Skip to main content

Module transform

Module transform 

Source
Expand description

XSLT transformation engine (§33, §85 Phase 8).

Executes compiled stylesheets against source documents:

  • xsltNewTransformContext / xsltFreeTransformContext
  • xsltApplyStylesheet and variants
  • Template application and instruction execution
  • Result tree construction
  • Current node / context position / context size management
  • Recursion depth limiting

§UPSTREAM-PARITY

Upstream libxslt (transform.c) drives the transformation from xsltApplyStylesheet:

  1. Create a transform context (or reuse a user-supplied one).
  2. Initialize global variables and key tables.
  3. Apply the template matching the root node of the source document.
  4. Execute the template’s instructions, building the result tree.
  5. Return the result document.

The insert pointer in the context tracks the current insertion point in the result tree; the node / nodeList fields track the current source node and node list; contextSize / proximityPosition track the XPath context.

Constants§

XSLT_MAX_DEPTH
Maximum template recursion depth (matches upstream XSLT_MAX_DEPTH).
XSLT_MAX_INSERT_DEPTH
Maximum insert depth.
XSLT_STATE_ERROR
XSLT_STATE_OK
State flags for the transform context.
XSLT_STATE_STOPPED
The transformation was stopped (e.g. xsl:message terminate=“yes”).

Statics§

xsltMaxDepth
Maximum template recursion depth (upstream xsltMaxDepth, transform.c). Default 30000 (upstream xslt.c).
xsltMaxVars
Maximum number of variables/params (upstream xsltMaxVars, transform.c).

Functions§

execute_content
Execute the content of a template (a list of nodes).
exslt_element_names
The set of EXSLT element names recognized by element-available().
exslt_function_names
The set of EXSLT function QNames (prefix:local) for function-available().
xsltApplyStylesheet
Apply a stylesheet to a document.
xsltApplyStylesheetStacked
Apply a stylesheet with a parameter stack.
xsltApplyStylesheetUser
Apply a stylesheet with user control.
xsltFreeTransformContext
Free a transform context.
xsltFreeTransformResult
Free the result of a transformation.
xsltGetXIncludeDefault
Get the current XInclude default (upstream xsltGetXIncludeDefault).
xsltNewTransformContext
Create a new transform context.
xsltProcessInstruction
Process a single instruction node.
xsltRunStylesheet
Apply a stylesheet and write the result to an output channel.
xsltRunStylesheetUser
Apply a stylesheet and write the result to an output channel.
xsltSetXIncludeDefault
Set whether XInclude processing is done on documents loaded by the transformation (upstream xsltSetXIncludeDefault).