mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[LIBXSLT]
- Trim trailing whitespace. Remove spaces before tabs. No code changes. svn path=/trunk/; revision=58297
This commit is contained in:
parent
61979ebc0f
commit
e53c550e55
34 changed files with 1024 additions and 1024 deletions
64
reactos/dll/3rdparty/libxslt/attributes.c
vendored
64
reactos/dll/3rdparty/libxslt/attributes.c
vendored
|
@ -140,7 +140,7 @@ xsltFreeAttrElem(xsltAttrElemPtr attr) {
|
|||
static void
|
||||
xsltFreeAttrElemList(xsltAttrElemPtr list) {
|
||||
xsltAttrElemPtr next;
|
||||
|
||||
|
||||
while (list != NULL) {
|
||||
next = list->next;
|
||||
xsltFreeAttrElem(list);
|
||||
|
@ -171,7 +171,7 @@ xsltAddAttrElemList(xsltAttrElemPtr list, xmlNodePtr attr) {
|
|||
if (list == NULL)
|
||||
return(xsltNewAttrElem(attr));
|
||||
cur = list;
|
||||
while (cur != NULL) {
|
||||
while (cur != NULL) {
|
||||
next = cur->next;
|
||||
if (cur->attr == attr)
|
||||
return(cur);
|
||||
|
@ -375,7 +375,7 @@ xsltParseStylesheetAttributeSet(xsltStylesheetPtr style, xmlNodePtr cur) {
|
|||
attrItems = curAttr;
|
||||
goto next_child;
|
||||
}
|
||||
if (curAttr->next == NULL)
|
||||
if (curAttr->next == NULL)
|
||||
curAttr->next = xsltNewAttrElem(child);
|
||||
curAttr = nextAttr;
|
||||
}
|
||||
|
@ -405,7 +405,7 @@ next_child:
|
|||
/*
|
||||
* Process attribue "use-attribute-sets".
|
||||
*/
|
||||
/* TODO check recursion */
|
||||
/* TODO check recursion */
|
||||
value = xmlGetNsProp(cur, (const xmlChar *)"use-attribute-sets",
|
||||
NULL);
|
||||
if (value != NULL) {
|
||||
|
@ -422,7 +422,7 @@ next_child:
|
|||
const xmlChar *ncname2 = NULL;
|
||||
const xmlChar *prefix2 = NULL;
|
||||
xsltAttrElemPtr refAttrItems;
|
||||
|
||||
|
||||
#ifdef WITH_XSLT_DEBUG_ATTRIBUTES
|
||||
xsltGenericDebug(xsltGenericDebugContext,
|
||||
"xsl:attribute-set : %s adds use %s\n", ncname, curval);
|
||||
|
@ -605,7 +605,7 @@ xsltResolveStylesheetAttributeSet(xsltStylesheetPtr style) {
|
|||
#endif
|
||||
style->attributeSets = xmlHashCreate(10);
|
||||
}
|
||||
xmlHashScanFull(cur->attributeSets,
|
||||
xmlHashScanFull(cur->attributeSets,
|
||||
(xmlHashScannerFull) xsltMergeSASCallback, style);
|
||||
/*
|
||||
* the attribute lists have either been migrated to style
|
||||
|
@ -621,7 +621,7 @@ xsltResolveStylesheetAttributeSet(xsltStylesheetPtr style) {
|
|||
* Then resolve all the references and computes the resulting sets
|
||||
*/
|
||||
if (style->attributeSets != NULL) {
|
||||
xmlHashScanFull(style->attributeSets,
|
||||
xmlHashScanFull(style->attributeSets,
|
||||
(xmlHashScannerFull) xsltResolveSASCallback, style);
|
||||
}
|
||||
}
|
||||
|
@ -645,21 +645,21 @@ xsltAttributeInternal(xsltTransformContextPtr ctxt,
|
|||
{
|
||||
#ifdef XSLT_REFACTORED
|
||||
xsltStyleItemAttributePtr comp =
|
||||
(xsltStyleItemAttributePtr) castedComp;
|
||||
(xsltStyleItemAttributePtr) castedComp;
|
||||
#else
|
||||
xsltStylePreCompPtr comp = castedComp;
|
||||
#endif
|
||||
xmlNodePtr targetElem;
|
||||
xmlChar *prop = NULL;
|
||||
xmlChar *prop = NULL;
|
||||
const xmlChar *name = NULL, *prefix = NULL, *nsName = NULL;
|
||||
xmlChar *value = NULL;
|
||||
xmlNsPtr ns = NULL;
|
||||
xmlAttrPtr attr;
|
||||
xmlAttrPtr attr;
|
||||
|
||||
if ((ctxt == NULL) || (contextNode == NULL) || (inst == NULL))
|
||||
return;
|
||||
|
||||
/*
|
||||
/*
|
||||
* A comp->has_name == 0 indicates that we need to skip this instruction,
|
||||
* since it was evaluated to be invalid already during compilation.
|
||||
*/
|
||||
|
@ -689,7 +689,7 @@ xsltAttributeInternal(xsltTransformContextPtr ctxt,
|
|||
* So report an internal error?
|
||||
*/
|
||||
if (ctxt->insert == NULL)
|
||||
return;
|
||||
return;
|
||||
/*
|
||||
* SPEC XSLT 1.0:
|
||||
* "Adding an attribute to a node that is not an element;
|
||||
|
@ -701,7 +701,7 @@ xsltAttributeInternal(xsltTransformContextPtr ctxt,
|
|||
targetElem = ctxt->insert;
|
||||
if (targetElem->type != XML_ELEMENT_NODE)
|
||||
return;
|
||||
|
||||
|
||||
/*
|
||||
* SPEC XSLT 1.0:
|
||||
* "Adding an attribute to an element after children have been added
|
||||
|
@ -727,7 +727,7 @@ xsltAttributeInternal(xsltTransformContextPtr ctxt,
|
|||
/*
|
||||
* Process the name
|
||||
* ----------------
|
||||
*/
|
||||
*/
|
||||
|
||||
#ifdef WITH_DEBUGGER
|
||||
if (ctxt->debugStatus != XSLT_DEBUG_NONE)
|
||||
|
@ -785,7 +785,7 @@ xsltAttributeInternal(xsltTransformContextPtr ctxt,
|
|||
name = xsltSplitQName(ctxt->dict, comp->name, &prefix);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Process namespace semantics
|
||||
* ---------------------------
|
||||
|
@ -809,9 +809,9 @@ xsltAttributeInternal(xsltTransformContextPtr ctxt,
|
|||
*/
|
||||
/* TODO: check attr acquisition wrt to the XSLT namespace */
|
||||
tmpNsName = xsltEvalAttrValueTemplate(ctxt, inst,
|
||||
(const xmlChar *) "namespace", XSLT_NAMESPACE);
|
||||
(const xmlChar *) "namespace", XSLT_NAMESPACE);
|
||||
/*
|
||||
* This fixes bug #302020: The AVT might also evaluate to the
|
||||
* This fixes bug #302020: The AVT might also evaluate to the
|
||||
* empty string; this means that the empty string also indicates
|
||||
* "no namespace".
|
||||
* SPEC XSLT 1.0:
|
||||
|
@ -820,8 +820,8 @@ xsltAttributeInternal(xsltTransformContextPtr ctxt,
|
|||
*/
|
||||
if ((tmpNsName != NULL) && (tmpNsName[0] != 0))
|
||||
nsName = xmlDictLookup(ctxt->dict, BAD_CAST tmpNsName, -1);
|
||||
xmlFree(tmpNsName);
|
||||
};
|
||||
xmlFree(tmpNsName);
|
||||
};
|
||||
} else if (prefix != NULL) {
|
||||
/*
|
||||
* SPEC XSLT 1.0:
|
||||
|
@ -829,7 +829,7 @@ xsltAttributeInternal(xsltTransformContextPtr ctxt,
|
|||
* expanded into an expanded-name using the namespace declarations
|
||||
* in effect for the xsl:attribute element, *not* including any
|
||||
* default namespace declaration."
|
||||
*/
|
||||
*/
|
||||
ns = xmlSearchNs(inst->doc, inst, prefix);
|
||||
if (ns == NULL) {
|
||||
/*
|
||||
|
@ -842,7 +842,7 @@ xsltAttributeInternal(xsltTransformContextPtr ctxt,
|
|||
"this is an error, since the namespace was not "
|
||||
"specified by the instruction itself.\n", prefix, name);
|
||||
} else
|
||||
nsName = ns->href;
|
||||
nsName = ns->href;
|
||||
}
|
||||
|
||||
if (fromAttributeSet) {
|
||||
|
@ -862,9 +862,9 @@ xsltAttributeInternal(xsltTransformContextPtr ctxt,
|
|||
* Find/create a matching ns-decl in the result tree.
|
||||
*/
|
||||
ns = NULL;
|
||||
|
||||
|
||||
#if 0
|
||||
if (0) {
|
||||
if (0) {
|
||||
/*
|
||||
* OPTIMIZE TODO: How do we know if we are adding to a
|
||||
* fragment or to the result tree?
|
||||
|
@ -883,7 +883,7 @@ xsltAttributeInternal(xsltTransformContextPtr ctxt,
|
|||
}
|
||||
#endif
|
||||
|
||||
if (nsName != NULL) {
|
||||
if (nsName != NULL) {
|
||||
/*
|
||||
* Something about ns-prefixes:
|
||||
* SPEC XSLT 1.0:
|
||||
|
@ -925,12 +925,12 @@ xsltAttributeInternal(xsltTransformContextPtr ctxt,
|
|||
* TODO: Do we need to put the empty string in ?
|
||||
*/
|
||||
attr = xmlSetNsProp(ctxt->insert, ns, name, (const xmlChar *) "");
|
||||
} else if ((inst->children->next == NULL) &&
|
||||
} else if ((inst->children->next == NULL) &&
|
||||
((inst->children->type == XML_TEXT_NODE) ||
|
||||
(inst->children->type == XML_CDATA_SECTION_NODE)))
|
||||
{
|
||||
xmlNodePtr copyTxt;
|
||||
|
||||
|
||||
/*
|
||||
* xmlSetNsProp() will take care of duplicates.
|
||||
*/
|
||||
|
@ -965,7 +965,7 @@ xsltAttributeInternal(xsltTransformContextPtr ctxt,
|
|||
*/
|
||||
copyTxt = xmlNewText(inst->children->content);
|
||||
if (copyTxt == NULL) /* TODO: report error */
|
||||
goto error;
|
||||
goto error;
|
||||
}
|
||||
attr->children = attr->last = copyTxt;
|
||||
copyTxt->parent = (xmlNodePtr) attr;
|
||||
|
@ -976,7 +976,7 @@ xsltAttributeInternal(xsltTransformContextPtr ctxt,
|
|||
* anyway?
|
||||
*/
|
||||
if (inst->children->name == xmlStringTextNoenc)
|
||||
copyTxt->name = xmlStringTextNoenc;
|
||||
copyTxt->name = xmlStringTextNoenc;
|
||||
|
||||
/*
|
||||
* since we create the attribute without content IDness must be
|
||||
|
@ -1005,7 +1005,7 @@ xsltAttributeInternal(xsltTransformContextPtr ctxt,
|
|||
}
|
||||
|
||||
error:
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1041,10 +1041,10 @@ xsltApplyAttributeSet(xsltTransformContextPtr ctxt, xmlNodePtr node,
|
|||
const xmlChar *attrSets)
|
||||
{
|
||||
const xmlChar *ncname = NULL;
|
||||
const xmlChar *prefix = NULL;
|
||||
const xmlChar *prefix = NULL;
|
||||
const xmlChar *curstr, *endstr;
|
||||
xsltAttrElemPtr attrs;
|
||||
xsltStylesheetPtr style;
|
||||
xsltStylesheetPtr style;
|
||||
|
||||
if (attrSets == NULL) {
|
||||
if (inst == NULL)
|
||||
|
@ -1056,7 +1056,7 @@ xsltApplyAttributeSet(xsltTransformContextPtr ctxt, xmlNodePtr node,
|
|||
if (inst->type == XML_ATTRIBUTE_NODE) {
|
||||
if ( ((xmlAttrPtr) inst)->children != NULL)
|
||||
attrSets = ((xmlAttrPtr) inst)->children->content;
|
||||
|
||||
|
||||
}
|
||||
if (attrSets == NULL) {
|
||||
/*
|
||||
|
|
6
reactos/dll/3rdparty/libxslt/attributes.h
vendored
6
reactos/dll/3rdparty/libxslt/attributes.h
vendored
|
@ -21,14 +21,14 @@ extern "C" {
|
|||
XSLTPUBFUN void XSLTCALL
|
||||
xsltParseStylesheetAttributeSet (xsltStylesheetPtr style,
|
||||
xmlNodePtr cur);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltFreeAttributeSetsHashes (xsltStylesheetPtr style);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltApplyAttributeSet (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr inst,
|
||||
const xmlChar *attributes);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltResolveStylesheetAttributeSet(xsltStylesheetPtr style);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
6
reactos/dll/3rdparty/libxslt/attrvt.c
vendored
6
reactos/dll/3rdparty/libxslt/attrvt.c
vendored
|
@ -147,7 +147,7 @@ static xsltAttrVTPtr
|
|||
xsltSetAttrVTsegment(xsltAttrVTPtr avt, void *val) {
|
||||
if (avt->nb_seg >= avt->max_seg) {
|
||||
avt = (xsltAttrVTPtr) xmlRealloc(avt, sizeof(xsltAttrVT) +
|
||||
avt->max_seg * sizeof(void *));
|
||||
avt->max_seg * sizeof(void *));
|
||||
if (avt == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ xsltCompileAttr(xsltStylesheetPtr style, xmlAttrPtr attr) {
|
|||
|
||||
if ((style == NULL) || (attr == NULL) || (attr->children == NULL))
|
||||
return;
|
||||
if ((attr->children->type != XML_TEXT_NODE) ||
|
||||
if ((attr->children->type != XML_TEXT_NODE) ||
|
||||
(attr->children->next != NULL)) {
|
||||
xsltTransformError(NULL, style, attr->parent,
|
||||
"Attribute '%s': The content is expected to be a single text "
|
||||
|
@ -248,7 +248,7 @@ xsltCompileAttr(xsltStylesheetPtr style, xmlAttrPtr attr) {
|
|||
/* Need to check for literal (bug539741) */
|
||||
if ((*cur == '\'') || (*cur == '"')) {
|
||||
char delim = *(cur++);
|
||||
while ((*cur != 0) && (*cur != delim))
|
||||
while ((*cur != 0) && (*cur != delim))
|
||||
cur++;
|
||||
if (*cur != 0)
|
||||
cur++; /* skip the ending delimiter */
|
||||
|
|
30
reactos/dll/3rdparty/libxslt/documents.c
vendored
30
reactos/dll/3rdparty/libxslt/documents.c
vendored
|
@ -36,9 +36,9 @@
|
|||
#endif
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Hooks for the document loader *
|
||||
* *
|
||||
* *
|
||||
* Hooks for the document loader *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
|
@ -116,7 +116,7 @@ xsltDocLoaderFunc xsltDocDefaultLoader = xsltDocDefaultLoaderFunc;
|
|||
* Set the new function to load document, if NULL it resets it to the
|
||||
* default function.
|
||||
*/
|
||||
|
||||
|
||||
void
|
||||
xsltSetLoaderFunc(xsltDocLoaderFunc f) {
|
||||
if (f == NULL)
|
||||
|
@ -140,7 +140,7 @@ xsltSetLoaderFunc(xsltDocLoaderFunc f) {
|
|||
*
|
||||
* Returns a handler to the document
|
||||
*/
|
||||
xsltDocumentPtr
|
||||
xsltDocumentPtr
|
||||
xsltNewDocument(xsltTransformContextPtr ctxt, xmlDocPtr doc) {
|
||||
xsltDocumentPtr cur;
|
||||
|
||||
|
@ -179,7 +179,7 @@ xsltNewDocument(xsltTransformContextPtr ctxt, xmlDocPtr doc) {
|
|||
*
|
||||
* Returns a handler to the document
|
||||
*/
|
||||
xsltDocumentPtr
|
||||
xsltDocumentPtr
|
||||
xsltNewStyleDocument(xsltStylesheetPtr style, xmlDocPtr doc) {
|
||||
xsltDocumentPtr cur;
|
||||
|
||||
|
@ -204,15 +204,15 @@ xsltNewStyleDocument(xsltStylesheetPtr style, xmlDocPtr doc) {
|
|||
*
|
||||
* Frees the node-trees (and xsltDocument structures) of all
|
||||
* stylesheet-modules of the stylesheet-level represented by
|
||||
* the given @style.
|
||||
* the given @style.
|
||||
*/
|
||||
void
|
||||
void
|
||||
xsltFreeStyleDocuments(xsltStylesheetPtr style) {
|
||||
xsltDocumentPtr doc, cur;
|
||||
#ifdef XSLT_REFACTORED_XSLT_NSCOMP
|
||||
xsltNsMapPtr nsMap;
|
||||
#endif
|
||||
|
||||
|
||||
if (style == NULL)
|
||||
return;
|
||||
|
||||
|
@ -220,8 +220,8 @@ xsltFreeStyleDocuments(xsltStylesheetPtr style) {
|
|||
if (XSLT_HAS_INTERNAL_NSMAP(style))
|
||||
nsMap = XSLT_GET_INTERNAL_NSMAP(style);
|
||||
else
|
||||
nsMap = NULL;
|
||||
#endif
|
||||
nsMap = NULL;
|
||||
#endif
|
||||
|
||||
cur = style->docList;
|
||||
while (cur != NULL) {
|
||||
|
@ -247,7 +247,7 @@ xsltFreeStyleDocuments(xsltStylesheetPtr style) {
|
|||
*
|
||||
* Free up all the space used by the loaded documents
|
||||
*/
|
||||
void
|
||||
void
|
||||
xsltFreeDocuments(xsltTransformContextPtr ctxt) {
|
||||
xsltDocumentPtr doc, cur;
|
||||
|
||||
|
@ -281,7 +281,7 @@ xsltFreeDocuments(xsltTransformContextPtr ctxt) {
|
|||
*
|
||||
* Returns the new xsltDocumentPtr or NULL in case of error
|
||||
*/
|
||||
xsltDocumentPtr
|
||||
xsltDocumentPtr
|
||||
xsltLoadDocument(xsltTransformContextPtr ctxt, const xmlChar *URI) {
|
||||
xsltDocumentPtr ret;
|
||||
xmlDocPtr doc;
|
||||
|
@ -294,7 +294,7 @@ xsltLoadDocument(xsltTransformContextPtr ctxt, const xmlChar *URI) {
|
|||
*/
|
||||
if (ctxt->sec != NULL) {
|
||||
int res;
|
||||
|
||||
|
||||
res = xsltCheckRead(ctxt->sec, ctxt, URI);
|
||||
if (res == 0) {
|
||||
xsltTransformError(ctxt, NULL, NULL,
|
||||
|
@ -355,7 +355,7 @@ xsltLoadDocument(xsltTransformContextPtr ctxt, const xmlChar *URI) {
|
|||
*
|
||||
* Returns the new xsltDocumentPtr or NULL in case of error
|
||||
*/
|
||||
xsltDocumentPtr
|
||||
xsltDocumentPtr
|
||||
xsltLoadStyleDocument(xsltStylesheetPtr style, const xmlChar *URI) {
|
||||
xsltDocumentPtr ret;
|
||||
xmlDocPtr doc;
|
||||
|
|
26
reactos/dll/3rdparty/libxslt/documents.h
vendored
26
reactos/dll/3rdparty/libxslt/documents.h
vendored
|
@ -20,26 +20,26 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
XSLTPUBFUN xsltDocumentPtr XSLTCALL
|
||||
XSLTPUBFUN xsltDocumentPtr XSLTCALL
|
||||
xsltNewDocument (xsltTransformContextPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
XSLTPUBFUN xsltDocumentPtr XSLTCALL
|
||||
xsltLoadDocument (xsltTransformContextPtr ctxt,
|
||||
XSLTPUBFUN xsltDocumentPtr XSLTCALL
|
||||
xsltLoadDocument (xsltTransformContextPtr ctxt,
|
||||
const xmlChar *URI);
|
||||
XSLTPUBFUN xsltDocumentPtr XSLTCALL
|
||||
xsltFindDocument (xsltTransformContextPtr ctxt,
|
||||
XSLTPUBFUN xsltDocumentPtr XSLTCALL
|
||||
xsltFindDocument (xsltTransformContextPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltFreeDocuments (xsltTransformContextPtr ctxt);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltFreeDocuments (xsltTransformContextPtr ctxt);
|
||||
|
||||
XSLTPUBFUN xsltDocumentPtr XSLTCALL
|
||||
xsltLoadStyleDocument (xsltStylesheetPtr style,
|
||||
XSLTPUBFUN xsltDocumentPtr XSLTCALL
|
||||
xsltLoadStyleDocument (xsltStylesheetPtr style,
|
||||
const xmlChar *URI);
|
||||
XSLTPUBFUN xsltDocumentPtr XSLTCALL
|
||||
xsltNewStyleDocument (xsltStylesheetPtr style,
|
||||
XSLTPUBFUN xsltDocumentPtr XSLTCALL
|
||||
xsltNewStyleDocument (xsltStylesheetPtr style,
|
||||
xmlDocPtr doc);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltFreeStyleDocuments (xsltStylesheetPtr style);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltFreeStyleDocuments (xsltStylesheetPtr style);
|
||||
|
||||
/*
|
||||
* Hooks for document loading
|
||||
|
|
78
reactos/dll/3rdparty/libxslt/extensions.c
vendored
78
reactos/dll/3rdparty/libxslt/extensions.c
vendored
|
@ -44,9 +44,9 @@
|
|||
#endif
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Private Types and Globals *
|
||||
* *
|
||||
* *
|
||||
* Private Types and Globals *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
typedef struct _xsltExtDef xsltExtDef;
|
||||
|
@ -89,9 +89,9 @@ static xmlHashTablePtr xsltModuleHash = NULL;
|
|||
static xmlMutexPtr xsltExtMutex = NULL;
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Type functions *
|
||||
* *
|
||||
* *
|
||||
* Type functions *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
|
@ -302,18 +302,18 @@ typedef void (*exsltRegisterFunction) (void);
|
|||
* @URI: the function or element namespace URI
|
||||
*
|
||||
* Dynamically loads an extension plugin when available.
|
||||
*
|
||||
* The plugin name is derived from the URI by removing the
|
||||
*
|
||||
* The plugin name is derived from the URI by removing the
|
||||
* initial protocol designation, e.g. "http://", then converting
|
||||
* the characters ".", "-", "/", and "\" into "_", the removing
|
||||
* any trailing "/", then concatenating LIBXML_MODULE_EXTENSION.
|
||||
*
|
||||
* Plugins are loaded from the directory specified by the
|
||||
* environment variable LIBXSLT_PLUGINS_PATH, or if NULL,
|
||||
*
|
||||
* Plugins are loaded from the directory specified by the
|
||||
* environment variable LIBXSLT_PLUGINS_PATH, or if NULL,
|
||||
* by LIBXSLT_DEFAULT_PLUGINS_PATH() which is determined at
|
||||
* compile time.
|
||||
*
|
||||
* Returns 0 if successful, -1 in case of error.
|
||||
* Returns 0 if successful, -1 in case of error.
|
||||
*/
|
||||
|
||||
static int
|
||||
|
@ -391,7 +391,7 @@ xsltExtModuleRegisterDynamic(const xmlChar * URI)
|
|||
|
||||
#ifdef WITH_XSLT_DEBUG_EXTENSIONS
|
||||
xsltGenericDebug(xsltGenericDebugContext,
|
||||
"Attempting to load plugin: %s for URI: %s\n",
|
||||
"Attempting to load plugin: %s for URI: %s\n",
|
||||
module_filename, URI);
|
||||
#endif
|
||||
|
||||
|
@ -442,7 +442,7 @@ xsltExtModuleRegisterDynamic(const xmlChar * URI)
|
|||
|
||||
#ifdef WITH_XSLT_DEBUG_EXTENSIONS
|
||||
xsltGenericDebug(xsltGenericDebugContext,
|
||||
"xmlModuleSymbol failed for plugin: %s, regfunc: %s\n",
|
||||
"xmlModuleSymbol failed for plugin: %s, regfunc: %s\n",
|
||||
module_filename, regfunc_name);
|
||||
#endif
|
||||
|
||||
|
@ -463,9 +463,9 @@ xsltExtModuleRegisterDynamic(const xmlChar * URI ATTRIBUTE_UNUSED)
|
|||
#endif
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* The stylesheet extension prefixes handling *
|
||||
* *
|
||||
* *
|
||||
* The stylesheet extension prefixes handling *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
|
@ -487,7 +487,7 @@ xsltFreeExts(xsltStylesheetPtr style)
|
|||
* @style: an XSLT stylesheet
|
||||
* @prefix: the prefix used (optional)
|
||||
* @URI: the URI associated to the extension
|
||||
*
|
||||
*
|
||||
* Registers an extension namespace
|
||||
* This is called from xslt.c during compile-time.
|
||||
* The given prefix is not needed.
|
||||
|
@ -567,9 +567,9 @@ xsltRegisterExtPrefix(xsltStylesheetPtr style,
|
|||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* The extensions modules interfaces *
|
||||
* *
|
||||
* *
|
||||
* The extensions modules interfaces *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
|
@ -577,7 +577,7 @@ xsltRegisterExtPrefix(xsltStylesheetPtr style,
|
|||
* @ctxt: an XSLT transformation context
|
||||
* @name: the name of the element
|
||||
* @URI: the URI associated to the element
|
||||
* @function: the actual implementation which should be called
|
||||
* @function: the actual implementation which should be called
|
||||
*
|
||||
* Registers an extension function
|
||||
*
|
||||
|
@ -611,7 +611,7 @@ xsltRegisterExtFunction(xsltTransformContextPtr ctxt, const xmlChar * name,
|
|||
* @ctxt: an XSLT transformation context
|
||||
* @name: the name of the element
|
||||
* @URI: the URI associated to the element
|
||||
* @function: the actual implementation which should be called
|
||||
* @function: the actual implementation which should be called
|
||||
*
|
||||
* Registers an extension element
|
||||
*
|
||||
|
@ -666,8 +666,8 @@ xsltStyleInitializeStylesheetModule(xsltStylesheetPtr style,
|
|||
xsltExtDataPtr dataContainer;
|
||||
void *userData = NULL;
|
||||
xsltExtModulePtr module;
|
||||
|
||||
if ((style == NULL) || (URI == NULL))
|
||||
|
||||
if ((style == NULL) || (URI == NULL))
|
||||
return(NULL);
|
||||
|
||||
if (xsltExtensionsHash == NULL) {
|
||||
|
@ -716,7 +716,7 @@ xsltStyleInitializeStylesheetModule(xsltStylesheetPtr style,
|
|||
* Fire the initialization callback.
|
||||
*/
|
||||
userData = module->styleInitFunc(style, URI);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Store the user-data in the context of the given stylesheet.
|
||||
*/
|
||||
|
@ -727,7 +727,7 @@ xsltStyleInitializeStylesheetModule(xsltStylesheetPtr style,
|
|||
if (xmlHashAddEntry(style->extInfos, URI,
|
||||
(void *) dataContainer) < 0)
|
||||
{
|
||||
xsltTransformError(NULL, style, NULL,
|
||||
xsltTransformError(NULL, style, NULL,
|
||||
"Failed to register module '%s'.\n", URI);
|
||||
style->errors++;
|
||||
if (module->styleShutdownFunc)
|
||||
|
@ -762,7 +762,7 @@ xsltStyleGetExtData(xsltStylesheetPtr style, const xmlChar * URI)
|
|||
(xsltExtensionsHash == NULL))
|
||||
return (NULL);
|
||||
|
||||
|
||||
|
||||
#ifdef XSLT_REFACTORED
|
||||
/*
|
||||
* This is intended for global storage, so only the main
|
||||
|
@ -838,7 +838,7 @@ xsltStyleStylesheetLevelGetExtData(xsltStylesheetPtr style,
|
|||
*/
|
||||
if (dataContainer)
|
||||
return(dataContainer->extData);
|
||||
}
|
||||
}
|
||||
|
||||
dataContainer =
|
||||
xsltStyleInitializeStylesheetModule(style, URI);
|
||||
|
@ -1120,7 +1120,7 @@ xsltShutdownExt(xsltExtDataPtr data, xsltStylesheetPtr style,
|
|||
*
|
||||
* xmlHashRemoveEntry(style->extInfos, URI,
|
||||
* (xmlHashDeallocator) xsltFreeExtData);
|
||||
*/
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1156,12 +1156,12 @@ xsltShutdownExts(xsltStylesheetPtr style)
|
|||
*/
|
||||
int
|
||||
xsltCheckExtPrefix(xsltStylesheetPtr style, const xmlChar * URI)
|
||||
{
|
||||
{
|
||||
#ifdef XSLT_REFACTORED
|
||||
if ((style == NULL) || (style->compCtxt == NULL) ||
|
||||
(XSLT_CCTXT(style)->inode == NULL) ||
|
||||
(XSLT_CCTXT(style)->inode->extElemNs == NULL))
|
||||
return (0);
|
||||
return (0);
|
||||
/*
|
||||
* Lookup the extension namespaces registered
|
||||
* at the current node in the stylesheet's tree.
|
||||
|
@ -1175,7 +1175,7 @@ xsltCheckExtPrefix(xsltStylesheetPtr style, const xmlChar * URI)
|
|||
URI))
|
||||
{
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
@ -1950,15 +1950,15 @@ xsltGetExtInfo(xsltStylesheetPtr style, const xmlChar * URI)
|
|||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Test module http://xmlsoft.org/XSLT/ *
|
||||
* *
|
||||
* *
|
||||
* Test module http://xmlsoft.org/XSLT/ *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Test of the extension module API *
|
||||
* *
|
||||
* *
|
||||
* Test of the extension module API *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
static xmlChar *testData = NULL;
|
||||
|
|
18
reactos/dll/3rdparty/libxslt/extra.c
vendored
18
reactos/dll/3rdparty/libxslt/extra.c
vendored
|
@ -40,9 +40,9 @@
|
|||
#endif
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Handling of XSLT debugging *
|
||||
* *
|
||||
* *
|
||||
* Handling of XSLT debugging *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
|
@ -112,9 +112,9 @@ xsltDebug(xsltTransformContextPtr ctxt, xmlNodePtr node ATTRIBUTE_UNUSED,
|
|||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Classic extensions as described by M. Kay *
|
||||
* *
|
||||
* *
|
||||
* Classic extensions as described by M. Kay *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
|
@ -178,14 +178,14 @@ xsltFunctionLocalTime(xmlXPathParserContextPtr ctxt, int nargs) {
|
|||
time_t gmt, lmt;
|
||||
struct tm gmt_tm;
|
||||
struct tm *local_tm;
|
||||
|
||||
|
||||
if (nargs != 1) {
|
||||
xsltTransformError(xsltXPathGetTransformContext(ctxt), NULL, NULL,
|
||||
"localTime() : invalid number of args %d\n", nargs);
|
||||
ctxt->error = XPATH_INVALID_ARITY;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
obj = valuePop(ctxt);
|
||||
|
||||
if (obj->type != XPATH_STRING) {
|
||||
|
@ -195,7 +195,7 @@ xsltFunctionLocalTime(xmlXPathParserContextPtr ctxt, int nargs) {
|
|||
valuePush(ctxt, xmlXPathNewString((const xmlChar *)""));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
str = (char *) obj->stringval;
|
||||
|
||||
/* str = "$Date$" */
|
||||
|
|
6
reactos/dll/3rdparty/libxslt/extra.h
vendored
6
reactos/dll/3rdparty/libxslt/extra.h
vendored
|
@ -60,16 +60,16 @@ extern "C" {
|
|||
XSLTPUBFUN void XSLTCALL
|
||||
xsltFunctionNodeSet (xmlXPathParserContextPtr ctxt,
|
||||
int nargs);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltDebug (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr inst,
|
||||
xsltStylePreCompPtr comp);
|
||||
|
||||
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltRegisterExtras (xsltTransformContextPtr ctxt);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltRegisterAllExtras (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
60
reactos/dll/3rdparty/libxslt/functions.c
vendored
60
reactos/dll/3rdparty/libxslt/functions.c
vendored
|
@ -118,16 +118,16 @@ xsltDocumentFunctionLoadDocument(xmlXPathParserContextPtr ctxt, xmlChar* URI)
|
|||
"document() : internal error tctxt == NULL\n");
|
||||
valuePush(ctxt, xmlXPathNewNodeSet(NULL));
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
uri = xmlParseURI((const char *) URI);
|
||||
if (uri == NULL) {
|
||||
xsltTransformError(tctxt, NULL, NULL,
|
||||
"document() : failed to parse URI\n");
|
||||
valuePush(ctxt, xmlXPathNewNodeSet(NULL));
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* check for and remove fragment identifier
|
||||
*/
|
||||
|
@ -141,12 +141,12 @@ xsltDocumentFunctionLoadDocument(xmlXPathParserContextPtr ctxt, xmlChar* URI)
|
|||
} else
|
||||
idoc = xsltLoadDocument(tctxt, URI);
|
||||
xmlFreeURI(uri);
|
||||
|
||||
|
||||
if (idoc == NULL) {
|
||||
if ((URI == NULL) ||
|
||||
(URI[0] == '#') ||
|
||||
((tctxt->style->doc != NULL) &&
|
||||
(xmlStrEqual(tctxt->style->doc->URL, URI))))
|
||||
(xmlStrEqual(tctxt->style->doc->URL, URI))))
|
||||
{
|
||||
/*
|
||||
* This selects the stylesheet's doc itself.
|
||||
|
@ -167,7 +167,7 @@ xsltDocumentFunctionLoadDocument(xmlXPathParserContextPtr ctxt, xmlChar* URI)
|
|||
valuePush(ctxt, xmlXPathNewNodeSet((xmlNodePtr) doc));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* use XPointer of HTML location for fragment ID */
|
||||
#ifdef LIBXML_XPTR_ENABLED
|
||||
xptrctxt = xmlXPtrNewContext(doc, NULL, NULL);
|
||||
|
@ -180,11 +180,11 @@ xsltDocumentFunctionLoadDocument(xmlXPathParserContextPtr ctxt, xmlChar* URI)
|
|||
resObj = xmlXPtrEval(fragment, xptrctxt);
|
||||
xmlXPathFreeContext(xptrctxt);
|
||||
#endif
|
||||
xmlFree(fragment);
|
||||
xmlFree(fragment);
|
||||
|
||||
if (resObj == NULL)
|
||||
goto out_fragment;
|
||||
|
||||
|
||||
switch (resObj->type) {
|
||||
case XPATH_NODESET:
|
||||
break;
|
||||
|
@ -198,11 +198,11 @@ xsltDocumentFunctionLoadDocument(xmlXPathParserContextPtr ctxt, xmlChar* URI)
|
|||
case XPATH_RANGE:
|
||||
case XPATH_LOCATIONSET:
|
||||
xsltTransformError(tctxt, NULL, NULL,
|
||||
"document() : XPointer does not select a node set: #%s\n",
|
||||
"document() : XPointer does not select a node set: #%s\n",
|
||||
fragment);
|
||||
goto out_object;
|
||||
}
|
||||
|
||||
|
||||
valuePush(ctxt, resObj);
|
||||
return;
|
||||
|
||||
|
@ -349,15 +349,15 @@ xsltDocumentFunction(xmlXPathParserContextPtr ctxt, int nargs)
|
|||
* node-set key(string, object)
|
||||
*/
|
||||
void
|
||||
xsltKeyFunction(xmlXPathParserContextPtr ctxt, int nargs){
|
||||
xmlXPathObjectPtr obj1, obj2;
|
||||
|
||||
xsltKeyFunction(xmlXPathParserContextPtr ctxt, int nargs){
|
||||
xmlXPathObjectPtr obj1, obj2;
|
||||
|
||||
if (nargs != 2) {
|
||||
xsltTransformError(xsltXPathGetTransformContext(ctxt), NULL, NULL,
|
||||
"key() : expects two arguments\n");
|
||||
ctxt->error = XPATH_INVALID_ARITY;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the key's value.
|
||||
|
@ -376,7 +376,7 @@ xsltKeyFunction(xmlXPathParserContextPtr ctxt, int nargs){
|
|||
/*
|
||||
* Get the key's name.
|
||||
*/
|
||||
obj1 = valuePop(ctxt);
|
||||
obj1 = valuePop(ctxt);
|
||||
|
||||
if ((obj2->type == XPATH_NODESET) || (obj2->type == XPATH_XSLT_TREE)) {
|
||||
int i;
|
||||
|
@ -402,7 +402,7 @@ xsltKeyFunction(xmlXPathParserContextPtr ctxt, int nargs){
|
|||
xmlNodeSetPtr nodelist = NULL;
|
||||
xmlChar *key = NULL, *value;
|
||||
const xmlChar *keyURI;
|
||||
xsltTransformContextPtr tctxt;
|
||||
xsltTransformContextPtr tctxt;
|
||||
xmlChar *qname, *prefix;
|
||||
xmlXPathContextPtr xpctxt = ctxt->context;
|
||||
xmlNodePtr tmpNode = NULL;
|
||||
|
@ -418,7 +418,7 @@ xsltKeyFunction(xmlXPathParserContextPtr ctxt, int nargs){
|
|||
"The context node is not set on the XPath context.\n");
|
||||
tctxt->state = XSLT_STATE_STOPPED;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Get the associated namespace URI if qualified name
|
||||
*/
|
||||
|
@ -458,7 +458,7 @@ xsltKeyFunction(xmlXPathParserContextPtr ctxt, int nargs){
|
|||
}
|
||||
obj2 = valuePop(ctxt);
|
||||
value = obj2->stringval;
|
||||
|
||||
|
||||
/*
|
||||
* We need to ensure that ctxt->document is available for
|
||||
* xsltGetKey().
|
||||
|
@ -468,7 +468,7 @@ xsltKeyFunction(xmlXPathParserContextPtr ctxt, int nargs){
|
|||
* or the doc might be a Result Tree Fragment.
|
||||
* FUTURE INFO: In XSLT 2.0 the key() function takes an additional
|
||||
* argument indicating the doc to use.
|
||||
*/
|
||||
*/
|
||||
if (xpctxt->node->type == XML_NAMESPACE_DECL) {
|
||||
/*
|
||||
* REVISIT: This is a libxml hack! Check xpath.c for details.
|
||||
|
@ -492,7 +492,7 @@ xsltKeyFunction(xmlXPathParserContextPtr ctxt, int nargs){
|
|||
|
||||
if ((tctxt->document == NULL) ||
|
||||
(tctxt->document->doc != tmpNode->doc))
|
||||
{
|
||||
{
|
||||
if (tmpNode->doc->name && (tmpNode->doc->name[0] == ' ')) {
|
||||
/*
|
||||
* This is a Result Tree Fragment.
|
||||
|
@ -502,7 +502,7 @@ xsltKeyFunction(xmlXPathParserContextPtr ctxt, int nargs){
|
|||
if (tmpNode->doc->_private == NULL)
|
||||
goto error;
|
||||
}
|
||||
tctxt->document = (xsltDocumentPtr) tmpNode->doc->_private;
|
||||
tctxt->document = (xsltDocumentPtr) tmpNode->doc->_private;
|
||||
} else {
|
||||
/*
|
||||
* May be the initial source doc or a doc acquired via the
|
||||
|
@ -523,18 +523,18 @@ xsltKeyFunction(xmlXPathParserContextPtr ctxt, int nargs){
|
|||
*/
|
||||
nodelist = xsltGetKey(tctxt, key, keyURI, value);
|
||||
|
||||
error:
|
||||
error:
|
||||
tctxt->document = oldDocInfo;
|
||||
valuePush(ctxt, xmlXPathWrapNodeSet(
|
||||
xmlXPathNodeSetMerge(NULL, nodelist)));
|
||||
if (key != NULL)
|
||||
xmlFree(key);
|
||||
}
|
||||
}
|
||||
|
||||
if (obj1 != NULL)
|
||||
xmlXPathFreeObject(obj1);
|
||||
if (obj2 != NULL)
|
||||
xmlXPathFreeObject(obj2);
|
||||
xmlXPathFreeObject(obj2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -606,7 +606,7 @@ xsltFormatNumberFunction(xmlXPathParserContextPtr ctxt, int nargs)
|
|||
if (sheet == NULL)
|
||||
return;
|
||||
formatValues = sheet->decimalFormat;
|
||||
|
||||
|
||||
switch (nargs) {
|
||||
case 3:
|
||||
CAST_TO_STRING;
|
||||
|
@ -614,7 +614,7 @@ xsltFormatNumberFunction(xmlXPathParserContextPtr ctxt, int nargs)
|
|||
formatValues = xsltDecimalFormatGetByName(sheet, decimalObj->stringval);
|
||||
if (formatValues == NULL) {
|
||||
xsltTransformError(tctxt, NULL, NULL,
|
||||
"format-number() : undeclared decimal format '%s'\n",
|
||||
"format-number() : undeclared decimal format '%s'\n",
|
||||
decimalObj->stringval);
|
||||
}
|
||||
/* Intentional fall-through */
|
||||
|
@ -941,9 +941,9 @@ xsltCurrentFunction(xmlXPathParserContextPtr ctxt, int nargs){
|
|||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Registration of XSLT and libxslt functions *
|
||||
* *
|
||||
* *
|
||||
* Registration of XSLT and libxslt functions *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
|
|
18
reactos/dll/3rdparty/libxslt/functions.h
vendored
18
reactos/dll/3rdparty/libxslt/functions.h
vendored
|
@ -38,28 +38,28 @@ XSLTPUBFUN xmlXPathFunction XSLTCALL
|
|||
* Interfaces for the functions implementations.
|
||||
*/
|
||||
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltDocumentFunction (xmlXPathParserContextPtr ctxt,
|
||||
int nargs);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltKeyFunction (xmlXPathParserContextPtr ctxt,
|
||||
int nargs);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltUnparsedEntityURIFunction (xmlXPathParserContextPtr ctxt,
|
||||
int nargs);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltFormatNumberFunction (xmlXPathParserContextPtr ctxt,
|
||||
int nargs);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltGenerateIdFunction (xmlXPathParserContextPtr ctxt,
|
||||
int nargs);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltSystemPropertyFunction (xmlXPathParserContextPtr ctxt,
|
||||
int nargs);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltElementAvailableFunction (xmlXPathParserContextPtr ctxt,
|
||||
int nargs);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltFunctionAvailableFunction (xmlXPathParserContextPtr ctxt,
|
||||
int nargs);
|
||||
|
||||
|
@ -67,7 +67,7 @@ XSLTPUBFUN void XSLTCALL
|
|||
* And the registration
|
||||
*/
|
||||
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltRegisterAllFunctions (xmlXPathContextPtr ctxt);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
6
reactos/dll/3rdparty/libxslt/imports.c
vendored
6
reactos/dll/3rdparty/libxslt/imports.c
vendored
|
@ -59,10 +59,10 @@
|
|||
* @style: the stylesheet being imported by the master
|
||||
*
|
||||
* normalize the comp steps for the stylesheet being imported
|
||||
* by the master, together with any imports within that.
|
||||
* by the master, together with any imports within that.
|
||||
*
|
||||
*/
|
||||
static void xsltFixImportedCompSteps(xsltStylesheetPtr master,
|
||||
static void xsltFixImportedCompSteps(xsltStylesheetPtr master,
|
||||
xsltStylesheetPtr style) {
|
||||
xsltStylesheetPtr res;
|
||||
xmlHashScan(style->templatesHash,
|
||||
|
@ -230,7 +230,7 @@ xsltParseStylesheetInclude(xsltStylesheetPtr style, xmlNodePtr cur) {
|
|||
"xsl:include : unable to load %s\n", URI);
|
||||
goto error;
|
||||
}
|
||||
#ifdef XSLT_REFACTORED
|
||||
#ifdef XSLT_REFACTORED
|
||||
if (IS_XSLT_ELEM_FAST(cur) && (cur->psvi != NULL)) {
|
||||
((xsltStyleItemIncludePtr) cur->psvi)->include = include;
|
||||
} else {
|
||||
|
|
12
reactos/dll/3rdparty/libxslt/imports.h
vendored
12
reactos/dll/3rdparty/libxslt/imports.h
vendored
|
@ -48,21 +48,21 @@ extern "C" {
|
|||
/*
|
||||
* Module interfaces
|
||||
*/
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltParseStylesheetImport(xsltStylesheetPtr style,
|
||||
xmlNodePtr cur);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltParseStylesheetInclude
|
||||
(xsltStylesheetPtr style,
|
||||
xmlNodePtr cur);
|
||||
XSLTPUBFUN xsltStylesheetPtr XSLTCALL
|
||||
XSLTPUBFUN xsltStylesheetPtr XSLTCALL
|
||||
xsltNextImport (xsltStylesheetPtr style);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltNeedElemSpaceHandling(xsltTransformContextPtr ctxt);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltFindElemSpaceHandling(xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node);
|
||||
XSLTPUBFUN xsltTemplatePtr XSLTCALL
|
||||
XSLTPUBFUN xsltTemplatePtr XSLTCALL
|
||||
xsltFindTemplate (xsltTransformContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *nameURI);
|
||||
|
|
18
reactos/dll/3rdparty/libxslt/keys.c
vendored
18
reactos/dll/3rdparty/libxslt/keys.c
vendored
|
@ -37,9 +37,9 @@ xsltInitDocKeyTable(xsltTransformContextPtr ctxt, const xmlChar *name,
|
|||
const xmlChar *nameURI);
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Type functions *
|
||||
* *
|
||||
* *
|
||||
* Type functions *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
|
@ -158,7 +158,7 @@ xsltFreeKeyTable(xsltKeyTablePtr keyt) {
|
|||
if (keyt->nameURI != NULL)
|
||||
xmlFree(keyt->nameURI);
|
||||
if (keyt->keys != NULL)
|
||||
xmlHashFree(keyt->keys,
|
||||
xmlHashFree(keyt->keys,
|
||||
(xmlHashDeallocator) xmlXPathFreeNodeSet);
|
||||
memset(keyt, -1, sizeof(xsltKeyTable));
|
||||
xmlFree(keyt);
|
||||
|
@ -182,9 +182,9 @@ xsltFreeKeyTableList(xsltKeyTablePtr keyt) {
|
|||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* The interpreter for the precompiled patterns *
|
||||
* *
|
||||
* *
|
||||
* The interpreter for the precompiled patterns *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
|
@ -311,8 +311,8 @@ xsltAddKey(xsltStylesheetPtr style, const xmlChar *name,
|
|||
end = skipPredicate(match, end);
|
||||
if (end <= 0) {
|
||||
xsltTransformError(NULL, style, inst,
|
||||
"key pattern is malformed: %s",
|
||||
key->match);
|
||||
"key pattern is malformed: %s",
|
||||
key->match);
|
||||
if (style != NULL) style->errors++;
|
||||
goto error;
|
||||
}
|
||||
|
|
8
reactos/dll/3rdparty/libxslt/keys.h
vendored
8
reactos/dll/3rdparty/libxslt/keys.h
vendored
|
@ -32,17 +32,17 @@ XSLTPUBFUN int XSLTCALL
|
|||
const xmlChar *match,
|
||||
const xmlChar *use,
|
||||
xmlNodePtr inst);
|
||||
XSLTPUBFUN xmlNodeSetPtr XSLTCALL
|
||||
XSLTPUBFUN xmlNodeSetPtr XSLTCALL
|
||||
xsltGetKey (xsltTransformContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *nameURI,
|
||||
const xmlChar *value);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltInitCtxtKeys (xsltTransformContextPtr ctxt,
|
||||
xsltDocumentPtr doc);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltFreeKeys (xsltStylesheetPtr style);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltFreeDocumentKeys (xsltDocumentPtr doc);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
82
reactos/dll/3rdparty/libxslt/namespaces.c
vendored
82
reactos/dll/3rdparty/libxslt/namespaces.c
vendored
|
@ -55,7 +55,7 @@
|
|||
* *
|
||||
************************************************************************/
|
||||
|
||||
#ifdef XSLT_REFACTORED
|
||||
#ifdef XSLT_REFACTORED
|
||||
static xsltNsAliasPtr
|
||||
xsltNewNsAlias(xsltCompilerCtxtPtr cctxt)
|
||||
{
|
||||
|
@ -71,12 +71,12 @@ xsltNewNsAlias(xsltCompilerCtxtPtr cctxt)
|
|||
cctxt->style->errors++;
|
||||
return(NULL);
|
||||
}
|
||||
memset(ret, 0, sizeof(xsltNsAlias));
|
||||
memset(ret, 0, sizeof(xsltNsAlias));
|
||||
/*
|
||||
* TODO: Store the item at current stylesheet-level.
|
||||
*/
|
||||
ret->next = cctxt->nsAliases;
|
||||
cctxt->nsAliases = ret;
|
||||
cctxt->nsAliases = ret;
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
@ -96,8 +96,8 @@ xsltNamespaceAlias(xsltStylesheetPtr style, xmlNodePtr node)
|
|||
xmlChar *stylePrefix = NULL;
|
||||
xmlNsPtr literalNs = NULL;
|
||||
xmlNsPtr targetNs = NULL;
|
||||
|
||||
#ifdef XSLT_REFACTORED
|
||||
|
||||
#ifdef XSLT_REFACTORED
|
||||
xsltNsAliasPtr alias;
|
||||
|
||||
if ((style == NULL) || (node == NULL))
|
||||
|
@ -118,9 +118,9 @@ xsltNamespaceAlias(xsltStylesheetPtr style, xmlNodePtr node)
|
|||
/*
|
||||
* NOTE that the XSLT 2.0 also *does* use the NULL namespace if
|
||||
* "#default" is used and there's no default namespace is scope.
|
||||
* I.e., this is *not* an error.
|
||||
* I.e., this is *not* an error.
|
||||
* Most XSLT 1.0 implementations work this way.
|
||||
* The XSLT 1.0 spec has nothing to say on the subject.
|
||||
* The XSLT 1.0 spec has nothing to say on the subject.
|
||||
*/
|
||||
/*
|
||||
* Attribute "stylesheet-prefix".
|
||||
|
@ -132,7 +132,7 @@ xsltNamespaceAlias(xsltStylesheetPtr style, xmlNodePtr node)
|
|||
return;
|
||||
}
|
||||
if (xmlStrEqual(stylePrefix, (const xmlChar *)"#default"))
|
||||
literalNs = xmlSearchNs(node->doc, node, NULL);
|
||||
literalNs = xmlSearchNs(node->doc, node, NULL);
|
||||
else {
|
||||
literalNs = xmlSearchNs(node->doc, node, stylePrefix);
|
||||
if (literalNs == NULL) {
|
||||
|
@ -151,7 +151,7 @@ xsltNamespaceAlias(xsltStylesheetPtr style, xmlNodePtr node)
|
|||
xsltTransformError(NULL, style, node,
|
||||
"The attribute 'result-prefix' is missing.\n");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
if (xmlStrEqual(resultPrefix, (const xmlChar *)"#default"))
|
||||
targetNs = xmlSearchNs(node->doc, node, NULL);
|
||||
else {
|
||||
|
@ -197,8 +197,8 @@ xsltNamespaceAlias(xsltStylesheetPtr style, xmlNodePtr node)
|
|||
* result-prefix="foo"/>
|
||||
* From no namespace to namespace.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Store the ns-node in the alias-object.
|
||||
*/
|
||||
|
@ -213,7 +213,7 @@ xsltNamespaceAlias(xsltStylesheetPtr style, xmlNodePtr node)
|
|||
#else /* XSLT_REFACTORED */
|
||||
const xmlChar *literalNsName;
|
||||
const xmlChar *targetNsName;
|
||||
|
||||
|
||||
|
||||
if ((style == NULL) || (node == NULL))
|
||||
return;
|
||||
|
@ -230,7 +230,7 @@ xsltNamespaceAlias(xsltStylesheetPtr style, xmlNodePtr node)
|
|||
"namespace-alias: result-prefix attribute missing\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
||||
if (xmlStrEqual(stylePrefix, (const xmlChar *)"#default")) {
|
||||
literalNs = xmlSearchNs(node->doc, node, NULL);
|
||||
if (literalNs == NULL) {
|
||||
|
@ -239,7 +239,7 @@ xsltNamespaceAlias(xsltStylesheetPtr style, xmlNodePtr node)
|
|||
literalNsName = literalNs->href; /* Yes - set for nsAlias table */
|
||||
} else {
|
||||
literalNs = xmlSearchNs(node->doc, node, stylePrefix);
|
||||
|
||||
|
||||
if ((literalNs == NULL) || (literalNs->href == NULL)) {
|
||||
xsltTransformError(NULL, style, node,
|
||||
"namespace-alias: prefix %s not bound to any namespace\n",
|
||||
|
@ -275,13 +275,13 @@ xsltNamespaceAlias(xsltStylesheetPtr style, xmlNodePtr node)
|
|||
* Special case: if #default is used for
|
||||
* the stylesheet-prefix (literal namespace) and there's no default
|
||||
* namespace in scope, we'll use style->defaultAlias for this.
|
||||
*/
|
||||
*/
|
||||
if (literalNsName == NULL) {
|
||||
if (targetNs != NULL) {
|
||||
/*
|
||||
* BUG TODO: Is it not sufficient to have only 1 field for
|
||||
* this, since subsequently alias declarations will
|
||||
* overwrite this.
|
||||
* overwrite this.
|
||||
* Example:
|
||||
* <xsl:namespace-alias result-prefix="foo"
|
||||
* stylesheet-prefix="#default"/>
|
||||
|
@ -358,7 +358,7 @@ xsltGetSpecialNamespace(xsltTransformContextPtr ctxt, xmlNodePtr invocNode,
|
|||
/*
|
||||
* OPTIMIZE TODO: This all could be optimized by keeping track of
|
||||
* the ns-decls currently in-scope via a specialized context.
|
||||
*/
|
||||
*/
|
||||
if ((nsPrefix == NULL) && ((nsName == NULL) || (nsName[0] == 0))) {
|
||||
/*
|
||||
* NOTE: the "undeclaration" of the default namespace was
|
||||
|
@ -398,7 +398,7 @@ xsltGetSpecialNamespace(xsltTransformContextPtr ctxt, xmlNodePtr invocNode,
|
|||
}
|
||||
ns = ns->next;
|
||||
} while (ns != NULL);
|
||||
}
|
||||
}
|
||||
if ((target->parent != NULL) &&
|
||||
(target->parent->type == XML_ELEMENT_NODE))
|
||||
{
|
||||
|
@ -408,7 +408,7 @@ xsltGetSpecialNamespace(xsltTransformContextPtr ctxt, xmlNodePtr invocNode,
|
|||
*/
|
||||
if (target->parent->ns == NULL)
|
||||
return(NULL);
|
||||
|
||||
|
||||
ns = xmlSearchNs(target->doc, target->parent,
|
||||
NULL);
|
||||
/*
|
||||
|
@ -417,12 +417,12 @@ xsltGetSpecialNamespace(xsltTransformContextPtr ctxt, xmlNodePtr invocNode,
|
|||
*/
|
||||
if ((ns == NULL) || (ns->href == NULL) || (ns->href[0] == 0))
|
||||
return(NULL);
|
||||
|
||||
|
||||
/*
|
||||
* Undeclare the default namespace.
|
||||
*/
|
||||
xmlNewNs(target, BAD_CAST "", NULL);
|
||||
/* TODO: Check result */
|
||||
/* TODO: Check result */
|
||||
return(NULL);
|
||||
}
|
||||
return(NULL);
|
||||
|
@ -464,7 +464,7 @@ xsltGetSpecialNamespace(xsltTransformContextPtr ctxt, xmlNodePtr invocNode,
|
|||
* If the ns-prefix is occupied by an other ns-decl on the
|
||||
* result element, then this means:
|
||||
* 1) The desired prefix is shadowed
|
||||
* 2) There's no way around changing the prefix
|
||||
* 2) There's no way around changing the prefix
|
||||
*
|
||||
* Try a desperate search for an in-scope ns-decl
|
||||
* with a matching ns-name before we use the last option,
|
||||
|
@ -476,7 +476,7 @@ xsltGetSpecialNamespace(xsltTransformContextPtr ctxt, xmlNodePtr invocNode,
|
|||
|
||||
/*
|
||||
* Fallback to changing the prefix.
|
||||
*/
|
||||
*/
|
||||
} else if ((target->parent != NULL) &&
|
||||
(target->parent->type == XML_ELEMENT_NODE))
|
||||
{
|
||||
|
@ -485,12 +485,12 @@ xsltGetSpecialNamespace(xsltTransformContextPtr ctxt, xmlNodePtr invocNode,
|
|||
*
|
||||
* Check the common case: The parent element of the current
|
||||
* result element is in the same namespace (with an equal ns-prefix).
|
||||
*/
|
||||
*/
|
||||
if ((target->parent->ns != NULL) &&
|
||||
((target->parent->ns->prefix != NULL) == (nsPrefix != NULL)))
|
||||
{
|
||||
ns = target->parent->ns;
|
||||
|
||||
|
||||
if (nsPrefix == NULL) {
|
||||
if (xmlStrEqual(ns->href, nsName))
|
||||
return(ns);
|
||||
|
@ -502,11 +502,11 @@ xsltGetSpecialNamespace(xsltTransformContextPtr ctxt, xmlNodePtr invocNode,
|
|||
}
|
||||
/*
|
||||
* Lookup the remaining in-scope namespaces.
|
||||
*/
|
||||
*/
|
||||
ns = xmlSearchNs(target->doc, target->parent, nsPrefix);
|
||||
if (ns != NULL) {
|
||||
if (xmlStrEqual(ns->href, nsName))
|
||||
return(ns);
|
||||
return(ns);
|
||||
/*
|
||||
* Now check for a nasty case: We need to ensure that the new
|
||||
* ns-decl won't shadow a prefix in-use by an existing attribute.
|
||||
|
@ -633,8 +633,8 @@ declare_new_prefix:
|
|||
xmlNsPtr
|
||||
xsltGetNamespace(xsltTransformContextPtr ctxt, xmlNodePtr cur, xmlNsPtr ns,
|
||||
xmlNodePtr out)
|
||||
{
|
||||
|
||||
{
|
||||
|
||||
if (ns == NULL)
|
||||
return(NULL);
|
||||
|
||||
|
@ -657,15 +657,15 @@ xsltGetNamespace(xsltTransformContextPtr ctxt, xmlNodePtr cur, xmlNsPtr ns,
|
|||
style = ctxt->style;
|
||||
while (style != NULL) {
|
||||
if (style->nsAliases != NULL)
|
||||
URI = (const xmlChar *)
|
||||
URI = (const xmlChar *)
|
||||
xmlHashLookup(style->nsAliases, ns->href);
|
||||
if (URI != NULL)
|
||||
break;
|
||||
|
||||
|
||||
style = xsltNextImport(style);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (URI == UNDEFINED_DEFAULT_NS) {
|
||||
return(xsltGetSpecialNamespace(ctxt, cur, NULL, NULL, out));
|
||||
#if 0
|
||||
|
@ -674,7 +674,7 @@ xsltGetNamespace(xsltTransformContextPtr ctxt, xmlNodePtr cur, xmlNsPtr ns,
|
|||
* namespace in the stylesheet then this must resolve to
|
||||
* the NULL namespace.
|
||||
*/
|
||||
xmlNsPtr dflt;
|
||||
xmlNsPtr dflt;
|
||||
dflt = xmlSearchNs(cur->doc, cur, NULL);
|
||||
if (dflt != NULL)
|
||||
URI = dflt->href;
|
||||
|
@ -696,9 +696,9 @@ xsltGetNamespace(xsltTransformContextPtr ctxt, xmlNodePtr cur, xmlNsPtr ns,
|
|||
* @ns: the namespace
|
||||
* @out: the result element
|
||||
*
|
||||
* Obsolete.
|
||||
* Obsolete.
|
||||
* *Not* called by any Libxslt/Libexslt function.
|
||||
* Exaclty the same as xsltGetNamespace().
|
||||
* Exaclty the same as xsltGetNamespace().
|
||||
*
|
||||
* Returns a namespace declaration or NULL in case of
|
||||
* namespace fixup failures or API or internal errors.
|
||||
|
@ -706,7 +706,7 @@ xsltGetNamespace(xsltTransformContextPtr ctxt, xmlNodePtr cur, xmlNsPtr ns,
|
|||
xmlNsPtr
|
||||
xsltGetPlainNamespace(xsltTransformContextPtr ctxt, xmlNodePtr cur,
|
||||
xmlNsPtr ns, xmlNodePtr out)
|
||||
{
|
||||
{
|
||||
return(xsltGetNamespace(ctxt, cur, ns, out));
|
||||
}
|
||||
|
||||
|
@ -722,7 +722,7 @@ xsltGetPlainNamespace(xsltTransformContextPtr ctxt, xmlNodePtr cur,
|
|||
* This function is intended only for *internal* use at
|
||||
* transformation-time for copying ns-declarations of Literal
|
||||
* Result Elements.
|
||||
*
|
||||
*
|
||||
* Called by:
|
||||
* xsltCopyTreeInternal() (transform.c)
|
||||
* xsltShallowCopyElem() (transform.c)
|
||||
|
@ -735,7 +735,7 @@ xmlNsPtr
|
|||
xsltCopyNamespaceList(xsltTransformContextPtr ctxt, xmlNodePtr node,
|
||||
xmlNsPtr cur) {
|
||||
xmlNsPtr ret = NULL, tmp;
|
||||
xmlNsPtr p = NULL,q;
|
||||
xmlNsPtr p = NULL,q;
|
||||
|
||||
if (cur == NULL)
|
||||
return(NULL);
|
||||
|
@ -759,7 +759,7 @@ xsltCopyNamespaceList(xsltTransformContextPtr ctxt, xmlNodePtr node,
|
|||
if (node != NULL) {
|
||||
if ((node->ns != NULL) &&
|
||||
(xmlStrEqual(node->ns->prefix, cur->prefix)) &&
|
||||
(xmlStrEqual(node->ns->href, cur->href))) {
|
||||
(xmlStrEqual(node->ns->href, cur->href))) {
|
||||
cur = cur->next;
|
||||
continue;
|
||||
}
|
||||
|
@ -824,7 +824,7 @@ xsltCopyNamespaceList(xsltTransformContextPtr ctxt, xmlNodePtr node,
|
|||
xmlNsPtr
|
||||
xsltCopyNamespace(xsltTransformContextPtr ctxt ATTRIBUTE_UNUSED,
|
||||
xmlNodePtr elem, xmlNsPtr ns)
|
||||
{
|
||||
{
|
||||
if ((ns == NULL) || (ns->type != XML_NAMESPACE_DECL))
|
||||
return(NULL);
|
||||
/*
|
||||
|
|
12
reactos/dll/3rdparty/libxslt/namespaces.h
vendored
12
reactos/dll/3rdparty/libxslt/namespaces.h
vendored
|
@ -32,31 +32,31 @@ extern "C" {
|
|||
XSLTPUBFUN void XSLTCALL
|
||||
xsltNamespaceAlias (xsltStylesheetPtr style,
|
||||
xmlNodePtr node);
|
||||
XSLTPUBFUN xmlNsPtr XSLTCALL
|
||||
XSLTPUBFUN xmlNsPtr XSLTCALL
|
||||
xsltGetNamespace (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr cur,
|
||||
xmlNsPtr ns,
|
||||
xmlNodePtr out);
|
||||
XSLTPUBFUN xmlNsPtr XSLTCALL
|
||||
XSLTPUBFUN xmlNsPtr XSLTCALL
|
||||
xsltGetPlainNamespace (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr cur,
|
||||
xmlNsPtr ns,
|
||||
xmlNodePtr out);
|
||||
XSLTPUBFUN xmlNsPtr XSLTCALL
|
||||
XSLTPUBFUN xmlNsPtr XSLTCALL
|
||||
xsltGetSpecialNamespace (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr cur,
|
||||
const xmlChar *URI,
|
||||
const xmlChar *prefix,
|
||||
xmlNodePtr out);
|
||||
XSLTPUBFUN xmlNsPtr XSLTCALL
|
||||
XSLTPUBFUN xmlNsPtr XSLTCALL
|
||||
xsltCopyNamespace (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr elem,
|
||||
xmlNsPtr ns);
|
||||
XSLTPUBFUN xmlNsPtr XSLTCALL
|
||||
XSLTPUBFUN xmlNsPtr XSLTCALL
|
||||
xsltCopyNamespaceList (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNsPtr cur);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltFreeNamespaceAliasHashes
|
||||
(xsltStylesheetPtr style);
|
||||
|
||||
|
|
106
reactos/dll/3rdparty/libxslt/numbers.c
vendored
106
reactos/dll/3rdparty/libxslt/numbers.c
vendored
|
@ -193,7 +193,7 @@ xsltNumberFormatDecimal(xmlBufferPtr buffer,
|
|||
pointer -= groupingCharacterLen;
|
||||
xmlCopyCharMultiByte(pointer, groupingCharacter);
|
||||
}
|
||||
|
||||
|
||||
val = digit_zero + (int)fmod(number, 10.0);
|
||||
if (val < 0x80) { /* shortcut if ASCII */
|
||||
if (pointer <= temp_string) { /* Check enough room */
|
||||
|
@ -203,7 +203,7 @@ xsltNumberFormatDecimal(xmlBufferPtr buffer,
|
|||
*(--pointer) = val;
|
||||
}
|
||||
else {
|
||||
/*
|
||||
/*
|
||||
* Here we have a multibyte character. It's a little messy,
|
||||
* because until we generate the char we don't know how long
|
||||
* it is. So, we generate it into the buffer temp_char, then
|
||||
|
@ -241,7 +241,7 @@ xsltNumberFormatAlpha(xmlBufferPtr buffer,
|
|||
pointer = &temp_string[sizeof(temp_string)];
|
||||
*(--pointer) = 0;
|
||||
alpha_list = (is_upper) ? alpha_upper_list : alpha_lower_list;
|
||||
|
||||
|
||||
for (i = 1; i < (int)sizeof(temp_string); i++) {
|
||||
number--;
|
||||
*(--pointer) = alpha_list[((int)fmod(number, alpha_size))];
|
||||
|
@ -337,7 +337,7 @@ xsltNumberFormatTokenize(const xmlChar *format,
|
|||
* There is always such a token in the list, even if NULL
|
||||
*/
|
||||
while (! (IS_LETTER(val=xmlStringCurrentChar(NULL, format+ix, &len)) ||
|
||||
IS_DIGIT(val)) ) {
|
||||
IS_DIGIT(val)) ) {
|
||||
if (format[ix] == 0) /* if end of format string */
|
||||
break; /* while */
|
||||
ix += len;
|
||||
|
@ -550,7 +550,7 @@ xsltNumberFormatGetAnyLevel(xsltTransformContextPtr context,
|
|||
countPat = xsltCompilePattern(count, doc, elem, NULL, context);
|
||||
if (from != NULL)
|
||||
fromPat = xsltCompilePattern(from, doc, elem, NULL, context);
|
||||
|
||||
|
||||
/* select the starting node */
|
||||
switch (node->type) {
|
||||
case XML_ELEMENT_NODE:
|
||||
|
@ -653,19 +653,19 @@ xsltNumberFormatGetMultipleLevel(xsltTransformContextPtr context,
|
|||
for (ancestor = node;
|
||||
(ancestor != NULL) && (ancestor->type != XML_DOCUMENT_NODE);
|
||||
ancestor = xmlXPathNextAncestor(parser, ancestor)) {
|
||||
|
||||
|
||||
if ((from != NULL) &&
|
||||
xsltTestCompMatchList(context, ancestor, fromPat))
|
||||
break; /* for */
|
||||
|
||||
if ((count == NULL && node->type == ancestor->type &&
|
||||
|
||||
if ((count == NULL && node->type == ancestor->type &&
|
||||
xmlStrEqual(node->name, ancestor->name)) ||
|
||||
xsltTestCompMatchList(context, ancestor, countPat)) {
|
||||
/* count(preceding-sibling::*) */
|
||||
cnt = 0;
|
||||
for (preceding = ancestor;
|
||||
preceding != NULL;
|
||||
preceding =
|
||||
preceding =
|
||||
xmlXPathNextPrecedingSibling(parser, preceding)) {
|
||||
if (count == NULL) {
|
||||
if ((preceding->type == ancestor->type) &&
|
||||
|
@ -704,7 +704,7 @@ xsltNumberFormatGetValue(xmlXPathContextPtr context,
|
|||
int amount = 0;
|
||||
xmlBufferPtr pattern;
|
||||
xmlXPathObjectPtr obj;
|
||||
|
||||
|
||||
pattern = xmlBufferCreate();
|
||||
if (pattern != NULL) {
|
||||
xmlBufferCCat(pattern, "number(");
|
||||
|
@ -773,9 +773,9 @@ xsltNumberFormat(xsltTransformContextPtr ctxt,
|
|||
&tokens,
|
||||
output);
|
||||
}
|
||||
|
||||
|
||||
} else if (data->level) {
|
||||
|
||||
|
||||
if (xmlStrEqual(data->level, (const xmlChar *) "single")) {
|
||||
amount = xsltNumberFormatGetMultipleLevel(ctxt,
|
||||
node,
|
||||
|
@ -815,7 +815,7 @@ xsltNumberFormat(xsltTransformContextPtr ctxt,
|
|||
node,
|
||||
data->count,
|
||||
data->from,
|
||||
&number,
|
||||
&number,
|
||||
data->doc,
|
||||
data->node);
|
||||
if (amount > 0) {
|
||||
|
@ -838,7 +838,7 @@ xsltNumberFormat(xsltTransformContextPtr ctxt,
|
|||
if (tokens.tokens[i].separator != NULL)
|
||||
xmlFree(tokens.tokens[i].separator);
|
||||
}
|
||||
|
||||
|
||||
XSLT_NUMBER_FORMAT_END:
|
||||
if (tempformat == 1) {
|
||||
/* The format need to be recomputed each time */
|
||||
|
@ -855,9 +855,9 @@ xsltFormatNumberPreSuffix(xsltDecimalFormatPtr self, xmlChar **format, xsltForma
|
|||
int len;
|
||||
|
||||
while (1) {
|
||||
/*
|
||||
* prefix / suffix ends at end of string or at
|
||||
* first 'special' character
|
||||
/*
|
||||
* prefix / suffix ends at end of string or at
|
||||
* first 'special' character
|
||||
*/
|
||||
if (**format == 0)
|
||||
return count;
|
||||
|
@ -870,12 +870,12 @@ xsltFormatNumberPreSuffix(xsltDecimalFormatPtr self, xmlChar **format, xsltForma
|
|||
return count;
|
||||
/*
|
||||
* else treat percent/per-mille as special cases,
|
||||
* depending on whether +ve or -ve
|
||||
* depending on whether +ve or -ve
|
||||
*/
|
||||
else {
|
||||
/*
|
||||
* for +ve prefix/suffix, allow only a
|
||||
* single occurence of either
|
||||
* for +ve prefix/suffix, allow only a
|
||||
* single occurence of either
|
||||
*/
|
||||
if (xsltUTF8Charcmp(*format, self->percent) == 0) {
|
||||
if (info->is_multiplier_set)
|
||||
|
@ -889,14 +889,14 @@ xsltFormatNumberPreSuffix(xsltDecimalFormatPtr self, xmlChar **format, xsltForma
|
|||
info->is_multiplier_set = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ((len=xsltUTF8Size(*format)) < 1)
|
||||
return -1;
|
||||
count += len;
|
||||
*format += len;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* xsltFormatNumberConversion:
|
||||
* @self: the decimal format
|
||||
|
@ -955,9 +955,9 @@ xsltFormatNumberConversion(xsltDecimalFormatPtr self,
|
|||
int j, len;
|
||||
int self_grouping_len;
|
||||
xsltFormatNumberInfo format_info;
|
||||
/*
|
||||
/*
|
||||
* delayed_multiplier allows a 'trailing' percent or
|
||||
* permille to be treated as suffix
|
||||
* permille to be treated as suffix
|
||||
*/
|
||||
int delayed_multiplier = 0;
|
||||
/* flag to show no -ve format present for -ve number */
|
||||
|
@ -1013,7 +1013,7 @@ xsltFormatNumberConversion(xsltDecimalFormatPtr self,
|
|||
|
||||
/*
|
||||
* First we process the +ve pattern to get percent / permille,
|
||||
* as well as main format
|
||||
* as well as main format
|
||||
*/
|
||||
prefix = the_format;
|
||||
prefix_length = xsltFormatNumberPreSuffix(self, &the_format, &format_info);
|
||||
|
@ -1022,18 +1022,18 @@ xsltFormatNumberConversion(xsltDecimalFormatPtr self,
|
|||
goto OUTPUT_NUMBER;
|
||||
}
|
||||
|
||||
/*
|
||||
* Here we process the "number" part of the format. It gets
|
||||
/*
|
||||
* Here we process the "number" part of the format. It gets
|
||||
* a little messy because of the percent/per-mille - if that
|
||||
* appears at the end, it may be part of the suffix instead
|
||||
* of part of the number, so the variable delayed_multiplier
|
||||
* is used to handle it
|
||||
* appears at the end, it may be part of the suffix instead
|
||||
* of part of the number, so the variable delayed_multiplier
|
||||
* is used to handle it
|
||||
*/
|
||||
self_grouping_len = xmlStrlen(self->grouping);
|
||||
while ((*the_format != 0) &&
|
||||
(xsltUTF8Charcmp(the_format, self->decimalPoint) != 0) &&
|
||||
(xsltUTF8Charcmp(the_format, self->patternSeparator) != 0)) {
|
||||
|
||||
|
||||
if (delayed_multiplier != 0) {
|
||||
format_info.multiplier = delayed_multiplier;
|
||||
format_info.is_multiplier_set = TRUE;
|
||||
|
@ -1071,7 +1071,7 @@ xsltFormatNumberConversion(xsltDecimalFormatPtr self,
|
|||
delayed_multiplier = 1000;
|
||||
} else
|
||||
break; /* while */
|
||||
|
||||
|
||||
if ((len=xsltUTF8Size(the_format)) < 1) {
|
||||
found_error = 1;
|
||||
goto OUTPUT_NUMBER;
|
||||
|
@ -1085,9 +1085,9 @@ xsltFormatNumberConversion(xsltDecimalFormatPtr self,
|
|||
format_info.add_decimal = TRUE;
|
||||
the_format += xsltUTF8Size(the_format); /* Skip over the decimal */
|
||||
}
|
||||
|
||||
|
||||
while (*the_format != 0) {
|
||||
|
||||
|
||||
if (xsltUTF8Charcmp(the_format, self->zeroDigit) == 0) {
|
||||
if (format_info.frac_hash != 0) {
|
||||
found_error = 1;
|
||||
|
@ -1135,9 +1135,9 @@ xsltFormatNumberConversion(xsltDecimalFormatPtr self,
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If delayed_multiplier is set after processing the
|
||||
* "number" part, should be in suffix
|
||||
/*
|
||||
* If delayed_multiplier is set after processing the
|
||||
* "number" part, should be in suffix
|
||||
*/
|
||||
if (delayed_multiplier != 0) {
|
||||
the_format -= len;
|
||||
|
@ -1147,7 +1147,7 @@ xsltFormatNumberConversion(xsltDecimalFormatPtr self,
|
|||
suffix = the_format;
|
||||
suffix_length = xsltFormatNumberPreSuffix(self, &the_format, &format_info);
|
||||
if ( (suffix_length < 0) ||
|
||||
((*the_format != 0) &&
|
||||
((*the_format != 0) &&
|
||||
(xsltUTF8Charcmp(the_format, self->patternSeparator) != 0)) ) {
|
||||
found_error = 1;
|
||||
goto OUTPUT_NUMBER;
|
||||
|
@ -1170,17 +1170,17 @@ xsltFormatNumberConversion(xsltDecimalFormatPtr self,
|
|||
else {
|
||||
/* Skip over pattern separator (accounting for UTF8) */
|
||||
the_format = (xmlChar *)xmlUTF8Strpos(format, j + 1);
|
||||
/*
|
||||
* Flag changes interpretation of percent/permille
|
||||
* in -ve pattern
|
||||
/*
|
||||
* Flag changes interpretation of percent/permille
|
||||
* in -ve pattern
|
||||
*/
|
||||
format_info.is_negative_pattern = TRUE;
|
||||
format_info.is_multiplier_set = FALSE;
|
||||
|
||||
/* First do the -ve prefix */
|
||||
nprefix = the_format;
|
||||
nprefix_length = xsltFormatNumberPreSuffix(self,
|
||||
&the_format, &format_info);
|
||||
nprefix_length = xsltFormatNumberPreSuffix(self,
|
||||
&the_format, &format_info);
|
||||
if (nprefix_length<0) {
|
||||
found_error = 1;
|
||||
goto OUTPUT_NUMBER;
|
||||
|
@ -1214,7 +1214,7 @@ xsltFormatNumberConversion(xsltDecimalFormatPtr self,
|
|||
/* Finally do the -ve suffix */
|
||||
if (*the_format != 0) {
|
||||
nsuffix = the_format;
|
||||
nsuffix_length = xsltFormatNumberPreSuffix(self,
|
||||
nsuffix_length = xsltFormatNumberPreSuffix(self,
|
||||
&the_format, &format_info);
|
||||
if (nsuffix_length < 0) {
|
||||
found_error = 1;
|
||||
|
@ -1232,12 +1232,12 @@ xsltFormatNumberConversion(xsltDecimalFormatPtr self,
|
|||
* if -ve prefix/suffix == +ve ones, discard & use default
|
||||
*/
|
||||
if ((nprefix_length != prefix_length) ||
|
||||
(nsuffix_length != suffix_length) ||
|
||||
((nprefix_length > 0) &&
|
||||
(nsuffix_length != suffix_length) ||
|
||||
((nprefix_length > 0) &&
|
||||
(xmlStrncmp(nprefix, prefix, prefix_length) !=0 )) ||
|
||||
((nsuffix_length > 0) &&
|
||||
((nsuffix_length > 0) &&
|
||||
(xmlStrncmp(nsuffix, suffix, suffix_length) !=0 ))) {
|
||||
prefix = nprefix;
|
||||
prefix = nprefix;
|
||||
prefix_length = nprefix_length;
|
||||
suffix = nsuffix;
|
||||
suffix_length = nsuffix_length;
|
||||
|
@ -1283,9 +1283,9 @@ OUTPUT_NUMBER:
|
|||
number = fabs(number) * (double)format_info.multiplier;
|
||||
scale = pow(10.0, (double)(format_info.frac_digits + format_info.frac_hash));
|
||||
number = floor((scale * number + 0.5)) / scale;
|
||||
if ((self->grouping != NULL) &&
|
||||
if ((self->grouping != NULL) &&
|
||||
(self->grouping[0] != 0)) {
|
||||
|
||||
|
||||
len = xmlStrlen(self->grouping);
|
||||
pchar = xsltGetUTF8Char(self->grouping, &len);
|
||||
xsltNumberFormatDecimal(buffer, floor(number), self->zeroDigit[0],
|
||||
|
@ -1314,14 +1314,14 @@ OUTPUT_NUMBER:
|
|||
/* Next the fractional part, if required */
|
||||
if (format_info.frac_digits + format_info.frac_hash == 0) {
|
||||
if (format_info.add_decimal)
|
||||
xmlBufferAdd(buffer, self->decimalPoint,
|
||||
xsltUTF8Size(self->decimalPoint));
|
||||
xmlBufferAdd(buffer, self->decimalPoint,
|
||||
xsltUTF8Size(self->decimalPoint));
|
||||
}
|
||||
else {
|
||||
number -= floor(number);
|
||||
if ((number != 0) || (format_info.frac_digits != 0)) {
|
||||
xmlBufferAdd(buffer, self->decimalPoint,
|
||||
xsltUTF8Size(self->decimalPoint));
|
||||
xsltUTF8Size(self->decimalPoint));
|
||||
number = floor(scale * number + 0.5);
|
||||
for (j = format_info.frac_hash; j > 0; j--) {
|
||||
if (fmod(number, 10.0) >= 1.0)
|
||||
|
|
44
reactos/dll/3rdparty/libxslt/pattern.c
vendored
44
reactos/dll/3rdparty/libxslt/pattern.c
vendored
|
@ -127,9 +127,9 @@ struct _xsltParserContext {
|
|||
};
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Type functions *
|
||||
* *
|
||||
* *
|
||||
* Type functions *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
|
@ -368,7 +368,7 @@ xsltSwapTopCompMatch(xsltCompMatchPtr comp) {
|
|||
if (j > 0) {
|
||||
register xmlChar *tmp;
|
||||
register xsltOp op;
|
||||
register xmlXPathCompExprPtr expr;
|
||||
register xmlXPathCompExprPtr expr;
|
||||
register int t;
|
||||
i = j - 1;
|
||||
tmp = comp->steps[i].value;
|
||||
|
@ -469,9 +469,9 @@ xsltReverseCompMatch(xsltParserContextPtr ctxt, xsltCompMatchPtr comp) {
|
|||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* The interpreter for the precompiled patterns *
|
||||
* *
|
||||
* *
|
||||
* The interpreter for the precompiled patterns *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
static int
|
||||
|
@ -540,7 +540,7 @@ xsltTestCompMatchDirect(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
|
|||
ix = XSLT_RUNTIME_EXTRA(ctxt, sel->indexExtra, ival);
|
||||
list = (xmlXPathObjectPtr)
|
||||
XSLT_RUNTIME_EXTRA_LST(ctxt, sel->lenExtra);
|
||||
|
||||
|
||||
if ((list == NULL) || (prevdoc != doc)) {
|
||||
xmlXPathObjectPtr newlist;
|
||||
xmlNodePtr parent = node->parent;
|
||||
|
@ -572,7 +572,7 @@ xsltTestCompMatchDirect(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
|
|||
|
||||
if ((parent == NULL) || (node->doc == NULL) || isRVT)
|
||||
nocache = 1;
|
||||
|
||||
|
||||
if (nocache == 0) {
|
||||
if (list != NULL)
|
||||
xmlXPathFreeObject(list);
|
||||
|
@ -754,8 +754,8 @@ restart:
|
|||
if (step->op == XSLT_OP_ROOT)
|
||||
goto found;
|
||||
/* added NS, ID and KEY as a result of bug 168208 */
|
||||
if ((step->op != XSLT_OP_ELEM) &&
|
||||
(step->op != XSLT_OP_ALL) &&
|
||||
if ((step->op != XSLT_OP_ELEM) &&
|
||||
(step->op != XSLT_OP_ALL) &&
|
||||
(step->op != XSLT_OP_NS) &&
|
||||
(step->op != XSLT_OP_ID) &&
|
||||
(step->op != XSLT_OP_KEY))
|
||||
|
@ -863,7 +863,7 @@ restart:
|
|||
xmlFree(states.states);
|
||||
}
|
||||
return(xsltTestCompMatchDirect(ctxt, comp, node,
|
||||
comp->nsList, comp->nsNr));
|
||||
comp->nsList, comp->nsNr));
|
||||
}
|
||||
|
||||
doc = node->doc;
|
||||
|
@ -939,7 +939,7 @@ restart:
|
|||
}
|
||||
}
|
||||
if (sibling != NULL) {
|
||||
pos = ix + indx;
|
||||
pos = ix + indx;
|
||||
/*
|
||||
* If the node is in a Value Tree we need to
|
||||
* save len, but cannot cache the node!
|
||||
|
@ -1227,17 +1227,17 @@ xsltTestCompMatchList(xsltTransformContextPtr ctxt, xmlNodePtr node,
|
|||
#define NXT(val) ctxt->cur[(val)]
|
||||
#define CUR_PTR ctxt->cur
|
||||
|
||||
#define SKIP_BLANKS \
|
||||
#define SKIP_BLANKS \
|
||||
while (IS_BLANK_CH(CUR)) NEXT
|
||||
|
||||
#define CURRENT (*ctxt->cur)
|
||||
#define NEXT ((*ctxt->cur) ? ctxt->cur++: ctxt->cur)
|
||||
|
||||
|
||||
#define PUSH(op, val, val2, novar) \
|
||||
#define PUSH(op, val, val2, novar) \
|
||||
if (xsltCompMatchAdd(ctxt, ctxt->comp, (op), (val), (val2), (novar))) goto error;
|
||||
|
||||
#define SWAP() \
|
||||
#define SWAP() \
|
||||
xsltSwapTopCompMatch(ctxt->comp);
|
||||
|
||||
#define XSLT_ERROR(X) \
|
||||
|
@ -1506,7 +1506,7 @@ error:
|
|||
* Compile the XSLT StepPattern and generates a precompiled
|
||||
* form suitable for fast matching.
|
||||
*
|
||||
* [5] StepPattern ::= ChildOrAttributeAxisSpecifier NodeTest Predicate*
|
||||
* [5] StepPattern ::= ChildOrAttributeAxisSpecifier NodeTest Predicate*
|
||||
* [6] ChildOrAttributeAxisSpecifier ::= AbbreviatedAxisSpecifier
|
||||
* | ('child' | 'attribute') '::'
|
||||
* from XPath
|
||||
|
@ -2040,12 +2040,12 @@ xsltAddTemplate(xsltStylesheetPtr style, xsltTemplatePtr cur,
|
|||
pat = xsltCompilePatternInternal(cur->match, style->doc, cur->elem,
|
||||
style, NULL, 1);
|
||||
if (pat == NULL)
|
||||
return(-1);
|
||||
return(-1);
|
||||
while (pat) {
|
||||
next = pat->next;
|
||||
pat->next = NULL;
|
||||
name = NULL;
|
||||
|
||||
|
||||
pat->template = cur;
|
||||
if (mode != NULL)
|
||||
pat->mode = xmlDictLookup(style->dict, mode, -1);
|
||||
|
@ -2432,7 +2432,7 @@ keyed_match:
|
|||
goto error;
|
||||
|
||||
switch (node->type) {
|
||||
case XML_ELEMENT_NODE:
|
||||
case XML_ELEMENT_NODE:
|
||||
if (node->psvi != NULL) keyed = 1;
|
||||
break;
|
||||
case XML_ATTRIBUTE_NODE:
|
||||
|
@ -2441,13 +2441,13 @@ keyed_match:
|
|||
case XML_TEXT_NODE:
|
||||
case XML_CDATA_SECTION_NODE:
|
||||
case XML_COMMENT_NODE:
|
||||
case XML_PI_NODE:
|
||||
case XML_PI_NODE:
|
||||
if (node->psvi != NULL) keyed = 1;
|
||||
break;
|
||||
case XML_DOCUMENT_NODE:
|
||||
case XML_HTML_DOCUMENT_NODE:
|
||||
if (((xmlDocPtr) node)->psvi != NULL) keyed = 1;
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
148
reactos/dll/3rdparty/libxslt/preproc.c
vendored
148
reactos/dll/3rdparty/libxslt/preproc.c
vendored
|
@ -72,7 +72,7 @@ xsltCheckTopLevelElement(xsltStylesheetPtr style, xmlNodePtr inst, int err) {
|
|||
xmlNodePtr parent;
|
||||
if ((style == NULL) || (inst == NULL) || (inst->ns == NULL))
|
||||
return(-1);
|
||||
|
||||
|
||||
parent = inst->parent;
|
||||
if (parent == NULL) {
|
||||
if (err) {
|
||||
|
@ -115,7 +115,7 @@ xsltCheckInstructionElement(xsltStylesheetPtr style, xmlNodePtr inst) {
|
|||
return;
|
||||
|
||||
has_ext = (style->extInfos != NULL);
|
||||
|
||||
|
||||
parent = inst->parent;
|
||||
if (parent == NULL) {
|
||||
xsltTransformError(NULL, style, inst,
|
||||
|
@ -141,7 +141,7 @@ xsltCheckInstructionElement(xsltStylesheetPtr style, xmlNodePtr inst) {
|
|||
if ((has_ext) && (parent->ns != NULL) &&
|
||||
(xmlHashLookup(style->extInfos, parent->ns->href) != NULL))
|
||||
return;
|
||||
|
||||
|
||||
parent = parent->parent;
|
||||
}
|
||||
xsltTransformError(NULL, style, inst,
|
||||
|
@ -193,7 +193,7 @@ xsltCheckParentElement(xsltStylesheetPtr style, xmlNodePtr inst,
|
|||
if ((parent->ns != NULL) &&
|
||||
(xmlHashLookup(style->extInfos, parent->ns->href) != NULL))
|
||||
return;
|
||||
|
||||
|
||||
parent = parent->parent;
|
||||
}
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ xsltNewStylePreComp(xsltStylesheetPtr style, xsltStyleType type) {
|
|||
|
||||
if (style == NULL)
|
||||
return(NULL);
|
||||
|
||||
|
||||
#ifdef XSLT_REFACTORED
|
||||
/*
|
||||
* URGENT TODO: Use specialized factory functions in order
|
||||
|
@ -280,7 +280,7 @@ xsltNewStylePreComp(xsltStylesheetPtr style, xsltStyleType type) {
|
|||
size = sizeof(xsltStyleItemWhen); break;
|
||||
case XSLT_FUNC_OTHERWISE:
|
||||
size = sizeof(xsltStyleItemOtherwise); break;
|
||||
default:
|
||||
default:
|
||||
xsltTransformError(NULL, style, NULL,
|
||||
"xsltNewStylePreComp : invalid type %d\n", type);
|
||||
style->errors++;
|
||||
|
@ -353,8 +353,8 @@ xsltNewStylePreComp(xsltStylesheetPtr style, xsltStyleType type) {
|
|||
case XSLT_FUNC_DOCUMENT:
|
||||
cur->func = (xsltTransformFunction) xsltDocumentElem;break;
|
||||
case XSLT_FUNC_WITHPARAM:
|
||||
case XSLT_FUNC_PARAM:
|
||||
case XSLT_FUNC_VARIABLE:
|
||||
case XSLT_FUNC_PARAM:
|
||||
case XSLT_FUNC_VARIABLE:
|
||||
case XSLT_FUNC_WHEN:
|
||||
break;
|
||||
default:
|
||||
|
@ -477,18 +477,18 @@ xsltFreeStylePreComp(xsltStylePreCompPtr comp) {
|
|||
xmlXPathFreeCompExpr(item->comp);
|
||||
}
|
||||
break;
|
||||
case XSLT_FUNC_OTHERWISE:
|
||||
case XSLT_FUNC_OTHERWISE:
|
||||
case XSLT_FUNC_FALLBACK:
|
||||
case XSLT_FUNC_MESSAGE:
|
||||
case XSLT_FUNC_INCLUDE:
|
||||
case XSLT_FUNC_ATTRSET:
|
||||
|
||||
|
||||
break;
|
||||
default:
|
||||
/* TODO: Raise error. */
|
||||
break;
|
||||
}
|
||||
#else
|
||||
#else
|
||||
if (comp->locale != (xsltLocale)0)
|
||||
xsltFreeLocale(comp->locale);
|
||||
if (comp->comp != NULL)
|
||||
|
@ -545,7 +545,7 @@ xsltDocumentComp(xsltStylesheetPtr style, xmlNodePtr inst,
|
|||
#else
|
||||
comp = xsltNewStylePreComp(style, XSLT_FUNC_DOCUMENT);
|
||||
#endif
|
||||
|
||||
|
||||
if (comp == NULL)
|
||||
return (NULL);
|
||||
comp->inst = inst;
|
||||
|
@ -592,8 +592,8 @@ xsltDocumentComp(xsltStylesheetPtr style, xmlNodePtr inst,
|
|||
#ifdef WITH_XSLT_DEBUG_EXTRA
|
||||
xsltGenericDebug(xsltGenericDebugContext,
|
||||
"Found xslt11:document construct\n");
|
||||
#endif
|
||||
} else {
|
||||
#endif
|
||||
} else {
|
||||
if (xmlStrEqual(inst->ns->href,
|
||||
(const xmlChar *)"http://exslt.org/common")) {
|
||||
/* EXSLT. */
|
||||
|
@ -634,12 +634,12 @@ xsltDocumentComp(xsltStylesheetPtr style, xmlNodePtr inst,
|
|||
* 3) XSLT_XT_NAMESPACE (http://www.jclark.com/xt)
|
||||
* Example: <xt:document method="xml" href="myFile.xml">
|
||||
* TODO: is @href is an AVT?
|
||||
*
|
||||
*
|
||||
* In all cases @href is in no namespace.
|
||||
*/
|
||||
filename = xsltEvalStaticAttrValueTemplate(style, inst,
|
||||
(const xmlChar *)"href", NULL, &comp->has_filename);
|
||||
}
|
||||
}
|
||||
if (!comp->has_filename) {
|
||||
goto error;
|
||||
}
|
||||
|
@ -677,7 +677,7 @@ xsltSortComp(xsltStylesheetPtr style, xmlNodePtr inst) {
|
|||
#else
|
||||
comp = xsltNewStylePreComp(style, XSLT_FUNC_SORT);
|
||||
#endif
|
||||
|
||||
|
||||
if (comp == NULL)
|
||||
return;
|
||||
inst->psvi = comp;
|
||||
|
@ -784,7 +784,7 @@ xsltCopyComp(xsltStylesheetPtr style, xmlNodePtr inst) {
|
|||
#else
|
||||
comp = xsltNewStylePreComp(style, XSLT_FUNC_COPY);
|
||||
#endif
|
||||
|
||||
|
||||
if (comp == NULL)
|
||||
return;
|
||||
inst->psvi = comp;
|
||||
|
@ -828,7 +828,7 @@ xsltTextComp(xsltStylesheetPtr style, xmlNodePtr inst) {
|
|||
comp = (xsltStyleItemTextPtr) xsltNewStylePreComp(style, XSLT_FUNC_TEXT);
|
||||
#else
|
||||
comp = xsltNewStylePreComp(style, XSLT_FUNC_TEXT);
|
||||
#endif
|
||||
#endif
|
||||
if (comp == NULL)
|
||||
return;
|
||||
inst->psvi = comp;
|
||||
|
@ -910,8 +910,8 @@ xsltElementComp(xsltStylesheetPtr style, xmlNodePtr inst) {
|
|||
*/
|
||||
comp->ns = xsltEvalStaticAttrValueTemplate(style, inst,
|
||||
(const xmlChar *)"namespace", NULL, &comp->has_ns);
|
||||
|
||||
if (comp->name != NULL) {
|
||||
|
||||
if (comp->name != NULL) {
|
||||
if (xmlValidateQName(comp->name, 0)) {
|
||||
xsltTransformError(NULL, style, inst,
|
||||
"xsl:element: The value '%s' of the attribute 'name' is "
|
||||
|
@ -921,7 +921,7 @@ xsltElementComp(xsltStylesheetPtr style, xmlNodePtr inst) {
|
|||
const xmlChar *prefix = NULL, *name;
|
||||
|
||||
name = xsltSplitQName(style->dict, comp->name, &prefix);
|
||||
if (comp->has_ns == 0) {
|
||||
if (comp->has_ns == 0) {
|
||||
xmlNsPtr ns;
|
||||
|
||||
/*
|
||||
|
@ -930,7 +930,7 @@ xsltElementComp(xsltStylesheetPtr style, xmlNodePtr inst) {
|
|||
* expanded into an expanded-name using the namespace declarations
|
||||
* in effect for the xsl:element element, including any default
|
||||
* namespace declaration.
|
||||
*/
|
||||
*/
|
||||
ns = xmlSearchNs(inst->doc, inst, prefix);
|
||||
if (ns != NULL) {
|
||||
comp->ns = xmlDictLookup(style->dict, ns->href, -1);
|
||||
|
@ -947,17 +947,17 @@ xsltElementComp(xsltStylesheetPtr style, xmlNodePtr inst) {
|
|||
"not specified by the instruction itself.\n", comp->name);
|
||||
style->errors++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((prefix != NULL) &&
|
||||
(!xmlStrncasecmp(prefix, (xmlChar *)"xml", 3)))
|
||||
{
|
||||
/*
|
||||
* Mark is to be skipped.
|
||||
*/
|
||||
comp->has_name = 0;
|
||||
comp->has_name = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Attribute "use-attribute-sets",
|
||||
*/
|
||||
|
@ -965,7 +965,7 @@ xsltElementComp(xsltStylesheetPtr style, xmlNodePtr inst) {
|
|||
(const xmlChar *)"use-attribute-sets",
|
||||
NULL, &comp->has_use);
|
||||
|
||||
error:
|
||||
error:
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1000,7 +1000,7 @@ xsltAttributeComp(xsltStylesheetPtr style, xmlNodePtr inst) {
|
|||
#else
|
||||
comp = xsltNewStylePreComp(style, XSLT_FUNC_ATTRIBUTE);
|
||||
#endif
|
||||
|
||||
|
||||
if (comp == NULL)
|
||||
return;
|
||||
inst->psvi = comp;
|
||||
|
@ -1020,7 +1020,7 @@ xsltAttributeComp(xsltStylesheetPtr style, xmlNodePtr inst) {
|
|||
"XSLT-attribute: The attribute 'name' is missing.\n");
|
||||
style->errors++;
|
||||
return;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Attribute "namespace".
|
||||
*/
|
||||
|
@ -1051,7 +1051,7 @@ xsltAttributeComp(xsltStylesheetPtr style, xmlNodePtr inst) {
|
|||
* QName is expanded into an expanded-name using the
|
||||
* namespace declarations in effect for the xsl:element
|
||||
* element, including any default namespace declaration.
|
||||
*/
|
||||
*/
|
||||
ns = xmlSearchNs(inst->doc, inst, prefix);
|
||||
if (ns != NULL) {
|
||||
comp->ns = xmlDictLookup(style->dict, ns->href, -1);
|
||||
|
@ -1083,16 +1083,16 @@ xsltAttributeComp(xsltStylesheetPtr style, xmlNodePtr inst) {
|
|||
* Reject a prefix of "xmlns". Mark to be skipped.
|
||||
*/
|
||||
comp->has_name = 0;
|
||||
|
||||
|
||||
#ifdef WITH_XSLT_DEBUG_PARSING
|
||||
xsltGenericDebug(xsltGenericDebugContext,
|
||||
"xsltAttribute: xmlns prefix forbidden\n");
|
||||
#endif
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1426,7 +1426,7 @@ xsltNumberComp(xsltStylesheetPtr style, xmlNodePtr cur) {
|
|||
comp->numdata.node = cur;
|
||||
comp->numdata.value = xsltGetCNsProp(style, cur, (const xmlChar *)"value",
|
||||
XSLT_NAMESPACE);
|
||||
|
||||
|
||||
prop = xsltEvalStaticAttrValueTemplate(style, cur,
|
||||
(const xmlChar *)"format",
|
||||
XSLT_NAMESPACE, &comp->numdata.has_format);
|
||||
|
@ -1440,7 +1440,7 @@ xsltNumberComp(xsltStylesheetPtr style, xmlNodePtr cur) {
|
|||
XSLT_NAMESPACE);
|
||||
comp->numdata.from = xsltGetCNsProp(style, cur, (const xmlChar *)"from",
|
||||
XSLT_NAMESPACE);
|
||||
|
||||
|
||||
prop = xsltGetCNsProp(style, cur, (const xmlChar *)"level", XSLT_NAMESPACE);
|
||||
if (prop != NULL) {
|
||||
if (xmlStrEqual(prop, BAD_CAST("single")) ||
|
||||
|
@ -1453,14 +1453,14 @@ xsltNumberComp(xsltStylesheetPtr style, xmlNodePtr cur) {
|
|||
if (style != NULL) style->warnings++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
prop = xsltGetCNsProp(style, cur, (const xmlChar *)"lang", XSLT_NAMESPACE);
|
||||
if (prop != NULL) {
|
||||
xsltTransformError(NULL, style, cur,
|
||||
"xsl:number : lang attribute not implemented\n");
|
||||
XSLT_TODO; /* xsl:number lang attribute */
|
||||
}
|
||||
|
||||
|
||||
prop = xsltGetCNsProp(style, cur, (const xmlChar *)"letter-value", XSLT_NAMESPACE);
|
||||
if (prop != NULL) {
|
||||
if (xmlStrEqual(prop, BAD_CAST("alphabetic"))) {
|
||||
|
@ -1479,7 +1479,7 @@ xsltNumberComp(xsltStylesheetPtr style, xmlNodePtr cur) {
|
|||
if (style != NULL) style->warnings++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
prop = xsltGetCNsProp(style, cur, (const xmlChar *)"grouping-separator",
|
||||
XSLT_NAMESPACE);
|
||||
if (prop != NULL) {
|
||||
|
@ -1487,7 +1487,7 @@ xsltNumberComp(xsltStylesheetPtr style, xmlNodePtr cur) {
|
|||
comp->numdata.groupingCharacter =
|
||||
xsltGetUTF8Char(prop, &(comp->numdata.groupingCharacterLen));
|
||||
}
|
||||
|
||||
|
||||
prop = xsltGetCNsProp(style, cur, (const xmlChar *)"grouping-size", XSLT_NAMESPACE);
|
||||
if (prop != NULL) {
|
||||
sscanf((char *)prop, "%d", &comp->numdata.digitsPerGroup);
|
||||
|
@ -1502,7 +1502,7 @@ xsltNumberComp(xsltStylesheetPtr style, xmlNodePtr cur) {
|
|||
BAD_CAST"single", 6);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1837,7 +1837,7 @@ xsltVariableComp(xsltStylesheetPtr style, xmlNodePtr inst) {
|
|||
xsltGetQNameProperty(style, inst, BAD_CAST "name",
|
||||
1, &(comp->has_name), &(comp->ns), &(comp->name));
|
||||
if (comp->ns)
|
||||
comp->has_ns = 1;
|
||||
comp->has_ns = 1;
|
||||
/*
|
||||
* Attribute "select".
|
||||
*/
|
||||
|
@ -1936,11 +1936,11 @@ xsltFreeStylePreComps(xsltStylesheetPtr style) {
|
|||
xsltElemPreCompPtr cur, next;
|
||||
|
||||
if (style == NULL)
|
||||
return;
|
||||
|
||||
return;
|
||||
|
||||
cur = style->preComps;
|
||||
while (cur != NULL) {
|
||||
next = cur->next;
|
||||
next = cur->next;
|
||||
if (cur->type == XSLT_FUNC_EXTENSION)
|
||||
cur->free(cur);
|
||||
else
|
||||
|
@ -1962,7 +1962,7 @@ xsltFreeStylePreComps(xsltStylesheetPtr style) {
|
|||
*/
|
||||
void
|
||||
xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr node) {
|
||||
/*
|
||||
/*
|
||||
* The xsltXSLTElemMarker marker was set beforehand by
|
||||
* the parsing mechanism for all elements in the XSLT namespace.
|
||||
*/
|
||||
|
@ -1982,67 +1982,67 @@ xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr node) {
|
|||
case XSLT_FUNC_APPLYTEMPLATES:
|
||||
xsltApplyTemplatesComp(style, node);
|
||||
break;
|
||||
case XSLT_FUNC_WITHPARAM:
|
||||
case XSLT_FUNC_WITHPARAM:
|
||||
xsltWithParamComp(style, node);
|
||||
break;
|
||||
case XSLT_FUNC_VALUEOF:
|
||||
case XSLT_FUNC_VALUEOF:
|
||||
xsltValueOfComp(style, node);
|
||||
break;
|
||||
case XSLT_FUNC_COPY:
|
||||
case XSLT_FUNC_COPY:
|
||||
xsltCopyComp(style, node);
|
||||
break;
|
||||
case XSLT_FUNC_COPYOF:
|
||||
xsltCopyOfComp(style, node);
|
||||
break;
|
||||
case XSLT_FUNC_IF:
|
||||
case XSLT_FUNC_IF:
|
||||
xsltIfComp(style, node);
|
||||
break;
|
||||
case XSLT_FUNC_CHOOSE:
|
||||
case XSLT_FUNC_CHOOSE:
|
||||
xsltChooseComp(style, node);
|
||||
break;
|
||||
case XSLT_FUNC_WHEN:
|
||||
case XSLT_FUNC_WHEN:
|
||||
xsltWhenComp(style, node);
|
||||
break;
|
||||
case XSLT_FUNC_OTHERWISE:
|
||||
case XSLT_FUNC_OTHERWISE:
|
||||
/* NOP yet */
|
||||
return;
|
||||
case XSLT_FUNC_FOREACH:
|
||||
case XSLT_FUNC_FOREACH:
|
||||
xsltForEachComp(style, node);
|
||||
break;
|
||||
case XSLT_FUNC_APPLYIMPORTS:
|
||||
case XSLT_FUNC_APPLYIMPORTS:
|
||||
xsltApplyImportsComp(style, node);
|
||||
break;
|
||||
case XSLT_FUNC_ATTRIBUTE:
|
||||
case XSLT_FUNC_ATTRIBUTE:
|
||||
xsltAttributeComp(style, node);
|
||||
break;
|
||||
case XSLT_FUNC_ELEMENT:
|
||||
case XSLT_FUNC_ELEMENT:
|
||||
xsltElementComp(style, node);
|
||||
break;
|
||||
case XSLT_FUNC_SORT:
|
||||
case XSLT_FUNC_SORT:
|
||||
xsltSortComp(style, node);
|
||||
break;
|
||||
case XSLT_FUNC_COMMENT:
|
||||
case XSLT_FUNC_COMMENT:
|
||||
xsltCommentComp(style, node);
|
||||
break;
|
||||
case XSLT_FUNC_NUMBER:
|
||||
case XSLT_FUNC_NUMBER:
|
||||
xsltNumberComp(style, node);
|
||||
break;
|
||||
case XSLT_FUNC_PI:
|
||||
case XSLT_FUNC_PI:
|
||||
xsltProcessingInstructionComp(style, node);
|
||||
break;
|
||||
case XSLT_FUNC_CALLTEMPLATE:
|
||||
case XSLT_FUNC_CALLTEMPLATE:
|
||||
xsltCallTemplateComp(style, node);
|
||||
break;
|
||||
case XSLT_FUNC_PARAM:
|
||||
case XSLT_FUNC_PARAM:
|
||||
xsltParamComp(style, node);
|
||||
break;
|
||||
case XSLT_FUNC_VARIABLE:
|
||||
case XSLT_FUNC_VARIABLE:
|
||||
xsltVariableComp(style, node);
|
||||
break;
|
||||
case XSLT_FUNC_FALLBACK:
|
||||
case XSLT_FUNC_FALLBACK:
|
||||
/* NOP yet */
|
||||
return;
|
||||
case XSLT_FUNC_DOCUMENT:
|
||||
case XSLT_FUNC_DOCUMENT:
|
||||
/* The extra one */
|
||||
node->psvi = (void *) xsltDocumentComp(style, node,
|
||||
(xsltTransformFunction) xsltDocumentElem);
|
||||
|
@ -2065,7 +2065,7 @@ xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr node) {
|
|||
} else {
|
||||
/*
|
||||
* Fallback to string comparison.
|
||||
*/
|
||||
*/
|
||||
if (IS_XSLT_NAME(node, "apply-templates")) {
|
||||
xsltApplyTemplatesComp(style, node);
|
||||
} else if (IS_XSLT_NAME(node, "with-param")) {
|
||||
|
@ -2081,7 +2081,7 @@ xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr node) {
|
|||
} else if (IS_XSLT_NAME(node, "choose")) {
|
||||
xsltChooseComp(style, node);
|
||||
} else if (IS_XSLT_NAME(node, "when")) {
|
||||
xsltWhenComp(style, node);
|
||||
xsltWhenComp(style, node);
|
||||
} else if (IS_XSLT_NAME(node, "otherwise")) {
|
||||
/* NOP yet */
|
||||
return;
|
||||
|
@ -2113,7 +2113,7 @@ xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr node) {
|
|||
} else if (IS_XSLT_NAME(node, "document")) {
|
||||
/* The extra one */
|
||||
node->psvi = (void *) xsltDocumentComp(style, node,
|
||||
(xsltTransformFunction) xsltDocumentElem);
|
||||
(xsltTransformFunction) xsltDocumentElem);
|
||||
} else if (IS_XSLT_NAME(node, "output")) {
|
||||
/* Top-level */
|
||||
return;
|
||||
|
@ -2122,7 +2122,7 @@ xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr node) {
|
|||
return;
|
||||
} else if (IS_XSLT_NAME(node, "strip-space")) {
|
||||
/* Top-level */
|
||||
return;
|
||||
return;
|
||||
} else if (IS_XSLT_NAME(node, "key")) {
|
||||
/* Top-level */
|
||||
return;
|
||||
|
@ -2138,7 +2138,7 @@ xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr node) {
|
|||
/* Top-level */
|
||||
return;
|
||||
} else if (IS_XSLT_NAME(node, "include")) {
|
||||
/* Top-level */
|
||||
/* Top-level */
|
||||
} else {
|
||||
/*
|
||||
* NOTE that xsl:text, xsl:template, xsl:stylesheet,
|
||||
|
@ -2150,7 +2150,7 @@ xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr node) {
|
|||
"the XSLT element '%s'.\n", node->name);
|
||||
style->errors++;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Assign the current list of in-scope namespaces to the
|
||||
|
@ -2251,7 +2251,7 @@ xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr inst) {
|
|||
} else if (IS_XSLT_NAME(inst, "call-template")) {
|
||||
xsltCheckInstructionElement(style, inst);
|
||||
xsltCallTemplateComp(style, inst);
|
||||
} else if (IS_XSLT_NAME(inst, "param")) {
|
||||
} else if (IS_XSLT_NAME(inst, "param")) {
|
||||
if (xsltCheckTopLevelElement(style, inst, 0) == 0)
|
||||
xsltCheckInstructionElement(style, inst);
|
||||
xsltParamComp(style, inst);
|
||||
|
@ -2319,7 +2319,7 @@ xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr inst) {
|
|||
"xsltStylePreCompute: unknown xsl:%s\n", inst->name);
|
||||
if (style != NULL) style->warnings++;
|
||||
}
|
||||
|
||||
|
||||
cur = (xsltStylePreCompPtr) inst->psvi;
|
||||
/*
|
||||
* A ns-list is build for every XSLT item in the
|
||||
|
|
6
reactos/dll/3rdparty/libxslt/preproc.h
vendored
6
reactos/dll/3rdparty/libxslt/preproc.h
vendored
|
@ -24,15 +24,15 @@ extern "C" {
|
|||
*/
|
||||
extern const xmlChar *xsltExtMarker;
|
||||
|
||||
XSLTPUBFUN xsltElemPreCompPtr XSLTCALL
|
||||
XSLTPUBFUN xsltElemPreCompPtr XSLTCALL
|
||||
xsltDocumentComp (xsltStylesheetPtr style,
|
||||
xmlNodePtr inst,
|
||||
xsltTransformFunction function);
|
||||
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltStylePreCompute (xsltStylesheetPtr style,
|
||||
xmlNodePtr inst);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltFreeStylePreComps (xsltStylesheetPtr style);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
8
reactos/dll/3rdparty/libxslt/security.c
vendored
8
reactos/dll/3rdparty/libxslt/security.c
vendored
|
@ -181,7 +181,7 @@ xsltGetSecurityPrefs(xsltSecurityPrefsPtr sec, xsltSecurityOption option) {
|
|||
*/
|
||||
void
|
||||
xsltSetDefaultSecurityPrefs(xsltSecurityPrefsPtr sec) {
|
||||
|
||||
|
||||
xsltDefaultSecurityPrefs = sec;
|
||||
}
|
||||
|
||||
|
@ -206,7 +206,7 @@ xsltGetDefaultSecurityPrefs(void) {
|
|||
*
|
||||
* Returns -1 in case of error, 0 otherwise
|
||||
*/
|
||||
int
|
||||
int
|
||||
xsltSetCtxtSecurityPrefs(xsltSecurityPrefsPtr sec,
|
||||
xsltTransformContextPtr ctxt) {
|
||||
if (ctxt == NULL)
|
||||
|
@ -265,7 +265,7 @@ xsltSecurityForbid(xsltSecurityPrefsPtr sec ATTRIBUTE_UNUSED,
|
|||
*
|
||||
* TODO: remove at some point !!!
|
||||
* Local copy of xmlCheckFilename to avoid a hard dependency on
|
||||
* a new version of libxml2
|
||||
* a new version of libxml2
|
||||
*
|
||||
* if stat is not available on the target machine,
|
||||
* returns 1. if stat fails, returns 0 (if calling
|
||||
|
@ -282,7 +282,7 @@ xsltCheckFilename (const char *path)
|
|||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
DWORD dwAttrs;
|
||||
|
||||
dwAttrs = GetFileAttributes(path);
|
||||
dwAttrs = GetFileAttributes(path);
|
||||
if (dwAttrs != INVALID_FILE_ATTRIBUTES) {
|
||||
if (dwAttrs & FILE_ATTRIBUTE_DIRECTORY) {
|
||||
return 2;
|
||||
|
|
22
reactos/dll/3rdparty/libxslt/security.h
vendored
22
reactos/dll/3rdparty/libxslt/security.h
vendored
|
@ -55,43 +55,43 @@ typedef int (*xsltSecurityCheck) (xsltSecurityPrefsPtr sec,
|
|||
/*
|
||||
* Module interfaces
|
||||
*/
|
||||
XSLTPUBFUN xsltSecurityPrefsPtr XSLTCALL
|
||||
XSLTPUBFUN xsltSecurityPrefsPtr XSLTCALL
|
||||
xsltNewSecurityPrefs (void);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltFreeSecurityPrefs (xsltSecurityPrefsPtr sec);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltSetSecurityPrefs (xsltSecurityPrefsPtr sec,
|
||||
xsltSecurityOption option,
|
||||
xsltSecurityCheck func);
|
||||
XSLTPUBFUN xsltSecurityCheck XSLTCALL
|
||||
XSLTPUBFUN xsltSecurityCheck XSLTCALL
|
||||
xsltGetSecurityPrefs (xsltSecurityPrefsPtr sec,
|
||||
xsltSecurityOption option);
|
||||
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltSetDefaultSecurityPrefs (xsltSecurityPrefsPtr sec);
|
||||
XSLTPUBFUN xsltSecurityPrefsPtr XSLTCALL
|
||||
XSLTPUBFUN xsltSecurityPrefsPtr XSLTCALL
|
||||
xsltGetDefaultSecurityPrefs (void);
|
||||
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltSetCtxtSecurityPrefs (xsltSecurityPrefsPtr sec,
|
||||
xsltTransformContextPtr ctxt);
|
||||
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltSecurityAllow (xsltSecurityPrefsPtr sec,
|
||||
xsltTransformContextPtr ctxt,
|
||||
const char *value);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltSecurityForbid (xsltSecurityPrefsPtr sec,
|
||||
xsltTransformContextPtr ctxt,
|
||||
const char *value);
|
||||
/*
|
||||
* internal interfaces
|
||||
*/
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltCheckWrite (xsltSecurityPrefsPtr sec,
|
||||
xsltTransformContextPtr ctxt,
|
||||
const xmlChar *URL);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltCheckRead (xsltSecurityPrefsPtr sec,
|
||||
xsltTransformContextPtr ctxt,
|
||||
const xmlChar *URL);
|
||||
|
|
22
reactos/dll/3rdparty/libxslt/templates.c
vendored
22
reactos/dll/3rdparty/libxslt/templates.c
vendored
|
@ -39,7 +39,7 @@
|
|||
* Module interfaces *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* xsltEvalXPathPredicate:
|
||||
* @ctxt: the XSLT transformation context
|
||||
|
@ -454,7 +454,7 @@ xsltEvalStaticAttrValueTemplate(xsltStylesheetPtr style, xmlNodePtr inst,
|
|||
* Evaluates Attribute Value Templates and copies the attribute over to
|
||||
* the result element.
|
||||
* This does *not* process attribute sets (xsl:use-attribute-set).
|
||||
*
|
||||
*
|
||||
*
|
||||
* Returns the generated attribute node.
|
||||
*/
|
||||
|
@ -467,14 +467,14 @@ xsltAttrTemplateProcess(xsltTransformContextPtr ctxt, xmlNodePtr target,
|
|||
|
||||
if ((ctxt == NULL) || (attr == NULL) || (target == NULL))
|
||||
return(NULL);
|
||||
|
||||
|
||||
if (attr->type != XML_ATTRIBUTE_NODE)
|
||||
return(NULL);
|
||||
|
||||
/*
|
||||
* Skip all XSLT attributes.
|
||||
*/
|
||||
#ifdef XSLT_REFACTORED
|
||||
#ifdef XSLT_REFACTORED
|
||||
if (attr->psvi == xsltXSLTAttrMarker)
|
||||
return(NULL);
|
||||
#else
|
||||
|
@ -511,7 +511,7 @@ xsltAttrTemplateProcess(xsltTransformContextPtr ctxt, xmlNodePtr target,
|
|||
}
|
||||
ret = ret->next;
|
||||
}
|
||||
if (ret != NULL) {
|
||||
if (ret != NULL) {
|
||||
/* free the existing value */
|
||||
xmlFreeNodeList(ret->children);
|
||||
ret->children = ret->last = NULL;
|
||||
|
@ -530,7 +530,7 @@ xsltAttrTemplateProcess(xsltTransformContextPtr ctxt, xmlNodePtr target,
|
|||
xsltGetNamespace(ctxt, attr->parent, attr->ns, target),
|
||||
attr->name, NULL);
|
||||
else
|
||||
ret = xmlNewNsProp(target, NULL, attr->name, NULL);
|
||||
ret = xmlNewNsProp(target, NULL, attr->name, NULL);
|
||||
}
|
||||
/*
|
||||
* Set the value.
|
||||
|
@ -581,11 +581,11 @@ xsltAttrTemplateProcess(xsltTransformContextPtr ctxt, xmlNodePtr target,
|
|||
} else {
|
||||
if (attr->ns) {
|
||||
xsltTransformError(ctxt, NULL, attr->parent,
|
||||
"Internal error: Failed to create attribute '{%s}%s'.\n",
|
||||
"Internal error: Failed to create attribute '{%s}%s'.\n",
|
||||
attr->ns->href, attr->name);
|
||||
} else {
|
||||
xsltTransformError(ctxt, NULL, attr->parent,
|
||||
"Internal error: Failed to create attribute '%s'.\n",
|
||||
"Internal error: Failed to create attribute '%s'.\n",
|
||||
attr->name);
|
||||
}
|
||||
}
|
||||
|
@ -613,7 +613,7 @@ xsltAttrTemplateProcess(xsltTransformContextPtr ctxt, xmlNodePtr target,
|
|||
* attributes will be disattached.)
|
||||
*/
|
||||
xmlAttrPtr
|
||||
xsltAttrListTemplateProcess(xsltTransformContextPtr ctxt,
|
||||
xsltAttrListTemplateProcess(xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr target, xmlAttrPtr attrs)
|
||||
{
|
||||
xmlAttrPtr attr, copy, last;
|
||||
|
@ -626,7 +626,7 @@ xsltAttrListTemplateProcess(xsltTransformContextPtr ctxt,
|
|||
return(NULL);
|
||||
|
||||
oldInsert = ctxt->insert;
|
||||
ctxt->insert = target;
|
||||
ctxt->insert = target;
|
||||
|
||||
/*
|
||||
* Instantiate LRE-attributes.
|
||||
|
@ -818,7 +818,7 @@ xmlNodePtr *
|
|||
xsltTemplateProcess(xsltTransformContextPtr ctxt ATTRIBUTE_UNUSED, xmlNodePtr node) {
|
||||
if (node == NULL)
|
||||
return(NULL);
|
||||
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
|
22
reactos/dll/3rdparty/libxslt/templates.h
vendored
22
reactos/dll/3rdparty/libxslt/templates.h
vendored
|
@ -20,21 +20,21 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltEvalXPathPredicate (xsltTransformContextPtr ctxt,
|
||||
xmlXPathCompExprPtr comp,
|
||||
xmlNsPtr *nsList,
|
||||
int nsNr);
|
||||
XSLTPUBFUN xmlChar * XSLTCALL
|
||||
XSLTPUBFUN xmlChar * XSLTCALL
|
||||
xsltEvalTemplateString (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr contextNode,
|
||||
xmlNodePtr inst);
|
||||
XSLTPUBFUN xmlChar * XSLTCALL
|
||||
XSLTPUBFUN xmlChar * XSLTCALL
|
||||
xsltEvalAttrValueTemplate (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns);
|
||||
XSLTPUBFUN const xmlChar * XSLTCALL
|
||||
XSLTPUBFUN const xmlChar * XSLTCALL
|
||||
xsltEvalStaticAttrValueTemplate (xsltStylesheetPtr style,
|
||||
xmlNodePtr node,
|
||||
const xmlChar *name,
|
||||
|
@ -42,30 +42,30 @@ XSLTPUBFUN const xmlChar * XSLTCALL
|
|||
int *found);
|
||||
|
||||
/* TODO: this is obviously broken ... the namespaces should be passed too ! */
|
||||
XSLTPUBFUN xmlChar * XSLTCALL
|
||||
XSLTPUBFUN xmlChar * XSLTCALL
|
||||
xsltEvalXPathString (xsltTransformContextPtr ctxt,
|
||||
xmlXPathCompExprPtr comp);
|
||||
XSLTPUBFUN xmlChar * XSLTCALL
|
||||
XSLTPUBFUN xmlChar * XSLTCALL
|
||||
xsltEvalXPathStringNs (xsltTransformContextPtr ctxt,
|
||||
xmlXPathCompExprPtr comp,
|
||||
int nsNr,
|
||||
xmlNsPtr *nsList);
|
||||
|
||||
XSLTPUBFUN xmlNodePtr * XSLTCALL
|
||||
XSLTPUBFUN xmlNodePtr * XSLTCALL
|
||||
xsltTemplateProcess (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node);
|
||||
XSLTPUBFUN xmlAttrPtr XSLTCALL
|
||||
XSLTPUBFUN xmlAttrPtr XSLTCALL
|
||||
xsltAttrListTemplateProcess (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr target,
|
||||
xmlAttrPtr cur);
|
||||
XSLTPUBFUN xmlAttrPtr XSLTCALL
|
||||
XSLTPUBFUN xmlAttrPtr XSLTCALL
|
||||
xsltAttrTemplateProcess (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr target,
|
||||
xmlAttrPtr attr);
|
||||
XSLTPUBFUN xmlChar * XSLTCALL
|
||||
XSLTPUBFUN xmlChar * XSLTCALL
|
||||
xsltAttrTemplateValueProcess (xsltTransformContextPtr ctxt,
|
||||
const xmlChar* attr);
|
||||
XSLTPUBFUN xmlChar * XSLTCALL
|
||||
XSLTPUBFUN xmlChar * XSLTCALL
|
||||
xsltAttrTemplateValueProcessNode(xsltTransformContextPtr ctxt,
|
||||
const xmlChar* str,
|
||||
xmlNodePtr node);
|
||||
|
|
166
reactos/dll/3rdparty/libxslt/variables.c
vendored
166
reactos/dll/3rdparty/libxslt/variables.c
vendored
|
@ -57,7 +57,7 @@ const xmlChar *xsltComputingGlobalVarMarker =
|
|||
* @ctxt: an XSLT transformation context
|
||||
*
|
||||
* Creates a Result Value Tree
|
||||
* (the XSLT 1.0 term for this is "Result Tree Fragment")
|
||||
* (the XSLT 1.0 term for this is "Result Tree Fragment")
|
||||
*
|
||||
* Returns the result value tree or NULL in case of API or internal errors.
|
||||
*/
|
||||
|
@ -69,7 +69,7 @@ xsltCreateRVT(xsltTransformContextPtr ctxt)
|
|||
/*
|
||||
* Question: Why is this function public?
|
||||
* Answer: It is called by the EXSLT module.
|
||||
*/
|
||||
*/
|
||||
if (ctxt == NULL)
|
||||
return(NULL);
|
||||
|
||||
|
@ -158,7 +158,7 @@ xsltRegisterLocalRVT(xsltTransformContextPtr ctxt,
|
|||
{
|
||||
if ((ctxt == NULL) || (RVT == NULL))
|
||||
return(-1);
|
||||
|
||||
|
||||
/*
|
||||
* When evaluating "select" expressions of xsl:variable
|
||||
* and xsl:param, we need to bind newly created tree fragments
|
||||
|
@ -272,7 +272,7 @@ xsltExtensionInstructionResultRegister(xsltTransformContextPtr ctxt,
|
|||
(((xmlNsPtr) cur)->next->type == XML_ELEMENT_NODE))
|
||||
{
|
||||
cur = (xmlNodePtr) ((xmlNsPtr) cur)->next;
|
||||
doc = cur->doc;
|
||||
doc = cur->doc;
|
||||
} else {
|
||||
xsltTransformError(ctxt, NULL, ctxt->inst,
|
||||
"Internal error in "
|
||||
|
@ -333,7 +333,7 @@ xsltReleaseRVT(xsltTransformContextPtr ctxt, xmlDocPtr RVT)
|
|||
}
|
||||
/*
|
||||
* Clear the document tree.
|
||||
* REVISIT TODO: Do we expect ID/IDREF tables to be existent?
|
||||
* REVISIT TODO: Do we expect ID/IDREF tables to be existent?
|
||||
*/
|
||||
if (RVT->children != NULL) {
|
||||
xmlFreeNodeList(RVT->children);
|
||||
|
@ -522,7 +522,7 @@ xsltCopyStackElem(xsltStackElemPtr elem) {
|
|||
cur->nameURI = elem->nameURI;
|
||||
cur->select = elem->select;
|
||||
cur->tree = elem->tree;
|
||||
cur->comp = elem->comp;
|
||||
cur->comp = elem->comp;
|
||||
return(cur);
|
||||
}
|
||||
|
||||
|
@ -563,13 +563,13 @@ xsltFreeStackElem(xsltStackElemPtr elem) {
|
|||
* </xsl:variable>
|
||||
* <f:result select="$bar"/>
|
||||
* </f:function>
|
||||
*
|
||||
*
|
||||
*/
|
||||
xsltRegisterLocalRVT(elem->context, cur);
|
||||
} else {
|
||||
xsltReleaseRVT((xsltTransformContextPtr) elem->context,
|
||||
cur);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
@ -583,7 +583,7 @@ xsltFreeStackElem(xsltStackElemPtr elem) {
|
|||
memset(elem, 0, sizeof(xsltStackElem));
|
||||
elem->context = ctxt;
|
||||
elem->next = ctxt->cache->stackItems;
|
||||
ctxt->cache->stackItems = elem;
|
||||
ctxt->cache->stackItems = elem;
|
||||
ctxt->cache->nbStackItems++;
|
||||
#ifdef XSLT_DEBUG_PROFILE_CACHE
|
||||
ctxt->cache->dbgCachedVars++;
|
||||
|
@ -602,7 +602,7 @@ xsltFreeStackElem(xsltStackElemPtr elem) {
|
|||
void
|
||||
xsltFreeStackElemList(xsltStackElemPtr elem) {
|
||||
xsltStackElemPtr next;
|
||||
|
||||
|
||||
while (elem != NULL) {
|
||||
next = elem->next;
|
||||
xsltFreeStackElem(elem);
|
||||
|
@ -706,7 +706,7 @@ xsltCheckStackElem(xsltTransformContextPtr ctxt, const xmlChar *name,
|
|||
else if (cur->comp->type == XSLT_FUNC_PARAM)
|
||||
return(2);
|
||||
}
|
||||
|
||||
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
@ -752,10 +752,10 @@ xsltAddStackElem(xsltTransformContextPtr ctxt, xsltStackElemPtr elem)
|
|||
}
|
||||
ctxt->varsTab[ctxt->varsNr++] = elem;
|
||||
ctxt->vars = elem;
|
||||
|
||||
|
||||
elem = elem->next;
|
||||
} while (elem != NULL);
|
||||
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@ -799,7 +799,7 @@ xsltEvalVariable(xsltTransformContextPtr ctxt, xsltStackElemPtr variable,
|
|||
(xsltStyleItemVariablePtr) castedComp;
|
||||
#else
|
||||
xsltStylePreCompPtr comp = castedComp;
|
||||
#endif
|
||||
#endif
|
||||
xmlXPathObjectPtr result = NULL;
|
||||
xmlNodePtr oldInst;
|
||||
|
||||
|
@ -842,7 +842,7 @@ xsltEvalVariable(xsltTransformContextPtr ctxt, xsltStackElemPtr variable,
|
|||
oldXPContextSize = xpctxt->contextSize;
|
||||
oldXPNamespaces = xpctxt->namespaces;
|
||||
oldXPNsNr = xpctxt->nsNr;
|
||||
|
||||
|
||||
xpctxt->node = ctxt->node;
|
||||
/*
|
||||
* OPTIMIZE TODO: Lame try to set the context doc.
|
||||
|
@ -854,7 +854,7 @@ xsltEvalVariable(xsltTransformContextPtr ctxt, xsltStackElemPtr variable,
|
|||
/*
|
||||
* BUG TODO: The proximity position and the context size will
|
||||
* potentially be wrong.
|
||||
* Example:
|
||||
* Example:
|
||||
* <xsl:template select="foo">
|
||||
* <xsl:variable name="pos" select="position()"/>
|
||||
* <xsl:for-each select="bar">
|
||||
|
@ -865,9 +865,9 @@ xsltEvalVariable(xsltTransformContextPtr ctxt, xsltStackElemPtr variable,
|
|||
* to the context of <xsl:for-each select="bar">, but
|
||||
* the variable needs to be evaluated in the context of
|
||||
* <xsl:template select="foo">.
|
||||
*/
|
||||
*/
|
||||
if (comp != NULL) {
|
||||
|
||||
|
||||
#ifdef XSLT_REFACTORED
|
||||
if (comp->inScopeNs != NULL) {
|
||||
xpctxt->namespaces = comp->inScopeNs->list;
|
||||
|
@ -892,9 +892,9 @@ xsltEvalVariable(xsltTransformContextPtr ctxt, xsltStackElemPtr variable,
|
|||
* we'll eventually free still referenced fragments, before
|
||||
* we leave the scope of the variable.
|
||||
*/
|
||||
ctxt->contextVariable = variable;
|
||||
variable->flags |= XSLT_VAR_IN_SELECT;
|
||||
|
||||
ctxt->contextVariable = variable;
|
||||
variable->flags |= XSLT_VAR_IN_SELECT;
|
||||
|
||||
result = xmlXPathCompiledEval(xpExpr, xpctxt);
|
||||
|
||||
variable->flags ^= XSLT_VAR_IN_SELECT;
|
||||
|
@ -932,7 +932,7 @@ xsltEvalVariable(xsltTransformContextPtr ctxt, xsltStackElemPtr variable,
|
|||
} else {
|
||||
if (variable->tree == NULL) {
|
||||
result = xmlXPathNewCString("");
|
||||
} else {
|
||||
} else {
|
||||
if (variable->tree) {
|
||||
xmlDocPtr container;
|
||||
xmlNodePtr oldInsert;
|
||||
|
@ -954,14 +954,14 @@ xsltEvalVariable(xsltTransformContextPtr ctxt, xsltStackElemPtr variable,
|
|||
*/
|
||||
/*
|
||||
* Attach the Result Tree Fragment to the variable;
|
||||
* when the variable is freed, it will also free
|
||||
* when the variable is freed, it will also free
|
||||
* the Result Tree Fragment.
|
||||
*/
|
||||
variable->fragment = container;
|
||||
|
||||
|
||||
oldOutput = ctxt->output;
|
||||
oldInsert = ctxt->insert;
|
||||
|
||||
oldInsert = ctxt->insert;
|
||||
|
||||
ctxt->output = container;
|
||||
ctxt->insert = (xmlNodePtr) container;
|
||||
ctxt->contextVariable = variable;
|
||||
|
@ -972,10 +972,10 @@ xsltEvalVariable(xsltTransformContextPtr ctxt, xsltStackElemPtr variable,
|
|||
xsltApplyOneTemplate(ctxt, ctxt->node, variable->tree,
|
||||
NULL, NULL);
|
||||
|
||||
ctxt->contextVariable = oldVar;
|
||||
ctxt->contextVariable = oldVar;
|
||||
ctxt->insert = oldInsert;
|
||||
ctxt->output = oldOutput;
|
||||
|
||||
|
||||
result = xmlXPathNewValueTree((xmlNodePtr) container);
|
||||
}
|
||||
if (result == NULL) {
|
||||
|
@ -985,7 +985,7 @@ xsltEvalVariable(xsltTransformContextPtr ctxt, xsltStackElemPtr variable,
|
|||
* Freeing is not handled there anymore.
|
||||
* QUESTION TODO: What does the above comment mean?
|
||||
*/
|
||||
result->boolval = 0;
|
||||
result->boolval = 0;
|
||||
}
|
||||
#ifdef WITH_XSLT_DEBUG_VARIABLE
|
||||
#ifdef LIBXML_DEBUG_ENABLED
|
||||
|
@ -1054,7 +1054,7 @@ xsltEvalGlobalVariable(xsltStackElemPtr elem, xsltTransformContextPtr ctxt)
|
|||
* called; and in the case of global params, if values for such params
|
||||
* are provided by the user.
|
||||
*/
|
||||
if (elem->select != NULL) {
|
||||
if (elem->select != NULL) {
|
||||
xmlXPathCompExprPtr xpExpr = NULL;
|
||||
xmlDocPtr oldXPDoc;
|
||||
xmlNodePtr oldXPContextNode;
|
||||
|
@ -1069,8 +1069,8 @@ xsltEvalGlobalVariable(xsltStackElemPtr elem, xsltTransformContextPtr ctxt)
|
|||
}
|
||||
if (xpExpr == NULL)
|
||||
goto error;
|
||||
|
||||
|
||||
|
||||
|
||||
if (comp != NULL)
|
||||
ctxt->inst = comp->inst;
|
||||
else
|
||||
|
@ -1082,7 +1082,7 @@ xsltEvalGlobalVariable(xsltStackElemPtr elem, xsltTransformContextPtr ctxt)
|
|||
* to process the root node of the source document: the current
|
||||
* node is the root node of the source document and the current
|
||||
* node list is a list containing just the root node of the source
|
||||
* document."
|
||||
* document."
|
||||
*/
|
||||
/*
|
||||
* Save context states.
|
||||
|
@ -1093,14 +1093,14 @@ xsltEvalGlobalVariable(xsltStackElemPtr elem, xsltTransformContextPtr ctxt)
|
|||
oldXPContextSize = xpctxt->contextSize;
|
||||
oldXPNamespaces = xpctxt->namespaces;
|
||||
oldXPNsNr = xpctxt->nsNr;
|
||||
|
||||
|
||||
xpctxt->node = ctxt->initialContextNode;
|
||||
xpctxt->doc = ctxt->initialContextDoc;
|
||||
xpctxt->contextSize = 1;
|
||||
xpctxt->proximityPosition = 1;
|
||||
|
||||
|
||||
if (comp != NULL) {
|
||||
|
||||
|
||||
#ifdef XSLT_REFACTORED
|
||||
if (comp->inScopeNs != NULL) {
|
||||
xpctxt->namespaces = comp->inScopeNs->list;
|
||||
|
@ -1117,7 +1117,7 @@ xsltEvalGlobalVariable(xsltStackElemPtr elem, xsltTransformContextPtr ctxt)
|
|||
xpctxt->namespaces = NULL;
|
||||
xpctxt->nsNr = 0;
|
||||
}
|
||||
|
||||
|
||||
result = xmlXPathCompiledEval(xpExpr, xpctxt);
|
||||
|
||||
/*
|
||||
|
@ -1156,7 +1156,7 @@ xsltEvalGlobalVariable(xsltStackElemPtr elem, xsltTransformContextPtr ctxt)
|
|||
} else {
|
||||
xmlDocPtr container;
|
||||
xmlNodePtr oldInsert;
|
||||
xmlDocPtr oldOutput, oldXPDoc;
|
||||
xmlDocPtr oldOutput, oldXPDoc;
|
||||
/*
|
||||
* Generate a result tree fragment.
|
||||
*/
|
||||
|
@ -1167,14 +1167,14 @@ xsltEvalGlobalVariable(xsltStackElemPtr elem, xsltTransformContextPtr ctxt)
|
|||
* Let the lifetime of the tree fragment be handled by
|
||||
* the Libxslt's garbage collector.
|
||||
*/
|
||||
xsltRegisterPersistRVT(ctxt, container);
|
||||
xsltRegisterPersistRVT(ctxt, container);
|
||||
|
||||
oldOutput = ctxt->output;
|
||||
oldInsert = ctxt->insert;
|
||||
|
||||
oldXPDoc = ctxt->xpathCtxt->doc;
|
||||
|
||||
ctxt->output = container;
|
||||
|
||||
ctxt->output = container;
|
||||
ctxt->insert = (xmlNodePtr) container;
|
||||
|
||||
ctxt->xpathCtxt->doc = ctxt->initialContextDoc;
|
||||
|
@ -1187,7 +1187,7 @@ xsltEvalGlobalVariable(xsltStackElemPtr elem, xsltTransformContextPtr ctxt)
|
|||
|
||||
ctxt->insert = oldInsert;
|
||||
ctxt->output = oldOutput;
|
||||
|
||||
|
||||
result = xmlXPathNewValueTree((xmlNodePtr) container);
|
||||
if (result == NULL) {
|
||||
result = xmlXPathNewCString("");
|
||||
|
@ -1227,11 +1227,11 @@ error:
|
|||
int
|
||||
xsltEvalGlobalVariables(xsltTransformContextPtr ctxt) {
|
||||
xsltStackElemPtr elem;
|
||||
xsltStylesheetPtr style;
|
||||
xsltStylesheetPtr style;
|
||||
|
||||
if ((ctxt == NULL) || (ctxt->document == NULL))
|
||||
return(-1);
|
||||
|
||||
|
||||
#ifdef WITH_XSLT_DEBUG_VARIABLE
|
||||
XSLT_TRACE(ctxt,XSLT_TRACE_VARIABLES,xsltGenericDebug(xsltGenericDebugContext,
|
||||
"Registering global variables\n"));
|
||||
|
@ -1242,7 +1242,7 @@ xsltEvalGlobalVariables(xsltTransformContextPtr ctxt) {
|
|||
style = ctxt->style;
|
||||
while (style != NULL) {
|
||||
elem = style->variables;
|
||||
|
||||
|
||||
#ifdef WITH_XSLT_DEBUG_VARIABLE
|
||||
if ((style->doc != NULL) && (style->doc->URL != NULL)) {
|
||||
XSLT_TRACE(ctxt,XSLT_TRACE_VARIABLES,xsltGenericDebug(xsltGenericDebugContext,
|
||||
|
@ -1257,7 +1257,7 @@ xsltEvalGlobalVariables(xsltTransformContextPtr ctxt) {
|
|||
/*
|
||||
* Global variables are stored in the variables pool.
|
||||
*/
|
||||
def = (xsltStackElemPtr)
|
||||
def = (xsltStackElemPtr)
|
||||
xmlHashLookup2(ctxt->globalVars,
|
||||
elem->name, elem->nameURI);
|
||||
if (def == NULL) {
|
||||
|
@ -1288,7 +1288,7 @@ xsltEvalGlobalVariables(xsltTransformContextPtr ctxt) {
|
|||
|
||||
/*
|
||||
* This part does the actual evaluation
|
||||
*/
|
||||
*/
|
||||
xmlHashScan(ctxt->globalVars,
|
||||
(xmlHashScanner) xsltEvalGlobalVariable, ctxt);
|
||||
|
||||
|
@ -1414,7 +1414,7 @@ xsltProcessUserParamInternal(xsltTransformContextPtr ctxt,
|
|||
const xmlChar *href;
|
||||
xmlXPathCompExprPtr xpExpr;
|
||||
xmlXPathObjectPtr result;
|
||||
|
||||
|
||||
xsltStackElemPtr elem;
|
||||
int res;
|
||||
void *res_ptr;
|
||||
|
@ -1496,7 +1496,7 @@ xsltProcessUserParamInternal(xsltTransformContextPtr ctxt,
|
|||
int oldXPProximityPosition, oldXPContextSize, oldXPNsNr;
|
||||
xmlNsPtr *oldXPNamespaces;
|
||||
xmlXPathContextPtr xpctxt = ctxt->xpathCtxt;
|
||||
|
||||
|
||||
/*
|
||||
* Save context states.
|
||||
*/
|
||||
|
@ -1516,19 +1516,19 @@ xsltProcessUserParamInternal(xsltTransformContextPtr ctxt,
|
|||
* node list is a list containing just the root node of the source
|
||||
* document."
|
||||
*/
|
||||
xpctxt->doc = ctxt->initialContextDoc;
|
||||
xpctxt->node = ctxt->initialContextNode;
|
||||
xpctxt->doc = ctxt->initialContextDoc;
|
||||
xpctxt->node = ctxt->initialContextNode;
|
||||
xpctxt->contextSize = 1;
|
||||
xpctxt->proximityPosition = 1;
|
||||
/*
|
||||
/*
|
||||
* There is really no in scope namespace for parameters on the
|
||||
* command line.
|
||||
*/
|
||||
xpctxt->namespaces = NULL;
|
||||
xpctxt->nsNr = 0;
|
||||
|
||||
xpctxt->nsNr = 0;
|
||||
|
||||
result = xmlXPathCompiledEval(xpExpr, xpctxt);
|
||||
|
||||
|
||||
/*
|
||||
* Restore Context states.
|
||||
*/
|
||||
|
@ -1538,7 +1538,7 @@ xsltProcessUserParamInternal(xsltTransformContextPtr ctxt,
|
|||
xpctxt->proximityPosition = oldXPProximityPosition;
|
||||
xpctxt->namespaces = oldXPNamespaces;
|
||||
xpctxt->nsNr = oldXPNsNr;
|
||||
|
||||
|
||||
xmlXPathFreeCompExpr(xpExpr);
|
||||
}
|
||||
if (result == NULL) {
|
||||
|
@ -1549,9 +1549,9 @@ xsltProcessUserParamInternal(xsltTransformContextPtr ctxt,
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* If @eval is 0 then @value is to be taken literally and result is NULL
|
||||
*
|
||||
*
|
||||
* If @eval is not 0, then @value is an XPath expression and has been
|
||||
* successfully evaluated and result contains the resulting value and
|
||||
* is not NULL.
|
||||
|
@ -1579,7 +1579,7 @@ xsltProcessUserParamInternal(xsltTransformContextPtr ctxt,
|
|||
elem->computed = 1;
|
||||
if (eval == 0) {
|
||||
elem->value = xmlXPathNewString(value);
|
||||
}
|
||||
}
|
||||
else {
|
||||
elem->value = result;
|
||||
}
|
||||
|
@ -1612,7 +1612,7 @@ xsltProcessUserParamInternal(xsltTransformContextPtr ctxt,
|
|||
*
|
||||
* Returns 0 in case of success, -1 in case of error
|
||||
*/
|
||||
|
||||
|
||||
int
|
||||
xsltEvalUserParams(xsltTransformContextPtr ctxt, const char **params) {
|
||||
int indx = 0;
|
||||
|
@ -1624,7 +1624,7 @@ xsltEvalUserParams(xsltTransformContextPtr ctxt, const char **params) {
|
|||
while (params[indx] != NULL) {
|
||||
name = (const xmlChar *) params[indx++];
|
||||
value = (const xmlChar *) params[indx++];
|
||||
if (xsltEvalOneUserParam(ctxt, name, value) != 0)
|
||||
if (xsltEvalOneUserParam(ctxt, name, value) != 0)
|
||||
return(-1);
|
||||
}
|
||||
return 0;
|
||||
|
@ -1642,7 +1642,7 @@ xsltEvalUserParams(xsltTransformContextPtr ctxt, const char **params) {
|
|||
*
|
||||
* Returns 0 in case of success, -1 in case of error.
|
||||
*/
|
||||
|
||||
|
||||
int
|
||||
xsltQuoteUserParams(xsltTransformContextPtr ctxt, const char **params) {
|
||||
int indx = 0;
|
||||
|
@ -1654,7 +1654,7 @@ xsltQuoteUserParams(xsltTransformContextPtr ctxt, const char **params) {
|
|||
while (params[indx] != NULL) {
|
||||
name = (const xmlChar *) params[indx++];
|
||||
value = (const xmlChar *) params[indx++];
|
||||
if (xsltQuoteOneUserParam(ctxt, name, value) != 0)
|
||||
if (xsltQuoteOneUserParam(ctxt, name, value) != 0)
|
||||
return(-1);
|
||||
}
|
||||
return 0;
|
||||
|
@ -1680,7 +1680,7 @@ xsltQuoteUserParams(xsltTransformContextPtr ctxt, const char **params) {
|
|||
|
||||
int
|
||||
xsltEvalOneUserParam(xsltTransformContextPtr ctxt,
|
||||
const xmlChar * name,
|
||||
const xmlChar * name,
|
||||
const xmlChar * value) {
|
||||
return xsltProcessUserParamInternal(ctxt, name, value,
|
||||
1 /* xpath eval ? */);
|
||||
|
@ -1727,7 +1727,7 @@ xsltBuildVariable(xsltTransformContextPtr ctxt,
|
|||
(xsltStyleBasicItemVariablePtr) castedComp;
|
||||
#else
|
||||
xsltStylePreCompPtr comp = castedComp;
|
||||
#endif
|
||||
#endif
|
||||
xsltStackElemPtr elem;
|
||||
|
||||
#ifdef WITH_XSLT_DEBUG_VARIABLE
|
||||
|
@ -1777,8 +1777,8 @@ xsltRegisterVariable(xsltTransformContextPtr ctxt,
|
|||
xsltStylePreCompPtr comp = castedComp;
|
||||
int present;
|
||||
#endif
|
||||
xsltStackElemPtr variable;
|
||||
|
||||
xsltStackElemPtr variable;
|
||||
|
||||
#ifdef XSLT_REFACTORED
|
||||
/*
|
||||
* REFACTORED NOTE: Redefinitions of vars/params are checked
|
||||
|
@ -1787,7 +1787,7 @@ xsltRegisterVariable(xsltTransformContextPtr ctxt,
|
|||
*/
|
||||
#else
|
||||
present = xsltCheckStackElem(ctxt, comp->name, comp->ns);
|
||||
if (isParam == 0) {
|
||||
if (isParam == 0) {
|
||||
if ((present != 0) && (present != 3)) {
|
||||
/* TODO: report QName. */
|
||||
xsltTransformError(ctxt, NULL, comp->inst,
|
||||
|
@ -1903,13 +1903,13 @@ xsltVariableLookup(xsltTransformContextPtr ctxt, const xmlChar *name,
|
|||
|
||||
/**
|
||||
* xsltParseStylesheetCallerParam:
|
||||
* @ctxt: the XSLT transformation context
|
||||
* @ctxt: the XSLT transformation context
|
||||
* @inst: the xsl:with-param instruction element
|
||||
*
|
||||
* Processes an xsl:with-param instruction at transformation time.
|
||||
* The value is compute, but not recorded.
|
||||
* NOTE that this is also called with an *xsl:param* element
|
||||
* from exsltFuncFunctionFunction().
|
||||
* from exsltFuncFunctionFunction().
|
||||
*
|
||||
* Returns the new xsltStackElemPtr or NULL
|
||||
*/
|
||||
|
@ -1925,7 +1925,7 @@ xsltParseStylesheetCallerParam(xsltTransformContextPtr ctxt, xmlNodePtr inst)
|
|||
xmlNodePtr tree = NULL; /* The first child node of the instruction or
|
||||
the instruction itself. */
|
||||
xsltStackElemPtr param = NULL;
|
||||
|
||||
|
||||
if ((ctxt == NULL) || (inst == NULL))
|
||||
return(NULL);
|
||||
|
||||
|
@ -1934,7 +1934,7 @@ xsltParseStylesheetCallerParam(xsltTransformContextPtr ctxt, xmlNodePtr inst)
|
|||
#else
|
||||
comp = (xsltStylePreCompPtr) inst->psvi;
|
||||
#endif
|
||||
|
||||
|
||||
if (comp == NULL) {
|
||||
xsltTransformError(ctxt, NULL, inst,
|
||||
"Internal error in xsltParseStylesheetCallerParam(): "
|
||||
|
@ -1987,7 +1987,7 @@ xsltParseGlobalVariable(xsltStylesheetPtr style, xmlNodePtr cur)
|
|||
|
||||
if ((cur == NULL) || (style == NULL))
|
||||
return;
|
||||
|
||||
|
||||
#ifdef XSLT_REFACTORED
|
||||
/*
|
||||
* Note that xsltStylePreCompute() will be called from
|
||||
|
@ -2014,7 +2014,7 @@ xsltParseGlobalVariable(xsltStylesheetPtr style, xmlNodePtr cur)
|
|||
* Parse the content (a sequence constructor) of xsl:variable.
|
||||
*/
|
||||
if (cur->children != NULL) {
|
||||
#ifdef XSLT_REFACTORED
|
||||
#ifdef XSLT_REFACTORED
|
||||
xsltParseSequenceConstructor(XSLT_CCTXT(style), cur->children);
|
||||
#else
|
||||
xsltParseTemplateContent(style, cur);
|
||||
|
@ -2049,7 +2049,7 @@ xsltParseGlobalParam(xsltStylesheetPtr style, xmlNodePtr cur) {
|
|||
|
||||
if ((cur == NULL) || (style == NULL))
|
||||
return;
|
||||
|
||||
|
||||
#ifdef XSLT_REFACTORED
|
||||
/*
|
||||
* Note that xsltStylePreCompute() will be called from
|
||||
|
@ -2059,7 +2059,7 @@ xsltParseGlobalParam(xsltStylesheetPtr style, xmlNodePtr cur) {
|
|||
#else
|
||||
xsltStylePreCompute(style, cur);
|
||||
comp = (xsltStylePreCompPtr) cur->psvi;
|
||||
#endif
|
||||
#endif
|
||||
if (comp == NULL) {
|
||||
xsltTransformError(NULL, style, cur,
|
||||
"xsl:param : compilation failed\n");
|
||||
|
@ -2076,7 +2076,7 @@ xsltParseGlobalParam(xsltStylesheetPtr style, xmlNodePtr cur) {
|
|||
* Parse the content (a sequence constructor) of xsl:param.
|
||||
*/
|
||||
if (cur->children != NULL) {
|
||||
#ifdef XSLT_REFACTORED
|
||||
#ifdef XSLT_REFACTORED
|
||||
xsltParseSequenceConstructor(XSLT_CCTXT(style), cur->children);
|
||||
#else
|
||||
xsltParseTemplateContent(style, cur);
|
||||
|
@ -2208,7 +2208,7 @@ xsltXPathVariableLookup(void *ctxt, const xmlChar *name,
|
|||
XSLT_TRACE(((xsltTransformContextPtr)ctxt),XSLT_TRACE_VARIABLES,xsltGenericDebug(xsltGenericDebugContext,
|
||||
"Lookup variable '%s'\n", name));
|
||||
#endif
|
||||
|
||||
|
||||
tctxt = (xsltTransformContextPtr) ctxt;
|
||||
/*
|
||||
* Local variables/params ---------------------------------------------
|
||||
|
@ -2232,7 +2232,7 @@ xsltXPathVariableLookup(void *ctxt, const xmlChar *name,
|
|||
goto local_variable_found;
|
||||
}
|
||||
cur = cur->next;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Redo the lookup with interned strings to avoid string comparison.
|
||||
*
|
||||
|
@ -2245,7 +2245,7 @@ xsltXPathVariableLookup(void *ctxt, const xmlChar *name,
|
|||
name = xmlDictLookup(tctxt->dict, name, -1);
|
||||
if (ns_uri)
|
||||
ns_uri = xmlDictLookup(tctxt->dict, ns_uri, -1);
|
||||
if ((tmpName != name) || (tmpNsName != ns_uri)) {
|
||||
if ((tmpName != name) || (tmpNsName != ns_uri)) {
|
||||
for (i = tctxt->varsNr; i > tctxt->varsBase; i--) {
|
||||
cur = tctxt->varsTab[i-1];
|
||||
if ((cur->name == name) && (cur->nameURI == ns_uri)) {
|
||||
|
@ -2263,7 +2263,7 @@ local_variable_found:
|
|||
|
||||
if (variable) {
|
||||
if (variable->computed == 0) {
|
||||
|
||||
|
||||
#ifdef WITH_XSLT_DEBUG_VARIABLE
|
||||
XSLT_TRACE(tctxt,XSLT_TRACE_VARIABLES,xsltGenericDebug(xsltGenericDebugContext,
|
||||
"uncomputed variable '%s'\n", name));
|
||||
|
@ -2272,14 +2272,14 @@ local_variable_found:
|
|||
variable->computed = 1;
|
||||
}
|
||||
if (variable->value != NULL) {
|
||||
valueObj = xmlXPathObjectCopy(variable->value);
|
||||
valueObj = xmlXPathObjectCopy(variable->value);
|
||||
}
|
||||
return(valueObj);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Global variables/params --------------------------------------------
|
||||
*/
|
||||
*/
|
||||
if (tctxt->globalVars) {
|
||||
valueObj = xsltGlobalVariableLookup(tctxt, name, ns_uri);
|
||||
}
|
||||
|
|
48
reactos/dll/3rdparty/libxslt/variables.h
vendored
48
reactos/dll/3rdparty/libxslt/variables.h
vendored
|
@ -38,48 +38,48 @@ extern "C" {
|
|||
* Interfaces for the variable module.
|
||||
*/
|
||||
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltEvalGlobalVariables (xsltTransformContextPtr ctxt);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltEvalUserParams (xsltTransformContextPtr ctxt,
|
||||
const char **params);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltQuoteUserParams (xsltTransformContextPtr ctxt,
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltQuoteUserParams (xsltTransformContextPtr ctxt,
|
||||
const char **params);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltEvalOneUserParam (xsltTransformContextPtr ctxt,
|
||||
const xmlChar * name,
|
||||
const xmlChar * name,
|
||||
const xmlChar * value);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltQuoteOneUserParam (xsltTransformContextPtr ctxt,
|
||||
const xmlChar * name,
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltQuoteOneUserParam (xsltTransformContextPtr ctxt,
|
||||
const xmlChar * name,
|
||||
const xmlChar * value);
|
||||
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltParseGlobalVariable (xsltStylesheetPtr style,
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltParseGlobalVariable (xsltStylesheetPtr style,
|
||||
xmlNodePtr cur);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltParseGlobalParam (xsltStylesheetPtr style,
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltParseGlobalParam (xsltStylesheetPtr style,
|
||||
xmlNodePtr cur);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltParseStylesheetVariable (xsltTransformContextPtr ctxt,
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltParseStylesheetVariable (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltParseStylesheetParam (xsltTransformContextPtr ctxt,
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltParseStylesheetParam (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XSLTPUBFUN xsltStackElemPtr XSLTCALL
|
||||
XSLTPUBFUN xsltStackElemPtr XSLTCALL
|
||||
xsltParseStylesheetCallerParam (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltAddStackElemList (xsltTransformContextPtr ctxt,
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltAddStackElemList (xsltTransformContextPtr ctxt,
|
||||
xsltStackElemPtr elems);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltFreeGlobalVariables (xsltTransformContextPtr ctxt);
|
||||
XSLTPUBFUN xmlXPathObjectPtr XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltFreeGlobalVariables (xsltTransformContextPtr ctxt);
|
||||
XSLTPUBFUN xmlXPathObjectPtr XSLTCALL
|
||||
xsltVariableLookup (xsltTransformContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns_uri);
|
||||
XSLTPUBFUN xmlXPathObjectPtr XSLTCALL
|
||||
XSLTPUBFUN xmlXPathObjectPtr XSLTCALL
|
||||
xsltXPathVariableLookup (void *ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns_uri);
|
||||
|
|
6
reactos/dll/3rdparty/libxslt/win32config.h
vendored
6
reactos/dll/3rdparty/libxslt/win32config.h
vendored
|
@ -28,12 +28,12 @@
|
|||
#include <math.h>
|
||||
#if defined _MSC_VER || defined __MINGW32__
|
||||
/* MS C-runtime has functions which can be used in order to determine if
|
||||
a given floating-point variable contains NaN, (+-)INF. These are
|
||||
a given floating-point variable contains NaN, (+-)INF. These are
|
||||
preferred, because floating-point technology is considered propriatary
|
||||
by MS and we can assume that their functions know more about their
|
||||
by MS and we can assume that their functions know more about their
|
||||
oddities than we do. */
|
||||
#include <float.h>
|
||||
/* Bjorn Reese figured a quite nice construct for isinf() using the
|
||||
/* Bjorn Reese figured a quite nice construct for isinf() using the
|
||||
_fpclass() function. */
|
||||
#ifndef isinf
|
||||
#define isinf(d) ((_fpclass(d) == _FPCLASS_PINF) ? 1 \
|
||||
|
|
538
reactos/dll/3rdparty/libxslt/xslt.c
vendored
538
reactos/dll/3rdparty/libxslt/xslt.c
vendored
File diff suppressed because it is too large
Load diff
50
reactos/dll/3rdparty/libxslt/xsltlocale.c
vendored
50
reactos/dll/3rdparty/libxslt/xsltlocale.c
vendored
|
@ -84,41 +84,41 @@ xsltNewLocale(const xmlChar *languageTag) {
|
|||
const char *region = NULL;
|
||||
char *q = localeName;
|
||||
int i, llen;
|
||||
|
||||
|
||||
/* Convert something like "pt-br" to "pt_BR.utf8" */
|
||||
|
||||
|
||||
if (languageTag == NULL)
|
||||
return(NULL);
|
||||
|
||||
return(NULL);
|
||||
|
||||
for (i=0; i<XSLTMAX_ISO639LANGLEN && ISALPHA(*p); ++i)
|
||||
*q++ = TOLOWER(*p++);
|
||||
|
||||
|
||||
if (i == 0)
|
||||
return(NULL);
|
||||
|
||||
return(NULL);
|
||||
|
||||
llen = i;
|
||||
*q++ = '_';
|
||||
|
||||
|
||||
if (*p) {
|
||||
if (*p++ != '-')
|
||||
return(NULL);
|
||||
|
||||
if (*p++ != '-')
|
||||
return(NULL);
|
||||
|
||||
for (i=0; i<XSLTMAX_ISO3166CNTRYLEN && ISALPHA(*p); ++i)
|
||||
*q++ = TOUPPER(*p++);
|
||||
|
||||
if (i == 0 || *p)
|
||||
return(NULL);
|
||||
|
||||
|
||||
if (i == 0 || *p)
|
||||
return(NULL);
|
||||
|
||||
memcpy(q, ".utf8", 6);
|
||||
locale = newlocale(LC_COLLATE_MASK, localeName, NULL);
|
||||
if (locale != NULL)
|
||||
return(locale);
|
||||
|
||||
|
||||
/* Continue without using country code */
|
||||
|
||||
|
||||
q = localeName + llen + 1;
|
||||
}
|
||||
|
||||
|
||||
/* Try locale without territory, e.g. for Esperanto (eo) */
|
||||
|
||||
memcpy(q, ".utf8", 6);
|
||||
|
@ -127,20 +127,20 @@ xsltNewLocale(const xmlChar *languageTag) {
|
|||
return(locale);
|
||||
|
||||
/* Try to find most common country for language */
|
||||
|
||||
|
||||
if (llen != 2)
|
||||
return(NULL);
|
||||
|
||||
region = (char *)xsltDefaultRegion((xmlChar *)localeName);
|
||||
if (region == NULL)
|
||||
return(NULL);
|
||||
|
||||
|
||||
q = localeName + llen + 1;
|
||||
*q++ = region[0];
|
||||
*q++ = region[1];
|
||||
memcpy(q, ".utf8", 6);
|
||||
locale = newlocale(LC_COLLATE_MASK, localeName, NULL);
|
||||
|
||||
|
||||
return(locale);
|
||||
#endif
|
||||
|
||||
|
@ -165,7 +165,7 @@ xsltNewLocale(const xmlChar *languageTag) {
|
|||
*q++ = '-';
|
||||
if (*p) { /*if country tag is given*/
|
||||
if (*p++ != '-') goto end;
|
||||
|
||||
|
||||
for (i=0; i<XSLTMAX_ISO3166CNTRYLEN && ISALPHA(*p); ++i)
|
||||
*q++ = TOUPPER(*p++);
|
||||
if (i == 0 || *p) goto end;
|
||||
|
@ -195,10 +195,10 @@ xsltDefaultRegion(const xmlChar *localeName) {
|
|||
xmlChar c;
|
||||
/* region should be xmlChar, but gcc warns on all string assignments */
|
||||
const char *region = NULL;
|
||||
|
||||
|
||||
c = localeName[1];
|
||||
/* This is based on the locales from glibc 2.3.3 */
|
||||
|
||||
|
||||
switch (localeName[0]) {
|
||||
case 'a':
|
||||
if (c == 'a' || c == 'm') region = "ET";
|
||||
|
@ -359,7 +359,7 @@ xsltStrxfrm(xsltLocale locale, const xmlChar *string)
|
|||
#else
|
||||
size_t xstrlen, r;
|
||||
xsltLocaleChar *xstr;
|
||||
|
||||
|
||||
#ifdef XSLT_LOCALE_XLOCALE
|
||||
xstrlen = strxfrm_l(NULL, (const char *)string, 0, locale) + 1;
|
||||
xstr = (xsltLocaleChar *) xmlMalloc(xstrlen);
|
||||
|
|
156
reactos/dll/3rdparty/libxslt/xsltutils.c
vendored
156
reactos/dll/3rdparty/libxslt/xsltutils.c
vendored
|
@ -53,9 +53,9 @@
|
|||
#endif /* WIN32 */
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Convenience function *
|
||||
* *
|
||||
* *
|
||||
* Convenience function *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
|
@ -130,7 +130,7 @@ xsltGetCNsProp(xsltStylesheetPtr style, xmlNodePtr node,
|
|||
attrDecl = xmlGetDtdAttrDesc(doc->intSubset, node->name, name);
|
||||
if ((attrDecl == NULL) && (doc->extSubset != NULL))
|
||||
attrDecl = xmlGetDtdAttrDesc(doc->extSubset, node->name, name);
|
||||
|
||||
|
||||
if ((attrDecl != NULL) && (attrDecl->prefix != NULL)) {
|
||||
/*
|
||||
* The DTD declaration only allows a prefix search
|
||||
|
@ -216,7 +216,7 @@ xsltGetNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace) {
|
|||
attrDecl = xmlGetDtdAttrDesc(doc->intSubset, node->name, name);
|
||||
if ((attrDecl == NULL) && (doc->extSubset != NULL))
|
||||
attrDecl = xmlGetDtdAttrDesc(doc->extSubset, node->name, name);
|
||||
|
||||
|
||||
if ((attrDecl != NULL) && (attrDecl->prefix != NULL)) {
|
||||
/*
|
||||
* The DTD declaration only allows a prefix search
|
||||
|
@ -314,7 +314,7 @@ error:
|
|||
* -1 in case of an error.
|
||||
*/
|
||||
int
|
||||
xsltPointerListAddSize(xsltPointerListPtr list,
|
||||
xsltPointerListAddSize(xsltPointerListPtr list,
|
||||
void *item,
|
||||
int initialSize)
|
||||
{
|
||||
|
@ -410,9 +410,9 @@ xsltPointerListClear(xsltPointerListPtr list)
|
|||
#endif /* XSLT_REFACTORED */
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Handling of XSLT stylesheets messages *
|
||||
* *
|
||||
* *
|
||||
* Handling of XSLT stylesheets messages *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
|
@ -465,9 +465,9 @@ xsltMessage(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst) {
|
|||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Handling of out of context errors *
|
||||
* *
|
||||
* *
|
||||
* Handling of out of context errors *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
#define XSLT_GET_VAR_STR(msg, str) { \
|
||||
|
@ -477,14 +477,14 @@ xsltMessage(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst) {
|
|||
va_list ap; \
|
||||
\
|
||||
str = (char *) xmlMalloc(150); \
|
||||
if (str == NULL) \
|
||||
if (str == NULL) \
|
||||
return; \
|
||||
\
|
||||
size = 150; \
|
||||
\
|
||||
while (size < 64000) { \
|
||||
va_start(ap, msg); \
|
||||
chars = vsnprintf(str, size, msg, ap); \
|
||||
chars = vsnprintf(str, size, msg, ap); \
|
||||
va_end(ap); \
|
||||
if ((chars > -1) && (chars < size)) \
|
||||
break; \
|
||||
|
@ -504,7 +504,7 @@ xsltMessage(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst) {
|
|||
* @ctx: an error context
|
||||
* @msg: the message to display/transmit
|
||||
* @...: extra parameters for the message display
|
||||
*
|
||||
*
|
||||
* Default handler for out of context error messages.
|
||||
*/
|
||||
static void
|
||||
|
@ -550,7 +550,7 @@ xsltSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler) {
|
|||
* @ctx: an error context
|
||||
* @msg: the message to display/transmit
|
||||
* @...: extra parameters for the message display
|
||||
*
|
||||
*
|
||||
* Default handler for out of context error messages.
|
||||
*/
|
||||
static void
|
||||
|
@ -632,8 +632,8 @@ xsltPrintErrorContext(xsltTransformContextPtr ctxt,
|
|||
if (node->name != NULL)
|
||||
name = node->name;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (ctxt != NULL)
|
||||
type = "runtime error";
|
||||
else if (style != NULL) {
|
||||
|
@ -719,9 +719,9 @@ xsltTransformError(xsltTransformContextPtr ctxt,
|
|||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* QNames *
|
||||
* *
|
||||
* *
|
||||
* QNames *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
|
@ -796,9 +796,9 @@ xsltGetQNameURI(xmlNodePtr node, xmlChar ** name)
|
|||
* we are not trying to validate but just to cut, and yes it will
|
||||
* work even if this is a set of UTF-8 encoded chars
|
||||
*/
|
||||
while ((qname[len] != 0) && (qname[len] != ':'))
|
||||
while ((qname[len] != 0) && (qname[len] != ':'))
|
||||
len++;
|
||||
|
||||
|
||||
if (qname[len] == 0)
|
||||
return(NULL);
|
||||
|
||||
|
@ -903,11 +903,11 @@ xsltGetQNameURI2(xsltStylesheetPtr style, xmlNodePtr node,
|
|||
xmlFree(qname);
|
||||
return(ns->href);
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Sorting *
|
||||
* *
|
||||
* *
|
||||
* Sorting *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
|
@ -962,7 +962,7 @@ xsltComputeSortResult(xsltTransformContextPtr ctxt, xmlNodePtr sort) {
|
|||
xmlNodeSetPtr list = NULL;
|
||||
xmlXPathObjectPtr res;
|
||||
int len = 0;
|
||||
int i;
|
||||
int i;
|
||||
xmlNodePtr oldNode;
|
||||
xmlNodePtr oldInst;
|
||||
int oldPos, oldSize ;
|
||||
|
@ -1078,7 +1078,7 @@ xsltComputeSortResult(xsltTransformContextPtr ctxt, xmlNodePtr sort) {
|
|||
* reorder the current node list accordingly to the set of sorting
|
||||
* requirement provided by the arry of nodes.
|
||||
*/
|
||||
void
|
||||
void
|
||||
xsltDefaultSortFunction(xsltTransformContextPtr ctxt, xmlNodePtr *sorts,
|
||||
int nbsorts) {
|
||||
#ifdef XSLT_REFACTORED
|
||||
|
@ -1095,7 +1095,7 @@ xsltDefaultSortFunction(xsltTransformContextPtr ctxt, xmlNodePtr *sorts,
|
|||
int tst;
|
||||
int depth;
|
||||
xmlNodePtr node;
|
||||
xmlXPathObjectPtr tmp;
|
||||
xmlXPathObjectPtr tmp;
|
||||
int tempstype[XSLT_MAX_SORT], temporder[XSLT_MAX_SORT];
|
||||
|
||||
if ((ctxt == NULL) || (sorts == NULL) || (nbsorts <= 0) ||
|
||||
|
@ -1175,7 +1175,7 @@ xsltDefaultSortFunction(xsltTransformContextPtr ctxt, xmlNodePtr *sorts,
|
|||
j = i - incr;
|
||||
if (results[i] == NULL)
|
||||
continue;
|
||||
|
||||
|
||||
while (j >= 0) {
|
||||
if (results[j] == NULL)
|
||||
tst = 1;
|
||||
|
@ -1193,7 +1193,7 @@ xsltDefaultSortFunction(xsltTransformContextPtr ctxt, xmlNodePtr *sorts,
|
|||
else if (results[j]->floatval ==
|
||||
results[j + incr]->floatval)
|
||||
tst = 0;
|
||||
else if (results[j]->floatval >
|
||||
else if (results[j]->floatval >
|
||||
results[j + incr]->floatval)
|
||||
tst = 1;
|
||||
else tst = -1;
|
||||
|
@ -1201,10 +1201,10 @@ xsltDefaultSortFunction(xsltTransformContextPtr ctxt, xmlNodePtr *sorts,
|
|||
tst = xsltLocaleStrcmp(
|
||||
comp->locale,
|
||||
(xsltLocaleChar *) results[j]->stringval,
|
||||
(xsltLocaleChar *) results[j + incr]->stringval);
|
||||
(xsltLocaleChar *) results[j + incr]->stringval);
|
||||
} else {
|
||||
tst = xmlStrcmp(results[j]->stringval,
|
||||
results[j + incr]->stringval);
|
||||
results[j + incr]->stringval);
|
||||
}
|
||||
if (descending)
|
||||
tst = -tst;
|
||||
|
@ -1227,11 +1227,11 @@ xsltDefaultSortFunction(xsltTransformContextPtr ctxt, xmlNodePtr *sorts,
|
|||
* Compute the result of the next level for the
|
||||
* full set, this might be optimized ... or not
|
||||
*/
|
||||
if (resultsTab[depth] == NULL)
|
||||
if (resultsTab[depth] == NULL)
|
||||
resultsTab[depth] = xsltComputeSortResult(ctxt,
|
||||
sorts[depth]);
|
||||
res = resultsTab[depth];
|
||||
if (res == NULL)
|
||||
if (res == NULL)
|
||||
break;
|
||||
if (res[j] == NULL) {
|
||||
if (res[j+incr] != NULL)
|
||||
|
@ -1242,7 +1242,7 @@ xsltDefaultSortFunction(xsltTransformContextPtr ctxt, xmlNodePtr *sorts,
|
|||
accordance with XSLT spec */
|
||||
if (xmlXPathIsNaN(res[j]->floatval)) {
|
||||
if (xmlXPathIsNaN(res[j +
|
||||
incr]->floatval))
|
||||
incr]->floatval))
|
||||
tst = 0;
|
||||
else
|
||||
tst = -1;
|
||||
|
@ -1252,7 +1252,7 @@ xsltDefaultSortFunction(xsltTransformContextPtr ctxt, xmlNodePtr *sorts,
|
|||
else if (res[j]->floatval == res[j + incr]->
|
||||
floatval)
|
||||
tst = 0;
|
||||
else if (res[j]->floatval >
|
||||
else if (res[j]->floatval >
|
||||
res[j + incr]->floatval)
|
||||
tst = 1;
|
||||
else tst = -1;
|
||||
|
@ -1260,10 +1260,10 @@ xsltDefaultSortFunction(xsltTransformContextPtr ctxt, xmlNodePtr *sorts,
|
|||
tst = xsltLocaleStrcmp(
|
||||
comp->locale,
|
||||
(xsltLocaleChar *) res[j]->stringval,
|
||||
(xsltLocaleChar *) res[j + incr]->stringval);
|
||||
(xsltLocaleChar *) res[j + incr]->stringval);
|
||||
} else {
|
||||
tst = xmlStrcmp(res[j]->stringval,
|
||||
res[j + incr]->stringval);
|
||||
res[j + incr]->stringval);
|
||||
}
|
||||
if (desc)
|
||||
tst = -tst;
|
||||
|
@ -1375,32 +1375,32 @@ xsltSetSortFunc(xsltSortFunc handler) {
|
|||
* @handler: the new handler function
|
||||
*
|
||||
* Function to set the handler for XSLT sorting
|
||||
* for the specified context.
|
||||
* for the specified context.
|
||||
* If the handler is NULL, then the global
|
||||
* sort function will be called
|
||||
*/
|
||||
void
|
||||
void
|
||||
xsltSetCtxtSortFunc(xsltTransformContextPtr ctxt, xsltSortFunc handler) {
|
||||
ctxt->sortfunc = handler;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Parsing options *
|
||||
* *
|
||||
* *
|
||||
* Parsing options *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
* xsltSetCtxtParseOptions:
|
||||
* @ctxt: a XSLT process context
|
||||
* @options: a combination of libxml2 xmlParserOption
|
||||
*
|
||||
* Change the default parser option passed by the XSLT engine to the
|
||||
*
|
||||
* Change the default parser option passed by the XSLT engine to the
|
||||
* parser when using document() loading.
|
||||
*
|
||||
* Returns the previous options or -1 in case of error
|
||||
*/
|
||||
int
|
||||
int
|
||||
xsltSetCtxtParseOptions(xsltTransformContextPtr ctxt, int options)
|
||||
{
|
||||
int oldopts;
|
||||
|
@ -1419,9 +1419,9 @@ xsltSetCtxtParseOptions(xsltTransformContextPtr ctxt, int options)
|
|||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Output *
|
||||
* *
|
||||
* *
|
||||
* Output *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
|
@ -1512,7 +1512,7 @@ xsltSaveResultTo(xmlOutputBufferPtr buf, xmlDocPtr result,
|
|||
cur = cur->next;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
do {
|
||||
cur = cur->parent;
|
||||
if (cur == NULL)
|
||||
|
@ -1537,7 +1537,7 @@ xsltSaveResultTo(xmlOutputBufferPtr buf, xmlDocPtr result,
|
|||
|
||||
if (omitXmlDecl != 1) {
|
||||
xmlOutputBufferWriteString(buf, "<?xml version=");
|
||||
if (result->version != NULL)
|
||||
if (result->version != NULL)
|
||||
xmlBufferWriteQuotedString(buf->buffer, result->version);
|
||||
else
|
||||
xmlOutputBufferWriteString(buf, "\"1.0\"");
|
||||
|
@ -1728,7 +1728,7 @@ xsltSaveResultToFd(int fd, xmlDocPtr result, xsltStylesheetPtr style) {
|
|||
* Returns 0 in case of success and -1 in case of error
|
||||
*/
|
||||
int
|
||||
xsltSaveResultToString(xmlChar **doc_txt_ptr, int * doc_txt_len,
|
||||
xsltSaveResultToString(xmlChar **doc_txt_ptr, int * doc_txt_len,
|
||||
xmlDocPtr result, xsltStylesheetPtr style) {
|
||||
xmlOutputBufferPtr buf;
|
||||
const xmlChar *encoding;
|
||||
|
@ -1766,9 +1766,9 @@ xsltSaveResultToString(xmlChar **doc_txt_ptr, int * doc_txt_len,
|
|||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Generating profiling informations *
|
||||
* *
|
||||
* *
|
||||
* Generating profiling informations *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
static long calibration = -1;
|
||||
|
@ -1857,7 +1857,7 @@ xsltTimestamp(void)
|
|||
tics = (cur.tv_sec - startup.tv_sec) * XSLT_TIMESTAMP_TICS_PER_SEC;
|
||||
tics += (cur.tv_usec - startup.tv_usec) /
|
||||
(1000000l / XSLT_TIMESTAMP_TICS_PER_SEC);
|
||||
|
||||
|
||||
tics -= calibration;
|
||||
return(tics);
|
||||
#else
|
||||
|
@ -1969,9 +1969,9 @@ xsltSaveProfiling(xsltTransformContextPtr ctxt, FILE *output) {
|
|||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Fetching profiling informations *
|
||||
* *
|
||||
* *
|
||||
* Fetching profiling informations *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
|
@ -2084,9 +2084,9 @@ xsltGetProfileInformation(xsltTransformContextPtr ctxt)
|
|||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Hooks for libxml2 XPath *
|
||||
* *
|
||||
* *
|
||||
* Hooks for libxml2 XPath *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
|
@ -2153,9 +2153,9 @@ xsltXPathCompile(xsltStylesheetPtr style, const xmlChar *str) {
|
|||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Hooks for the debugger *
|
||||
* *
|
||||
* *
|
||||
* Hooks for the debugger *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/*
|
||||
|
@ -2183,18 +2183,18 @@ int xslDebugStatus;
|
|||
/**
|
||||
* xsltSetDebuggerStatus:
|
||||
* @value : the value to be set
|
||||
*
|
||||
*
|
||||
* This function sets the value of xslDebugStatus.
|
||||
*/
|
||||
void
|
||||
xsltSetDebuggerStatus(int value)
|
||||
{
|
||||
xslDebugStatus = value;
|
||||
xslDebugStatus = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* xsltGetDebuggerStatus:
|
||||
*
|
||||
* xsltGetDebuggerStatus:
|
||||
*
|
||||
* Get xslDebugStatus.
|
||||
*
|
||||
* Returns the value of xslDebugStatus.
|
||||
|
@ -2202,16 +2202,16 @@ xsltSetDebuggerStatus(int value)
|
|||
int
|
||||
xsltGetDebuggerStatus(void)
|
||||
{
|
||||
return(xslDebugStatus);
|
||||
return(xslDebugStatus);
|
||||
}
|
||||
|
||||
/**
|
||||
* xsltSetDebuggerCallbacks:
|
||||
* @no : number of callbacks
|
||||
* @block : the block of callbacks
|
||||
*
|
||||
*
|
||||
* This function allow to plug a debugger into the XSLT library
|
||||
* @block points to a block of memory containing the address of @no
|
||||
* @block points to a block of memory containing the address of @no
|
||||
* callback routines.
|
||||
*
|
||||
* Returns 0 in case of success and -1 in case of error
|
||||
|
@ -2236,9 +2236,9 @@ xsltSetDebuggerCallbacks(int no, void *block)
|
|||
* @cur : source node being executed
|
||||
* @node : data node being processed
|
||||
* @templ : temlate that applies to node
|
||||
* @ctxt : the xslt transform context
|
||||
*
|
||||
* If either cur or node are a breakpoint, or xslDebugStatus in state
|
||||
* @ctxt : the xslt transform context
|
||||
*
|
||||
* If either cur or node are a breakpoint, or xslDebugStatus in state
|
||||
* where debugging must occcur at this time then transfer control
|
||||
* to the xslDebugBreak function
|
||||
*/
|
||||
|
@ -2256,7 +2256,7 @@ xslHandleDebugger(xmlNodePtr cur, xmlNodePtr node, xsltTemplatePtr templ,
|
|||
* @source : the source node being processed
|
||||
*
|
||||
* Add template "call" to call stack
|
||||
* Returns : 1 on sucess 0 otherwise an error may be printed if
|
||||
* Returns : 1 on sucess 0 otherwise an error may be printed if
|
||||
* WITH_XSLT_DEBUG_BREAKPOINTS is defined
|
||||
*/
|
||||
int
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#if (defined (__CYGWIN__) || defined _MSC_VER) && !defined IN_LIBXSLT && !defined LIBXSLT_STATIC
|
||||
#define LIBXSLT_PUBLIC __declspec(dllimport)
|
||||
#else
|
||||
#define LIBXSLT_PUBLIC
|
||||
#define LIBXSLT_PUBLIC
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ extern "C" {
|
|||
*/
|
||||
typedef struct _xsltNumberData xsltNumberData;
|
||||
typedef xsltNumberData *xsltNumberDataPtr;
|
||||
|
||||
|
||||
struct _xsltNumberData {
|
||||
const xmlChar *level;
|
||||
const xmlChar *count;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Summary: internal data structures, constants and functions
|
||||
* Description: Internal data structures, constants and functions used
|
||||
* by the XSLT engine.
|
||||
* by the XSLT engine.
|
||||
* They are not part of the API or ABI, i.e. they can change
|
||||
* without prior notice, use carefully.
|
||||
*
|
||||
|
@ -101,7 +101,7 @@ extern const xmlChar *xsltXSLTAttrMarker;
|
|||
* XSLT_REFACTORED_XSLT_NSCOMP
|
||||
*
|
||||
* Internal define to enable the pointer-comparison of
|
||||
* namespaces of XSLT elements.
|
||||
* namespaces of XSLT elements.
|
||||
*/
|
||||
/* #define XSLT_REFACTORED_XSLT_NSCOMP */
|
||||
|
||||
|
@ -474,7 +474,7 @@ struct _xsltElemPreComp {
|
|||
xsltElemPreCompPtr next; /* next item in the global chained
|
||||
list hold by xsltStylesheet. */
|
||||
xsltStyleType type; /* type of the element */
|
||||
xsltTransformFunction func; /* handling function */
|
||||
xsltTransformFunction func; /* handling function */
|
||||
xmlNodePtr inst; /* the node in the stylesheet's tree
|
||||
corresponding to this item */
|
||||
|
||||
|
@ -506,7 +506,7 @@ XSLTPUBFUN void XSLTCALL
|
|||
XSLTPUBFUN void XSLTCALL
|
||||
xsltPointerListClear (xsltPointerListPtr list);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltPointerListAddSize (xsltPointerListPtr list,
|
||||
xsltPointerListAddSize (xsltPointerListPtr list,
|
||||
void *item,
|
||||
int initialSize);
|
||||
|
||||
|
@ -521,12 +521,12 @@ typedef xsltNsListContainer *xsltNsListContainerPtr;
|
|||
struct _xsltNsListContainer {
|
||||
xmlNsPtr *list;
|
||||
int totalNumber;
|
||||
int xpathNumber;
|
||||
int xpathNumber;
|
||||
};
|
||||
|
||||
/**
|
||||
* XSLT_ITEM_COMPATIBILITY_FIELDS:
|
||||
*
|
||||
*
|
||||
* Fields for API compatibility to the structure
|
||||
* _xsltElemPreComp which is used for extension functions.
|
||||
* Note that @next is used for storage; it does not reflect a next
|
||||
|
@ -549,7 +549,7 @@ struct _xsltNsListContainer {
|
|||
/*
|
||||
xsltStylePreCompPtr parent;\
|
||||
xsltStylePreCompPtr children;\
|
||||
xsltStylePreCompPtr nextItem;
|
||||
xsltStylePreCompPtr nextItem;
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -570,7 +570,7 @@ struct _xsltNsListContainer {
|
|||
XSLT_ITEM_NSINSCOPE_FIELDS
|
||||
|
||||
/**
|
||||
* _xsltStylePreComp:
|
||||
* _xsltStylePreComp:
|
||||
*
|
||||
* The abstract basic structure for items of the XSLT processor.
|
||||
* This includes:
|
||||
|
@ -585,7 +585,7 @@ struct _xsltNsListContainer {
|
|||
struct _xsltStylePreComp {
|
||||
xsltElemPreCompPtr next; /* next item in the global chained
|
||||
list hold by xsltStylesheet */
|
||||
xsltStyleType type; /* type of the item */
|
||||
xsltStyleType type; /* type of the item */
|
||||
xsltTransformFunction func; /* handling function */
|
||||
xmlNodePtr inst; /* the node in the stylesheet's tree
|
||||
corresponding to this item. */
|
||||
|
@ -595,7 +595,7 @@ struct _xsltStylePreComp {
|
|||
|
||||
/**
|
||||
* xsltStyleBasicEmptyItem:
|
||||
*
|
||||
*
|
||||
* Abstract structure only used as a short-cut for
|
||||
* XSLT items with no extra fields.
|
||||
* NOTE that it is intended that this structure looks the same as
|
||||
|
@ -610,7 +610,7 @@ struct _xsltStyleBasicEmptyItem {
|
|||
|
||||
/**
|
||||
* xsltStyleBasicExpressionItem:
|
||||
*
|
||||
*
|
||||
* Abstract structure only used as a short-cut for
|
||||
* XSLT items with just an expression.
|
||||
*/
|
||||
|
@ -632,7 +632,7 @@ struct _xsltStyleBasicExpressionItem {
|
|||
|
||||
/**
|
||||
* xsltStyleItemElement:
|
||||
*
|
||||
*
|
||||
* <!-- Category: instruction -->
|
||||
* <xsl:element
|
||||
* name = { qname }
|
||||
|
@ -645,11 +645,11 @@ typedef struct _xsltStyleItemElement xsltStyleItemElement;
|
|||
typedef xsltStyleItemElement *xsltStyleItemElementPtr;
|
||||
|
||||
struct _xsltStyleItemElement {
|
||||
XSLT_ITEM_COMMON_FIELDS
|
||||
XSLT_ITEM_COMMON_FIELDS
|
||||
|
||||
const xmlChar *use;
|
||||
int has_use;
|
||||
const xmlChar *name;
|
||||
const xmlChar *name;
|
||||
int has_name;
|
||||
const xmlChar *ns;
|
||||
const xmlChar *nsPrefix;
|
||||
|
@ -794,7 +794,7 @@ typedef xsltStyleItemCopy *xsltStyleItemCopyPtr;
|
|||
struct _xsltStyleItemCopy {
|
||||
XSLT_ITEM_COMMON_FIELDS
|
||||
const xmlChar *use; /* copy, element */
|
||||
int has_use; /* copy, element */
|
||||
int has_use; /* copy, element */
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -916,7 +916,7 @@ typedef struct _xsltStyleItemMessage xsltStyleItemMessage;
|
|||
typedef xsltStyleItemMessage *xsltStyleItemMessagePtr;
|
||||
|
||||
struct _xsltStyleItemMessage {
|
||||
XSLT_ITEM_COMMON_FIELDS
|
||||
XSLT_ITEM_COMMON_FIELDS
|
||||
int terminate;
|
||||
};
|
||||
|
||||
|
@ -935,7 +935,7 @@ struct _xsltStyleItemDocument {
|
|||
TODO: Check if we need. */
|
||||
const xmlChar *filename; /* document URL */
|
||||
int has_filename;
|
||||
};
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
|
@ -1005,7 +1005,7 @@ struct _xsltStyleItemParam {
|
|||
const xmlChar *name;
|
||||
int has_name;
|
||||
const xmlChar *ns;
|
||||
int has_ns;
|
||||
int has_ns;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1061,7 +1061,7 @@ struct _xsltStyleItemSort {
|
|||
|
||||
/**
|
||||
* xsltStyleItemWhen:
|
||||
*
|
||||
*
|
||||
* <xsl:when
|
||||
* test = boolean-expression>
|
||||
* <!-- Content: template -->
|
||||
|
@ -1144,7 +1144,7 @@ typedef struct _xsltStyleItemExtElement xsltStyleItemExtElement;
|
|||
typedef xsltStyleItemExtElement *xsltStyleItemExtElementPtr;
|
||||
struct _xsltStyleItemExtElement {
|
||||
XSLT_ITEM_COMMON_FIELDS
|
||||
xsltElemPreCompPtr item;
|
||||
xsltElemPreCompPtr item;
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
|
@ -1160,7 +1160,7 @@ struct _xsltEffectiveNs {
|
|||
xsltEffectiveNsPtr next; /* next item in the list */
|
||||
const xmlChar *prefix;
|
||||
const xmlChar *nsName;
|
||||
/*
|
||||
/*
|
||||
* Indicates if eclared on the literal result element; dunno if really
|
||||
* needed.
|
||||
*/
|
||||
|
@ -1196,7 +1196,7 @@ struct _xsltStyleItemLRElementInfo {
|
|||
typedef struct _xsltNsAlias xsltNsAlias;
|
||||
typedef xsltNsAlias *xsltNsAliasPtr;
|
||||
struct _xsltNsAlias {
|
||||
xsltNsAliasPtr next; /* next in the list */
|
||||
xsltNsAliasPtr next; /* next in the list */
|
||||
xmlNsPtr literalNs;
|
||||
xmlNsPtr targetNs;
|
||||
xmlDocPtr docOfTargetNs;
|
||||
|
@ -1213,7 +1213,7 @@ struct _xsltNsMap {
|
|||
xmlNodePtr elem; /* the element holding the ns-decl */
|
||||
xmlNsPtr ns; /* the xmlNs structure holding the XML namespace name */
|
||||
const xmlChar *origNsName; /* the original XML namespace name */
|
||||
const xmlChar *newNsName; /* the mapped XML namespace name */
|
||||
const xmlChar *newNsName; /* the mapped XML namespace name */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -1268,13 +1268,13 @@ struct _xsltCompilerNodeInfo {
|
|||
/* The current in-scope namespaces */
|
||||
xsltNsListContainerPtr inScopeNs;
|
||||
/* The current excluded result namespaces */
|
||||
xsltPointerListPtr exclResultNs;
|
||||
xsltPointerListPtr exclResultNs;
|
||||
/* The current extension instruction namespaces */
|
||||
xsltPointerListPtr extElemNs;
|
||||
|
||||
/* The current info for literal result elements. */
|
||||
xsltStyleItemLRElementInfoPtr litResElemInfo;
|
||||
/*
|
||||
/*
|
||||
* Set to 1 if in-scope namespaces changed,
|
||||
* or excluded result namespaces changed,
|
||||
* or extension element namespaces changed.
|
||||
|
@ -1289,7 +1289,7 @@ struct _xsltCompilerNodeInfo {
|
|||
/* whether the content of an extension element was processed */
|
||||
int extContentHandled;
|
||||
/* the type of the current child */
|
||||
xsltStyleType curChildType;
|
||||
xsltStyleType curChildType;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1297,7 +1297,7 @@ struct _xsltCompilerNodeInfo {
|
|||
*
|
||||
* get pointer to compiler context
|
||||
*/
|
||||
#define XSLT_CCTXT(style) ((xsltCompilerCtxtPtr) style->compCtxt)
|
||||
#define XSLT_CCTXT(style) ((xsltCompilerCtxtPtr) style->compCtxt)
|
||||
|
||||
typedef enum {
|
||||
XSLT_ERROR_SEVERITY_ERROR = 0,
|
||||
|
@ -1310,7 +1310,7 @@ struct _xsltCompilerCtxt {
|
|||
void *errorCtxt; /* user specific error context */
|
||||
/*
|
||||
* used for error/warning reports; e.g. XSLT_ERROR_SEVERITY_WARNING */
|
||||
xsltErrorSeverityType errSeverity;
|
||||
xsltErrorSeverityType errSeverity;
|
||||
int warnings; /* TODO: number of warnings found at
|
||||
compilation */
|
||||
int errors; /* TODO: number of errors found at
|
||||
|
@ -1320,7 +1320,7 @@ struct _xsltCompilerCtxt {
|
|||
int simplified; /* whether this is a simplified stylesheet */
|
||||
/* TODO: structured/unstructured error contexts. */
|
||||
int depth; /* Current depth of processing */
|
||||
|
||||
|
||||
xsltCompilerNodeInfoPtr inode;
|
||||
xsltCompilerNodeInfoPtr inodeList;
|
||||
xsltCompilerNodeInfoPtr inodeLast;
|
||||
|
@ -1333,7 +1333,7 @@ struct _xsltCompilerCtxt {
|
|||
in a parsing episode */
|
||||
int maxNodeInfos; /* TEMP TODO: just for the interest */
|
||||
int maxLREs; /* TEMP TODO: just for the interest */
|
||||
/*
|
||||
/*
|
||||
* In order to keep the old behaviour, applying strict rules of
|
||||
* the spec can be turned off. This has effect only on special
|
||||
* mechanisms like whitespace-stripping in the stylesheet.
|
||||
|
@ -1348,7 +1348,7 @@ struct _xsltCompilerCtxt {
|
|||
xsltNsAliasPtr nsAliases;
|
||||
xsltVarInfoPtr ivars; /* Storage of local in-scope variables/params. */
|
||||
xsltVarInfoPtr ivar; /* topmost local variable/param. */
|
||||
};
|
||||
};
|
||||
|
||||
#else /* XSLT_REFACTORED */
|
||||
/*
|
||||
|
@ -1471,7 +1471,7 @@ struct _xsltPrincipalStylesheetData {
|
|||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
/*
|
||||
* Note that we added a @compCtxt field to anchor an stylesheet compilation
|
||||
|
@ -1516,7 +1516,7 @@ struct _xsltStylesheet {
|
|||
void *textMatch; /* template based on text() */
|
||||
void *piMatch; /* template based on processing-instruction() */
|
||||
void *commentMatch; /* template based on comment() */
|
||||
|
||||
|
||||
/*
|
||||
* Namespace aliases.
|
||||
* NOTE: Not used in the refactored code.
|
||||
|
@ -1537,7 +1537,7 @@ struct _xsltStylesheet {
|
|||
execution of XPath expressions; unfortunately
|
||||
it restricts the stylesheet to have distinct
|
||||
prefixes.
|
||||
TODO: We need to get rid of this.
|
||||
TODO: We need to get rid of this.
|
||||
*/
|
||||
void *nsDefs; /* ATTENTION TODO: This is currently used to store
|
||||
xsltExtDefPtr (in extensions.c) and
|
||||
|
@ -1558,7 +1558,7 @@ struct _xsltStylesheet {
|
|||
xmlChar *encoding; /* encoding string */
|
||||
int omitXmlDeclaration; /* omit-xml-declaration = "yes" | "no" */
|
||||
|
||||
/*
|
||||
/*
|
||||
* Number formatting.
|
||||
*/
|
||||
xsltDecimalFormatPtr decimalFormat;
|
||||
|
@ -1628,7 +1628,7 @@ struct _xsltStylesheet {
|
|||
*/
|
||||
xsltCompilerCtxtPtr compCtxt; /* TODO: Change this to (void *). */
|
||||
|
||||
xsltPrincipalStylesheetDataPtr principalData;
|
||||
xsltPrincipalStylesheetDataPtr principalData;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -1828,62 +1828,62 @@ struct _xsltTransformContext {
|
|||
xsltDecimalFormatPtr xsltDecimalFormatGetByName(xsltStylesheetPtr sheet,
|
||||
xmlChar *name);
|
||||
*/
|
||||
XSLTPUBFUN xsltStylesheetPtr XSLTCALL
|
||||
XSLTPUBFUN xsltStylesheetPtr XSLTCALL
|
||||
xsltNewStylesheet (void);
|
||||
XSLTPUBFUN xsltStylesheetPtr XSLTCALL
|
||||
XSLTPUBFUN xsltStylesheetPtr XSLTCALL
|
||||
xsltParseStylesheetFile (const xmlChar* filename);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltFreeStylesheet (xsltStylesheetPtr style);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltIsBlank (xmlChar *str);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltFreeStackElemList (xsltStackElemPtr elem);
|
||||
XSLTPUBFUN xsltDecimalFormatPtr XSLTCALL
|
||||
XSLTPUBFUN xsltDecimalFormatPtr XSLTCALL
|
||||
xsltDecimalFormatGetByName(xsltStylesheetPtr style,
|
||||
xmlChar *name);
|
||||
|
||||
XSLTPUBFUN xsltStylesheetPtr XSLTCALL
|
||||
XSLTPUBFUN xsltStylesheetPtr XSLTCALL
|
||||
xsltParseStylesheetProcess(xsltStylesheetPtr ret,
|
||||
xmlDocPtr doc);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltParseStylesheetOutput(xsltStylesheetPtr style,
|
||||
xmlNodePtr cur);
|
||||
XSLTPUBFUN xsltStylesheetPtr XSLTCALL
|
||||
XSLTPUBFUN xsltStylesheetPtr XSLTCALL
|
||||
xsltParseStylesheetDoc (xmlDocPtr doc);
|
||||
XSLTPUBFUN xsltStylesheetPtr XSLTCALL
|
||||
XSLTPUBFUN xsltStylesheetPtr XSLTCALL
|
||||
xsltParseStylesheetImportedDoc(xmlDocPtr doc,
|
||||
xsltStylesheetPtr style);
|
||||
XSLTPUBFUN xsltStylesheetPtr XSLTCALL
|
||||
XSLTPUBFUN xsltStylesheetPtr XSLTCALL
|
||||
xsltLoadStylesheetPI (xmlDocPtr doc);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltNumberFormat (xsltTransformContextPtr ctxt,
|
||||
xsltNumberDataPtr data,
|
||||
xmlNodePtr node);
|
||||
XSLTPUBFUN xmlXPathError XSLTCALL
|
||||
XSLTPUBFUN xmlXPathError XSLTCALL
|
||||
xsltFormatNumberConversion(xsltDecimalFormatPtr self,
|
||||
xmlChar *format,
|
||||
double number,
|
||||
xmlChar **result);
|
||||
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltParseTemplateContent(xsltStylesheetPtr style,
|
||||
xmlNodePtr templ);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltAllocateExtra (xsltStylesheetPtr style);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltAllocateExtraCtxt (xsltTransformContextPtr ctxt);
|
||||
/*
|
||||
* Extra functions for Result Value Trees
|
||||
*/
|
||||
XSLTPUBFUN xmlDocPtr XSLTCALL
|
||||
XSLTPUBFUN xmlDocPtr XSLTCALL
|
||||
xsltCreateRVT (xsltTransformContextPtr ctxt);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltRegisterTmpRVT (xsltTransformContextPtr ctxt,
|
||||
xmlDocPtr RVT);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltRegisterLocalRVT (xsltTransformContextPtr ctxt,
|
||||
xmlDocPtr RVT);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltRegisterPersistRVT (xsltTransformContextPtr ctxt,
|
||||
xmlDocPtr RVT);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
|
@ -1932,7 +1932,7 @@ XSLTPUBFUN void XSLTCALL
|
|||
* *
|
||||
************************************************************************/
|
||||
|
||||
#ifdef XSLT_REFACTORED
|
||||
#ifdef XSLT_REFACTORED
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltParseSequenceConstructor(
|
||||
xsltCompilerCtxtPtr cctxt,
|
||||
|
|
|
@ -31,7 +31,7 @@ extern "C" {
|
|||
*
|
||||
* Macro to flag unimplemented blocks.
|
||||
*/
|
||||
#define XSLT_TODO \
|
||||
#define XSLT_TODO \
|
||||
xsltGenericError(xsltGenericErrorContext, \
|
||||
"Unimplemented block at %s:%d\n", \
|
||||
__FILE__, __LINE__);
|
||||
|
@ -41,7 +41,7 @@ extern "C" {
|
|||
*
|
||||
* Macro to flag that a problem was detected internally.
|
||||
*/
|
||||
#define XSLT_STRANGE \
|
||||
#define XSLT_STRANGE \
|
||||
xsltGenericError(xsltGenericErrorContext, \
|
||||
"Internal error at %s:%d\n", \
|
||||
__FILE__, __LINE__);
|
||||
|
@ -77,7 +77,7 @@ extern "C" {
|
|||
((n)->type == XML_DOCUMENT_NODE) || \
|
||||
((n)->type == XML_HTML_DOCUMENT_NODE) || \
|
||||
((n)->type == XML_COMMENT_NODE) || \
|
||||
((n)->type == XML_PI_NODE)))
|
||||
((n)->type == XML_PI_NODE)))
|
||||
|
||||
/*
|
||||
* Our own version of namespaced atributes lookup.
|
||||
|
@ -100,24 +100,24 @@ XSLTPUBFUN int XSLTCALL
|
|||
*/
|
||||
typedef enum {
|
||||
XSLT_TRACE_ALL = -1,
|
||||
XSLT_TRACE_NONE = 0,
|
||||
XSLT_TRACE_COPY_TEXT = 1<<0,
|
||||
XSLT_TRACE_PROCESS_NODE = 1<<1,
|
||||
XSLT_TRACE_APPLY_TEMPLATE = 1<<2,
|
||||
XSLT_TRACE_COPY = 1<<3,
|
||||
XSLT_TRACE_COMMENT = 1<<4,
|
||||
XSLT_TRACE_PI = 1<<5,
|
||||
XSLT_TRACE_COPY_OF = 1<<6,
|
||||
XSLT_TRACE_VALUE_OF = 1<<7,
|
||||
XSLT_TRACE_CALL_TEMPLATE = 1<<8,
|
||||
XSLT_TRACE_APPLY_TEMPLATES = 1<<9,
|
||||
XSLT_TRACE_CHOOSE = 1<<10,
|
||||
XSLT_TRACE_IF = 1<<11,
|
||||
XSLT_TRACE_FOR_EACH = 1<<12,
|
||||
XSLT_TRACE_STRIP_SPACES = 1<<13,
|
||||
XSLT_TRACE_TEMPLATES = 1<<14,
|
||||
XSLT_TRACE_KEYS = 1<<15,
|
||||
XSLT_TRACE_VARIABLES = 1<<16
|
||||
XSLT_TRACE_NONE = 0,
|
||||
XSLT_TRACE_COPY_TEXT = 1<<0,
|
||||
XSLT_TRACE_PROCESS_NODE = 1<<1,
|
||||
XSLT_TRACE_APPLY_TEMPLATE = 1<<2,
|
||||
XSLT_TRACE_COPY = 1<<3,
|
||||
XSLT_TRACE_COMMENT = 1<<4,
|
||||
XSLT_TRACE_PI = 1<<5,
|
||||
XSLT_TRACE_COPY_OF = 1<<6,
|
||||
XSLT_TRACE_VALUE_OF = 1<<7,
|
||||
XSLT_TRACE_CALL_TEMPLATE = 1<<8,
|
||||
XSLT_TRACE_APPLY_TEMPLATES = 1<<9,
|
||||
XSLT_TRACE_CHOOSE = 1<<10,
|
||||
XSLT_TRACE_IF = 1<<11,
|
||||
XSLT_TRACE_FOR_EACH = 1<<12,
|
||||
XSLT_TRACE_STRIP_SPACES = 1<<13,
|
||||
XSLT_TRACE_TEMPLATES = 1<<14,
|
||||
XSLT_TRACE_KEYS = 1<<15,
|
||||
XSLT_TRACE_VARIABLES = 1<<16
|
||||
} xsltDebugTraceCodes;
|
||||
|
||||
/**
|
||||
|
@ -142,26 +142,26 @@ XSLTPUBVAR void *xsltGenericErrorContext;
|
|||
XSLTPUBVAR xmlGenericErrorFunc xsltGenericDebug;
|
||||
XSLTPUBVAR void *xsltGenericDebugContext;
|
||||
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltPrintErrorContext (xsltTransformContextPtr ctxt,
|
||||
xsltStylesheetPtr style,
|
||||
xmlNodePtr node);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltMessage (xsltTransformContextPtr ctxt,
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltMessage (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr inst);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltSetGenericErrorFunc (void *ctx,
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltSetGenericErrorFunc (void *ctx,
|
||||
xmlGenericErrorFunc handler);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltSetGenericDebugFunc (void *ctx,
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltSetGenericDebugFunc (void *ctx,
|
||||
xmlGenericErrorFunc handler);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltSetTransformErrorFunc (xsltTransformContextPtr ctxt,
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltSetTransformErrorFunc (xsltTransformContextPtr ctxt,
|
||||
void *ctx,
|
||||
xmlGenericErrorFunc handler);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltTransformError (xsltTransformContextPtr ctxt,
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltTransformError (xsltTransformContextPtr ctxt,
|
||||
xsltStylesheetPtr style,
|
||||
xmlNodePtr node,
|
||||
const char *msg,
|
||||
|
@ -174,23 +174,23 @@ XSLTPUBFUN int XSLTCALL
|
|||
* Sorting.
|
||||
*/
|
||||
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltDocumentSortFunction (xmlNodeSetPtr list);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltSetSortFunc (xsltSortFunc handler);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltSetCtxtSortFunc (xsltTransformContextPtr ctxt,
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltDocumentSortFunction (xmlNodeSetPtr list);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltSetSortFunc (xsltSortFunc handler);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltSetCtxtSortFunc (xsltTransformContextPtr ctxt,
|
||||
xsltSortFunc handler);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltDefaultSortFunction (xsltTransformContextPtr ctxt,
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltDefaultSortFunction (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr *sorts,
|
||||
int nbsorts);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltDoSortFunction (xsltTransformContextPtr ctxt,
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltDoSortFunction (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr * sorts,
|
||||
int nbsorts);
|
||||
XSLTPUBFUN xmlXPathObjectPtr * XSLTCALL
|
||||
xsltComputeSortResult (xsltTransformContextPtr ctxt,
|
||||
XSLTPUBFUN xmlXPathObjectPtr * XSLTCALL
|
||||
xsltComputeSortResult (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr sort);
|
||||
|
||||
/*
|
||||
|
@ -201,8 +201,8 @@ XSLTPUBFUN const xmlChar * XSLTCALL
|
|||
xsltSplitQName (xmlDictPtr dict,
|
||||
const xmlChar *name,
|
||||
const xmlChar **prefix);
|
||||
XSLTPUBFUN const xmlChar * XSLTCALL
|
||||
xsltGetQNameURI (xmlNodePtr node,
|
||||
XSLTPUBFUN const xmlChar * XSLTCALL
|
||||
xsltGetQNameURI (xmlNodePtr node,
|
||||
xmlChar **name);
|
||||
|
||||
XSLTPUBFUN const xmlChar * XSLTCALL
|
||||
|
@ -213,27 +213,27 @@ XSLTPUBFUN const xmlChar * XSLTCALL
|
|||
/*
|
||||
* Output, reuse libxml I/O buffers.
|
||||
*/
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltSaveResultTo (xmlOutputBufferPtr buf,
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltSaveResultTo (xmlOutputBufferPtr buf,
|
||||
xmlDocPtr result,
|
||||
xsltStylesheetPtr style);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltSaveResultToFilename (const char *URI,
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltSaveResultToFilename (const char *URI,
|
||||
xmlDocPtr result,
|
||||
xsltStylesheetPtr style,
|
||||
int compression);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltSaveResultToFile (FILE *file,
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltSaveResultToFile (FILE *file,
|
||||
xmlDocPtr result,
|
||||
xsltStylesheetPtr style);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltSaveResultToFd (int fd,
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltSaveResultToFd (int fd,
|
||||
xmlDocPtr result,
|
||||
xsltStylesheetPtr style);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltSaveResultToString (xmlChar **doc_txt_ptr,
|
||||
int * doc_txt_len,
|
||||
xmlDocPtr result,
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltSaveResultToString (xmlChar **doc_txt_ptr,
|
||||
int * doc_txt_len,
|
||||
xmlDocPtr result,
|
||||
xsltStylesheetPtr style);
|
||||
|
||||
/*
|
||||
|
@ -246,16 +246,16 @@ XSLTPUBFUN xmlXPathCompExprPtr XSLTCALL
|
|||
/*
|
||||
* Profiling.
|
||||
*/
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltSaveProfiling (xsltTransformContextPtr ctxt,
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltSaveProfiling (xsltTransformContextPtr ctxt,
|
||||
FILE *output);
|
||||
XSLTPUBFUN xmlDocPtr XSLTCALL
|
||||
xsltGetProfileInformation (xsltTransformContextPtr ctxt);
|
||||
XSLTPUBFUN xmlDocPtr XSLTCALL
|
||||
xsltGetProfileInformation (xsltTransformContextPtr ctxt);
|
||||
|
||||
XSLTPUBFUN long XSLTCALL
|
||||
xsltTimestamp (void);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltCalibrateAdjust (long delta);
|
||||
XSLTPUBFUN long XSLTCALL
|
||||
xsltTimestamp (void);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltCalibrateAdjust (long delta);
|
||||
|
||||
/**
|
||||
* XSLT_TIMESTAMP_TICS_PER_SEC:
|
||||
|
@ -292,12 +292,12 @@ XSLTPUBFUN void XSLTCALL
|
|||
xsltSetDebuggerStatus (int value);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltGetDebuggerStatus (void);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltSetDebuggerCallbacks (int no, void *block);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xslAddCall (xsltTemplatePtr templ,
|
||||
xmlNodePtr source);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xslDropCall (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Loading…
Reference in a new issue