mirror of
https://github.com/reactos/reactos.git
synced 2025-06-22 23:20:16 +00:00
[LIBXSLT] Update to version 1.1.34. CORE-16952
This commit is contained in:
parent
f22fa382fe
commit
b01a480163
22 changed files with 657 additions and 374 deletions
76
dll/3rdparty/libxslt/xsltutils.c
vendored
76
dll/3rdparty/libxslt/xsltutils.c
vendored
|
@ -1554,7 +1554,15 @@ xsltSaveResultTo(xmlOutputBufferPtr buf, xmlDocPtr result,
|
|||
xmlOutputBufferWriteString(buf, "?>\n");
|
||||
}
|
||||
if (result->children != NULL) {
|
||||
xmlNodePtr child = result->children;
|
||||
xmlNodePtr children = result->children;
|
||||
xmlNodePtr child = children;
|
||||
|
||||
/*
|
||||
* Hack to avoid quadratic behavior when scanning
|
||||
* result->children in xmlGetIntSubset called by
|
||||
* xmlNodeDumpOutput.
|
||||
*/
|
||||
result->children = NULL;
|
||||
|
||||
while (child != NULL) {
|
||||
xmlNodeDumpOutput(buf, result, child, 0, (indent == 1),
|
||||
|
@ -1567,6 +1575,8 @@ xsltSaveResultTo(xmlOutputBufferPtr buf, xmlDocPtr result,
|
|||
}
|
||||
if (indent)
|
||||
xmlOutputBufferWriteString(buf, "\n");
|
||||
|
||||
result->children = children;
|
||||
}
|
||||
xmlOutputBufferFlush(buf);
|
||||
}
|
||||
|
@ -1764,6 +1774,8 @@ xsltSaveResultToString(xmlChar **doc_txt_ptr, int * doc_txt_len,
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef WITH_PROFILER
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Generating profiling information *
|
||||
|
@ -2241,6 +2253,8 @@ xsltGetProfileInformation(xsltTransformContextPtr ctxt)
|
|||
return ret;
|
||||
}
|
||||
|
||||
#endif /* WITH_PROFILER */
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Hooks for libxml2 XPath *
|
||||
|
@ -2264,25 +2278,7 @@ xsltXPathCompileFlags(xsltStylesheetPtr style, const xmlChar *str, int flags) {
|
|||
xmlXPathCompExprPtr ret;
|
||||
|
||||
if (style != NULL) {
|
||||
#ifdef XSLT_REFACTORED_XPATHCOMP
|
||||
if (XSLT_CCTXT(style)) {
|
||||
/*
|
||||
* Proposed by Jerome Pesenti
|
||||
* --------------------------
|
||||
* For better efficiency we'll reuse the compilation
|
||||
* context's XPath context. For the common stylesheet using
|
||||
* XPath expressions this will reduce compilation time to
|
||||
* about 50%.
|
||||
*
|
||||
* See http://mail.gnome.org/archives/xslt/2006-April/msg00037.html
|
||||
*/
|
||||
xpathCtxt = XSLT_CCTXT(style)->xpathCtxt;
|
||||
xpathCtxt->doc = style->doc;
|
||||
} else
|
||||
xpathCtxt = xmlXPathNewContext(style->doc);
|
||||
#else
|
||||
xpathCtxt = xmlXPathNewContext(style->doc);
|
||||
#endif
|
||||
xpathCtxt = style->principal->xpathCtxt;
|
||||
if (xpathCtxt == NULL)
|
||||
return NULL;
|
||||
xpathCtxt->dict = style->dict;
|
||||
|
@ -2298,13 +2294,9 @@ xsltXPathCompileFlags(xsltStylesheetPtr style, const xmlChar *str, int flags) {
|
|||
*/
|
||||
ret = xmlXPathCtxtCompile(xpathCtxt, str);
|
||||
|
||||
#ifdef XSLT_REFACTORED_XPATHCOMP
|
||||
if ((style == NULL) || (! XSLT_CCTXT(style))) {
|
||||
if (style == NULL) {
|
||||
xmlXPathFreeContext(xpathCtxt);
|
||||
}
|
||||
#else
|
||||
xmlXPathFreeContext(xpathCtxt);
|
||||
#endif
|
||||
/*
|
||||
* TODO: there is a lot of optimizations which should be possible
|
||||
* like variable slot precomputations, function precomputations, etc.
|
||||
|
@ -2334,6 +2326,23 @@ xsltXPathCompile(xsltStylesheetPtr style, const xmlChar *str) {
|
|||
* *
|
||||
************************************************************************/
|
||||
|
||||
int xslDebugStatus;
|
||||
|
||||
/**
|
||||
* xsltGetDebuggerStatus:
|
||||
*
|
||||
* Get xslDebugStatus.
|
||||
*
|
||||
* Returns the value of xslDebugStatus.
|
||||
*/
|
||||
int
|
||||
xsltGetDebuggerStatus(void)
|
||||
{
|
||||
return(xslDebugStatus);
|
||||
}
|
||||
|
||||
#ifdef WITH_DEBUGGER
|
||||
|
||||
/*
|
||||
* There is currently only 3 debugging callback defined
|
||||
* Debugger callbacks are disabled by default
|
||||
|
@ -2354,8 +2363,6 @@ static xsltDebuggerCallbacks xsltDebuggerCurrentCallbacks = {
|
|||
NULL /* drop */
|
||||
};
|
||||
|
||||
int xslDebugStatus;
|
||||
|
||||
/**
|
||||
* xsltSetDebuggerStatus:
|
||||
* @value : the value to be set
|
||||
|
@ -2368,19 +2375,6 @@ xsltSetDebuggerStatus(int value)
|
|||
xslDebugStatus = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* xsltGetDebuggerStatus:
|
||||
*
|
||||
* Get xslDebugStatus.
|
||||
*
|
||||
* Returns the value of xslDebugStatus.
|
||||
*/
|
||||
int
|
||||
xsltGetDebuggerStatus(void)
|
||||
{
|
||||
return(xslDebugStatus);
|
||||
}
|
||||
|
||||
/**
|
||||
* xsltSetDebuggerCallbacks:
|
||||
* @no : number of callbacks
|
||||
|
@ -2455,3 +2449,5 @@ xslDropCall(void)
|
|||
xsltDebuggerCurrentCallbacks.drop();
|
||||
}
|
||||
|
||||
#endif /* WITH_DEBUGGER */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue