added namespace comparison for xsl:number count function (Bug 129057)
authorWilliam M. Brack <wbrack@src.gnome.org>
Sun, 21 Dec 2003 13:39:01 +0000 (13:39 +0000)
committerWilliam M. Brack <wbrack@src.gnome.org>
Sun, 21 Dec 2003 13:39:01 +0000 (13:39 +0000)
* libxslt/numbers.c: added namespace comparison for
  xsl:number count function (Bug 129057)

ChangeLog
libxslt/numbers.c

index 3b9620a..af9203c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Dec 21 21:38:11 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+       * libxslt/numbers.c: added namespace comparison for
+         xsl:number count function (Bug 129057)
+
 Sun Dec 21 13:56:48 CET 2003 Daniel Veillard <daniel@veillard.com>
 
        * tests/docs/Makefile.am tests/docs/bug-139.xml
index 668ca47..8adb09e 100644 (file)
@@ -663,9 +663,14 @@ xsltNumberFormatGetMultipleLevel(xsltTransformContextPtr context,
                        xmlXPathNextPrecedingSibling(parser, preceding)) {
                    if (count == NULL) {
                        if ((preceding->type == ancestor->type) &&
-                           /* FIXME */
-                           xmlStrEqual(preceding->name, ancestor->name))
-                           cnt++;
+                           xmlStrEqual(preceding->name, ancestor->name)){
+                           if ((preceding->ns == ancestor->ns) ||
+                               ((preceding->ns != NULL) &&
+                                (ancestor->ns != NULL) &&
+                                (xmlStrEqual(preceding->ns->href,
+                                    ancestor->ns->href) )))
+                               cnt++;
+                       }
                    } else {
                        if (xsltTestCompMatchList(context, preceding,
                                                  countPat))