Project

Profile

Help

Bug #4696

closed

Different inherit-namespaces="no" result (10.2 and 9.9.1.7)

Added by Air Quick about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT conformance
Sprint/Milestone:
-
Start date:
2020-08-26
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
10, trunk
Fix Committed on Branch:
10, trunk
Fixed in Maintenance Release:
Platforms:

Description

Given this test.xsl, Saxon 10.2 and 9.9.1.7 behave differently.

$ cat test.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet exclude-result-prefixes="#all" version="3.0" xmlns:x="x"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:output indent="yes" />

  <xsl:template as="element(x:description)" name="xsl:initial-template">
    <xsl:element inherit-namespaces="no" name="description" namespace="x">
      <x:scenario>
        <e />
      </x:scenario>
    </xsl:element>
  </xsl:template>

</xsl:stylesheet>
$ java -jar SaxonHE9-9-1-7J/saxon9he.jar -it -xsl:test.xsl
<?xml version="1.0" encoding="UTF-8"?>
<description xmlns="x">
   <x:scenario xmlns:x="x" xmlns="">
      <e/>
   </x:scenario>
</description>
$ java -jar SaxonHE10-2J/saxon-he-10.2.jar -it -xsl:test.xsl
<?xml version="1.0" encoding="UTF-8"?>
<description xmlns="x">
   <x:scenario xmlns:x="x">
      <e/>
   </x:scenario>
</description>
$ 

10.2 doesn't set xmlns="" in <x:scenario>, whereas 9.9.1.7 does.

Please register to edit this issue

Also available in: Atom PDF