Index: third_party/libxslt/libxslt/xsltInternals.h |
diff --git a/third_party/libxslt/libxslt/xsltInternals.h b/third_party/libxslt/libxslt/xsltInternals.h |
index e991a93c901dcf548dbfc185548c85328177287d..95e8fe6e81f429db0a68d9c7ed5dd51752bd8c1c 100644 |
--- a/third_party/libxslt/libxslt/xsltInternals.h |
+++ b/third_party/libxslt/libxslt/xsltInternals.h |
@@ -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 */ |
@@ -294,6 +294,11 @@ struct _xsltTemplate { |
int nbCalls; /* the number of time the template was called */ |
unsigned long time; /* the time spent in this template */ |
void *params; /* xsl:param instructions */ |
+ |
+ int templNr; /* Nb of templates in the stack */ |
+ int templMax; /* Size of the templtes stack */ |
+ xsltTemplatePtr *templCalledTab; /* templates called */ |
+ int *templCountTab; /* .. and how often */ |
}; |
/** |
@@ -474,7 +479,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 +511,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 +526,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 +554,7 @@ struct _xsltNsListContainer { |
/* |
xsltStylePreCompPtr parent;\ |
xsltStylePreCompPtr children;\ |
- xsltStylePreCompPtr nextItem; |
+ xsltStylePreCompPtr nextItem; |
*/ |
/** |
@@ -570,7 +575,7 @@ struct _xsltNsListContainer { |
XSLT_ITEM_NSINSCOPE_FIELDS |
/** |
- * _xsltStylePreComp: |
+ * _xsltStylePreComp: |
* |
* The abstract basic structure for items of the XSLT processor. |
* This includes: |
@@ -585,7 +590,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 +600,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 +615,7 @@ struct _xsltStyleBasicEmptyItem { |
/** |
* xsltStyleBasicExpressionItem: |
- * |
+ * |
* Abstract structure only used as a short-cut for |
* XSLT items with just an expression. |
*/ |
@@ -632,7 +637,7 @@ struct _xsltStyleBasicExpressionItem { |
/** |
* xsltStyleItemElement: |
- * |
+ * |
* <!-- Category: instruction --> |
* <xsl:element |
* name = { qname } |
@@ -645,11 +650,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 +799,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 +921,7 @@ typedef struct _xsltStyleItemMessage xsltStyleItemMessage; |
typedef xsltStyleItemMessage *xsltStyleItemMessagePtr; |
struct _xsltStyleItemMessage { |
- XSLT_ITEM_COMMON_FIELDS |
+ XSLT_ITEM_COMMON_FIELDS |
int terminate; |
}; |
@@ -935,7 +940,7 @@ struct _xsltStyleItemDocument { |
TODO: Check if we need. */ |
const xmlChar *filename; /* document URL */ |
int has_filename; |
-}; |
+}; |
/************************************************************************ |
* * |
@@ -1005,7 +1010,7 @@ struct _xsltStyleItemParam { |
const xmlChar *name; |
int has_name; |
const xmlChar *ns; |
- int has_ns; |
+ int has_ns; |
}; |
/** |
@@ -1061,7 +1066,7 @@ struct _xsltStyleItemSort { |
/** |
* xsltStyleItemWhen: |
- * |
+ * |
* <xsl:when |
* test = boolean-expression> |
* <!-- Content: template --> |
@@ -1144,7 +1149,7 @@ typedef struct _xsltStyleItemExtElement xsltStyleItemExtElement; |
typedef xsltStyleItemExtElement *xsltStyleItemExtElementPtr; |
struct _xsltStyleItemExtElement { |
XSLT_ITEM_COMMON_FIELDS |
- xsltElemPreCompPtr item; |
+ xsltElemPreCompPtr item; |
}; |
/************************************************************************ |
@@ -1160,7 +1165,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 +1201,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 +1218,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 +1273,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 +1294,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 +1302,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 +1315,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 +1325,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 +1338,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 +1353,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 +1476,7 @@ struct _xsltPrincipalStylesheetData { |
#endif |
}; |
- |
+ |
#endif |
/* |
* Note that we added a @compCtxt field to anchor an stylesheet compilation |
@@ -1516,7 +1521,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 +1542,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 +1563,7 @@ struct _xsltStylesheet { |
xmlChar *encoding; /* encoding string */ |
int omitXmlDeclaration; /* omit-xml-declaration = "yes" | "no" */ |
- /* |
+ /* |
* Number formatting. |
*/ |
xsltDecimalFormatPtr decimalFormat; |
@@ -1628,8 +1633,12 @@ struct _xsltStylesheet { |
*/ |
xsltCompilerCtxtPtr compCtxt; /* TODO: Change this to (void *). */ |
- xsltPrincipalStylesheetDataPtr principalData; |
+ xsltPrincipalStylesheetDataPtr principalData; |
#endif |
+ /* |
+ * Forwards-compatible processing |
+ */ |
+ int forwards_compatible; |
}; |
typedef struct _xsltTransformCache xsltTransformCache; |
@@ -1775,6 +1784,8 @@ struct _xsltTransformContext { |
xmlDocPtr localRVTBase; |
int keyInitLevel; /* Needed to catch recursive keys issues */ |
int funcLevel; /* Needed to catch recursive functions issues */ |
+ int maxTemplateDepth; |
+ int maxTemplateVars; |
}; |
/** |
@@ -1828,62 +1839,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 |
@@ -1898,14 +1909,6 @@ XSLTPUBFUN void XSLTCALL |
XSLTPUBFUN void XSLTCALL |
xsltReleaseRVT (xsltTransformContextPtr ctxt, |
xmlDocPtr RVT); |
-XSLTPUBFUN int XSLTCALL |
- xsltTransStorageAdd (xsltTransformContextPtr ctxt, |
- void *id, |
- void *data); |
-XSLTPUBFUN void * XSLTCALL |
- xsltTransStorageRemove (xsltTransformContextPtr ctxt, |
- void *id); |
- |
/* |
* Extra functions for Attribute Value Templates |
*/ |
@@ -1932,7 +1935,7 @@ XSLTPUBFUN void XSLTCALL |
* * |
************************************************************************/ |
-#ifdef XSLT_REFACTORED |
+#ifdef XSLT_REFACTORED |
XSLTPUBFUN void XSLTCALL |
xsltParseSequenceConstructor( |
xsltCompilerCtxtPtr cctxt, |