From 6b24dc9bde04c6df23a648f19f99666a972b59b6 Mon Sep 17 00:00:00 2001 From: "William M. Brack" Date: Tue, 16 Mar 2004 00:53:41 +0000 Subject: [PATCH] corrected my error from bug 135938 pointed out on the mailing list by Mark * 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 | 8 ++++++++ libxslt/transform.c | 11 +++++++++-- libxslt/xsltutils.c | 2 +- tests/general/bug-145.err | 2 +- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 724b97dd..bf9148ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Tue Mar 16 08:55:18 HKT 2004 William Brack + + * 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 * libxslt/namespaces.c: added additional check to prevent diff --git a/libxslt/transform.c b/libxslt/transform.c index dfb4d07f..9d9fb069 100644 --- a/libxslt/transform.c +++ b/libxslt/transform.c @@ -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; } } diff --git a/libxslt/xsltutils.c b/libxslt/xsltutils.c index 3ea4a1ef..45183b4f 100644 --- a/libxslt/xsltutils.c +++ b/libxslt/xsltutils.c @@ -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); } diff --git a/tests/general/bug-145.err b/tests/general/bug-145.err index 25debc41..7f08c57a 100644 --- a/tests/general/bug-145.err +++ b/tests/general/bug-145.err @@ -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