/usr/share/doc/libxslt-devel/html
NameSizeModeActions
book1.html68210644editdlrm
home.png6540644editdlrm
index.html68210644editdlrm
left.png4590644editdlrm
libxslt-attributes.html93560644editdlrm
libxslt-documents.html164470644editdlrm
libxslt-extensions.html496180644editdlrm
libxslt-extra.html101790644editdlrm
libxslt-functions.html140300644editdlrm
libxslt-imports.html128460644editdlrm
libxslt-keys.html112610644editdlrm
libxslt-lib.html68210644editdlrm
libxslt-namespaces.html156210644editdlrm
libxslt-numbersInternals.html77120644editdlrm
libxslt-pattern.html167060644editdlrm
libxslt-preproc.html87310644editdlrm
libxslt-security.html201510644editdlrm
libxslt-templates.html208950644editdlrm
libxslt-transform.html513230644editdlrm
libxslt-variables.html231580644editdlrm
libxslt-xslt.html77900644editdlrm
libxslt-xsltexports.html67350644editdlrm
libxslt-xsltInternals.html1097310644editdlrm
libxslt-xsltlocale.html114310644editdlrm
libxslt-xsltutils.html507800644editdlrm
right.png4720644editdlrm
up.png4060644editdlrm
Edit: /usr/share/doc/libxslt-devel/html/libxslt-pattern.html (16706B)
Module pattern from libxslt
Action against software patentsGNOME2 LogoW3C logoRed Hat Logo
Made with Libxslt Logo

The XSLT C library for GNOME

Module pattern from libxslt

API Menu
Related links
API Indexes

the implementation of the lookup of the right template for a given node must be really fast in order to keep decent performances.

Table of Contents

Structure xsltCompMatch
struct _xsltCompMatch The content of this structure is not made public by the API.
Typedef xsltCompMatch * xsltCompMatchPtr
int	xsltAddTemplate			(xsltStylesheetPtr style, 
xsltTemplatePtr cur,
const xmlChar * mode,
const xmlChar * modeURI)
void	xsltCleanupTemplates		(xsltStylesheetPtr style)
xsltCompMatchPtr	xsltCompilePattern	(const xmlChar * pattern, 
xmlDocPtr doc,
xmlNodePtr node,
xsltStylesheetPtr style,
xsltTransformContextPtr runtime)
void	xsltFreeCompMatchList		(xsltCompMatchPtr comp)
void	xsltFreeTemplateHashes		(xsltStylesheetPtr style)
xsltTemplatePtr	xsltGetTemplate		(xsltTransformContextPtr ctxt, 
xmlNodePtr node,
xsltStylesheetPtr style)
int	xsltMatchPattern		(xsltTransformContextPtr ctxt, 
xmlNodePtr node,
const xmlChar * pattern,
xmlDocPtr ctxtdoc,
xmlNodePtr ctxtnode)
void	xsltNormalizeCompSteps		(void * payload, 
void * data,
const xmlChar * name)
int	xsltTestCompMatchList		(xsltTransformContextPtr ctxt, 
xmlNodePtr node,
xsltCompMatchPtr comp)

Description

Structure xsltCompMatch

Structure xsltCompMatch
struct _xsltCompMatch { The content of this structure is not made public by the API. }

Function: xsltAddTemplate

int	xsltAddTemplate			(xsltStylesheetPtr style, 
xsltTemplatePtr cur,
const xmlChar * mode,
const xmlChar * modeURI)

Register the XSLT pattern associated to @cur

style:an XSLT stylesheet
cur:an XSLT template
mode:the mode name or NULL
modeURI:the mode URI or NULL
Returns:-1 in case of error, 0 otherwise

Function: xsltCleanupTemplates

void	xsltCleanupTemplates		(xsltStylesheetPtr style)

Cleanup the state of the templates used by the stylesheet and the ones it imports.

style:an XSLT stylesheet

Function: xsltCompilePattern

xsltCompMatchPtr	xsltCompilePattern	(const xmlChar * pattern, 
xmlDocPtr doc,
xmlNodePtr node,
xsltStylesheetPtr style,
xsltTransformContextPtr runtime)

Compile the XSLT pattern and generates a list of precompiled form suitable for fast matching. [1] Pattern ::= LocationPathPattern | Pattern '|' LocationPathPattern

pattern:an XSLT pattern
doc:the containing document
node:the containing element
style:the stylesheet
runtime:the transformation context, if done at run-time
Returns:the generated pattern list or NULL in case of failure

Function: xsltFreeCompMatchList

void	xsltFreeCompMatchList		(xsltCompMatchPtr comp)

Free up the memory allocated by all the elements of @comp

comp:an XSLT comp list

Function: xsltFreeTemplateHashes

void	xsltFreeTemplateHashes		(xsltStylesheetPtr style)

Free up the memory used by xsltAddTemplate/xsltGetTemplate mechanism

style:an XSLT stylesheet

Function: xsltGetTemplate

xsltTemplatePtr	xsltGetTemplate		(xsltTransformContextPtr ctxt, 
xmlNodePtr node,
xsltStylesheetPtr 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.

ctxt:a XSLT process context
node:the node being processed
style:the current style
Returns:the xsltTemplatePtr or NULL if not found

Function: xsltMatchPattern

int	xsltMatchPattern		(xsltTransformContextPtr ctxt, 
xmlNodePtr node,
const xmlChar * pattern,
xmlDocPtr ctxtdoc,
xmlNodePtr ctxtnode)

ctxt:
node:
pattern:
ctxtdoc:
ctxtnode:
Returns:

Function: xsltNormalizeCompSteps

void	xsltNormalizeCompSteps		(void * payload, 
void * data,
const xmlChar * name)

This is a hashtable scanner function to normalize the compiled steps of an imported stylesheet.

payload:pointer to template hash table entry
data:pointer to the stylesheet
name:template match name

Function: xsltTestCompMatchList

int	xsltTestCompMatchList		(xsltTransformContextPtr ctxt, 
xmlNodePtr node,
xsltCompMatchPtr comp)

Test whether the node matches one of the patterns in the list

ctxt:a XSLT process context
node:a node
comp:the precompiled pattern list
Returns:1 if it matches, 0 if it doesn't and -1 in case of failure

Daniel Veillard