Project

Profile

Help

Bug #4660

Incorrect xpath-default-namespace on included files with XX compiler

Added by John Lumley 15 days ago. Updated 15 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2020-07-31
Due date:
% Done:

0%

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

Description

In the case where an included stylesheet has an @xpath-default-namespace on the stylesheet|transform element, and the top-level stylesheet does not, templates within the included stylesheet, which do not themselves have @xpath-default-namespace attributes, do not inherit the property from their parent.

Minimal reproduction of the problem attached.

bugXXX.xsl (468 Bytes) bugXXX.xsl John Lumley, 2020-07-31 12:02
bugXXXinc.xsl (380 Bytes) bugXXXinc.xsl John Lumley, 2020-07-31 12:02

History

#1 Updated by John Lumley 15 days ago

It appears to be an error in the static phase, as the result after static processing is:

<xsl:stylesheet xmlns:ex="http://ns.saxonica.com/xslt/export" xmlns:math="http://www.w3.org/2005/xpath-functions/math"
      xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="FOO" 
     version="3.0" ex:ns="xml=~ xsl=~ xs=~ math=~ =FOO">
   <xsl:template ex:ns="xml=~ xsl=~ xs=~ math=~ =FOO" ex:baseUri="http://localhost/XSLT3/special/bugXXXinc.xsl"
            ex:precLabel="A" ex:lineNr="2" match="a">
      <A ex:lineNr="3" ex:exclude="http://www.w3.org/2001/XMLSchema http://www.w3.org/2005/xpath-functions/math"/>
   </xsl:template>
   <xsl:template ex:ns="xml=~ xsl=~ xs=~ math=~ =FOO" ex:baseUri="http://localhost/XSLT3/special/bugXXX.xsl" 
        ex:precLabel="A" ex:lineNr="3" match="b" xpath-default-namespace="FOO">
      <B ex:lineNr="4" ex:exclude="http://www.w3.org/2001/XMLSchema http://www.w3.org/2005/xpath-functions/math"/>
   </xsl:template>
</xsl:stylesheet>

where the template matching b does not have an inherited @xpath-default-namespace from its original parent.

Please register to edit this issue

Also available in: Atom PDF Tracking page