Project

Profile

Help

Bug #4681

closed

namespace declaration not honored: error XTDE1390 undeclared prefix: saxon

Added by Martin Honnen over 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT Conformance
Sprint/Milestone:
-
Start date:
2020-08-13
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

When I run the file

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  version="3.0"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  exclude-result-prefixes="#all"
  expand-text="yes">

  <xsl:output method="text"/>

  <xsl:template name="xsl:initial-template">
    <xsl:text xmlns:saxon="http://saxon.sf.net/">Run with {system-property('xsl:product-name')} {system-property('xsl:product-version')} {system-property('saxon:platform')}</xsl:text>
  </xsl:template>

</xsl:stylesheet>

with Saxon-JS 2 under Node (using xslt3 -it -xsl) I get an error:

Transformation failure: Error XTDE1390 at ns-problem2.xsl#10
    Undeclared prefix: saxon
Transformation failed: Error XTDE1390 at ns-problem2.xsl#10
    Undeclared prefix: saxon

The namespace is declared on the xsl:text element so I think this is a bug. Running the stylesheet through Saxon HE 10.1 Java does not give any error.

Moving the namespace declaration to the stylesheet's root element enables Saxon-JS to run the code but I think it should work with the local namespace declaration as well.

Please register to edit this issue

Also available in: Atom PDF Tracking page