node-set or nodeset?
Oxygen general issues.
-
- Posts: 5
- Joined: Fri Sep 22, 2017 11:34 am
node-set or nodeset?
Hello.
I have been using Oxygen with an old XSLT stylesheet for many years without issues, but when I revisited the stylesheet today, I suddenly get an error upon transformation of a XML file:
The offending function is: <xsl:for-each select="xalan:node-set($temp)">
Changing it to: <xsl:for-each select="xalan:nodeset($temp)"> throws no error and seens to work as before.
I cannot find any documentaion on why and how this occurs and if this fix is "safe".
I suspect the problem arose after a system upgrade on the Mac I am using, but I cannot be sure.
I have been using Oxygen with an old XSLT stylesheet for many years without issues, but when I revisited the stylesheet today, I suddenly get an error upon transformation of a XML file:
Code: Select all
Engine name: Xalan
Severity: fatal
Description: java.lang.NoSuchMethodException: For extension function, could not find method org.apache.xalan.lib.Extensions.nodeSet([ExpressionContext,] #RTREEFRAG).
Checked both static and instance methods.
Changing it to: <xsl:for-each select="xalan:nodeset($temp)"> throws no error and seens to work as before.
I cannot find any documentaion on why and how this occurs and if this fix is "safe".
I suspect the problem arose after a system upgrade on the Mac I am using, but I cannot be sure.
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: node-set or nodeset?
Hello,
The confusion over the name of this extension function is due to the fact that each XSLT 1.0 processor implemented it differently.
I found an article and table that clarifies this: Understanding the node-set() Function by Jirka Kosek - Support for node-set() in XSLT processors
In short, if your xalan namespace prefix is indeed declared to indicate Xalan (xmlns:xalan="http://xml.apache.org/xalan") then the name of the function is nodeset(). Otherwise, if the namespace is http://exslt.org/common (EXSLT), node-set() should be used.
Regards,
Adrian
The confusion over the name of this extension function is due to the fact that each XSLT 1.0 processor implemented it differently.
I found an article and table that clarifies this: Understanding the node-set() Function by Jirka Kosek - Support for node-set() in XSLT processors
In short, if your xalan namespace prefix is indeed declared to indicate Xalan (xmlns:xalan="http://xml.apache.org/xalan") then the name of the function is nodeset(). Otherwise, if the namespace is http://exslt.org/common (EXSLT), node-set() should be used.
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: 5
- Joined: Fri Sep 22, 2017 11:34 am
Re: node-set or nodeset?
Ok, thank you for the clarification.
Xalan is the processor in use by the host system, so I need to code for that.
Not sure if they support EXSLT.
Strange though that node-set has worked for years with the xalan prefix.
Anyway, thanks again.
Xalan is the processor in use by the host system, so I need to code for that.
Not sure if they support EXSLT.
Strange though that node-set has worked for years with the xalan prefix.
Anyway, thanks again.
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