X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=dll%2F3rdparty%2Flibxslt%2Fpreproc.c;h=44d4983c15dd6fcd6c35bfb285136d63a1049328;hp=4ef3f631d98ace7eb5b3a0c864f2dbb88d9e7b4c;hb=5c0faa58cf4776550097dbcc1d2f5867c929d5a6;hpb=e1ef07874175603f7e980194c4bfe511bff4e3c5 diff --git a/dll/3rdparty/libxslt/preproc.c b/dll/3rdparty/libxslt/preproc.c index 4ef3f631d98..44d4983c15d 100644 --- a/dll/3rdparty/libxslt/preproc.c +++ b/dll/3rdparty/libxslt/preproc.c @@ -15,31 +15,7 @@ * daniel@veillard.com */ -#define IN_LIBXSLT -#include "libxslt.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include "xslt.h" -#include "xsltutils.h" -#include "xsltInternals.h" -#include "transform.h" -#include "templates.h" -#include "variables.h" -#include "numbersInternals.h" -#include "preproc.h" -#include "extra.h" -#include "imports.h" -#include "extensions.h" -#include "pattern.h" +#include "precomp.h" #ifdef WITH_XSLT_DEBUG #define WITH_XSLT_DEBUG_PREPROC @@ -949,6 +925,8 @@ xsltElementComp(xsltStylesheetPtr style, xmlNodePtr inst) { #ifdef XSLT_REFACTORED comp->nsPrefix = prefix; comp->name = name; +#else + (void)name; /* Suppress unused variable warning. */ #endif } else if (prefix != NULL) { xsltTransformError(NULL, style, inst, @@ -1074,6 +1052,8 @@ xsltAttributeComp(xsltStylesheetPtr style, xmlNodePtr inst) { #ifdef XSLT_REFACTORED comp->nsPrefix = prefix; comp->name = name; +#else + (void)name; /* Suppress unused variable warning. */ #endif } else { xsltTransformError(NULL, style, inst, @@ -1301,7 +1281,8 @@ xsltGetQNameProperty(xsltStylesheetPtr style, xmlNodePtr inst, if (prop == NULL) { style->errors++; } else { - *localName = prop; + if (localName) + *localName = prop; if (hasProp) *hasProp = 1; if (URI != NULL) { @@ -1413,9 +1394,6 @@ xsltNumberComp(xsltStylesheetPtr style, xmlNodePtr cur) { return; cur->psvi = comp; - if ((style == NULL) || (cur == NULL)) - return; - comp->numdata.doc = cur->doc; comp->numdata.node = cur; comp->numdata.value = xsltGetCNsProp(style, cur, (const xmlChar *)"value", @@ -2245,7 +2223,8 @@ xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr inst) { } else if (IS_XSLT_NAME(inst, "attribute")) { xmlNodePtr parent = inst->parent; - if ((parent == NULL) || (parent->ns == NULL) || + if ((parent == NULL) || + (parent->type != XML_ELEMENT_NODE) || (parent->ns == NULL) || ((parent->ns != inst->ns) && (!xmlStrEqual(parent->ns->href, inst->ns->href))) || (!xmlStrEqual(parent->name, BAD_CAST "attribute-set"))) { @@ -2337,7 +2316,7 @@ xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr inst) { xsltCheckInstructionElement(style, inst); inst->psvi = (void *) xsltDocumentComp(style, inst, (xsltTransformFunction) xsltDocumentElem); - } else { + } else if ((style == NULL) || (style->forwards_compatible == 0)) { xsltTransformError(NULL, style, inst, "xsltStylePreCompute: unknown xsl:%s\n", inst->name); if (style != NULL) style->warnings++;