Cannot pass static parameters to XSLT refactoring operation
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 922
- Joined: Thu May 02, 2019 2:32 pm
Cannot pass static parameters to XSLT refactoring operation
Post by chrispitude »
In refactoring operations, I would like to allow the user to turn some features on and off. So I tried defining some static stylesheet parameters, then used them to enable templates with use-when:
However, Oxygen gives me the following error when running the stylesheet from Oxygen's refactoring operation window:
But if I run it from the command line, it works:
then it works.
Am I doing something wrong? I found a similar issue here:
Configure transformation scenarios boolean
but I am not sure if it is the same issue.
Here is a testcase:
Code: Select all
<xsl:param name="remove.rev" as="xs:boolean" select="true()" static="yes"/>
<xsl:template use-when="$remove.rev"
match="...">
...
</xsl:template>
Code: Select all
Parameter $remove.rev cannot be supplied dynamically because it is declared as static
Code: Select all
java -jar ~/saxon/saxon-he-11.4.jar -s:OPENME2.dita -xsl:refactoring/post-release-cleanup.xsl
Am I doing something wrong? I found a similar issue here:
Configure transformation scenarios boolean
but I am not sure if it is the same issue.
Here is a testcase:
oxygen_refactoring_static_params.zip
You do not have the required permissions to view the files attached to this post.
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Cannot pass static parameters to XSLT refactoring operation
Hi Chris,
I added this internal issue based on your feedback:
EXM-52078 Cannot run XML refactoring scripts which use static params
Static parameters need to be set very early in the XSLT processor code, before the stylesheet is compiled, so right now we do not support setting static parameters.
Somehow we would need either to read the XSLT stylesheet before compiling it and find out what parameter is defined as static or not, or add some kind of attribute in the XML refactoring script on the <parameter> element to declare it as static so that we can know what parameters to set as static and what parameters to set as regular params.
Regards,
Radu
I added this internal issue based on your feedback:
EXM-52078 Cannot run XML refactoring scripts which use static params
Static parameters need to be set very early in the XSLT processor code, before the stylesheet is compiled, so right now we do not support setting static parameters.
Somehow we would need either to read the XSLT stylesheet before compiling it and find out what parameter is defined as static or not, or add some kind of attribute in the XML refactoring script on the <parameter> element to declare it as static so that we can know what parameters to set as static and what parameters to set as regular params.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “General XML Questions”
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