Project

Profile

Help

Bug #4601

closed

Problem with namespaces containing "="

Added by Michael Kay over 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT Conformance
Sprint/Milestone:
-
Start date:
2020-06-17
Due date:
% Done:

100%

Estimated time:
Applies to JS Branch:
2
Fix Committed on JS Branch:
2
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

With the following stylesheet

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
              xmlns:x="http://example.org/x?subject="
              xmlns:y="http://example.org/x?subject"
               version="1.0"
>

<xsl:output method="text"/>

<xsl:template match="/">
 <xsl:variable name="test">
   <xsl:call-template name="get-test-data"/>
 </xsl:variable>
 <xsl:call-template name="dump-test-data">
   <xsl:with-param name="test" select="$test"/>
 </xsl:call-template>
</xsl:template>

<xsl:template name="get-test-data">
 <x:item>x</x:item>
 <y:item>y</y:item>
</xsl:template>

<xsl:template name="dump-test-data">
 <xsl:param name="test"/>
 <xsl:for-each select="$test/x:item | $test/y:item">
   <xsl:value-of select="."/>
 </xsl:for-each>
</xsl:template>

</xsl:transform>

Saxon-JS 2 outputs "y" (should be "xy")

Looking at the SEF files, for line 19 the XJ compiler outputs

                           "N": "elem",
                           "name": "x:item",
                           "nsuri": "http://example.org/x?subject=",
                           "namespaces": "x y",

while the XX compiler produces:

                           "N": "elem",
                           "name": "x:item",
                           "sType": "1NE nQ{http://example.org/x?subject=}item ",
                           "nsuri": "http://example.org/x?subject=",
                           "namespaces": "x=http://example.org/x?subject y=http://example.org/x?subject",
                           "line": "19",

The XX compiler output also includes incorrect ns attributes, for example:

"ns": "= xml=~ fn=~ xsl=~ x=http://example.org/x?subject y=http://example.org/x?subject "

Please register to edit this issue

Also available in: Atom PDF Tracking page