Adding Parameters to an XSLT Transformation
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 47
- Joined: Mon Jun 26, 2006 10:40 pm
Adding Parameters to an XSLT Transformation
Hi all,
I have an input-less XSLT stylesheet [1] that generates a catalog file. I've figured out how to apply it from the CLI, but I'm stumped when it comes to adding the correct Parameters in the Scenario dialog(s).
I go into Configure Transformation Scenario(s) > New > XSLT Transformation > Parameters and I'm not quite sure what to enter in the Configure parameters. Is it just the template name (e.g. "main")? Or do I need to key the entire template into the Add Parameter dialog?
Thanks!
bds
[1] XSLT:
I have an input-less XSLT stylesheet [1] that generates a catalog file. I've figured out how to apply it from the CLI, but I'm stumped when it comes to adding the correct Parameters in the Scenario dialog(s).
I go into Configure Transformation Scenario(s) > New > XSLT Transformation > Parameters and I'm not quite sure what to enter in the Configure parameters. Is it just the template name (e.g. "main")? Or do I need to key the entire template into the Add Parameter dialog?
Thanks!
bds
[1] XSLT:
Code: Select all
?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<xsl:output method="xml"/>
<!-- collection() to grab documents -->
<xsl:variable name="docs" select="collection('file:///usr/home/bds/Documents/tdh-test/all-tdh/?select=*.xml;recurse=yes;on-error=warn')"/>
<xsl:template name="main">
<xsl:result-document href="tdh-catalog.xml" indent="yes">
<catalog>
<xsl:for-each select="$docs">
<doc href="{substring-after(document-uri(.), 'tdh-test/')}"/><xsl:value-of select="' '"/>
</xsl:for-each>
</catalog>
</xsl:result-document>
</xsl:template>
</xsl:stylesheet>
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Adding Parameters to an XSLT Transformation
Hi,
The Parameters dialog is meant for specifying values for the stylesheet parameters (xsl:param) if any.
To specify the main template and mode press the Advanced options button (cogwheel icon next to the Transformer combo) and fill the corresponding fields.
Regards,
Adrian
The Parameters dialog is meant for specifying values for the stylesheet parameters (xsl:param) if any.
To specify the main template and mode press the Advanced options button (cogwheel icon next to the Transformer combo) and fill the corresponding fields.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 47
- Joined: Mon Jun 26, 2006 10:40 pm
Re: Adding Parameters to an XSLT Transformation
Hi Adrian,
thanks so much for the response. That's great! I see the options there. I appreciate the guidance!
Best,
BDS
Also: TIL the difference between a combo box and a dropdown/drop-down menu.
thanks so much for the response. That's great! I see the options there. I appreciate the guidance!
Best,
BDS
Also: TIL the difference between a combo box and a dropdown/drop-down menu.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service