+Wed Oct 17 21:20:55 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * libxslt/attributes.c libxslt/extensions.c libxslt/preproc.c
+ libxslt/transform.c libxslt/xsltutils.h: cleanup TODO into
+ XSLT_TODO
+
Wed Oct 17 02:46:55 CEST 2001 Thomas Broyer <tbroyer@ltgt.net>
* libxslt/numbers.c: reworked internal representation of
xmlChar *ncname = NULL;
xmlChar *prefix = NULL;
xmlChar *attributes;
- xmlChar *attribute, *end;
+ xmlChar *attrib, *endattr;
xmlNodePtr list;
xsltAttrElemPtr values;
goto done;
}
- attribute = attributes;
- while (*attribute != 0) {
- while (IS_BLANK(*attribute)) attribute++;
- if (*attribute == 0)
+ attrib = attributes;
+ while (*attrib != 0) {
+ while (IS_BLANK(*attrib)) attrib++;
+ if (*attrib == 0)
break;
- end = attribute;
- while ((*end != 0) && (!IS_BLANK(*end))) end++;
- attribute = xmlStrndup(attribute, end - attribute);
- if (attribute) {
+ endattr = attrib;
+ while ((*endattr != 0) && (!IS_BLANK(*endattr))) endattr++;
+ attrib = xmlStrndup(attrib, endattr - attrib);
+ if (attrib) {
xmlChar *ncname2 = NULL;
xmlChar *prefix2 = NULL;
xsltAttrElemPtr values2;
#ifdef WITH_XSLT_DEBUG_ATTRIBUTES
xsltGenericDebug(xsltGenericDebugContext,
- "xsl:attribute-set : %s adds use %s\n", ncname, attribute);
+ "xsl:attribute-set : %s adds use %s\n", ncname, attrib);
#endif
- ncname2 = xmlSplitQName2(attribute, &prefix2);
+ ncname2 = xmlSplitQName2(attrib, &prefix2);
if (ncname2 == NULL) {
- ncname2 = attribute;
- attribute = NULL;
+ ncname2 = attrib;
+ attrib = NULL;
prefix = NULL;
}
values2 = xmlHashLookup2(style->attributeSets, ncname2, prefix2);
values = xsltMergeAttrElemList(values, values2);
- if (attribute != NULL)
- xmlFree(attribute);
+ if (attrib != NULL)
+ xmlFree(attrib);
if (ncname2 != NULL)
xmlFree(ncname2);
if (prefix2 != NULL)
xmlFree(prefix2);
}
- attribute = end;
+ attrib = endattr;
}
xmlFree(attributes);
xmlNodePtr inst ATTRIBUTE_UNUSED, xmlChar *attributes) {
xmlChar *ncname = NULL;
xmlChar *prefix = NULL;
- xmlChar *attribute, *end;
+ xmlChar *attrib, *endattr;
xsltAttrElemPtr values;
xsltStylesheetPtr style;
return;
}
- attribute = attributes;
- while (*attribute != 0) {
- while (IS_BLANK(*attribute)) attribute++;
- if (*attribute == 0)
+ attrib = attributes;
+ while (*attrib != 0) {
+ while (IS_BLANK(*attrib)) attrib++;
+ if (*attrib == 0)
break;
- end = attribute;
- while ((*end != 0) && (!IS_BLANK(*end))) end++;
- attribute = xmlStrndup(attribute, end - attribute);
- if (attribute) {
+ endattr = attrib;
+ while ((*endattr != 0) && (!IS_BLANK(*endattr))) endattr++;
+ attrib = xmlStrndup(attrib, endattr - attrib);
+ if (attrib) {
#ifdef WITH_XSLT_DEBUG_ATTRIBUTES
xsltGenericDebug(xsltGenericDebugContext,
- "apply attribute set %s\n", attribute);
+ "apply attribute set %s\n", attrib);
#endif
- ncname = xmlSplitQName2(attribute, &prefix);
+ ncname = xmlSplitQName2(attrib, &prefix);
if (ncname == NULL) {
- ncname = attribute;
- attribute = NULL;
+ ncname = attrib;
+ attrib = NULL;
prefix = NULL;
}
}
style = xsltNextImport(style);
}
- if (attribute != NULL)
- xmlFree(attribute);
+ if (attrib != NULL)
+ xmlFree(attrib);
if (ncname != NULL)
xmlFree(ncname);
if (prefix != NULL)
xmlFree(prefix);
}
- attribute = end;
+ attrib = endattr;
}
}
xmlNodePtr inst,
xsltElemPreCompPtr comp ATTRIBUTE_UNUSED)
{
- xmlNodePtr comment;
+ xmlNodePtr commentNode;
if (testData == NULL) {
xsltGenericDebug(xsltGenericDebugContext,
"xsltExtElementTest: no insertion point\n");
return;
}
- comment =
+ commentNode =
xmlNewComment((const xmlChar *)
"libxslt:test element test worked");
- xmlAddChild(ctxt->insert, comment);
+ xmlAddChild(ctxt->insert, commentNode);
}
/**
prop = xsltGetNsProp(cur, (const xmlChar *)"lang", XSLT_NAMESPACE);
if (prop != NULL) {
- TODO; /* xsl:number lang attribute */
+ XSLT_TODO; /* xsl:number lang attribute */
xmlFree(prop);
}
xsltGenericError(xsltGenericErrorContext,
"xsl:number : letter-value 'alphabetic' not implemented\n");
style->warnings++;
- TODO; /* xsl:number letter-value attribute alphabetic */
+ XSLT_TODO; /* xsl:number letter-value attribute alphabetic */
} else if (xmlStrEqual(prop, BAD_CAST("traditional"))) {
xsltPrintErrorContext(NULL, style, cur);
xsltGenericError(xsltGenericErrorContext,
"xsl:number : letter-value 'traditional' not implemented\n");
style->warnings++;
- TODO; /* xsl:number letter-value attribute traditional */
+ XSLT_TODO; /* xsl:number letter-value attribute traditional */
} else {
xsltPrintErrorContext(NULL, style, cur);
xsltGenericError(xsltGenericErrorContext,
xsltComment(xsltTransformContextPtr ctxt, xmlNodePtr node,
xmlNodePtr inst, xsltStylePreCompPtr comp ATTRIBUTE_UNUSED) {
xmlChar *value = NULL;
- xmlNodePtr comment;
+ xmlNodePtr commentNode;
value = xsltEvalTemplateString(ctxt, node, inst);
/* TODO: use or generate the compiled form */
"xsltComment: content %s\n", value);
#endif
- comment = xmlNewComment(value);
- xmlAddChild(ctxt->insert, comment);
+ commentNode = xmlNewComment(value);
+ xmlAddChild(ctxt->insert, commentNode);
if (value != NULL)
xmlFree(value);
/* unsupported yet */
if (SAX != NULL) {
- TODO /* xsltRunStylesheet xmlSAXHandlerPtr SAX */
- return (-1);
+ XSLT_TODO /* xsltRunStylesheet xmlSAXHandlerPtr SAX */
+ return (-1);
}
tmp = xsltApplyStylesheetInternal(style, doc, params, output, NULL, NULL);
*
* macro to flag unimplemented blocks
*/
-#define TODO \
+#define XSLT_TODO \
xsltGenericError(xsltGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
*
* macro to flag that a problem was detected internally
*/
-#define STRANGE \
+#define XSLT_STRANGE \
xsltGenericError(xsltGenericErrorContext, \
"Internal error at %s:%d\n", \
__FILE__, __LINE__);