mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-09-15 16:01:08 +03:00
* libxslt/transform.c: fixing bug #115913 for xsl:copy with namespace nodes. * tests/docs/Makefile.am tests/docs/bug-122.* tests/general/Makefile.am tests/general/bug-122*: added the test to the regression suite. Daniel
18 lines
585 B
XML
18 lines
585 B
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<xsl:stylesheet version="1.0"
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
|
|
|
|
<xsl:template match="doc">
|
|
<xsl:variable name="node" select="."/>
|
|
<xsl:element name="Document" namespace="{namespace-uri(.)}">
|
|
<xsl:for-each select="namespace::*">
|
|
<xsl:if test="string(.) != namespace-uri($node)">
|
|
<xsl:copy/>
|
|
</xsl:if>
|
|
</xsl:for-each>
|
|
</xsl:element>
|
|
</xsl:template>
|
|
|
|
</xsl:stylesheet>
|