| Gnome XSLT Library Reference Manual |
|---|
templates —
int xsltEvalXPathPredicate (xsltTransformContextPtr ctxt,xmlXPathCompExprPtr comp,xmlNsPtr *nsList, int nsNr);xmlChar * xsltEvalTemplateString (xsltTransformContextPtr ctxt,xmlNodePtr node,xmlNodePtr parent);xmlChar * xsltEvalAttrValueTemplate (xsltTransformContextPtr ctxt,xmlNodePtr node, constxmlChar *name, constxmlChar *ns);xmlChar * xsltEvalStaticAttrValueTemplate (xsltStylesheetPtr style,xmlNodePtr node, constxmlChar *name, constxmlChar *ns, int *found);xmlChar * xsltEvalXPathString (xsltTransformContextPtr ctxt,xmlXPathCompExprPtr comp);xmlChar * xsltEvalXPathStringNs (xsltTransformContextPtr ctxt,xmlXPathCompExprPtr comp, int nsNr,xmlNsPtr *nsList);xmlNodePtr * xsltTemplateProcess (xsltTransformContextPtr ctxt,xmlNodePtr node);xmlAttrPtr xsltAttrListTemplateProcess (xsltTransformContextPtr ctxt,xmlNodePtr target,xmlAttrPtr cur);xmlAttrPtr xsltAttrTemplateProcess (xsltTransformContextPtr ctxt,xmlNodePtr target,xmlAttrPtr attr);xmlChar * xsltAttrTemplateValueProcess (xsltTransformContextPtr ctxt, constxmlChar *attr);xmlChar * xsltAttrTemplateValueProcessNode (xsltTransformContextPtr ctxt, constxmlChar *str,xmlNodePtr node);
int xsltEvalXPathPredicate (xsltTransformContextPtr ctxt,xmlXPathCompExprPtr comp,xmlNsPtr *nsList, int nsNr);
Process the expression using XPath and evaluate the result as an XPath predicate
| ctxt : | the XSLT transformation context |
| comp : | the XPath compiled expression |
| nsList : | the namespaces in scope |
| nsNr : | the number of namespaces in scope |
| Returns : | 1 is the predicate was true, 0 otherwise |
xmlChar * xsltEvalTemplateString (xsltTransformContextPtr ctxt,xmlNodePtr node,xmlNodePtr parent);
Evaluate a template string value, i.e. the parent list is interpreter as template content and the resulting tree string value is returned This is needed for example by xsl:comment and xsl:processing-instruction
| ctxt : | the XSLT transformation context |
| node : | the stylesheet node |
| parent : | the content parent |
| Returns : | the computed string value or NULL, must be deallocated by the caller. |
xmlChar * xsltEvalAttrValueTemplate (xsltTransformContextPtr ctxt,xmlNodePtr node, constxmlChar *name, constxmlChar *ns);
Evaluate a attribute value template, i.e. the attribute value can contain expressions contained in curly braces ({}) and those are substituted by they computed value.
| ctxt : | the XSLT transformation context |
| node : | the stylesheet node |
| name : | the attribute QName |
| ns : | the attribute namespace URI |
| Returns : | the computed string value or NULL, must be deallocated by the caller. |
xmlChar * xsltEvalStaticAttrValueTemplate (xsltStylesheetPtr style,xmlNodePtr node, constxmlChar *name, constxmlChar *ns, int *found);
Check if an attribute value template has a static value, i.e. the attribute value does not contain expressions contained in curly braces ({})
| style : | the XSLT stylesheet |
| node : | the stylesheet node |
| name : | the attribute Name |
| ns : | the attribute namespace URI |
| found : | indicator whether the attribute is present |
| Returns : | the static string value or NULL, must be deallocated by the caller. |
xmlChar * xsltEvalXPathString (xsltTransformContextPtr ctxt,xmlXPathCompExprPtr comp);
Process the expression using XPath and get a string
| ctxt : | the XSLT transformation context |
| comp : | the compiled XPath expression |
| Returns : | the computed string value or NULL, must be deallocated by the caller. |
xmlChar * xsltEvalXPathStringNs (xsltTransformContextPtr ctxt,xmlXPathCompExprPtr comp, int nsNr,xmlNsPtr *nsList);
Process the expression using XPath, allowing to pass a namespace mapping context and get a string
| ctxt : | the XSLT transformation context |
| comp : | the compiled XPath expression |
| nsNr : | the number of namespaces in the list |
| nsList : | the list of in-scope namespaces to use |
| Returns : | the computed string value or NULL, must be deallocated by the caller. |
xmlNodePtr * xsltTemplateProcess (xsltTransformContextPtr ctxt,xmlNodePtr node);
Process the given node and return the new string value.
| ctxt : | the XSLT transformation context |
| node : | the attribute template node |
| Returns : | the computed tree replacement |
xmlAttrPtr xsltAttrListTemplateProcess (xsltTransformContextPtr ctxt,xmlNodePtr target,xmlAttrPtr cur);
Do a copy of an attribute list with attribute template processing
| ctxt : | the XSLT transformation context |
| target : | the element where the attributes will be grafted |
| cur : | the first attribute |
| Returns : | a new xmlAttrPtr, or NULL in case of error. |
xmlAttrPtr xsltAttrTemplateProcess (xsltTransformContextPtr ctxt,xmlNodePtr target,xmlAttrPtr attr);
Process the given attribute and return the new processed copy.
| ctxt : | the XSLT transformation context |
| target : | the result node |
| attr : | |
| Returns : | the attribute replacement. |
xmlChar * xsltAttrTemplateValueProcess (xsltTransformContextPtr ctxt, constxmlChar *attr);
Process the given node and return the new string value.
| ctxt : | the XSLT transformation context |
| attr : | |
| Returns : | the computed string value or NULL, must be deallocated by the caller. |
xmlChar * xsltAttrTemplateValueProcessNode (xsltTransformContextPtr ctxt, constxmlChar *str,xmlNodePtr node);
Process the given string, allowing to pass a namespace mapping context and return the new string value.
| ctxt : | the XSLT transformation context |
| str : | the attribute template node value |
| node : | the node hosting the attribute |
| Returns : | the computed string value or NULL, must be deallocated by the caller. |
| << pattern | transform >> |