Project

Profile

Help

Bug #3923

closed

Invalid result-document output in Saxon-HE-9.9.0-1

Added by Vladimir Nesterovsky about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT conformance
Sprint/Milestone:
-
Start date:
2018-09-28
Due date:
% Done:

100%

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

Description

I've tested latest version of Saxon HE and got invalid output with duplicate namespace. The code looks like this:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="3.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns="x">

  <xsl:template match="/">
    <xsl:variable name="entity" as="element()">
      <unit/>
    </xsl:variable>

    <xsl:sequence select="$entity"/>
    
    <xsl:result-document href="out2.xml">
      <xsl:sequence select="$entity"/>
    </xsl:result-document>
  </xsl:template>

</xsl:stylesheet>

Any input xml should be supplied. Stylesheet produces two outputs.

out2.xml for me is like this:

<?xml version="1.0" encoding="UTF-8"?><unit xmlns="x" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="x"/>

Note xmlns twice.

Please register to edit this issue

Also available in: Atom PDF