Passing A Parameter As A Node
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 1
- Joined: Wed Sep 02, 2009 9:45 pm
Passing A Parameter As A Node
Post by jeromebridge »
I have the following parameter defined in my XSLT:
How can I setup the parameters in my XSLT scenario to pass a valid XML document to this parameter. Everything I've tried passes a string.
Code: Select all
<xsl:param name="param1" as="node()" select="node()" />
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Passing A Parameter As A Node
Post by sorin_ristache »
Hello,
We plan to allow setting XSLT parameters of type document in a future version. In the current version all parameters set in the Configure Parameters dialog are of type String. Until we implement that you can use an additional stylesheet that loads the XML document and passes it to your stylesheet and set the additional stylesheet in the transformation scenario. The additional stylesheet can be:
Regards,
Sorin
We plan to allow setting XSLT parameters of type document in a future version. In the current version all parameters set in the Configure Parameters dialog are of type String. Until we implement that you can use an additional stylesheet that loads the XML document and passes it to your stylesheet and set the additional stylesheet in the transformation scenario. The additional stylesheet can be:
Code: Select all
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="your-stylesheet.xsl"/>
<xsl:param name="your-param" select="document('path-of-XML-file.xml')"/>
</xsl:stylesheet>
Regards,
Sorin
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Passing A Parameter As A Node
Post by sorin_ristache »
Hello,
Starting with Oxygen 12.2 which will be released in April 2011 each parameter from the XSLT and XQuery transformation scenarios will have an XPath checkbox that will allow setting the type of the parameter to XPath. That means you will select the XPath checkbox for your parameter and will set document('path-of-XML-file.xml') as value. The expression document('path-of-XML-file.xml') will be evaluated as XPath expression and the result will be passed to your XSLT transformation.
Regards,
Sorin
Starting with Oxygen 12.2 which will be released in April 2011 each parameter from the XSLT and XQuery transformation scenarios will have an XPath checkbox that will allow setting the type of the parameter to XPath. That means you will select the XPath checkbox for your parameter and will set document('path-of-XML-file.xml') as value. The expression document('path-of-XML-file.xml') will be evaluated as XPath expression and the result will be passed to your XSLT transformation.
Regards,
Sorin
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