Eliminated a tiny difference wrt to the old behaviour in the naming of
authorKasimier T. Buchcik <kbuchcik@src.gnome.org>
Tue, 6 Jun 2006 09:47:12 +0000 (09:47 +0000)
committerKasimier T. Buchcik <kbuchcik@src.gnome.org>
Tue, 6 Jun 2006 09:47:12 +0000 (09:47 +0000)
* libxslt/attributes.c: Eliminated a tiny difference wrt to
  the old behaviour in the naming of newly generated ns-decls
  in xsltAttributeInternal().

ChangeLog
libxslt/attributes.c

index 1523c43..9b6f9e2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Jun  6 11:44:34 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+       * libxslt/attributes.c: Eliminated a tiny difference wrt to
+         the old behaviour in the naming of newly generated ns-decls
+         in xsltAttributeInternal().
+
 Thu Jun  1 15:06:31 CEST 2006 Daniel Veillard <daniel@veillard.com>
 
        * configure.in: fix a problem in Python detection
index 785e654..2f5d660 100644 (file)
@@ -918,7 +918,7 @@ xsltAttributeInternal(xsltTransformContextPtr ctxt, xmlNodePtr node,
        {
            const xmlChar *basepref = prefix;
            xmlChar pref[30];
-           int counter = 0;
+           int counter = 1;
            
            if (prefix != NULL)
                basepref = prefix;
@@ -926,7 +926,7 @@ xsltAttributeInternal(xsltTransformContextPtr ctxt, xmlNodePtr node,
                basepref = xmlStrdup(BAD_CAST "ns");
            
            do {
-               snprintf((char *) pref, 30, "%s_%d",
+               snprintf((char *) pref, 30, "%s%d",
                    basepref, counter++);
                ns = xmlSearchNs(targetElem->doc, targetElem, BAD_CAST pref);
                if (counter > 1000) {