fixed bug #124286 - detect invalid name on template
authorWilliam M. Brack <wbrack@src.gnome.org>
Sun, 2 Nov 2003 17:12:37 +0000 (17:12 +0000)
committerWilliam M. Brack <wbrack@src.gnome.org>
Sun, 2 Nov 2003 17:12:37 +0000 (17:12 +0000)
* libxslt/xslt.c: fixed bug #124286 - detect invalid name on
  template

ChangeLog
libxslt/xslt.c

index fd7eea6..4788777 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Nov  2 09:07:32 PST 2003 William Brack <wbrack@mmm.com.hk>
+
+       * libxslt/xslt.c: fixed bug #124286 - detect invalid name on
+         template
+       
 Sun Nov  2 10:51:58 CET 2003 Daniel Veillard <daniel@veillard.com>
 
        * Makefile.am configure.in libxslt.spec.in doc/libxslt-api.xml
index 0c5287d..b505f66 100644 (file)
@@ -1704,6 +1704,12 @@ xsltParseStylesheetTemplate(xsltStylesheetPtr style, xmlNodePtr template) {
            if (style != NULL) style->errors++;
            goto error;
        } else {
+           if (xmlValidateNCName(prop,0)) {
+               xsltTransformError(NULL, style, template,
+                   "xsl:template : error invalid name '%s'\n", prop);
+               if (style != NULL) style->errors++;
+               goto error;
+           } 
            ret->name = prop;
            if (URI != NULL)
                ret->nameURI = xmlStrdup(URI);