ReactOS 0.4.16-dev-329-g9223134
|
Go to the source code of this file.
Classes | |
struct | xsltHTMLVersion |
Macros | |
#define | XSLT_GENERATE_HTML_DOCTYPE |
#define | FALSE (0 == 1) |
#define | TRUE (!FALSE) |
#define | IS_BLANK_NODE(n) (((n)->type == XML_TEXT_NODE) && (xsltIsBlank((n)->content))) |
Typedefs | |
typedef struct xsltHTMLVersion | xsltHTMLVersion |
Variables | |
int | xsltMaxDepth = 3000 |
int | xsltMaxVars = 15000 |
static int | xsltDoXIncludeDefault = 0 |
static unsigned long | xsltDefaultTrace = (unsigned long) XSLT_TRACE_ALL |
static xsltHTMLVersion | xsltHTMLVersions [] |
#define FALSE (0 == 1) |
Definition at line 43 of file transform.c.
#define IS_BLANK_NODE | ( | n | ) | (((n)->type == XML_TEXT_NODE) && (xsltIsBlank((n)->content))) |
Definition at line 47 of file transform.c.
Definition at line 44 of file transform.c.
#define XSLT_GENERATE_HTML_DOCTYPE |
Definition at line 29 of file transform.c.
typedef struct xsltHTMLVersion xsltHTMLVersion |
|
static |
templPop: @ctxt: the transformation context
Pop a template value from the stack
Returns the stored template value
Definition at line 121 of file transform.c.
Referenced by xsltApplyXSLTTemplate().
|
static |
templPush: @ctxt: the transformation context @value: the template to push on the stack
Push a template on the stack
Returns the new index in the stack or 0 in case of error
Definition at line 85 of file transform.c.
Referenced by xsltApplyXSLTTemplate().
|
static |
xsltAddChild: @parent: the parent node @cur: the child node
Wrapper version of xmlAddChild with a more consistent behaviour on error. One expect the use to be child = xsltAddChild(parent, child); and the routine will take care of not leaking on errors or node merge
Returns the child is successfully attached or NULL if merged or freed
Definition at line 751 of file transform.c.
Referenced by xsltApplySequenceConstructor(), xsltComment(), xsltCopy(), xsltCopyText(), xsltCopyTextString(), xsltCopyTree(), xsltElement(), xsltProcessingInstruction(), xsltShallowCopyElem(), and xsltText().
|
static |
xsltAddTextString: @ctxt: a XSLT process context @target: the text node where the text will be attached @string: the text string @len: the string length in byte
Extend the current text node with the new string, it handles coalescing
Returns: the text node
Definition at line 777 of file transform.c.
Referenced by xsltCopyText(), and xsltCopyTextString().
|
static |
xsltApplyFallbacks: @ctxt: a XSLT process context @node: the node in the source tree. @inst: the node generating the error
Process possible xsl:fallback nodes present under @inst
Returns the number of xsl:fallback element found and processed
Definition at line 1803 of file transform.c.
Referenced by xsltApplySequenceConstructor().
void xsltApplyImports | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | contextNode, | ||
xmlNodePtr | inst, | ||
xsltElemPreCompPtr comp | ATTRIBUTE_UNUSED | ||
) |
xsltApplyImports: @ctxt: an XSLT transformation context @contextNode: the current node in the source tree. @inst: the element node of the XSLT 'apply-imports' instruction @comp: the compiled instruction
Process the XSLT apply-imports element.
Definition at line 4610 of file transform.c.
Referenced by xsltNewStylePreComp(), and xsltRegisterAllElement().
void xsltApplyOneTemplate | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | contextNode, | ||
xmlNodePtr | list, | ||
xsltTemplatePtr templ | ATTRIBUTE_UNUSED, | ||
xsltStackElemPtr | params | ||
) |
xsltApplyOneTemplate: @ctxt: a XSLT process context @contextNode: the node in the source tree. @list: the nodes of a sequence constructor @templ: not used @params: a set of parameters (xsl:param) or NULL
Processes a sequence constructor on the current node in the source tree.
@params are the already computed variable stack items; this function pushes them on the variable stack, and pops them before exiting; it's left to the caller to free or reuse @params afterwards. The initial states of the variable stack will always be restored before this function exits. NOTE that this does not initiate a new distinct variable scope; i.e. variables already on the stack are visible to the process. The caller's side needs to start a new variable scope if needed (e.g. in exsl:function).
@templ is obsolete and not used anymore (e.g. <exslt:function> does not provide a @templ); a non-NULL @templ might raise an error in the future.
BIG NOTE: This function is not intended to process the content of an xsl:template; it does not expect xsl:param instructions in @list and will report errors if found.
Called by:
Definition at line 3273 of file transform.c.
Referenced by xsltEvalGlobalVariable(), xsltEvalTemplateString(), and xsltEvalVariable().
|
static |
xsltApplySequenceConstructor: @ctxt: a XSLT process context @contextNode: the "current node" in the source tree @list: the nodes of a sequence constructor; (plus leading xsl:param elements) @templ: the compiled xsl:template (optional)
Processes a sequence constructor.
NOTE: ctxt->currentTemplateRule was introduced to reflect the semantics of "current template rule". I.e. the field ctxt->templ is not intended to reflect this, thus always pushed onto the template stack.
Definition at line 2278 of file transform.c.
Referenced by xsltApplyFallbacks(), xsltApplyOneTemplate(), xsltApplySequenceConstructor(), xsltApplyXSLTTemplate(), xsltChoose(), xsltCopy(), xsltDocumentElem(), xsltElement(), xsltForEach(), and xsltIf().
void xsltApplyStripSpaces | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | node | ||
) |
xsltApplyStripSpaces: @ctxt: a XSLT process context @node: the root of the XML tree
Strip the unwanted ignorable spaces from the input tree
Definition at line 5609 of file transform.c.
Referenced by xsltApplyStripSpaces(), xsltApplyStylesheetInternal(), and xsltLoadDocument().
xmlDocPtr xsltApplyStylesheet | ( | xsltStylesheetPtr | style, |
xmlDocPtr | doc, | ||
const char ** | params | ||
) |
xsltApplyStylesheet: @style: a parsed XSLT stylesheet @doc: a parsed XML document @params: a NULL terminated arry of parameters names/values tuples
Apply the stylesheet to the document NOTE: This may lead to a non-wellformed output XML wise !
Returns the result document or NULL in case of error
Definition at line 6144 of file transform.c.
|
static |
xsltApplyStylesheetInternal: @style: a parsed XSLT stylesheet @doc: a parsed XML document @params: a NULL terminated array of parameters names/values tuples @output: the targetted output @profile: profile FILE * output or NULL @user: user provided parameter
Apply the stylesheet to the document NOTE: This may lead to a non-wellformed output XML wise !
Returns the result document or NULL in case of error
Definition at line 5729 of file transform.c.
Referenced by xsltApplyStylesheet(), xsltApplyStylesheetUser(), xsltProfileStylesheet(), and xsltRunStylesheetUser().
xmlDocPtr xsltApplyStylesheetUser | ( | xsltStylesheetPtr | style, |
xmlDocPtr | doc, | ||
const char ** | params, | ||
const char * | output, | ||
FILE * | profile, | ||
xsltTransformContextPtr | userCtxt | ||
) |
xsltApplyStylesheetUser: @style: a parsed XSLT stylesheet @doc: a parsed XML document @params: a NULL terminated array of parameters names/values tuples @output: the targetted output @profile: profile FILE * output or NULL @userCtxt: user provided transform context
Apply the stylesheet to the document and allow the user to provide its own transformation context.
Returns the result document or NULL in case of error
Definition at line 6187 of file transform.c.
void xsltApplyTemplates | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | node, | ||
xmlNodePtr | inst, | ||
xsltElemPreCompPtr | castedComp | ||
) |
xsltApplyTemplates: @ctxt: a XSLT transformation context @node: the 'current node' in the source tree @inst: the element node of an XSLT 'apply-templates' instruction @castedComp: the compiled instruction
Processes the XSLT 'apply-templates' instruction on the current node.
Definition at line 4782 of file transform.c.
Referenced by xsltNewStylePreComp(), and xsltRegisterAllElement().
|
static |
Definition at line 3026 of file transform.c.
Referenced by xsltApplyImports(), xsltCallTemplate(), xsltDefaultProcessOneNode(), and xsltProcessOneNode().
void xsltCallTemplate | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | node, | ||
xmlNodePtr | inst, | ||
xsltElemPreCompPtr | castedComp | ||
) |
xsltCallTemplate: @ctxt: a XSLT transformation context @node: the "current node" in the source tree @inst: the XSLT 'call-template' instruction @castedComp: the compiled information of the instruction
Processes the XSLT call-template instruction on the source node.
Definition at line 4679 of file transform.c.
Referenced by xsltNewStylePreComp(), and xsltRegisterAllElement().
void xsltChoose | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | contextNode, | ||
xmlNodePtr | inst, | ||
xsltElemPreCompPtr comp | ATTRIBUTE_UNUSED | ||
) |
xsltChoose: @ctxt: a XSLT process context @contextNode: the current node in the source tree @inst: the xsl:choose instruction @comp: compiled information of the instruction
Processes the xsl:choose instruction on the source node.
Definition at line 5096 of file transform.c.
Referenced by xsltNewStylePreComp(), and xsltRegisterAllElement().
void xsltComment | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | node, | ||
xmlNodePtr | inst, | ||
xsltElemPreCompPtr comp | ATTRIBUTE_UNUSED | ||
) |
xsltComment: @ctxt: a XSLT process context @node: the node in the source tree. @inst: the xslt comment node @comp: precomputed information
Process the xslt comment node on the source node
Definition at line 4225 of file transform.c.
Referenced by xsltNewStylePreComp(), and xsltRegisterAllElement().
void xsltCopy | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | node, | ||
xmlNodePtr | inst, | ||
xsltElemPreCompPtr | castedComp | ||
) |
xsltCopy: @ctxt: an XSLT process context @node: the node in the source tree @inst: the element node of the XSLT-copy instruction @castedComp: computed information of the XSLT-copy instruction
Execute the XSLT-copy instruction on the source node.
Definition at line 3861 of file transform.c.
Referenced by xsltNewStylePreComp(), and xsltRegisterAllElement().
|
static |
xsltCopyAttrListNoOverwrite: @ctxt: a XSLT process context @invocNode: responsible node in the stylesheet; used for error reports @target: the element where the new attributes will be grafted @attr: the first attribute in the list to be copied
Copies a list of attribute nodes, starting with @attr, over to the @target element node.
Called by:
Returns 0 on success and -1 on errors and internal errors.
Definition at line 1220 of file transform.c.
Referenced by xsltCopyTree().
|
static |
xsltCopyNamespaceListInternal: @node: the target node @cur: the first namespace
Do a copy of a namespace list. If @node is non-NULL the new namespaces are added automatically. Called by: xsltCopyTree()
QUESTION: What is the exact difference between this function and xsltCopyNamespaceList() in "namespaces.c"? ANSWER: xsltCopyNamespaceList() tries to apply ns-aliases.
Returns: a new xmlNsPtr, or NULL in case of error.
Definition at line 1424 of file transform.c.
Referenced by xsltCopyTree(), and xsltShallowCopyElem().
void xsltCopyOf | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | node, | ||
xmlNodePtr | inst, | ||
xsltElemPreCompPtr | castedComp | ||
) |
xsltCopyOf: @ctxt: an XSLT transformation context @node: the current node in the source tree @inst: the element node of the XSLT copy-of instruction @castedComp: precomputed information of the XSLT copy-of instruction
Process the XSLT copy-of instruction.
Definition at line 4335 of file transform.c.
Referenced by xsltNewStylePreComp(), and xsltRegisterAllElement().
|
static |
xsltCopyText: @ctxt: a XSLT process context @target: the element where the text will be attached @cur: the text or CDATA node @interned: the string is in the target doc dictionary
Copy the text content of @cur and append it to @target's children.
Returns: the text node, where the text content of @cur is copied to. NULL in case of API or internal errors.
Definition at line 945 of file transform.c.
Referenced by xsltApplySequenceConstructor(), xsltCopy(), xsltDefaultProcessOneNode(), and xsltShallowCopyElem().
xmlNodePtr xsltCopyTextString | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | target, | ||
const xmlChar * | string, | ||
int | noescape | ||
) |
xsltCopyTextString: @ctxt: a XSLT process context @target: the element where the text will be attached @string: the text string @noescape: should disable-escaping be activated for this text node.
Adds @string to a newly created or an existent text node child of @target.
Returns: the text node, where the text content of @cur is copied to. NULL in case of API or internal errors.
Definition at line 849 of file transform.c.
Referenced by xsltCopyOf(), xsltCopyTree(), xsltNumberFormat(), and xsltValueOf().
|
static |
xsltCopyTree: @ctxt: the XSLT transformation context @invocNode: responsible node in the stylesheet; used for error reports @node: the element node in the source tree @insert: the parent in the result tree @isLRE: indicates if @node is a Literal Result Element @topElemVisited: indicates if a top-most element was already processed
Make a copy of the full tree under the element node @node and insert it as last child of @insert
NOTE: Not to be used for Literal Result Elements.
Used by:
Returns a pointer to the new tree, or NULL in case of error
Definition at line 1592 of file transform.c.
Referenced by xsltCopyOf(), and xsltCopyTreeList().
|
static |
xsltCopyTreeList: @ctxt: a XSLT process context @invocNode: responsible node in the stylesheet; used for error reports @list: the list of element nodes in the source tree. @insert: the parent in the result tree. @isLRE: is this a literal result element list @topElemVisited: indicates if a top-most element was already processed
Make a copy of the full list of tree @list and insert it as last children of @insert
NOTE: Not to be used for Literal Result Elements.
Used by:
Returns a pointer to the new list, or NULL in case of error
Definition at line 1388 of file transform.c.
Referenced by xsltCopyOf(), and xsltCopyTree().
|
static |
Definition at line 5678 of file transform.c.
Referenced by xsltApplyStylesheetInternal().
xsltDebugTraceCodes xsltDebugGetDefaultTrace | ( | void | ) |
xsltDebugGetDefaultTrace:
Get the current default debug tracing level mask
Returns the current default debug tracing level mask
Definition at line 460 of file transform.c.
void xsltDebugSetDefaultTrace | ( | xsltDebugTraceCodes | val | ) |
xsltDebugSetDefaultTrace: @val: tracing level mask
Set the default debug tracing level mask
Definition at line 449 of file transform.c.
|
static |
xsltDefaultProcessOneNode: @ctxt: a XSLT process context @node: the node in the source tree. @params: extra parameters passed to the template if any
Process the source node with the default built-in template rule: <xsl:template match="*|/"> <xsl:apply-templates/> </xsl:template>
and
<xsl:template match="text()|@*"> <xsl:value-of select="."/> </xsl:template>
Note also that namespace declarations are copied directly:
the built-in template rule is the only template rule that is applied for namespace nodes.
Definition at line 1859 of file transform.c.
Referenced by xsltApplyImports(), and xsltProcessOneNode().
void xsltDocumentElem | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | node, | ||
xmlNodePtr | inst, | ||
xsltElemPreCompPtr | castedComp | ||
) |
xsltDocumentElem: @ctxt: an XSLT processing context @node: The current node @inst: the instruction in the stylesheet @castedComp: precomputed information
Process an EXSLT/XSLT-1.1 document element
Definition at line 3323 of file transform.c.