small fixups related to the XPath changes in fixing #61290 Daniel
authorDaniel Veillard <veillard@src.gnome.org>
Mon, 4 Mar 2002 17:11:29 +0000 (17:11 +0000)
committerDaniel Veillard <veillard@src.gnome.org>
Mon, 4 Mar 2002 17:11:29 +0000 (17:11 +0000)
* libxslt/namespaces.c tests/general/bug-63.out: small fixups
  related to the XPath changes in fixing #61290
Daniel

ChangeLog
libxslt/namespaces.c
tests/general/bug-63.out

index 27b5760..fc4b40f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Mar  4 18:09:48 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+       * libxslt/namespaces.c tests/general/bug-63.out: small fixups
+         related to the XPath changes in fixing #61290
+         
 Mon Mar  4 12:57:21 CET 2002 Daniel Veillard <daniel@veillard.com>
 
        * libxslt/pattern.c: fixed bug #73363, bad tokenization of
index 7149e63..ee35b93 100644 (file)
@@ -252,6 +252,8 @@ xsltCopyNamespaceList(xsltTransformContextPtr ctxt, xmlNodePtr node,
        node = NULL;
 
     while (cur != NULL) {
+       if (cur->type != XML_NAMESPACE_DECL)
+           break;
        if (!xmlStrEqual(cur->href, XSLT_NAMESPACE)) {
            /* TODO apply cascading */
            URI = (const xmlChar *) xmlHashLookup(ctxt->style->nsAliases,
index 7ba9c3b..95f095f 100644 (file)
@@ -1,2 +1,22 @@
 <?xml version="1.0"?>
-<namespace><name>xsl</name><uri>http://www.w3.org/1999/XSL/Transform</uri><parent/></namespace><namespace><name>xml</name><uri>http://www.w3.org/XML/1998/namespace</uri><parent/></namespace>
+<namespace><name>xsl</name><uri>http://www.w3.org/1999/XSL/Transform</uri><parent><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:template match="*">
+<xsl:for-each select="namespace::*">
+<namespace>
+<name><xsl:value-of select="name()"/></name>
+<uri><xsl:value-of select="."/></uri>
+<parent><xsl:copy-of select=".."/></parent>
+</namespace>
+</xsl:for-each>
+</xsl:template>
+</xsl:stylesheet></parent></namespace><namespace><name>xml</name><uri>http://www.w3.org/XML/1998/namespace</uri><parent><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:template match="*">
+<xsl:for-each select="namespace::*">
+<namespace>
+<name><xsl:value-of select="name()"/></name>
+<uri><xsl:value-of select="."/></uri>
+<parent><xsl:copy-of select=".."/></parent>
+</namespace>
+</xsl:for-each>
+</xsl:template>
+</xsl:stylesheet></parent></namespace>