Cleanup messages and comments
authorWilliam M. Brack <wbrack@src.gnome.org>
Fri, 6 Jul 2001 06:36:32 +0000 (06:36 +0000)
committerWilliam M. Brack <wbrack@src.gnome.org>
Fri, 6 Jul 2001 06:36:32 +0000 (06:36 +0000)
ChangeLog
libxslt/attributes.c
libxslt/functions.c
libxslt/keys.c
libxslt/pattern.c
libxslt/preproc.c
libxslt/templates.c
libxslt/transform.c
libxslt/variables.c
libxslt/xslt.c
libxslt/xsltutils.c

index 00c8dad..0bee06b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Jul  6 14:30:00 HKT 2001 William Brack <wbrack@mmm.com.hk>
+
+       * cleaned up many comments and error messages
+
 Fri Jul  6 01:43:51 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
 
        * configure.in libxslt/xsltwin32config.h: released 0.14.0
index a04156e..c2ade9d 100644 (file)
@@ -187,14 +187,14 @@ xsltMergeAttrElemList(xsltAttrElemPtr list, xsltAttrElemPtr old) {
     while (old != NULL) {
 
        /*
-        * Check taht the attribute is not yet in the list
+        * Check that the attribute is not yet in the list
         */
        cur = list;
        add = 1;
        while (cur != NULL) {
            if (cur->attr == old->attr) {
                xsltGenericError(xsltGenericErrorContext,
-            "xslt:attribute-set : use-attribute-sets recursion detected\n");
+            "xsl:attribute-set : use-attribute-sets recursion detected\n");
                return(list);
            }
            if (xmlStrEqual(cur->attr->name, old->attr->name)) {
@@ -255,7 +255,7 @@ xsltParseStylesheetAttributeSet(xsltStylesheetPtr style, xmlNodePtr cur) {
     prop = xsltGetNsProp(cur, (const xmlChar *)"name", XSLT_NAMESPACE);
     if (prop == NULL) {
        xsltGenericError(xsltGenericErrorContext,
-            "xslt:attribute-set : name is missing\n");
+            "xsl:attribute-set : name is missing\n");
        goto error;
     }
 
@@ -286,7 +286,7 @@ xsltParseStylesheetAttributeSet(xsltStylesheetPtr style, xmlNodePtr cur) {
        if (IS_XSLT_ELEM(list)) {
            if (!IS_XSLT_NAME(list, "attribute")) {
                xsltGenericError(xsltGenericErrorContext,
-                   "xslt:attribute-set : unexpected child xsl:%s\n",
+                   "xsl:attribute-set : unexpected child xsl:%s\n",
                                 list->name);
            } else {
 #ifdef WITH_XSLT_DEBUG_ATTRIBUTES
@@ -297,7 +297,7 @@ xsltParseStylesheetAttributeSet(xsltStylesheetPtr style, xmlNodePtr cur) {
            }
        } else {
            xsltGenericError(xsltGenericErrorContext,
-               "xslt:attribute-set : unexpected child %s\n", list->name);
+               "xsl:attribute-set : unexpected child %s\n", list->name);
        }
        list = list->next;
     }
@@ -327,7 +327,7 @@ xsltParseStylesheetAttributeSet(xsltStylesheetPtr style, xmlNodePtr cur) {
            xsltAttrElemPtr values2;
 #ifdef WITH_XSLT_DEBUG_ATTRIBUTES
            xsltGenericDebug(xsltGenericDebugContext,
-               "xslt:attribute-set : %s adds use %s\n", ncname, attribute);
+               "xsl:attribute-set : %s adds use %s\n", ncname, attribute);
 #endif
            ncname2 = xmlSplitQName2(attribute, &prefix2);
            if (ncname2 == NULL) {
index bba428f..5006416 100644 (file)
@@ -502,7 +502,7 @@ xsltSystemPropertyFunction(xmlXPathParserContextPtr ctxt, int nargs){
            nsURI = xmlXPathNsLookup(ctxt->context, prefix);
            if (nsURI == NULL) {
                xsltGenericError(xsltGenericErrorContext,
-                   "system-property(): prefix %s is not bound\n", prefix);
+                   "system-property() : prefix %s is not bound\n", prefix);
            }
        }
 
@@ -577,7 +577,7 @@ xsltElementAvailableFunction(xmlXPathParserContextPtr ctxt, int nargs){
     }
     if ((ctxt->value == NULL) || (ctxt->value->type != XPATH_STRING)) {
        xsltGenericError(xsltGenericErrorContext,
-           "element-available invalid arg expecting a string\n");
+           "element-available() : invalid arg expecting a string\n");
        ctxt->error = XPATH_INVALID_TYPE;
        return;
     }
@@ -608,7 +608,7 @@ xsltFunctionAvailableFunction(xmlXPathParserContextPtr ctxt, int nargs){
     }
     if ((ctxt->value == NULL) || (ctxt->value->type != XPATH_STRING)) {
        xsltGenericError(xsltGenericErrorContext,
-           "function-available invalid arg expecting a string\n");
+           "function-available() : invalid arg expecting a string\n");
        ctxt->error = XPATH_INVALID_TYPE;
        return;
     }
@@ -621,7 +621,7 @@ xsltFunctionAvailableFunction(xmlXPathParserContextPtr ctxt, int nargs){
        nsURI = xmlXPathNsLookup(ctxt->context, prefix);
        if (nsURI == NULL) {
            xsltGenericError(xsltGenericErrorContext,
-               "function-available(): prefix %s is not bound\n", prefix);
+               "function-available() : prefix %s is not bound\n", prefix);
        }
     }
 
