Bug #4624
closedMatching with namespaces in SaxonJS / NodeJS
100%
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
Related issues
Updated by Michael Kay over 4 years ago
- Project changed from Saxon to SaxonJS
- Category set to XSLT Conformance
Updated by Michael Kay over 4 years ago
- Status changed from New to In Progress
Created XSLT3 test case key-098. Problem reproduced.
Updated by Michael Kay over 4 years ago
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.
Updated by Michael Kay over 4 years ago
- 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.
Updated by Debbie Lockett over 4 years ago
- 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
Updated by Community Admin almost 4 years ago
- Applies to JS Branch 2 added
- Applies to JS Branch deleted (
2.0)
Updated by Community Admin almost 4 years ago
- Fix Committed on JS Branch 2 added
- Fix Committed on JS Branch deleted (
2.0)
Updated by Debbie Lockett almost 4 years ago
- 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