Skip to content

Commit

Permalink
Retain xsl:* node namespace declarations
Browse files Browse the repository at this point in the history
xsl:copy retains them, but a copy isn't being done here; the author copied
all attributes and nodes, but didn't catch namespace declarations.  Nor
would most people (or I); this came up when I was trying to test namespace
manipulation.

* src/compiler/generate-tests-helper.xsl (test:create-xslt-generator xsl:*):
  Copy namespace::*
  • Loading branch information
mikegerwitz committed Jul 5, 2016
1 parent 20c6b8a commit fcd852b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/compiler/generate-tests-helper.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@

<xsl:template match="xsl:*" mode="test:create-xslt-generator">
<xsl:element name="__x:{ local-name() }">
<!-- xsl:copy would normally retain namespace declarations -->
<xsl:sequence select="namespace::*" />
<xsl:apply-templates select="@*|node()" mode="test:create-xslt-generator"/>
</xsl:element>
</xsl:template>
Expand Down

0 comments on commit fcd852b

Please sign in to comment.