GNOME Bugzilla – Bug 110577
Incorrect handling namespace in xsl:copy-of template
Last modified: 2009-08-15 18:40:50 UTC
Looks like a bug with xsl:copy-of when copying node-set with many namespaces. I use following stylesheet and xml: ----t1.xsl---- <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ex="http://www.example.org/" version="1.0" > <xsl:output method="xml" /> <xsl:template match="/"> <xsl:copy-of select="/" /> </xsl:template> </xsl:stylesheet> ---/t1.xsl--- ---t1.xml--- <?xml version="1.0"?> <root xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ex="http://www.example.org/" > </root> ---/t1.xml--- When apply t1.xsl on t2.xsl I got: xsltproc t1.xsl t1.xml <?xml version="1.0"?> <root xmlns:ex="http://www.example.org/"> </root> but expect got t1.xml as-is. Looks like libxslt skip some "default" namespaces. Versions: Using libxml 20506, libxslt 10027 and libexslt 718 xsltproc was compiled against libxml 20504, libxslt 10027 and libexslt 718 libxslt 10027 was compiled against libxml 20504 libexslt 718 was compiled against libxml 20504 If need, I cen rebuild libxslt agains libxml2-2.5.6.
Okay, fixed in CVS and example added to the test suite: paphio:~/XSLT/tests/general -> xsltproc bug-118.xsl ../docs/bug-118.xml <?xml version="1.0"?> <root xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ex="http://www.example.org/"> </root> paphio:~/XSLT/tests/general -> thanks for the report, Daniel
this should be closed by release of libxslt-1.0.31 thanks, Daniel