@@ -652,7 +652,7 @@ xsltCurrentFunction(xmlXPathParserContextPtr ctxt, int nargs){
 
     if (nargs != 0) {
         xsltGenericError(xsltGenericErrorContext,
-               "document() : function uses no argument\n");
+               "current() : function uses no argument\n");
        ctxt->error = XPATH_INVALID_ARITY;
        return;
     }
index 6bd244e..5d31b67 100644 (file)
@@ -257,14 +257,14 @@ xsltAddKey(xsltStylesheetPtr style, const xmlChar *name,
     key->comp = xmlXPathCompile(pattern);
     if (key->comp == NULL) {
         xsltGenericError(xsltGenericErrorContext,
-               "xslt:key : XPath pattern compilation failed '%s'\n",
+               "xsl:key : XPath pattern compilation failed '%s'\n",
                         pattern);
        style->errors++;
     }
     key->usecomp = xmlXPathCompile(use);
     if (key->usecomp == NULL) {
         xsltGenericError(xsltGenericErrorContext,
-               "xslt:key : XPath pattern compilation failed '%s'\n",
+               "xsl:key : XPath pattern compilation failed '%s'\n",
                         use);
        style->errors++;
     }
index 489da70..3523b20 100644 (file)
@@ -237,7 +237,7 @@ xsltCompMatchAdd(xsltCompMatchPtr comp, xsltOp op, xmlChar *value,
                 xmlChar *value2) {
     if (comp->nbStep >= 20) {
         xsltGenericError(xsltGenericErrorContext,
-               "xsltCompMatchAddOp: overflow\n");
+               "xsltCompMatchAdd: overflow\n");
         return(-1);
     }
     comp->steps[comp->nbStep].op = op;
@@ -886,7 +886,7 @@ xsltScanName(xsltParserContextPtr ctxt) {
        len++;
        if (len >= XML_MAX_NAMELEN) {
            xmlGenericError(xmlGenericErrorContext, 
-              "xmlScanName: reached XML_MAX_NAMELEN limit\n");
+              "xsltScanName: reached XML_MAX_NAMELEN limit\n");
            while ((IS_LETTER(NXT(len))) || (IS_DIGIT(NXT(len))) ||
                   (NXT(len) == '.') || (NXT(len) == '-') ||
                   (NXT(len) == '_') || (NXT(len) == ':') || 
@@ -928,7 +928,7 @@ xsltScanNCName(xsltParserContextPtr ctxt) {
        len++;
        if (len >= XML_MAX_NAMELEN) {
            xmlGenericError(xmlGenericErrorContext, 
-              "xmlScanNCName: reached XML_MAX_NAMELEN limit\n");
+              "xsltScanNCName: reached XML_MAX_NAMELEN limit\n");
            while ((IS_LETTER(NXT(len))) || (IS_DIGIT(NXT(len))) ||
                   (NXT(len) == '.') || (NXT(len) == '-') ||
                   (NXT(len) == '_') ||
@@ -968,7 +968,7 @@ xsltScanQName(xsltParserContextPtr ctxt, xmlChar **prefix) {
 
 /*
  * xsltCompileIdKeyPattern:
- * @comp:  the compilation context
+ * @ctxt:  the compilation context
  * @name:  a preparsed name
  * @aid:  whether id/key are allowed there
  *
@@ -1104,7 +1104,7 @@ error:
 
 /**
  * xsltCompileStepPattern:
- * @comp:  the compilation context
+ * @ctxt:  the compilation context
  * @token:  a posible precompiled name
  *
  * Compile the XSLT StepPattern and generates a precompiled
@@ -1147,7 +1147,7 @@ xsltCompileStepPattern(xsltParserContextPtr ctxt, xmlChar *token) {
            ns = xmlSearchNs(ctxt->doc, ctxt->elem, prefix);
            if (ns == NULL) {
                xsltGenericError(xsltGenericErrorContext,
-                   "xsl: pattern, no namespace bound to prefix %s\n",
+                   "xsltCompileStepPattern : no namespace bound to prefix %s\n",
                                 prefix);
            } else {
                URL = xmlStrdup(ns->href);
@@ -1341,7 +1341,7 @@ error:
 
 /**
  * xsltCompileLocationPathPattern:
- * @comp:  the compilation context
+ * @ctxt:  the compilation context
  *
  * Compile the XSLT LocationPathPattern and generates a precompiled
  * form suitable for fast matching.
@@ -1726,11 +1726,11 @@ xsltAddTemplate(xsltStylesheetPtr style, xsltTemplatePtr cur,
 /**
  * xsltGetTemplate:
  * @ctxt:  a XSLT process context
- * @mode:  the mode 
+ * @node:  the node being processed
  * @style:  the current style
  *
  * Finds the template applying to this node, if @style is non-NULL
- * it means one need to look for the next imported template in scope.
+ * it means one needs to look for the next imported template in scope.
  *
  * Returns the xsltTemplatePtr or NULL if not found
  */
index 599388a..d7c2bfb 100644 (file)
@@ -411,7 +411,7 @@ xsltTextComp(xsltStylesheetPtr style, xmlNodePtr inst) {
        } else if (!xmlStrEqual(prop,
                                (const xmlChar *)"no")){
            xsltGenericError(xsltGenericErrorContext,
-"xslt:text: disable-output-escaping allow only yes or no\n");
+"xsl:text: disable-output-escaping allows only yes or no\n");
            style->warnings++;
        }
        xmlFree(prop);
@@ -550,14 +550,14 @@ xsltCopyOfComp(xsltStylesheetPtr style, xmlNodePtr inst) {
                                XSLT_NAMESPACE);
     if (comp->select == NULL) {
        xsltGenericError(xsltGenericErrorContext,
-            "xslt:copy-of : select is missing\n");
+            "xsl:copy-of : select is missing\n");
        style->errors++;
        return;
     }
     comp->comp = xmlXPathCompile(comp->select);
     if (comp->comp == NULL) {
        xsltGenericError(xsltGenericErrorContext,
-            "xslt:copy-of : could not compile select expression '%s'\n",
+            "xsl:copy-of : could not compile select expression '%s'\n",
                         comp->select);
        style->errors++;
     }
@@ -592,7 +592,7 @@ xsltValueOfComp(xsltStylesheetPtr style, xmlNodePtr inst) {
        } else if (!xmlStrEqual(prop,
                                (const xmlChar *)"no")){
            xsltGenericError(xsltGenericErrorContext,
-"value-of: disable-output-escaping allow only yes or no\n");
+"xsl:value-of : disable-output-escaping allows only yes or no\n");
            style->warnings++;
        }
        xmlFree(prop);
@@ -601,14 +601,14 @@ xsltValueOfComp(xsltStylesheetPtr style, xmlNodePtr inst) {
                                XSLT_NAMESPACE);
     if (comp->select == NULL) {
        xsltGenericError(xsltGenericErrorContext,
-            "xslt:value-of : select is missing\n");
+            "xsl:value-of : select is missing\n");
        style->errors++;
        return;
     }
     comp->comp = xmlXPathCompile(comp->select);
     if (comp->comp == NULL) {
        xsltGenericError(xsltGenericErrorContext,
-            "xslt:value-of : could not compile select expression '%s'\n",
+            "xsl:value-of : could not compile select expression '%s'\n",
                         comp->select);
        style->errors++;
     }
@@ -640,7 +640,7 @@ xsltWithParamComp(xsltStylesheetPtr style, xmlNodePtr inst) {
     prop = xsltGetNsProp(inst, (const xmlChar *)"name", XSLT_NAMESPACE);
     if (prop == NULL) {
        xsltGenericError(xsltGenericErrorContext,
-            "xslt:with-param : name is missing\n");
+            "xsl:with-param : name is missing\n");
        style->errors++;
     } else {
         const xmlChar *URI;
@@ -666,7 +666,7 @@ xsltWithParamComp(xsltStylesheetPtr style, xmlNodePtr inst) {
        comp->comp = xmlXPathCompile(comp->select);
        if (comp->comp == NULL) {
            xsltGenericError(xsltGenericErrorContext,
-                "xslt:param : could not compile select expression '%s'\n",
+                "xsl:param : could not compile select expression '%s'\n",
                             comp->select);
            style->errors++;
        }
@@ -826,7 +826,7 @@ xsltCallTemplateComp(xsltStylesheetPtr style, xmlNodePtr inst) {
     prop = xsltGetNsProp(inst, (const xmlChar *)"name", XSLT_NAMESPACE);
     if (prop == NULL) {
        xsltGenericError(xsltGenericErrorContext,
-            "xslt:call-template : name is missing\n");
+            "xsl:call-template : name is missing\n");
        style->errors++;
     } else {
         const xmlChar *URI;
@@ -893,7 +893,7 @@ xsltApplyTemplatesComp(xsltStylesheetPtr style, xmlNodePtr inst) {
        comp->comp = xmlXPathCompile(comp->select);
        if (comp->comp == NULL) {
            xsltGenericError(xsltGenericErrorContext,
-     "xslt:apply-templates : could not compile select expression '%s'\n",
+     "xsl:apply-templates : could not compile select expression '%s'\n",
                             comp->select);
            style->errors++;
        }
@@ -944,14 +944,14 @@ xsltIfComp(xsltStylesheetPtr style, xmlNodePtr inst) {
     comp->test = xsltGetNsProp(inst, (const xmlChar *)"test", XSLT_NAMESPACE);
     if (comp->test == NULL) {
        xsltGenericError(xsltGenericErrorContext,
-            "xslt:if : test is not defined\n");
+            "xsl:if : test is not defined\n");
        style->errors++;
        return;
     }
     comp->comp = xmlXPathCompile(comp->test);
     if (comp->comp == NULL) {
        xsltGenericError(xsltGenericErrorContext,
-            "xslt:if : could not compile test expression '%s'\n",
+            "xsl:if : could not compile test expression '%s'\n",
                         comp->test);
        style->errors++;
     }
@@ -1015,13 +1015,13 @@ xsltForEachComp(xsltStylesheetPtr style, xmlNodePtr inst) {
                                XSLT_NAMESPACE);
     if (comp->select == NULL) {
        xsltGenericError(xsltGenericErrorContext,
-               "xslt:for-each : select is missing\n");
+               "xsl:for-each : select is missing\n");
        style->errors++;
     } else {
        comp->comp = xmlXPathCompile(comp->select);
        if (comp->comp == NULL) {
            xsltGenericError(xsltGenericErrorContext,
-     "xslt:for-each : could not compile select expression '%s'\n",
+     "xsl:for-each : could not compile select expression '%s'\n",
                             comp->select);
            style->errors++;
        }
@@ -1055,7 +1055,7 @@ xsltVariableComp(xsltStylesheetPtr style, xmlNodePtr inst) {
     prop = xsltGetNsProp(inst, (const xmlChar *)"name", XSLT_NAMESPACE);
     if (prop == NULL) {
        xsltGenericError(xsltGenericErrorContext,
-            "xslt:variable : name is missing\n");
+            "xsl:variable : name is missing\n");
        style->errors++;
     } else {
         const xmlChar *URI;
@@ -1081,7 +1081,7 @@ xsltVariableComp(xsltStylesheetPtr style, xmlNodePtr inst) {
        comp->comp = xmlXPathCompile(comp->select);
        if (comp->comp == NULL) {
            xsltGenericError(xsltGenericErrorContext,
-                "xslt:variable : could not compile select expression '%s'\n",
+                "xsl:variable : could not compile select expression '%s'\n",
                             comp->select);
            style->errors++;
        }
@@ -1118,7 +1118,7 @@ xsltParamComp(xsltStylesheetPtr style, xmlNodePtr inst) {
     prop = xsltGetNsProp(inst, (const xmlChar *)"name", XSLT_NAMESPACE);
     if (prop == NULL) {
        xsltGenericError(xsltGenericErrorContext,
-            "xslt:param : name is missing\n");
+            "xsl:param : name is missing\n");
        style->errors++;
     } else {
         const xmlChar *URI;
@@ -1144,7 +1144,7 @@ xsltParamComp(xsltStylesheetPtr style, xmlNodePtr inst) {
        comp->comp = xmlXPathCompile(comp->select);
        if (comp->comp == NULL) {
            xsltGenericError(xsltGenericErrorContext,
-                "xslt:param : could not compile select expression '%s'\n",
+                "xsl:param : could not compile select expression '%s'\n",
                             comp->select);
            style->errors++;
        }
@@ -1285,7 +1285,7 @@ xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr inst) {
            xsltDocumentComp(style, inst);
        } else {
            xsltGenericError(xsltGenericDebugContext,
-                "xsltStylePreCompute: unknown xslt:%s\n", inst->name);
+                "xsltStylePreCompute: unknown xsl:%s\n", inst->name);
            style->warnings++;
        }
        /*
index 7dbd7fc..f4012ba 100644 (file)
@@ -43,7 +43,7 @@
  * @ctxt:  the XSLT transformation context
  * @comp:  the XPath compiled expression
  * @nsList:  the namespaces in scope
- * @int nsNr:  the number of namespaces in scope
+ * @nsNr:  the number of namespaces in scope
  *
  * Process the expression using XPath and evaluate the result as
  * an XPath predicate
@@ -136,7 +136,7 @@ xsltEvalXPathString(xsltTransformContextPtr ctxt, xmlXPathCompExprPtr comp) {
            res->stringval = NULL;
        } else {
            xsltGenericError(xsltGenericErrorContext,
-                "xpath : string() function didn't returned a String\n");
+                "xpath : string() function didn't return a String\n");
        }
        xmlXPathFreeObject(res);
     }
@@ -292,7 +292,7 @@ xsltEvalAttrValueTemplate(xsltTransformContextPtr ctxt, xmlNodePtr node,
     ret = xsltAttrTemplateValueProcess(ctxt, expr);
 #ifdef WITH_XSLT_DEBUG_TEMPLATES
     xsltGenericDebug(xsltGenericDebugContext,
-        "xsltEvalXPathString: %s returns %s\n", expr, ret);
+        "xsltEvalAttrValueTemplate: %s returns %s\n", expr, ret);
 #endif
     if (expr != NULL)
        xmlFree(expr);
@@ -304,7 +304,7 @@ xsltEvalAttrValueTemplate(xsltTransformContextPtr ctxt, xmlNodePtr node,
  * @style:  the XSLT stylesheet
  * @node:  the stylesheet node
  * @name:  the attribute Name
- * @name:  the attribute namespace URI
+ * @ns:  the attribute namespace URI
  * @found:  indicator whether the attribute is present
  *
  * Check if an attribute value template has a static value, i.e. the
index 6d894e7..d89cb54 100644 (file)
@@ -316,7 +316,7 @@ xsltCopyTextString(xsltTransformContextPtr ctxt, xmlNodePtr target,
  * xsltCopyText:
  * @ctxt:  a XSLT process context
  * @target:  the element where the text will be attached
- * @text:  the text or CDATA node
+ * @cur:  the text or CDATA node
  *
  * Do a copy of a text node
  *
@@ -1494,7 +1494,7 @@ xsltDocumentElem(xsltTransformContextPtr ctxt, xmlNodePtr node,
                goto error;
        } else if (xmlStrEqual(method, (const xmlChar *) "xhtml")) {
            xsltGenericError(xsltGenericErrorContext,
-            "xsltApplyStylesheet: unsupported method xhtml, using html\n",
+            "xsltDocumentElem: unsupported method xhtml, using html\n",
                             style->method);
            ctxt->type = XSLT_OUTPUT_HTML;
            res = htmlNewDoc(doctypeSystem, doctypePublic);
@@ -1507,7 +1507,7 @@ xsltDocumentElem(xsltTransformContextPtr ctxt, xmlNodePtr node,
                goto error;
        } else {
            xsltGenericError(xsltGenericErrorContext,
-                            "xsltApplyStylesheet: unsupported method %s\n",
+                            "xsltDocumentElem: unsupported method %s\n",
                             style->method);
            goto error;
        }
@@ -1615,10 +1615,10 @@ xsltCopy(xsltTransformContextPtr ctxt, xmlNodePtr node,
 #ifdef WITH_XSLT_DEBUG_PROCESS
                if (node->type == XML_CDATA_SECTION_NODE)
                    xsltGenericDebug(xsltGenericDebugContext,
-                        "xsl:copy: CDATA text %s\n", node->content);
+                        "xsltCopy: CDATA text %s\n", node->content);
                else
                    xsltGenericDebug(xsltGenericDebugContext,
-                        "xsl:copy: text %s\n", node->content);
+                        "xsltCopy: text %s\n", node->content);
 #endif
                xsltCopyText(ctxt, ctxt->insert, node);
                break;
@@ -1628,7 +1628,7 @@ xsltCopy(xsltTransformContextPtr ctxt, xmlNodePtr node,
            case XML_ELEMENT_NODE:
 #ifdef WITH_XSLT_DEBUG_PROCESS
                xsltGenericDebug(xsltGenericDebugContext,
-                                "xsl:copy: node %s\n", node->name);
+                                "xsltCopy: node %s\n", node->name);
 #endif
                copy = xsltCopyNode(ctxt, node, ctxt->insert);
                ctxt->insert = copy;
@@ -1639,7 +1639,7 @@ xsltCopy(xsltTransformContextPtr ctxt, xmlNodePtr node,
            case XML_ATTRIBUTE_NODE: {
 #ifdef WITH_XSLT_DEBUG_PROCESS
                xsltGenericDebug(xsltGenericDebugContext,
-                                "xsl:copy: attribute %s\n", node->name);
+                                "xsltCopy: attribute %s\n", node->name);
 #endif
                if (ctxt->insert->type == XML_ELEMENT_NODE) {
                    xmlAttrPtr attr = (xmlAttrPtr) node, ret = NULL, cur;
@@ -1668,7 +1668,7 @@ xsltCopy(xsltTransformContextPtr ctxt, xmlNodePtr node,
            case XML_PI_NODE:
 #ifdef WITH_XSLT_DEBUG_PROCESS
                xsltGenericDebug(xsltGenericDebugContext,
-                                "xsl:copy: PI %s\n", node->name);
+                                "xsltCopy: PI %s\n", node->name);
 #endif
                copy = xmlNewPI(node->name, node->content);
                xmlAddChild(ctxt->insert, copy);
@@ -1676,7 +1676,7 @@ xsltCopy(xsltTransformContextPtr ctxt, xmlNodePtr node,
            case XML_COMMENT_NODE:
 #ifdef WITH_XSLT_DEBUG_PROCESS
                xsltGenericDebug(xsltGenericDebugContext,
-                                "xsl:copy: comment\n");
+                                "xsltCopy: comment\n");
 #endif
                copy = xmlNewComment(node->content);
                xmlAddChild(ctxt->insert, copy);
@@ -1807,7 +1807,7 @@ xsltElement(xsltTransformContextPtr ctxt, xmlNodePtr node,
        if (!xmlStrncasecmp(prefix, (xmlChar *)"xml", 3)) {
 #ifdef WITH_XSLT_DEBUG_PARSING
            xsltGenericDebug(xsltGenericDebugContext,
-                "xsl:element : xml prefix forbidden\n");
+                "xsltElement: xml prefix forbidden\n");
 #endif
            goto error;
        }
@@ -1923,7 +1923,7 @@ xsltAttribute(xsltTransformContextPtr ctxt, xmlNodePtr node,
     if (!xmlStrncasecmp(prefix, (xmlChar *)"xml", 3)) {
 #ifdef WITH_XSLT_DEBUG_PARSING
        xsltGenericDebug(xsltGenericDebugContext,
-            "xsl:attribute : xml prefix forbidden\n");
+            "xsltAttribute: xml prefix forbidden\n");
 #endif
        goto error;
     }
@@ -1998,10 +1998,10 @@ xsltComment(xsltTransformContextPtr ctxt, xmlNodePtr node,
 #ifdef WITH_XSLT_DEBUG_PROCESS
     if (value == NULL)
        xsltGenericDebug(xsltGenericDebugContext,
-            "xsl:comment: empty\n");
+            "xsltComment: empty\n");
     else
        xsltGenericDebug(xsltGenericDebugContext,
-            "xsl:comment: content %s\n", value);
+            "xsltComment: content %s\n", value);
 #endif
 
     comment = xmlNewComment(value);
@@ -2052,10 +2052,10 @@ xsltProcessingInstruction(xsltTransformContextPtr ctxt, xmlNodePtr node,
 #ifdef WITH_XSLT_DEBUG_PROCESS
     if (value == NULL)
        xsltGenericDebug(xsltGenericDebugContext,
-            "xsl:processing-instruction: %s empty\n", ncname);
+            "xsltProcessingInstruction: %s empty\n", ncname);
     else
        xsltGenericDebug(xsltGenericDebugContext,
-            "xsl:processing-instruction: %s content %s\n", ncname, value);
+            "xsltProcessingInstruction: %s content %s\n", ncname, value);
 #endif
 
     pi = xmlNewPI(name, value);
@@ -2656,13 +2656,13 @@ xsltChoose(xsltTransformContextPtr ctxt, xmlNodePtr node,
 
        if ((wcomp == NULL) || (wcomp->test == NULL) || (wcomp->comp == NULL)) {
            xsltGenericError(xsltGenericErrorContext,
-                "xsl:when: compilation failed !\n");
+                "xsl:choose: compilation failed !\n");
            goto error;
        }
        when = replacement;
 #ifdef WITH_XSLT_DEBUG_PROCESS
        xsltGenericDebug(xsltGenericDebugContext,
-            "xsl:when: test %s\n", wcomp->test);
+            "xsltChoose: test %s\n", wcomp->test);
 #endif
 
        oldProximityPosition = ctxt->xpathCtxt->proximityPosition;
@@ -2685,7 +2685,7 @@ xsltChoose(xsltTransformContextPtr ctxt, xmlNodePtr node,
            else {
 #ifdef WITH_XSLT_DEBUG_PROCESS
                xsltGenericDebug(xsltGenericDebugContext,
-                   "xsl:when: test didn't evaluate to a boolean\n");
+                   "xsltChoose: test didn't evaluate to a boolean\n");
 #endif
                goto error;
            }
@@ -2693,7 +2693,7 @@ xsltChoose(xsltTransformContextPtr ctxt, xmlNodePtr node,
 
 #ifdef WITH_XSLT_DEBUG_PROCESS
        xsltGenericDebug(xsltGenericDebugContext,
-           "xsl:when: test evaluate to %d\n", doit);
+           "xsltChoose: test evaluate to %d\n", doit);
 #endif
        if (doit) {
            varsPush(ctxt, NULL);
@@ -2882,7 +2882,7 @@ xsltForEach(xsltTransformContextPtr ctxt, xmlNodePtr node,
     while (IS_XSLT_ELEM(replacement) && (IS_XSLT_NAME(replacement, "sort"))) {
        if (nbsorts >= XSLT_MAX_SORT) {
            xsltGenericError(xsltGenericDebugContext,
-               "xsl:for-each: too many sort\n");
+               "xsl:for-each: too many sorts\n");
        } else {
            sorts[nbsorts++] = replacement;
        }
@@ -3057,7 +3057,7 @@ xsltApplyStylesheetInternal(xsltStylesheetPtr style, xmlDocPtr doc,
                goto error;
        } else if (xmlStrEqual(method, (const xmlChar *) "xhtml")) {
            xsltGenericError(xsltGenericErrorContext,
-            "xsltApplyStylesheet: unsupported method xhtml, using html\n",
+            "xsltApplyStylesheetInternal: unsupported method xhtml, using html\n",
                             style->method);
            ctxt->type = XSLT_OUTPUT_HTML;
            res = htmlNewDoc(doctypeSystem, doctypePublic);
@@ -3070,7 +3070,7 @@ xsltApplyStylesheetInternal(xsltStylesheetPtr style, xmlDocPtr doc,
                goto error;
        } else {
            xsltGenericError(xsltGenericErrorContext,
-                            "xsltApplyStylesheet: unsupported method %s\n",
+                            "xsltApplyStylesheetInternal: unsupported method %s\n",
                             style->method);
            goto error;
        }
index be89fe6..c7aca94 100644 (file)
@@ -81,7 +81,7 @@ xsltCopyStackElem(xsltStackElemPtr elem) {
     cur = (xsltStackElemPtr) xmlMalloc(sizeof(xsltStackElem));
     if (cur == NULL) {
         xsltGenericError(xsltGenericErrorContext,
-               "xsltNewStackElem : malloc failed\n");
+               "xsltCopyStackElem : malloc failed\n");
        return(NULL);
     }
     cur->name = xmlStrdup(elem->name);
@@ -271,6 +271,7 @@ xsltStackLookup(xsltTransformContextPtr ctxt, const xmlChar *name,
  * xsltEvalVariable:
  * @ctxt:  the XSLT transformation context
  * @elem:  the variable or parameter.
+ * @precomp: pointer to precompiled data
  *
  * Evaluate a variable value.
  *
@@ -379,8 +380,8 @@ xsltEvalVariable(xsltTransformContextPtr ctxt, xsltStackElemPtr elem,
 
 /**
  * xsltEvalGlobalVariable:
- * @ctxt:  the XSLT transformation context
  * @elem:  the variable or parameter.
+ * @ctxt:  the XSLT transformation context
  *
  * Evaluate a global variable value.
  *
@@ -642,7 +643,7 @@ xsltRegisterGlobalVariable(xsltStylesheetPtr style, const xmlChar *name,
  * @ctxt:  the XSLT transformation context
  * @params:  a NULL terminated arry of parameters names/values tuples
  *
- * Evaluate the global variables of a stylesheet. This need to be
+ * Evaluate the global variables of a stylesheet. This needs to be
  * done on parsed stylesheets before starting to apply transformations
  *
  * Returns 0 in case of success, -1 in case of error
@@ -825,9 +826,7 @@ xsltBuildVariable(xsltTransformContextPtr ctxt, xsltStylePreCompPtr comp,
 /**
  * xsltRegisterVariable:
  * @ctxt:  the XSLT transformation context
- * @name:  the variable name
- * @ns_uri:  the variable namespace URI
- * @select:  the expression which need to be evaluated to generate a value
+ * @comp:  pointer to precompiled data
  * @tree:  the tree if select is NULL
  * @param:  this is a parameter actually
  *
@@ -1007,7 +1006,7 @@ xsltParseGlobalVariable(xsltStylesheetPtr style, xmlNodePtr cur) {
     comp = (xsltStylePreCompPtr) cur->_private;
     if (comp == NULL) {
        xsltGenericError(xsltGenericErrorContext,
-            "xsl:variable : compilation had failed\n");
+            "xsl:variable : compilation failed\n");
        return;
     }
 
@@ -1046,7 +1045,7 @@ xsltParseGlobalParam(xsltStylesheetPtr style, xmlNodePtr cur) {
     comp = (xsltStylePreCompPtr) cur->_private;
     if (comp == NULL) {
        xsltGenericError(xsltGenericErrorContext,
-            "xsl:param : compilation had failed\n");
+            "xsl:param : compilation failed\n");
        return;
     }
 
@@ -1084,7 +1083,7 @@ xsltParseStylesheetVariable(xsltTransformContextPtr ctxt, xmlNodePtr cur) {
     comp = (xsltStylePreCompPtr) cur->_private;
     if (comp == NULL) {
        xsltGenericError(xsltGenericErrorContext,
-            "xsl:variable : compilation had failed\n");
+            "xsl:variable : compilation failed\n");
        return;
     }
 
@@ -1121,7 +1120,7 @@ xsltParseStylesheetParam(xsltTransformContextPtr ctxt, xmlNodePtr cur) {
     comp = (xsltStylePreCompPtr) cur->_private;
     if (comp == NULL) {
        xsltGenericError(xsltGenericErrorContext,
-            "xsl:param : compilation had failed\n");
+            "xsl:param : compilation failed\n");
        return;
     }
 
index 17eab48..bc1f312 100644 (file)
@@ -406,7 +406,7 @@ xsltFreeStylesheet(xsltStylesheetPtr sheet)
 /**
  * xsltParseStylesheetOutput:
  * @style:  the XSLT stylesheet
- * @template:  the "output" element
+ * @cur:  the "output" element
  *
  * parse an XSLT stylesheet output element and record
  * information related to the stylesheet output
@@ -684,7 +684,7 @@ xsltParseStylesheetDecimalFormat(xsltStylesheetPtr style, xmlNodePtr cur)
 /**
  * xsltParseStylesheetPreserveSpace:
  * @style:  the XSLT stylesheet
- * @template:  the "preserve-space" element
+ * @cur:  the "preserve-space" element
  *
  * parse an XSLT stylesheet preserve-space element and record
  * elements needing preserving
@@ -797,7 +797,7 @@ xsltParseStylesheetExtPrefix(xsltStylesheetPtr style, xmlNodePtr cur) {
 /**
  * xsltParseStylesheetStripSpace:
  * @style:  the XSLT stylesheet
- * @template:  the "strip-space" element
+ * @cur:  the "strip-space" element
  *
  * parse an XSLT stylesheet strip-space element and record
  * elements needing stripping
@@ -893,13 +893,13 @@ xsltParseStylesheetExcludePrefix(xsltStylesheetPtr style, xmlNodePtr cur) {
                ns = xmlSearchNs(style->doc, cur, prefix);
            if (ns == NULL) {
                xsltGenericError(xsltGenericErrorContext,
-           "xsl:extension-element-prefix : undefined namespace %s\n",
+           "xsl:exclude-result-prefixes : undefined namespace %s\n",
                                 prefix);
                style->warnings++;
            } else {
 #ifdef WITH_XSLT_DEBUG_PARSING
                xsltGenericDebug(xsltGenericDebugContext,
-                   "add extension prefix %s\n", prefix);
+                   "exclude result prefix %s\n", prefix);
 #endif
                exclPrefixPush(style, (xmlChar *) ns->href);
                nb++;
@@ -1038,7 +1038,7 @@ skip_children:
  * xsltGatherNamespaces:
  * @style:  the XSLT stylesheet
  *
- * Browse the stylesheet and buit the namspace hash table which
+ * Browse the stylesheet and build the namspace hash table which
  * will be used for XPath interpretation. If needed do a bit of normalization
  */
 
@@ -1169,7 +1169,7 @@ xsltParseTemplateContent(xsltStylesheetPtr style, xsltTemplatePtr ret,
                        } else if (!xmlStrEqual(prop,
                                                (const xmlChar *)"no")){
                            xsltGenericError(xsltGenericErrorContext,
-            "xslt:text: disable-output-escaping allow only yes or no\n");
+            "xsl:text: disable-output-escaping allows only yes or no\n");
                            style->warnings++;
 
                        }
@@ -1247,7 +1247,7 @@ skip_children:
     if (delete != NULL) {
 #ifdef WITH_XSLT_DEBUG_PARSING
        xsltGenericDebug(xsltGenericDebugContext,
-        "xsltParseStylesheetTemplate: removing text\n");
+        "xsltParseTemplateContent: removing text\n");
 #endif
        xmlUnlinkNode(delete);
        xmlFreeNode(delete);
@@ -1265,7 +1265,7 @@ skip_children:
     }
 
     /*
-     * Browse the remaining of the template
+     * Browse the remainder of the template
      */
     while (cur != NULL) {
        if ((IS_XSLT_ELEM(cur)) && (IS_XSLT_NAME(cur, "param"))) {
@@ -1273,7 +1273,7 @@ skip_children:
 
             cur = cur->next;
            xsltGenericError(xsltGenericErrorContext,
-               "xsltParseStylesheetTop: ignoring misplaced param element\n");
+               "xsltParseTemplateContent: ignoring misplaced param element\n");
            style->warnings++;
            xmlUnlinkNode(param);
            xmlFreeNode(param);
@@ -1323,7 +1323,7 @@ xsltParseStylesheetKey(xsltStylesheetPtr style, xmlNodePtr key) {
        }
 #ifdef WITH_XSLT_DEBUG_PARSING
        xsltGenericDebug(xsltGenericDebugContext,
-            "xslt:key: name %s\n", name);
+            "xsltParseStylesheetKey: name %s\n", name);
 #endif
     } else {
        xsltGenericError(xsltGenericErrorContext,
@@ -1411,7 +1411,7 @@ xsltParseStylesheetTemplate(xsltStylesheetPtr style, xmlNodePtr template) {
        }
 #ifdef WITH_XSLT_DEBUG_PARSING
        xsltGenericDebug(xsltGenericDebugContext,
-            "xslt:template: mode %s\n", mode);
+            "xsltParseStylesheetTemplate: mode %s\n", mode);
 #endif
     } else {
        mode = NULL;
index c39685d..6fb2cee 100644 (file)
@@ -239,7 +239,7 @@ void *xsltGenericDebugContext = NULL;
  * Function to reset the handler and the error context for out of
  * context error messages.
  * This simply means that @handler will be called for subsequent
- * error messages while not parsing nor validating. And @ctx will
+ * error messages while not parsing or validating. And @ctx will
  * be passed as first argument to @handler
  * One can simply force messages to be emitted to another FILE * than
  * stderr by setting @ctx to this file handle and @handler to NULL.
@@ -264,7 +264,7 @@ xsltSetGenericDebugFunc(void *ctx, xmlGenericErrorFunc handler) {
  * @node:  the node holding the QName
  * @name:  pointer to the initial QName value
  *
- * This function analyze @name, if the name contains a prefix,
+ * This function analyzes @name, if the name contains a prefix,
  * the function seaches the associated namespace in scope for it.
  * It will also replace @name value with the NCName, the old value being
  * freed.
@@ -303,7 +303,7 @@ xsltGetQNameURI(xmlNodePtr node, xmlChar ** name)
 
     /*
      * we are not trying to validate but just to cut, and yes it will
-     * work even if this is as set of UTF-8 encoded chars
+     * work even if this is a set of UTF-8 encoded chars
      */
     while ((qname[len] != 0) && (qname[len] != ':')) 
        len++;
@@ -378,10 +378,9 @@ xsltDocumentSortFunction(xmlNodeSetPtr list) {
  * xsltComputeSortResult:
  * @ctxt:  a XSLT process context
  * @sorts:  array of sort nodes
- * @nbsorts:  the number of sorts in the array
  *
  * reorder the current node list accordingly to the set of sorting
- * requirement provided by the arry of nodes.
+ * requirement provided by the array of nodes.
  */
 static xmlXPathObjectPtr *
 xsltComputeSortResult(xsltTransformContextPtr ctxt, xmlNodePtr sort) {
@@ -400,7 +399,7 @@ xsltComputeSortResult(xsltTransformContextPtr ctxt, xmlNodePtr sort) {
     comp = sort->_private;
     if (comp == NULL) {
        xsltGenericError(xsltGenericErrorContext,
-            "xslt:sort : compilation had failed\n");
+            "xslt:sort : compilation failed\n");
        return(NULL);
     }
 
@@ -420,7 +419,7 @@ xsltComputeSortResult(xsltTransformContextPtr ctxt, xmlNodePtr sort) {
     results = xmlMalloc(len * sizeof(xmlXPathObjectPtr));
     if (results == NULL) {
        xsltGenericError(xsltGenericErrorContext,
-            "xsltSort: memory allocation failure\n");
+            "xsltComputeSortResult: memory allocation failure\n");
        return(NULL);
     }
 
@@ -451,7 +450,7 @@ xsltComputeSortResult(xsltTransformContextPtr ctxt, xmlNodePtr sort) {
                } else {
 #ifdef WITH_XSLT_DEBUG_PROCESS
                    xsltGenericDebug(xsltGenericDebugContext,
-                       "xsltSort: select didn't evaluate to a number\n");
+                       "xsltComputeSortResult: select didn't evaluate to a number\n");
 #endif
                    results[i] = NULL;
                }
@@ -461,7 +460,7 @@ xsltComputeSortResult(xsltTransformContextPtr ctxt, xmlNodePtr sort) {
                } else {
 #ifdef WITH_XSLT_DEBUG_PROCESS
                    xsltGenericDebug(xsltGenericDebugContext,
-                       "xsltSort: select didn't evaluate to a string\n");
+                       "xsltComputeSortResult: select didn't evaluate to a string\n");
 #endif
                    results[i] = NULL;
                }
@@ -863,7 +862,7 @@ xsltSaveResultToFilename(const char *URL, xmlDocPtr result,
  * to an open FILE * I/O.
  * This does not close the FILE @file
  *
- * Returns the number of byte written or -1 in case of failure.
+ * Returns the number of bytes written or -1 in case of failure.
  */
 int
 xsltSaveResultToFile(FILE *file, xmlDocPtr result, xsltStylesheetPtr style) {
@@ -907,7 +906,7 @@ xsltSaveResultToFile(FILE *file, xmlDocPtr result, xsltStylesheetPtr style) {
  * to an open file descriptor
  * This does not close the descriptor.
  *
- * Returns the number of byte written or -1 in case of failure.
+ * Returns the number of bytes written or -1 in case of failure.
  */
 int
 xsltSaveResultToFd(int fd, xmlDocPtr result, xsltStylesheetPtr style) {