Bug #4624
closed
Matching with namespaces in SaxonJS / NodeJS
Category:
XSLT Conformance
Fix Committed on JS Branch:
2
Description
Using SaxonJS and invoking from the node-js CL, I am finding that namespaces are not lining up as expected.
An XSLT is attached. It can be run on itself. It shows two key declarations, both of which should work, but only one does. The one that does not work is relying on an xpath-default-namespace setting for matching. The one that works uses an explicit namespace prefix (matching an element with an unprefixed name in the input document). Plain template matches work fine with the xpath-default-namespace setting.
Thanks! Wendell
Files
- Project changed from Saxon to SaxonJS
- Category set to XSLT Conformance
- Status changed from New to In Progress
Created XSLT3 test case key-098. Problem reproduced.
Seems to be an XX compiler problem: the key in question compiles to
{
"N": "p.nodeTest",
"role": "match",
"test": "NE nQ{}data",
"sType": "1NE nQ{}data",
"ns": "= xml=~ fn=~ xsl=~ xs=~ math=~ "
},
which is clearly incorrect.
- Status changed from In Progress to Resolved
- Assignee set to Michael Kay
- Applies to JS Branch 2.0 added
- Fix Committed on JS Branch 2.0 added
Fixed. In the compiler module key.xsl, match pattern with match="xsl:key"
, pick up the $xpath-default-namespace
tunnel parameter and add the value to the generated pattern
element.
- Has duplicate Bug #4630: Elements not matched when using `match="foo[. is key('some-key', value)[1]]"` if elements are in a namespace and xpath-default-namespace is used added
- Applies to JS Branch 2 added
- Applies to JS Branch deleted (
2.0)
- Fix Committed on JS Branch 2 added
- Fix Committed on JS Branch deleted (
2.0)
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in JS Release set to Saxon-JS 2.1
Bug fix applied in the Saxon-JS 2.1 maintenance release.
Please register to edit this issue
Also available in: Atom
PDF
Tracking page