diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | libxslt/transform.c | 4 | ||||
-rw-r--r-- | tests/docs/Makefile.am | 1 | ||||
-rw-r--r-- | tests/docs/bug-77.xml | 4 | ||||
-rw-r--r-- | tests/general/Makefile.am | 1 | ||||
-rw-r--r-- | tests/general/bug-77.out | 5 | ||||
-rw-r--r-- | tests/general/bug-77.xsl | 18 |
7 files changed, 37 insertions, 3 deletions
@@ -1,3 +1,10 @@ +Thu Mar 21 00:25:12 CET 2002 Daniel Veillard <daniel@veillard.com> + + * libxslt/transform.c: fixing bug #75603 + * tests/docs/Makefile.am tests/docs/bug-77.xml + tests/general/Makefile.am tests/general/bug-77.*: added a + specific example for bug #75603 in the regression tests + Wed Mar 20 17:49:43 CET 2002 Daniel Veillard <daniel@veillard.com> * python/Makefile.am: Art Haas pointed a stupid error diff --git a/libxslt/transform.c b/libxslt/transform.c index 00c374c2..a0805eb3 100644 --- a/libxslt/transform.c +++ b/libxslt/transform.c @@ -1996,9 +1996,7 @@ xsltCopy(xsltTransformContextPtr ctxt, xmlNodePtr node, if (ctxt->insert->type == XML_ELEMENT_NODE) { xmlAttrPtr attr = (xmlAttrPtr) node, ret = NULL, cur; if (attr->ns != NULL) { - if ((!xmlStrEqual(attr->ns->href, XSLT_NAMESPACE)) && - (xmlStrncasecmp(attr->ns->prefix, - (xmlChar *)"xml", 3))) { + if (!xmlStrEqual(attr->ns->href, XSLT_NAMESPACE)) { ret = xmlCopyProp(ctxt->insert, attr); ret->ns = xsltGetNamespace(ctxt, node, attr->ns, ctxt->insert); diff --git a/tests/docs/Makefile.am b/tests/docs/Makefile.am index 73874c3e..aacbaed7 100644 --- a/tests/docs/Makefile.am +++ b/tests/docs/Makefile.am @@ -77,6 +77,7 @@ EXTRA_DIST = \ bug-74.xml \ bug-75.xml \ bug-76.xml \ + bug-77.xml \ character.xml \ array.xml \ items.xml diff --git a/tests/docs/bug-77.xml b/tests/docs/bug-77.xml new file mode 100644 index 00000000..e414475e --- /dev/null +++ b/tests/docs/bug-77.xml @@ -0,0 +1,4 @@ +<foo> +<bar id="Wowie" xml:lang="en">Hi</bar> +<bar id="Zowie" xml:lang="fr">bonjour</bar> +</foo> diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am index 21da13ad..e33e242d 100644 --- a/tests/general/Makefile.am +++ b/tests/general/Makefile.am @@ -80,6 +80,7 @@ EXTRA_DIST = \ bug-74.out bug-74.xsl \ bug-75.out bug-75.xsl \ bug-76.out bug-76.xsl \ + bug-77.out bug-77.xsl \ character.out character.xsl \ character2.out character2.xsl \ itemschoose.out itemschoose.xsl \ diff --git a/tests/general/bug-77.out b/tests/general/bug-77.out new file mode 100644 index 00000000..a6392e50 --- /dev/null +++ b/tests/general/bug-77.out @@ -0,0 +1,5 @@ +<?xml version="1.0"?> +<foo> +<bar xml:lang="en" id="Wowie">Hi</bar> +<bar xml:lang="fr" id="Zowie">bonjour</bar> +</foo> diff --git a/tests/general/bug-77.xsl b/tests/general/bug-77.xsl new file mode 100644 index 00000000..fabd6f10 --- /dev/null +++ b/tests/general/bug-77.xsl @@ -0,0 +1,18 @@ +<?xml version="1.0"?> <xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> +<!-- I have tried this with xmlns:xml="http://www.w3.org/XML/1998/namespace" + defined above, too + --> + +<xsl:template match="/"> +<xsl:apply-templates mode="copy"/> +</xsl:template> + +<xsl:template match="@* | node()" mode="copy"> +<xsl:copy> +<xsl:apply-templates select="node() | @*" mode="copy"/> +</xsl:copy> +</xsl:template> + +</xsl:stylesheet> |