ReactOS 0.4.16-dev-2-g02a6913
|
#include <libxml/parser.h>
#include <libxml/xmlIO.h>
#include "xsltexports.h"
#include <libxslt/xsltInternals.h>
Go to the source code of this file.
XSLTPUBFUN void XSLTCALL xslHandleDebugger | ( | xmlNodePtr | cur, |
xmlNodePtr | node, | ||
xsltTemplatePtr | templ, | ||
xsltTransformContextPtr | ctxt | ||
) |
XSLTPUBFUN void XSLTCALL 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().
XSLTPUBFUN void XSLTCALL 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().
XSLTPUBFUN void XSLTCALL xsltApplyStripSpaces | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | node | ||
) |
Private Interfaces.
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().
XSLTPUBFUN xmlDocPtr XSLTCALL 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.
XSLTPUBFUN xmlDocPtr XSLTCALL 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.
XSLTPUBFUN void XSLTCALL 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().
XSLTPUBFUN void XSLTCALL xsltAttribute | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | contextNode, | ||
xmlNodePtr | inst, | ||
xsltElemPreCompPtr | castedComp | ||
) |
xsltAttribute: @ctxt: a XSLT process context @contextNode: the current node in the source tree @inst: the xsl:attribute element @castedComp: precomputed information
Process the xslt attribute node on the source node
Definition at line 716 of file attributes.c.
Referenced by xsltApplyAttributeSet(), xsltNewStylePreComp(), and xsltRegisterAllElement().
XSLTPUBFUN void XSLTCALL 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().
XSLTPUBFUN void XSLTCALL 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().
XSLTPUBFUN void XSLTCALL 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().
XSLTPUBFUN void XSLTCALL 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().
XSLTPUBFUN void XSLTCALL 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().
XSLTPUBFUN xmlNodePtr XSLTCALL 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().
XSLTPUBFUN void XSLTCALL 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.
Referenced by xsltNewStylePreComp(), xsltRegisterAllExtras(), and xsltStylePreCompute().
XSLTPUBFUN void XSLTCALL xsltElement | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | node, | ||
xmlNodePtr | inst, | ||
xsltElemPreCompPtr | castedComp | ||
) |
xsltElement: @ctxt: a XSLT process context @node: the node in the source tree. @inst: the xslt element node @castedComp: precomputed information
Process the xslt element node on the source node
Definition at line 4017 of file transform.c.
Referenced by xsltNewStylePreComp(), and xsltRegisterAllElement().
XSLTPUBFUN void XSLTCALL xsltForEach | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | contextNode, | ||
xmlNodePtr | inst, | ||
xsltElemPreCompPtr | castedComp | ||
) |
xsltForEach: @ctxt: an XSLT transformation context @contextNode: the "current node" in the source tree @inst: the element node of the xsl:for-each instruction @castedComp: the compiled information of the instruction
Process the xslt for-each node on the source node
Definition at line 5361 of file transform.c.
Referenced by xsltNewStylePreComp(), and xsltRegisterAllElement().
XSLTPUBFUN void XSLTCALL xsltFreeTransformContext | ( | xsltTransformContextPtr | ctxt | ) |
xsltFreeTransformContext: @ctxt: an XSLT parser context
Free up the memory allocated by @ctxt
Definition at line 689 of file transform.c.
Referenced by xsltApplyStylesheetInternal(), and xsltNewTransformContext().
XSLTPUBFUN int XSLTCALL xsltGetXIncludeDefault | ( | void | ) |
xsltGetXIncludeDefault:
Provides the default state for XInclude processing
Returns 0 if there is no processing 1 otherwise
Definition at line 437 of file transform.c.
Referenced by xsltNewTransformContext().
XSLTPUBFUN void XSLTCALL xsltIf | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | contextNode, | ||
xmlNodePtr | inst, | ||
xsltElemPreCompPtr | castedComp | ||
) |
xsltIf: @ctxt: a XSLT process context @contextNode: the current node in the source tree @inst: the xsl:if instruction @castedComp: compiled information of the instruction
Processes the xsl:if instruction on the source node.
Definition at line 5255 of file transform.c.
Referenced by xsltNewStylePreComp(), and xsltRegisterAllElement().
XSLTPUBFUN void XSLTCALL xsltLocalVariablePop | ( | xsltTransformContextPtr | ctxt, |
int | limitNr, | ||
int | level | ||
) |
xsltLocalVariablePop: @ctxt: the transformation context @limitNr: number of variables which should remain @level: the depth in the xsl:template's tree
Pops all variable values at the given @depth from the stack.
Returns the stored variable value NOTE: This is an internal routine and should not be called by users!
Definition at line 150 of file transform.c.
Referenced by xsltApplyOneTemplate(), xsltApplySequenceConstructor(), and xsltApplyStylesheetInternal().
XSLTPUBFUN int XSLTCALL xsltLocalVariablePush | ( | xsltTransformContextPtr | ctxt, |
xsltStackElemPtr | variable, | ||
int | level | ||
) |
xsltLocalVariablePush: @ctxt: the transformation context @variable: variable to be pushed to the variable stack @level: new value for variable's level
Places the variable onto the local variable stack
Returns: 0 for success, -1 for any error NOTE: This is an internal routine and should not be called by users!
Definition at line 2188 of file transform.c.
Referenced by xsltApplyOneTemplate(), and xsltApplyXSLTTemplate().
XSLTPUBFUN xsltTransformContextPtr XSLTCALL xsltNewTransformContext | ( | xsltStylesheetPtr | style, |
xmlDocPtr | doc | ||
) |
Export context to users.
xsltNewTransformContext: @style: a parsed XSLT stylesheet @doc: the input document
Create a new XSLT TransformContext
Returns the newly allocated xsltTransformContextPtr or NULL in case of error
Definition at line 536 of file transform.c.
Referenced by xsltApplyStylesheetInternal().
XSLTPUBFUN void XSLTCALL xsltNumber | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | node, | ||
xmlNodePtr | inst, | ||
xsltElemPreCompPtr | castedComp | ||
) |
xsltNumber: @ctxt: a XSLT process context @node: the node in the source tree. @inst: the xslt number node @castedComp: precomputed information
Process the xslt number node on the source node
Definition at line 4553 of file transform.c.
Referenced by xsltNewStylePreComp(), and xsltRegisterAllElement().
XSLTPUBFUN void XSLTCALL xsltProcessingInstruction | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | node, | ||
xmlNodePtr | inst, | ||
xsltElemPreCompPtr | castedComp | ||
) |
xsltProcessingInstruction: @ctxt: a XSLT process context @node: the node in the source tree. @inst: the xslt processing-instruction node @castedComp: precomputed information
Process the xslt processing-instruction node on the source node
Definition at line 4269 of file transform.c.
Referenced by xsltNewStylePreComp(), and xsltRegisterAllElement().
XSLTPUBFUN void XSLTCALL xsltProcessOneNode | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | contextNode, | ||
xsltStackElemPtr | withParams | ||
) |
xsltProcessOneNode: @ctxt: a XSLT process context @contextNode: the "current node" in the source tree @withParams: extra parameters (e.g. xsl:with-param) passed to the template if any
Process the source node.
Definition at line 2064 of file transform.c.
Referenced by xsltApplyStylesheetInternal(), xsltApplyTemplates(), and xsltDefaultProcessOneNode().
XSLTPUBFUN xmlDocPtr XSLTCALL xsltProfileStylesheet | ( | xsltStylesheetPtr | style, |
xmlDocPtr | doc, | ||
const char ** | params, | ||
FILE * | output | ||
) |
xsltProfileStylesheet: @style: a parsed XSLT stylesheet @doc: a parsed XML document @params: a NULL terminated arry of parameters names/values tuples @output: a FILE * for the profiling output
Apply the stylesheet to the document and dump the profiling to the given output.
Returns the result document or NULL in case of error
Definition at line 6163 of file transform.c.
XSLTPUBFUN void XSLTCALL xsltRegisterAllElement | ( | xsltTransformContextPtr | ctxt | ) |
xsltRegisterAllElement: @ctxt: the XPath context
Registers all default XSLT elements in this context
Definition at line 6307 of file transform.c.
XSLTPUBFUN int XSLTCALL xsltRunStylesheet | ( | xsltStylesheetPtr | style, |
xmlDocPtr | doc, | ||
const char ** | params, | ||
const char * | output, | ||
xmlSAXHandlerPtr | SAX, | ||
xmlOutputBufferPtr | IObuf | ||
) |
xsltRunStylesheet: @style: a parsed XSLT stylesheet @doc: a parsed XML document @params: a NULL terminated array of parameters names/values tuples @output: the URL/filename ot the generated resource if available @SAX: a SAX handler for progressive callback output (not implemented yet) @IObuf: an output buffer for progressive output (not implemented yet)
Apply the stylesheet to the document and generate the output according to @output @SAX and @IObuf. It's an error to specify both @SAX and @IObuf.
NOTE: This may lead to a non-wellformed output XML wise ! NOTE: This may also result in multiple files being generated NOTE: using IObuf, the result encoding used will be the one used for creating the output buffer, use the following macro to read it from the stylesheet XSLT_GET_IMPORT_PTR(encoding, style, encoding) NOTE: using SAX, any encoding specified in the stylesheet will be lost since the interface uses only UTF8
Returns the number of bytes written to the main resource or -1 in case of error.
Definition at line 6286 of file transform.c.
XSLTPUBFUN int XSLTCALL xsltRunStylesheetUser | ( | xsltStylesheetPtr | style, |
xmlDocPtr | doc, | ||
const char ** | params, | ||
const char * | output, | ||
xmlSAXHandlerPtr | SAX, | ||
xmlOutputBufferPtr | IObuf, | ||
FILE * | profile, | ||
xsltTransformContextPtr | userCtxt | ||
) |
xsltRunStylesheetUser: @style: a parsed XSLT stylesheet @doc: a parsed XML document @params: a NULL terminated array of parameters names/values tuples @output: the URL/filename ot the generated resource if available @SAX: a SAX handler for progressive callback output (not implemented yet) @IObuf: an output buffer for progressive output (not implemented yet) @profile: profile FILE * output or NULL @userCtxt: user provided transform context
Apply the stylesheet to the document and generate the output according to @output @SAX and @IObuf. It's an error to specify both @SAX and @IObuf.
NOTE: This may lead to a non-wellformed output XML wise ! NOTE: This may also result in multiple files being generated NOTE: using IObuf, the result encoding used will be the one used for creating the output buffer, use the following macro to read it from the stylesheet XSLT_GET_IMPORT_PTR(encoding, style, encoding) NOTE: using SAX, any encoding specified in the stylesheet will be lost since the interface uses only UTF8
Returns the number of by written to the main resource or -1 in case of error.
Definition at line 6225 of file transform.c.
Referenced by xsltRunStylesheet().
XSLTPUBFUN void XSLTCALL xsltSetXIncludeDefault | ( | int | xinclude | ) |
XInclude default processing.
xsltSetXIncludeDefault: @xinclude: whether to do XInclude processing
Set whether XInclude should be processed on document being loaded by default
Definition at line 425 of file transform.c.
XSLTPUBFUN void XSLTCALL xsltSort | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr node | ATTRIBUTE_UNUSED, | ||
xmlNodePtr | inst, | ||
xsltElemPreCompPtr | comp | ||
) |
xsltSort: @ctxt: a XSLT process context @node: the node in the source tree. @inst: the xslt sort node @comp: precomputed information
function attached to xsl:sort nodes, but this should not be called directly
Definition at line 3839 of file transform.c.
Referenced by xsltNewStylePreComp(), and xsltRegisterAllElement().
XSLTPUBFUN void XSLTCALL xsltText | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr node | ATTRIBUTE_UNUSED, | ||
xmlNodePtr | inst, | ||
xsltElemPreCompPtr comp | ATTRIBUTE_UNUSED | ||
) |
xsltText: @ctxt: a XSLT process context @node: the node in the source tree. @inst: the xslt text node @comp: precomputed information
Process the xslt text node on the source node
Definition at line 3980 of file transform.c.
Referenced by xsltNewStylePreComp(), and xsltRegisterAllElement().
XSLTPUBFUN void XSLTCALL xsltValueOf | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | node, | ||
xmlNodePtr | inst, | ||
xsltElemPreCompPtr | castedComp | ||
) |
xsltValueOf: @ctxt: a XSLT process context @node: the node in the source tree. @inst: the xslt value-of node @castedComp: precomputed information
Process the xslt value-of node on the source node
Definition at line 4479 of file transform.c.
Referenced by xsltNewStylePreComp(), and xsltRegisterAllElement().