corrected my error from bug 135938 pointed out on the mailing list by Mark
authorWilliam M. Brack <wbrack@src.gnome.org>
Tue, 16 Mar 2004 00:53:41 +0000 (00:53 +0000)
committerWilliam M. Brack <wbrack@src.gnome.org>
Tue, 16 Mar 2004 00:53:41 +0000 (00:53 +0000)
* libxslt/xsltutils.c: corrected my error from bug 135938
  pointed out on the mailing list by Mark Vakoc.
* libxslt/transform.c: enhanced the error message for
  call-template when namespace is present.
* tests/general/bug-145.err: regenerated for new message

ChangeLog
libxslt/transform.c
libxslt/xsltutils.c
tests/general/bug-145.err

index 724b97d..bf9148c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Tue Mar 16 08:55:18 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+       * libxslt/xsltutils.c: corrected my error from bug 135938
+         pointed out on the mailing list by Mark Vakoc.
+       * libxslt/transform.c: enhanced the error message for
+         call-template when namespace is present.
+       * tests/general/bug-145.err: regenerated for new message
+
 Fri Mar 12 13:07:03 HKT 2004 William Brack <wbrack@mmm.com.hk>
 
        * libxslt/namespaces.c: added additional check to prevent
index dfb4d07..9d9fb06 100644 (file)
@@ -3006,8 +3006,15 @@ xsltCallTemplate(xsltTransformContextPtr ctxt, xmlNodePtr node,
     if (comp->templ == NULL) {
        comp->templ = xsltFindTemplate(ctxt, comp->name, comp->ns);
        if (comp->templ == NULL) {
-           xsltTransformError(ctxt, NULL, inst,
-                "xsl:call-template : template %s not found\n", comp->name);
+           if (comp->ns != NULL) {
+               xsltTransformError(ctxt, NULL, inst,
+                       "xsl:call-template : template %s:%s not found\n",
+                       comp->ns, comp->name);
+           } else {
+               xsltTransformError(ctxt, NULL, inst,
+                       "xsl:call-template : template %s not found\n",
+                       comp->name);
+           }
            return;
        }
     }
index 3ea4a1e..45183b4 100644 (file)
@@ -760,7 +760,7 @@ xsltGetQNameURI2(xsltStylesheetPtr style, xmlNodePtr node,
         xmlFree(qname);
         return(NULL);
     }
-    *name = xmlDictLookup(style->dict, (*name)+len, -1);
+    *name = xmlDictLookup(style->dict, (*name)+len+1, -1);
     xmlFree(qname);
     return(ns->href);
 }
index 25debc4..7f08c57 100644 (file)
@@ -1,5 +1,5 @@
 compilation error: file ./bug-145.xsl line 4 element transform
 xsl:version is missing: document may not be a stylesheet
 runtime error: file ./bug-145.xsl line 6 element call-template
-xsl:call-template : template :a not found
+xsl:call-template : template a:a not found
 no result for ./../docs/bug-145.xml