ReactOS 0.4.16-dev-329-g9223134
|
#include "precomp.h"
Go to the source code of this file.
Classes | |
struct | _xsltStepState |
struct | _xsltStepStates |
struct | _xsltStepOp |
struct | _xsltCompMatch |
struct | _xsltParserContext |
Typedefs | |
typedef struct _xsltStepState | xsltStepState |
typedef xsltStepState * | xsltStepStatePtr |
typedef struct _xsltStepStates | xsltStepStates |
typedef xsltStepStates * | xsltStepStatesPtr |
typedef struct _xsltStepOp | xsltStepOp |
typedef xsltStepOp * | xsltStepOpPtr |
typedef struct _xsltParserContext | xsltParserContext |
typedef xsltParserContext * | xsltParserContextPtr |
Enumerations | |
enum | xsltOp { XSLT_OP_END =0 , XSLT_OP_ROOT , XSLT_OP_ELEM , XSLT_OP_ATTR , XSLT_OP_PARENT , XSLT_OP_ANCESTOR , XSLT_OP_ID , XSLT_OP_KEY , XSLT_OP_NS , XSLT_OP_ALL , XSLT_OP_PI , XSLT_OP_COMMENT , XSLT_OP_TEXT , XSLT_OP_NODE , XSLT_OP_PREDICATE } |
enum | xsltAxis { AXIS_CHILD =1 , AXIS_ATTRIBUTE } |
Functions | |
static xsltCompMatchPtr | xsltNewCompMatch (void) |
static void | xsltFreeCompMatch (xsltCompMatchPtr comp) |
void | xsltFreeCompMatchList (xsltCompMatchPtr comp) |
static void | xsltFreeCompMatchListEntry (void *payload, const xmlChar *name ATTRIBUTE_UNUSED) |
#define SWAP | ( | ) | xsltSwapTopCompMatch(ctxt->comp); |
typedef xsltParserContext* xsltParserContextPtr |
typedef struct _xsltStepOp xsltStepOp |
typedef xsltStepOp* xsltStepOpPtr |
typedef struct _xsltStepState xsltStepState |
typedef xsltStepState* xsltStepStatePtr |
typedef struct _xsltStepStates xsltStepStates |
typedef xsltStepStates* xsltStepStatesPtr |
Enumerator | |
---|---|
AXIS_CHILD | |
AXIS_ATTRIBUTE |
Definition at line 27 of file pattern.c.
Definition at line 495 of file pattern.c.
Referenced by xsltTestCompMatchDirect().
int xsltAddTemplate | ( | xsltStylesheetPtr | style, |
xsltTemplatePtr | cur, | ||
const xmlChar * | mode, | ||
const xmlChar * | modeURI | ||
) |
xsltAddTemplate: @style: an XSLT stylesheet @cur: an XSLT template @mode: the mode name or NULL @modeURI: the mode URI or NULL
Register the XSLT pattern associated to @cur
Returns -1 in case of error, 0 otherwise
Definition at line 2016 of file pattern.c.
Referenced by xsltParseStylesheetProcess(), and xsltParseStylesheetTemplate().
void xsltCleanupTemplates | ( | xsltStylesheetPtr style | ATTRIBUTE_UNUSED | ) |
xsltCleanupTemplates: @style: an XSLT stylesheet
Cleanup the state of the templates used by the stylesheet and the ones it imports.
Definition at line 2517 of file pattern.c.
Referenced by xsltApplyStylesheetInternal().
|
static |
Definition at line 1308 of file pattern.c.
Referenced by xsltCompileLocationPathPattern(), and xsltCompileStepPattern().
|
static |
xsltCompileLocationPathPattern: @ctxt: the compilation context @novar: flag to prohibit xslt variables
Compile the XSLT LocationPathPattern and generates a precompiled form suitable for fast matching.
[2] LocationPathPattern ::= '/' RelativePathPattern? | IdKeyPattern (('/' | '//') RelativePathPattern)? | '//'? RelativePathPattern
Definition at line 1736 of file pattern.c.
Referenced by xsltCompilePatternInternal().
xsltCompMatchPtr xsltCompilePattern | ( | const xmlChar * | pattern, |
xmlDocPtr | doc, | ||
xmlNodePtr | node, | ||
xsltStylesheetPtr | style, | ||
xsltTransformContextPtr | runtime | ||
) |
xsltCompilePattern: @pattern: an XSLT pattern @doc: the containing document @node: the containing element @style: the stylesheet @runtime: the transformation context, if done at run-time
Compile the XSLT pattern and generates a list of precompiled form suitable for fast matching.
[1] Pattern ::= LocationPathPattern | Pattern '|' LocationPathPattern
Returns the generated pattern list or NULL in case of failure
Definition at line 1992 of file pattern.c.
Referenced by xsltNumberComp().
|
static |
xsltCompilePatternInternal: @pattern: an XSLT pattern @doc: the containing document @node: the containing element @style: the stylesheet @runtime: the transformation context, if done at run-time @novar: flag to prohibit xslt variables
Compile the XSLT pattern and generates a list of precompiled form suitable for fast matching.
[1] Pattern ::= LocationPathPattern | Pattern '|' LocationPathPattern
Returns the generated pattern list or NULL in case of failure
Definition at line 1816 of file pattern.c.
Referenced by xsltAddTemplate(), and xsltCompilePattern().
|
static |
xsltCompileRelativePathPattern: @comp: the compilation context @token: a posible precompiled name @novar: flag to prohibit xslt variables
Compile the XSLT RelativePathPattern and generates a precompiled form suitable for fast matching.
[4] RelativePathPattern ::= StepPattern | RelativePathPattern '/' StepPattern | RelativePathPattern '//' StepPattern
Definition at line 1695 of file pattern.c.
Referenced by xsltCompileLocationPathPattern().
|
static |
xsltCompileStepPattern: @ctxt: the compilation context @token: a posible precompiled name @novar: flag to prohibit xslt variables from pattern
Compile the XSLT StepPattern and generates a precompiled form suitable for fast matching.
[5] StepPattern ::= ChildOrAttributeAxisSpecifier NodeTest Predicate* [6] ChildOrAttributeAxisSpecifier ::= AbbreviatedAxisSpecifier | ('child' | 'attribute') '::' from XPath [7] NodeTest ::= NameTest | NodeType '(' ')' | 'processing-instruction' '(' Literal ')' [8] Predicate ::= '[' PredicateExpr ']' [9] PredicateExpr ::= Expr [13] AbbreviatedAxisSpecifier ::= '@'? [37] NameTest ::= '*' | NCName ':' '*' | QName
Definition at line 1492 of file pattern.c.
Referenced by xsltCompileRelativePathPattern().
|
static |
xsltCompMatchAdd: @comp: the compiled match expression @op: an op @value: the first value @value2: the second value @novar: flag to set XML_XPATH_NOVAR
Add an step to an XSLT Compiled Match
Returns -1 in case of failure, 0 otherwise.
Definition at line 282 of file pattern.c.
Referenced by xsltReverseCompMatch().
void xsltCompMatchClearCache | ( | xsltTransformContextPtr | ctxt, |
xsltCompMatchPtr | comp | ||
) |
xsltCompMatchClearCache: @ctxt: a XSLT process context @comp: the precompiled pattern list
Clear pattern match cache.
Definition at line 1144 of file pattern.c.
Referenced by xsltNumberFormat().
|
static |
Definition at line 2214 of file pattern.c.
Referenced by xsltGetTemplate().
|
static |
xsltFreeCompMatch: @comp: an XSLT comp
Free up the memory allocated by @comp
Definition at line 159 of file pattern.c.
Referenced by xsltAddTemplate(), and xsltFreeCompMatchList().
void xsltFreeCompMatchList | ( | xsltCompMatchPtr | comp | ) |
xsltFreeCompMatchList: @comp: an XSLT comp list
Free up the memory allocated by all the elements of @comp
Definition at line 192 of file pattern.c.
Referenced by xsltCompilePatternInternal(), xsltFreeCompMatchListEntry(), xsltFreeStylePreComp(), and xsltFreeTemplateHashes().
|
static |
Definition at line 203 of file pattern.c.
Referenced by xsltFreeTemplateHashes().
|
static |
xsltFreeParserContext: @ctxt: an XSLT parser context
Free up the memory allocated by @ctxt
Definition at line 262 of file pattern.c.
Referenced by xsltCompilePatternInternal().
void xsltFreeTemplateHashes | ( | xsltStylesheetPtr | style | ) |
xsltFreeTemplateHashes: @style: an XSLT stylesheet
Free up the memory used by xsltAddTemplate/xsltGetTemplate mechanism
Definition at line 2527 of file pattern.c.
Referenced by xsltFreeStylesheet().
xsltTemplatePtr xsltGetTemplate | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | node, | ||
xsltStylesheetPtr | style | ||
) |
xsltGetTemplate: @ctxt: a XSLT process context @node: the node being processed @style: the current style
Finds the template applying to this node, if @style is non-NULL it means one needs to look for the next imported template in scope.
Returns the xsltTemplatePtr or NULL if not found
Definition at line 2259 of file pattern.c.
Referenced by xsltApplyImports(), xsltDefaultProcessOneNode(), and xsltProcessOneNode().
|
static |
xsltNewCompMatch:
Create a new XSLT CompMatch
Returns the newly allocated xsltCompMatchPtr or NULL in case of error
Definition at line 126 of file pattern.c.
Referenced by xsltCompilePatternInternal().
|
static |
xsltNewParserContext: @style: the stylesheet @ctxt: the transformation context, if done at run-time
Create a new XSLT ParserContext
Returns the newly allocated xsltParserContextPtr or NULL in case of error
Definition at line 240 of file pattern.c.
Referenced by xsltCompilePatternInternal().
Definition at line 217 of file pattern.c.
Referenced by xsltFixImportedCompSteps().
|
static |
Definition at line 465 of file pattern.c.
Referenced by xsltTestCompMatch().
|
static |
xsltReverseCompMatch: @ctxt: the parser context @comp: the compiled match expression
reverse all the stack of expressions
Definition at line 396 of file pattern.c.
Referenced by xsltCompilePatternInternal().
|
static |
xsltScanLiteral: @ctxt: the XPath Parser context
Parse an XPath Litteral:
[29] Literal ::= '"' [^"]* '"' | "'" [^']* "'"
Returns the Literal parsed or NULL
Definition at line 1209 of file pattern.c.
Referenced by xsltCompileIdKeyPattern().
|
static |
xsltScanNCName: @ctxt: the XPath Parser context
Parses a non qualified name
Returns the Name parsed or NULL
Definition at line 1264 of file pattern.c.
Referenced by xsltCompileLocationPathPattern(), and xsltCompileStepPattern().
|
static |
|
static |
xsltTestCompMatch: @ctxt: a XSLT process context @comp: the precompiled pattern @node: a node @mode: the mode name or NULL @modeURI: the mode URI or NULL
Test whether the node matches the pattern
Returns 1 if it matches, 0 if it doesn't and -1 in case of failure
Definition at line 926 of file pattern.c.
Referenced by xsltGetTemplate(), and xsltTestCompMatchList().
|
static |
xsltTestCompMatchDirect: @ctxt: a XSLT process context @comp: the precompiled pattern @node: a node @nsList: the namespaces in scope @nsNr: the number of namespaces in scope
Test whether the node matches the pattern, do a direct evalutation and not a step by step evaluation.
Returns 1 if it matches, 0 if it doesn't and -1 in case of failure
Definition at line 513 of file pattern.c.
Referenced by xsltTestCompMatch().
int xsltTestCompMatchList | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | node, | ||
xsltCompMatchPtr | comp | ||
) |
xsltTestCompMatchList: @ctxt: a XSLT process context @node: a node @comp: the precompiled pattern list
Test whether the node matches one of the patterns in the list
Returns 1 if it matches, 0 if it doesn't and -1 in case of failure
Definition at line 1121 of file pattern.c.
Referenced by xsltNumberFormatGetAnyLevel(), xsltNumberFormatGetMultipleLevel(), and xsltTestCompMatchCount().
|
static |
xsltTestPredicateMatch: @ctxt: a XSLT process context @comp: the precompiled pattern @node: a node @step: the predicate step @sel: the previous step
Test whether the node matches the predicate
Returns 1 if it matches, 0 if it doesn't and -1 in case of failure
Definition at line 769 of file pattern.c.
Referenced by xsltTestCompMatch().
|
static |
xsltTestStepMatch: @ctxt: a XSLT process context @node: a node @step: the step
Test whether the node matches the step.
Returns 1 if it matches, 0 if it doesn't and -1 in case of failure
Definition at line 621 of file pattern.c.
Referenced by xsltTestCompMatch(), and xsltTestPredicateMatch().