mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-08-08 21:42:07 +03:00
changed some variable names for warning cleanup when -ansi flag is not
* libexslt/crypto.c, libexslt/functions.c, libxslt/keys.c, libxslt/numbers.c, libxslt/pattern.c, libxslt/transform.c, libxslt/variables.c: changed some variable names for warning cleanup when -ansi flag is not present. * libxslt/namespaces.c: fixed potential NULL pointer reference pointed out by Dennis Dams (bug 156187)
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
Sat Oct 23 09:36:12 PDT 2004 William Brack <wbrack@mmm.com.hk>
|
||||||
|
|
||||||
|
* libexslt/crypto.c, libexslt/functions.c, libxslt/keys.c,
|
||||||
|
libxslt/numbers.c, libxslt/pattern.c, libxslt/transform.c,
|
||||||
|
libxslt/variables.c: changed some variable names for warning
|
||||||
|
cleanup when -ansi flag is not present.
|
||||||
|
* libxslt/namespaces.c: fixed potential NULL pointer reference
|
||||||
|
pointed out by Dennis Dams (bug 156187)
|
||||||
|
|
||||||
Mon Oct 18 17:04:27 CEST 2004 Daniel Veillard <daniel@veillard.com>
|
Mon Oct 18 17:04:27 CEST 2004 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* libxslt.spec.in doc/Makefile.am: fix for RedHat bug #136072
|
* libxslt.spec.in doc/Makefile.am: fix for RedHat bug #136072
|
||||||
|
@@ -237,7 +237,7 @@ exsltCryptoCryptoApiRc4Encrypt (xmlXPathParserContextPtr ctxt,
|
|||||||
exsltCryptoCryptoApiReportError (ctxt, __LINE__);
|
exsltCryptoCryptoApiReportError (ctxt, __LINE__);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
// Now encrypt data.
|
/* Now encrypt data. */
|
||||||
dwDataLen = msglen;
|
dwDataLen = msglen;
|
||||||
memcpy (dest, msg, msglen);
|
memcpy (dest, msg, msglen);
|
||||||
if (!CryptEncrypt (hKey, 0, TRUE, 0, dest, &dwDataLen, msglen)) {
|
if (!CryptEncrypt (hKey, 0, TRUE, 0, dest, &dwDataLen, msglen)) {
|
||||||
@@ -288,7 +288,7 @@ exsltCryptoCryptoApiRc4Decrypt (xmlXPathParserContextPtr ctxt,
|
|||||||
exsltCryptoCryptoApiReportError (ctxt, __LINE__);
|
exsltCryptoCryptoApiReportError (ctxt, __LINE__);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
// Now encrypt data.
|
/* Now encrypt data. */
|
||||||
dwDataLen = msglen;
|
dwDataLen = msglen;
|
||||||
memcpy (dest, msg, msglen);
|
memcpy (dest, msg, msglen);
|
||||||
if (!CryptDecrypt (hKey, 0, TRUE, 0, dest, &dwDataLen)) {
|
if (!CryptDecrypt (hKey, 0, TRUE, 0, dest, &dwDataLen)) {
|
||||||
|
@@ -455,7 +455,7 @@ static xsltElemPreCompPtr
|
|||||||
exsltFuncResultComp (xsltStylesheetPtr style, xmlNodePtr inst,
|
exsltFuncResultComp (xsltStylesheetPtr style, xmlNodePtr inst,
|
||||||
xsltTransformFunction function) {
|
xsltTransformFunction function) {
|
||||||
xmlNodePtr test;
|
xmlNodePtr test;
|
||||||
xmlChar *select;
|
xmlChar *sel;
|
||||||
exsltFuncResultPreComp *ret;
|
exsltFuncResultPreComp *ret;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -525,10 +525,10 @@ exsltFuncResultComp (xsltStylesheetPtr style, xmlNodePtr inst,
|
|||||||
/*
|
/*
|
||||||
* Precompute the select attribute
|
* Precompute the select attribute
|
||||||
*/
|
*/
|
||||||
select = xmlGetNsProp(inst, (const xmlChar *) "select", NULL);
|
sel = xmlGetNsProp(inst, (const xmlChar *) "select", NULL);
|
||||||
if (select != NULL) {
|
if (sel != NULL) {
|
||||||
ret->select = xmlXPathCompile (select);
|
ret->select = xmlXPathCompile (sel);
|
||||||
xmlFree(select);
|
xmlFree(sel);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Precompute the namespace list
|
* Precompute the namespace list
|
||||||
|
@@ -630,9 +630,9 @@ xsltInitCtxtKey(xsltTransformContextPtr ctxt, xsltDocumentPtr doc,
|
|||||||
|
|
||||||
list = xsltEvalXPathKeys(ctxt, keyd->usecomp, keyd);
|
list = xsltEvalXPathKeys(ctxt, keyd->usecomp, keyd);
|
||||||
if (list != NULL) {
|
if (list != NULL) {
|
||||||
int index = 0;
|
int ix = 0;
|
||||||
|
|
||||||
str = list[index++];
|
str = list[ix++];
|
||||||
while (str != NULL) {
|
while (str != NULL) {
|
||||||
#ifdef WITH_XSLT_DEBUG_KEYS
|
#ifdef WITH_XSLT_DEBUG_KEYS
|
||||||
XSLT_TRACE(ctxt,XSLT_TRACE_KEYS,xsltGenericDebug(xsltGenericDebugContext,
|
XSLT_TRACE(ctxt,XSLT_TRACE_KEYS,xsltGenericDebug(xsltGenericDebugContext,
|
||||||
@@ -671,7 +671,7 @@ xsltInitCtxtKey(xsltTransformContextPtr ctxt, xsltDocumentPtr doc,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
xmlFree(str);
|
xmlFree(str);
|
||||||
str = list[index++];
|
str = list[ix++];
|
||||||
}
|
}
|
||||||
xmlFree(list);
|
xmlFree(list);
|
||||||
#ifdef WITH_XSLT_DEBUG_KEYS
|
#ifdef WITH_XSLT_DEBUG_KEYS
|
||||||
|
@@ -492,16 +492,18 @@ xsltCopyNamespaceList(xsltTransformContextPtr ctxt, xmlNodePtr node,
|
|||||||
/*
|
/*
|
||||||
* Avoid duplicating namespace declrations on the tree
|
* Avoid duplicating namespace declrations on the tree
|
||||||
*/
|
*/
|
||||||
if ((node != NULL) && (node->ns != NULL) &&
|
if (node != NULL) {
|
||||||
(xmlStrEqual(node->ns->href, cur->href)) &&
|
if ((node->ns != NULL) &&
|
||||||
(xmlStrEqual(node->ns->prefix, cur->prefix))) {
|
(xmlStrEqual(node->ns->href, cur->href)) &&
|
||||||
cur = cur->next;
|
(xmlStrEqual(node->ns->prefix, cur->prefix))) {
|
||||||
continue;
|
cur = cur->next;
|
||||||
}
|
continue;
|
||||||
tmp = xmlSearchNs(node->doc, node, cur->prefix);
|
}
|
||||||
if ((tmp != NULL) && (xmlStrEqual(tmp->href, cur->href))) {
|
tmp = xmlSearchNs(node->doc, node, cur->prefix);
|
||||||
cur = cur->next;
|
if ((tmp != NULL) && (xmlStrEqual(tmp->href, cur->href))) {
|
||||||
continue;
|
cur = cur->next;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!xmlStrEqual(cur->href, XSLT_NAMESPACE)) {
|
if (!xmlStrEqual(cur->href, XSLT_NAMESPACE)) {
|
||||||
|
@@ -318,7 +318,7 @@ static void
|
|||||||
xsltNumberFormatTokenize(const xmlChar *format,
|
xsltNumberFormatTokenize(const xmlChar *format,
|
||||||
xsltFormatPtr tokens)
|
xsltFormatPtr tokens)
|
||||||
{
|
{
|
||||||
int index = 0;
|
int ix = 0;
|
||||||
int j;
|
int j;
|
||||||
int val;
|
int val;
|
||||||
int len;
|
int len;
|
||||||
@@ -336,19 +336,19 @@ xsltNumberFormatTokenize(const xmlChar *format,
|
|||||||
* Insert initial non-alphanumeric token.
|
* Insert initial non-alphanumeric token.
|
||||||
* There is always such a token in the list, even if NULL
|
* There is always such a token in the list, even if NULL
|
||||||
*/
|
*/
|
||||||
while (! (IS_LETTER(val=xmlStringCurrentChar(NULL, format+index, &len)) ||
|
while (! (IS_LETTER(val=xmlStringCurrentChar(NULL, format+ix, &len)) ||
|
||||||
IS_DIGIT(val)) ) {
|
IS_DIGIT(val)) ) {
|
||||||
if (format[index] == 0) /* if end of format string */
|
if (format[ix] == 0) /* if end of format string */
|
||||||
break; /* while */
|
break; /* while */
|
||||||
index += len;
|
ix += len;
|
||||||
}
|
}
|
||||||
if (index > 0)
|
if (ix > 0)
|
||||||
tokens->start = xmlStrndup(format, index);
|
tokens->start = xmlStrndup(format, ix);
|
||||||
|
|
||||||
|
|
||||||
for (tokens->nTokens = 0; tokens->nTokens < MAX_TOKENS;
|
for (tokens->nTokens = 0; tokens->nTokens < MAX_TOKENS;
|
||||||
tokens->nTokens++) {
|
tokens->nTokens++) {
|
||||||
if (format[index] == 0)
|
if (format[ix] == 0)
|
||||||
break; /* for */
|
break; /* for */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -360,27 +360,27 @@ xsltNumberFormatTokenize(const xmlChar *format,
|
|||||||
tokens->end = NULL;
|
tokens->end = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
val = xmlStringCurrentChar(NULL, format+index, &len);
|
val = xmlStringCurrentChar(NULL, format+ix, &len);
|
||||||
if (IS_DIGIT_ONE(val) ||
|
if (IS_DIGIT_ONE(val) ||
|
||||||
IS_DIGIT_ZERO(val)) {
|
IS_DIGIT_ZERO(val)) {
|
||||||
tokens->tokens[tokens->nTokens].width = 1;
|
tokens->tokens[tokens->nTokens].width = 1;
|
||||||
while (IS_DIGIT_ZERO(val)) {
|
while (IS_DIGIT_ZERO(val)) {
|
||||||
tokens->tokens[tokens->nTokens].width++;
|
tokens->tokens[tokens->nTokens].width++;
|
||||||
index += len;
|
ix += len;
|
||||||
val = xmlStringCurrentChar(NULL, format+index, &len);
|
val = xmlStringCurrentChar(NULL, format+ix, &len);
|
||||||
}
|
}
|
||||||
if (IS_DIGIT_ONE(val)) {
|
if (IS_DIGIT_ONE(val)) {
|
||||||
tokens->tokens[tokens->nTokens].token = val - 1;
|
tokens->tokens[tokens->nTokens].token = val - 1;
|
||||||
index += len;
|
ix += len;
|
||||||
val = xmlStringCurrentChar(NULL, format+index, &len);
|
val = xmlStringCurrentChar(NULL, format+ix, &len);
|
||||||
}
|
}
|
||||||
} else if ( (val == (xmlChar)'A') ||
|
} else if ( (val == (xmlChar)'A') ||
|
||||||
(val == (xmlChar)'a') ||
|
(val == (xmlChar)'a') ||
|
||||||
(val == (xmlChar)'I') ||
|
(val == (xmlChar)'I') ||
|
||||||
(val == (xmlChar)'i') ) {
|
(val == (xmlChar)'i') ) {
|
||||||
tokens->tokens[tokens->nTokens].token = val;
|
tokens->tokens[tokens->nTokens].token = val;
|
||||||
index += len;
|
ix += len;
|
||||||
val = xmlStringCurrentChar(NULL, format+index, &len);
|
val = xmlStringCurrentChar(NULL, format+ix, &len);
|
||||||
} else {
|
} else {
|
||||||
/* XSLT section 7.7
|
/* XSLT section 7.7
|
||||||
* "Any other format token indicates a numbering sequence
|
* "Any other format token indicates a numbering sequence
|
||||||
@@ -401,22 +401,22 @@ xsltNumberFormatTokenize(const xmlChar *format,
|
|||||||
* one wonders why XSLT doesn't refer to these instead).
|
* one wonders why XSLT doesn't refer to these instead).
|
||||||
*/
|
*/
|
||||||
while (IS_LETTER(val) || IS_DIGIT(val)) {
|
while (IS_LETTER(val) || IS_DIGIT(val)) {
|
||||||
index += len;
|
ix += len;
|
||||||
val = xmlStringCurrentChar(NULL, format+index, &len);
|
val = xmlStringCurrentChar(NULL, format+ix, &len);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Insert temporary non-alphanumeric final tooken.
|
* Insert temporary non-alphanumeric final tooken.
|
||||||
*/
|
*/
|
||||||
j = index;
|
j = ix;
|
||||||
while (! (IS_LETTER(val) || IS_DIGIT(val))) {
|
while (! (IS_LETTER(val) || IS_DIGIT(val))) {
|
||||||
if (val == 0)
|
if (val == 0)
|
||||||
break; /* while */
|
break; /* while */
|
||||||
index += len;
|
ix += len;
|
||||||
val = xmlStringCurrentChar(NULL, format+index, &len);
|
val = xmlStringCurrentChar(NULL, format+ix, &len);
|
||||||
}
|
}
|
||||||
if (index > j)
|
if (ix > j)
|
||||||
tokens->end = xmlStrndup(&format[j], index - j);
|
tokens->end = xmlStrndup(&format[j], ix - j);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -382,7 +382,7 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
|
|||||||
xmlNodePtr node, const xmlChar *mode,
|
xmlNodePtr node, const xmlChar *mode,
|
||||||
const xmlChar *modeURI) {
|
const xmlChar *modeURI) {
|
||||||
int i;
|
int i;
|
||||||
xsltStepOpPtr step, select = NULL;
|
xsltStepOpPtr step, sel = NULL;
|
||||||
|
|
||||||
if ((comp == NULL) || (node == NULL) || (ctxt == NULL)) {
|
if ((comp == NULL) || (node == NULL) || (ctxt == NULL)) {
|
||||||
xsltTransformError(ctxt, NULL, node,
|
xsltTransformError(ctxt, NULL, node,
|
||||||
@@ -411,7 +411,7 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
|
|||||||
for (i = 0;i < comp->nbStep;i++) {
|
for (i = 0;i < comp->nbStep;i++) {
|
||||||
step = &comp->steps[i];
|
step = &comp->steps[i];
|
||||||
if (step->op != XSLT_OP_PREDICATE)
|
if (step->op != XSLT_OP_PREDICATE)
|
||||||
select = step;
|
sel = step;
|
||||||
switch (step->op) {
|
switch (step->op) {
|
||||||
case XSLT_OP_END:
|
case XSLT_OP_END:
|
||||||
return(1);
|
return(1);
|
||||||
@@ -618,15 +618,15 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
|
|||||||
if (comp->steps[i + 1].op == XSLT_OP_PREDICATE) {
|
if (comp->steps[i + 1].op == XSLT_OP_PREDICATE) {
|
||||||
xmlDocPtr prevdoc, doc;
|
xmlDocPtr prevdoc, doc;
|
||||||
xmlXPathObjectPtr list;
|
xmlXPathObjectPtr list;
|
||||||
int index, j;
|
int ix, j;
|
||||||
int nocache = 0;
|
int nocache = 0;
|
||||||
|
|
||||||
prevdoc = (xmlDocPtr)
|
prevdoc = (xmlDocPtr)
|
||||||
XSLT_RUNTIME_EXTRA(ctxt, select->previousExtra);
|
XSLT_RUNTIME_EXTRA(ctxt, sel->previousExtra);
|
||||||
index = (int)
|
ix = (int)
|
||||||
XSLT_RUNTIME_EXTRA(ctxt, select->indexExtra);
|
XSLT_RUNTIME_EXTRA(ctxt, sel->indexExtra);
|
||||||
list = (xmlXPathObjectPtr)
|
list = (xmlXPathObjectPtr)
|
||||||
XSLT_RUNTIME_EXTRA_LST(ctxt, select->lenExtra);
|
XSLT_RUNTIME_EXTRA_LST(ctxt, sel->lenExtra);
|
||||||
|
|
||||||
doc = node->doc;
|
doc = node->doc;
|
||||||
if ((list == NULL) || (prevdoc != doc)) {
|
if ((list == NULL) || (prevdoc != doc)) {
|
||||||
@@ -656,7 +656,7 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
|
|||||||
xmlXPathFreeObject(newlist);
|
xmlXPathFreeObject(newlist);
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
index = 0;
|
ix = 0;
|
||||||
|
|
||||||
if ((parent == NULL) || (node->doc == NULL))
|
if ((parent == NULL) || (node->doc == NULL))
|
||||||
nocache = 1;
|
nocache = 1;
|
||||||
@@ -673,13 +673,13 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
|
|||||||
xmlXPathFreeObject(list);
|
xmlXPathFreeObject(list);
|
||||||
list = newlist;
|
list = newlist;
|
||||||
|
|
||||||
XSLT_RUNTIME_EXTRA_LST(ctxt, select->lenExtra) =
|
XSLT_RUNTIME_EXTRA_LST(ctxt, sel->lenExtra) =
|
||||||
(void *) list;
|
(void *) list;
|
||||||
XSLT_RUNTIME_EXTRA(ctxt, select->previousExtra) =
|
XSLT_RUNTIME_EXTRA(ctxt, sel->previousExtra) =
|
||||||
(void *) doc;
|
(void *) doc;
|
||||||
XSLT_RUNTIME_EXTRA(ctxt, select->indexExtra) =
|
XSLT_RUNTIME_EXTRA(ctxt, sel->indexExtra) =
|
||||||
0;
|
0;
|
||||||
XSLT_RUNTIME_EXTRA_FREE(ctxt, select->lenExtra) =
|
XSLT_RUNTIME_EXTRA_FREE(ctxt, sel->lenExtra) =
|
||||||
(xmlFreeFunc) xmlXPathFreeObject;
|
(xmlFreeFunc) xmlXPathFreeObject;
|
||||||
} else
|
} else
|
||||||
list = newlist;
|
list = newlist;
|
||||||
@@ -691,7 +691,7 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
/* TODO: store the index and use it for the scan */
|
/* TODO: store the index and use it for the scan */
|
||||||
if (index == 0) {
|
if (ix == 0) {
|
||||||
for (j = 0;j < list->nodesetval->nodeNr;j++) {
|
for (j = 0;j < list->nodesetval->nodeNr;j++) {
|
||||||
if (list->nodesetval->nodeTab[j] == node) {
|
if (list->nodesetval->nodeTab[j] == node) {
|
||||||
if (nocache == 1)
|
if (nocache == 1)
|
||||||
@@ -713,18 +713,18 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
|
|||||||
*/
|
*/
|
||||||
oldCS = ctxt->xpathCtxt->contextSize;
|
oldCS = ctxt->xpathCtxt->contextSize;
|
||||||
oldCP = ctxt->xpathCtxt->proximityPosition;
|
oldCP = ctxt->xpathCtxt->proximityPosition;
|
||||||
if ((select != NULL) &&
|
if ((sel != NULL) &&
|
||||||
(select->op == XSLT_OP_ELEM) &&
|
(sel->op == XSLT_OP_ELEM) &&
|
||||||
(select->value != NULL) &&
|
(sel->value != NULL) &&
|
||||||
(node->type == XML_ELEMENT_NODE) &&
|
(node->type == XML_ELEMENT_NODE) &&
|
||||||
(node->parent != NULL)) {
|
(node->parent != NULL)) {
|
||||||
xmlNodePtr previous;
|
xmlNodePtr previous;
|
||||||
int index, nocache = 0;
|
int ix, nocache = 0;
|
||||||
|
|
||||||
previous = (xmlNodePtr)
|
previous = (xmlNodePtr)
|
||||||
XSLT_RUNTIME_EXTRA(ctxt, select->previousExtra);
|
XSLT_RUNTIME_EXTRA(ctxt, sel->previousExtra);
|
||||||
index = (int)
|
ix = (int)
|
||||||
XSLT_RUNTIME_EXTRA(ctxt, select->indexExtra);
|
XSLT_RUNTIME_EXTRA(ctxt, sel->indexExtra);
|
||||||
if ((previous != NULL) &&
|
if ((previous != NULL) &&
|
||||||
(previous->parent == node->parent)) {
|
(previous->parent == node->parent)) {
|
||||||
/*
|
/*
|
||||||
@@ -741,9 +741,9 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
|
|||||||
(sibling->name != NULL) &&
|
(sibling->name != NULL) &&
|
||||||
(previous->name[0] == sibling->name[0]) &&
|
(previous->name[0] == sibling->name[0]) &&
|
||||||
(xmlStrEqual(previous->name, sibling->name))) {
|
(xmlStrEqual(previous->name, sibling->name))) {
|
||||||
if ((select->value2 == NULL) ||
|
if ((sel->value2 == NULL) ||
|
||||||
((sibling->ns != NULL) &&
|
((sibling->ns != NULL) &&
|
||||||
(xmlStrEqual(select->value2,
|
(xmlStrEqual(sel->value2,
|
||||||
sibling->ns->href))))
|
sibling->ns->href))))
|
||||||
indx++;
|
indx++;
|
||||||
}
|
}
|
||||||
@@ -756,16 +756,16 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
|
|||||||
while (sibling != NULL) {
|
while (sibling != NULL) {
|
||||||
if (sibling == previous)
|
if (sibling == previous)
|
||||||
break;
|
break;
|
||||||
if ((select->value2 == NULL) ||
|
if ((sel->value2 == NULL) ||
|
||||||
((sibling->ns != NULL) &&
|
((sibling->ns != NULL) &&
|
||||||
(xmlStrEqual(select->value2,
|
(xmlStrEqual(sel->value2,
|
||||||
sibling->ns->href))))
|
sibling->ns->href))))
|
||||||
indx--;
|
indx--;
|
||||||
sibling = sibling->next;
|
sibling = sibling->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sibling != NULL) {
|
if (sibling != NULL) {
|
||||||
pos = index + indx;
|
pos = ix + indx;
|
||||||
/*
|
/*
|
||||||
* If the node is in a Value Tree we cannot
|
* If the node is in a Value Tree we cannot
|
||||||
* cache it !
|
* cache it !
|
||||||
@@ -774,13 +774,13 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
|
|||||||
(node->doc->name != NULL) &&
|
(node->doc->name != NULL) &&
|
||||||
(node->doc->name[0] != ' ')) {
|
(node->doc->name[0] != ' ')) {
|
||||||
len = (int)
|
len = (int)
|
||||||
XSLT_RUNTIME_EXTRA(ctxt, select->lenExtra);
|
XSLT_RUNTIME_EXTRA(ctxt, sel->lenExtra);
|
||||||
XSLT_RUNTIME_EXTRA(ctxt,
|
XSLT_RUNTIME_EXTRA(ctxt,
|
||||||
select->previousExtra) = node;
|
sel->previousExtra) = node;
|
||||||
XSLT_RUNTIME_EXTRA(ctxt, select->indexExtra) =
|
XSLT_RUNTIME_EXTRA(ctxt, sel->indexExtra) =
|
||||||
(void *) pos;
|
(void *) pos;
|
||||||
}
|
}
|
||||||
index = pos;
|
ix = pos;
|
||||||
} else
|
} else
|
||||||
pos = 0;
|
pos = 0;
|
||||||
} else {
|
} else {
|
||||||
@@ -799,9 +799,9 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
|
|||||||
(siblings->name != NULL) &&
|
(siblings->name != NULL) &&
|
||||||
(node->name[0] == siblings->name[0]) &&
|
(node->name[0] == siblings->name[0]) &&
|
||||||
(xmlStrEqual(node->name, siblings->name))) {
|
(xmlStrEqual(node->name, siblings->name))) {
|
||||||
if ((select->value2 == NULL) ||
|
if ((sel->value2 == NULL) ||
|
||||||
((siblings->ns != NULL) &&
|
((siblings->ns != NULL) &&
|
||||||
(xmlStrEqual(select->value2,
|
(xmlStrEqual(sel->value2,
|
||||||
siblings->ns->href))))
|
siblings->ns->href))))
|
||||||
len++;
|
len++;
|
||||||
}
|
}
|
||||||
@@ -827,23 +827,23 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
|
|||||||
* cache it !
|
* cache it !
|
||||||
*/
|
*/
|
||||||
if ((node->doc != NULL) && (nocache == 0)) {
|
if ((node->doc != NULL) && (nocache == 0)) {
|
||||||
XSLT_RUNTIME_EXTRA(ctxt, select->previousExtra) =
|
XSLT_RUNTIME_EXTRA(ctxt, sel->previousExtra) =
|
||||||
node;
|
node;
|
||||||
XSLT_RUNTIME_EXTRA(ctxt, select->indexExtra) =
|
XSLT_RUNTIME_EXTRA(ctxt, sel->indexExtra) =
|
||||||
(void *) pos;
|
(void *) pos;
|
||||||
XSLT_RUNTIME_EXTRA(ctxt, select->lenExtra) =
|
XSLT_RUNTIME_EXTRA(ctxt, sel->lenExtra) =
|
||||||
(void *) len;
|
(void *) len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ((select != NULL) && (select->op == XSLT_OP_ALL) &&
|
} else if ((sel != NULL) && (sel->op == XSLT_OP_ALL) &&
|
||||||
(node->type == XML_ELEMENT_NODE)) {
|
(node->type == XML_ELEMENT_NODE)) {
|
||||||
xmlNodePtr previous;
|
xmlNodePtr previous;
|
||||||
int index, nocache = 0;
|
int ix, nocache = 0;
|
||||||
|
|
||||||
previous = (xmlNodePtr)
|
previous = (xmlNodePtr)
|
||||||
XSLT_RUNTIME_EXTRA(ctxt, select->previousExtra);
|
XSLT_RUNTIME_EXTRA(ctxt, sel->previousExtra);
|
||||||
index = (int)
|
ix = (int)
|
||||||
XSLT_RUNTIME_EXTRA(ctxt, select->indexExtra);
|
XSLT_RUNTIME_EXTRA(ctxt, sel->indexExtra);
|
||||||
if ((previous != NULL) &&
|
if ((previous != NULL) &&
|
||||||
(previous->parent == node->parent)) {
|
(previous->parent == node->parent)) {
|
||||||
/*
|
/*
|
||||||
@@ -872,7 +872,7 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sibling != NULL) {
|
if (sibling != NULL) {
|
||||||
pos = index + indx;
|
pos = ix + indx;
|
||||||
/*
|
/*
|
||||||
* If the node is in a Value Tree we cannot
|
* If the node is in a Value Tree we cannot
|
||||||
* cache it !
|
* cache it !
|
||||||
@@ -881,10 +881,10 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
|
|||||||
(node->doc->name != NULL) &&
|
(node->doc->name != NULL) &&
|
||||||
(node->doc->name[0] != ' ')) {
|
(node->doc->name[0] != ' ')) {
|
||||||
len = (int)
|
len = (int)
|
||||||
XSLT_RUNTIME_EXTRA(ctxt, select->lenExtra);
|
XSLT_RUNTIME_EXTRA(ctxt, sel->lenExtra);
|
||||||
XSLT_RUNTIME_EXTRA(ctxt,
|
XSLT_RUNTIME_EXTRA(ctxt,
|
||||||
select->previousExtra) = node;
|
sel->previousExtra) = node;
|
||||||
XSLT_RUNTIME_EXTRA(ctxt, select->indexExtra) =
|
XSLT_RUNTIME_EXTRA(ctxt, sel->indexExtra) =
|
||||||
(void *) pos;
|
(void *) pos;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
@@ -924,11 +924,11 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
|
|||||||
* cache it !
|
* cache it !
|
||||||
*/
|
*/
|
||||||
if ((node->doc != NULL) && (nocache == 0)) {
|
if ((node->doc != NULL) && (nocache == 0)) {
|
||||||
XSLT_RUNTIME_EXTRA(ctxt, select->previousExtra) =
|
XSLT_RUNTIME_EXTRA(ctxt, sel->previousExtra) =
|
||||||
node;
|
node;
|
||||||
XSLT_RUNTIME_EXTRA(ctxt, select->indexExtra) =
|
XSLT_RUNTIME_EXTRA(ctxt, sel->indexExtra) =
|
||||||
(void *) pos;
|
(void *) pos;
|
||||||
XSLT_RUNTIME_EXTRA(ctxt, select->lenExtra) =
|
XSLT_RUNTIME_EXTRA(ctxt, sel->lenExtra) =
|
||||||
(void *) len;
|
(void *) len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -65,8 +65,6 @@ static int xsltGetHTMLIDs(const xmlChar *version, const xmlChar **publicID,
|
|||||||
|
|
||||||
int xsltMaxDepth = 5000;
|
int xsltMaxDepth = 5000;
|
||||||
|
|
||||||
xmlDictPtr xmlDictCreateSub(xmlDictPtr sub);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Useful macros
|
* Useful macros
|
||||||
*/
|
*/
|
||||||
|
@@ -784,8 +784,8 @@ xsltEvalGlobalVariables(xsltTransformContextPtr ctxt) {
|
|||||||
* @style: the XSLT transformation context
|
* @style: the XSLT transformation context
|
||||||
* @name: the variable name
|
* @name: the variable name
|
||||||
* @ns_uri: the variable namespace URI
|
* @ns_uri: the variable namespace URI
|
||||||
* @select: the expression which need to be evaluated to generate a value
|
* @sel: the expression which need to be evaluated to generate a value
|
||||||
* @tree: the subtree if select is NULL
|
* @tree: the subtree if sel is NULL
|
||||||
* @comp: the precompiled value
|
* @comp: the precompiled value
|
||||||
* @value: the string value if available
|
* @value: the string value if available
|
||||||
*
|
*
|
||||||
@@ -796,7 +796,7 @@ xsltEvalGlobalVariables(xsltTransformContextPtr ctxt) {
|
|||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
xsltRegisterGlobalVariable(xsltStylesheetPtr style, const xmlChar *name,
|
xsltRegisterGlobalVariable(xsltStylesheetPtr style, const xmlChar *name,
|
||||||
const xmlChar *ns_uri, const xmlChar *select,
|
const xmlChar *ns_uri, const xmlChar *sel,
|
||||||
xmlNodePtr tree, xsltStylePreCompPtr comp,
|
xmlNodePtr tree, xsltStylePreCompPtr comp,
|
||||||
const xmlChar *value) {
|
const xmlChar *value) {
|
||||||
xsltStackElemPtr elem, tmp;
|
xsltStackElemPtr elem, tmp;
|
||||||
@@ -821,7 +821,7 @@ xsltRegisterGlobalVariable(xsltStylesheetPtr style, const xmlChar *name,
|
|||||||
return(-1);
|
return(-1);
|
||||||
elem->comp = comp;
|
elem->comp = comp;
|
||||||
elem->name = xmlDictLookup(style->dict, name, -1);
|
elem->name = xmlDictLookup(style->dict, name, -1);
|
||||||
elem->select = xmlDictLookup(style->dict, select, -1);
|
elem->select = xmlDictLookup(style->dict, sel, -1);
|
||||||
if (ns_uri)
|
if (ns_uri)
|
||||||
elem->nameURI = xmlDictLookup(style->dict, ns_uri, -1);
|
elem->nameURI = xmlDictLookup(style->dict, ns_uri, -1);
|
||||||
elem->tree = tree;
|
elem->tree = tree;
|
||||||
|
@@ -44,7 +44,7 @@ extern "C" {
|
|||||||
*
|
*
|
||||||
* extra version information, used to show a CVS compilation
|
* extra version information, used to show a CVS compilation
|
||||||
*/
|
*/
|
||||||
#define LIBXML_VERSION_EXTRA "-CVS958"
|
#define LIBXML_VERSION_EXTRA "-CVS959"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WITH_XSLT_DEBUG:
|
* WITH_XSLT_DEBUG:
|
||||||
|
Reference in New Issue
Block a user