pattern

Name

pattern -- 

Synopsis



struct      xsltCompMatch;
typedef     xsltCompMatchPtr;
xsltCompMatchPtr xsltCompilePattern         (const xmlChar *pattern,
                                             xmlDocPtr doc,
                                             xmlNodePtr node,
                                             xsltStylesheetPtr style,
                                             xsltTransformContextPtr runtime);
void        xsltFreeCompMatchList           (xsltCompMatchPtr comp);
int         xsltTestCompMatchList           (xsltTransformContextPtr ctxt,
                                             xmlNodePtr node,
                                             xsltCompMatchPtr comp);
int         xsltAddTemplate                 (xsltStylesheetPtr style,
                                             xsltTemplatePtr cur,
                                             const xmlChar *mode,
                                             const xmlChar *modeURI);
xsltTemplatePtr xsltGetTemplate             (xsltTransformContextPtr ctxt,
                                             xmlNodePtr node,
                                             xsltStylesheetPtr style);
void        xsltFreeTemplateHashes          (xsltStylesheetPtr style);
void        xsltCleanupTemplates            (xsltStylesheetPtr style);
int         xsltMatchPattern                (xsltTransformContextPtr ctxt,
                                             xmlNodePtr node,
                                             const xmlChar *pattern,
                                             xmlDocPtr ctxtdoc,
                                             xmlNodePtr ctxtnode);

Description

Details

struct xsltCompMatch

struct xsltCompMatch;

Data structure used for the implementation of patterns. It is kept private (in pattern.c).


xsltCompMatchPtr

typedef xsltCompMatch *xsltCompMatchPtr;


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


xsltFreeCompMatchList ()

void        xsltFreeCompMatchList           (xsltCompMatchPtr comp);

Free up the memory allocated by all the elements of comp


xsltTestCompMatchList ()

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

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


xsltAddTemplate ()

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

Register the XSLT pattern associated to cur


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.


xsltFreeTemplateHashes ()

void        xsltFreeTemplateHashes          (xsltStylesheetPtr style);

Free up the memory used by xsltAddTemplate/xsltGetTemplate mechanism


xsltCleanupTemplates ()

void        xsltCleanupTemplates            (xsltStylesheetPtr style);

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


xsltMatchPattern ()

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

Determine if a node matches a pattern.