![]() | ![]() | ![]() | Gnome XSLT Library Reference Manual | ![]() |
---|
variables —
#define XSLT_REGISTER_VARIABLE_LOOKUP (ctxt) int xsltEvalGlobalVariables (xsltTransformContextPtr ctxt); int xsltEvalUserParams (xsltTransformContextPtr ctxt, const char **params); int xsltQuoteUserParams (xsltTransformContextPtr ctxt, const char **params); int xsltEvalOneUserParam (xsltTransformContextPtr ctxt, constxmlChar *name, constxmlChar *value); int xsltQuoteOneUserParam (xsltTransformContextPtr ctxt, constxmlChar *name, constxmlChar *value); void xsltParseGlobalVariable (xsltStylesheetPtr style,xmlNodePtr cur); void xsltParseGlobalParam (xsltStylesheetPtr style,xmlNodePtr cur); void xsltParseStylesheetVariable (xsltTransformContextPtr ctxt,xmlNodePtr cur); void xsltParseStylesheetParam (xsltTransformContextPtr ctxt,xmlNodePtr cur); xsltStackElemPtr xsltParseStylesheetCallerParam (xsltTransformContextPtr ctxt,xmlNodePtr cur); int xsltAddStackElemList (xsltTransformContextPtr ctxt, xsltStackElemPtr elems); void xsltFreeGlobalVariables (xsltTransformContextPtr ctxt);xmlXPathObjectPtr xsltVariableLookup (xsltTransformContextPtr ctxt, constxmlChar *name, constxmlChar *ns_uri);xmlXPathObjectPtr xsltXPathVariableLookup (void *ctxt, constxmlChar *name, constxmlChar *ns_uri);
#define XSLT_REGISTER_VARIABLE_LOOKUP(ctxt)
Registering macro, not general purpose at all but used in different modules.
ctxt : |
int xsltEvalGlobalVariables (xsltTransformContextPtr ctxt);
Evaluate the global variables of a stylesheet. This need to be done on parsed stylesheets before starting to apply transformations
ctxt : | the XSLT transformation context |
Returns : | 0 in case of success, -1 in case of error |
int xsltEvalUserParams (xsltTransformContextPtr ctxt, const char **params);
ctxt: the XSLT transformation context params: a NULL terminated array of parameters name/value tuples
Evaluate the global variables of a stylesheet. This needs to be done on parsed stylesheets before starting to apply transformations. Each of the parameters is evaluated as an XPath expression and stored in the global variables/parameter hash table. If you want your parameter used literally, use xsltQuoteUserParams.
ctxt : | |
params : | |
Returns : | 0 in case of success, -1 in case of error |
int xsltQuoteUserParams (xsltTransformContextPtr ctxt, const char **params);
ctxt: the XSLT transformation context params: a NULL terminated arry of parameters names/values tuples
Similar to xsltEvalUserParams, but the values are treated literally and are * *not* evaluated as XPath expressions. This should be done on parsed stylesheets before starting to apply transformations.
ctxt : | |
params : | |
Returns : | 0 in case of success, -1 in case of error. |
int xsltEvalOneUserParam (xsltTransformContextPtr ctxt, constxmlChar *name, constxmlChar *value);
This is normally called from xsltEvalUserParams to process a single parameter from a list of parameters. The value is evaluated as an XPath expression and the result is stored in the context's global variable/parameter hash table.
To have a parameter treated literally (not as an XPath expression) use xsltQuoteUserParams (or xsltQuoteOneUserParam). For more details see description of xsltProcessOneUserParamInternal.
ctxt : | the XSLT transformation context |
name : | a null terminated string giving the name of the parameter |
value : | a null terminated string giving the XPath expression to be evaluated |
Returns : | 0 in case of success, -1 in case of error. |
int xsltQuoteOneUserParam (xsltTransformContextPtr ctxt, constxmlChar *name, constxmlChar *value);
This is normally called from xsltQuoteUserParams to process a single parameter from a list of parameters. The value is stored in the context's global variable/parameter hash table.
ctxt : | the XSLT transformation context |
name : | a null terminated string giving the name of the parameter |
value : | a null terminated string giving the parameter value |
Returns : | 0 in case of success, -1 in case of error. |
void xsltParseGlobalVariable (xsltStylesheetPtr style,xmlNodePtr cur);
parse an XSLT transformation variable declaration and record its value.
style : | the XSLT stylesheet |
cur : | the "variable" element |
void xsltParseGlobalParam (xsltStylesheetPtr style,xmlNodePtr cur);
parse an XSLT transformation param declaration and record its value.
style : | the XSLT stylesheet |
cur : | the "param" element |
void xsltParseStylesheetVariable (xsltTransformContextPtr ctxt,xmlNodePtr cur);
parse an XSLT transformation variable declaration and record its value.
ctxt : | the XSLT transformation context |
cur : | the "variable" element |
void xsltParseStylesheetParam (xsltTransformContextPtr ctxt,xmlNodePtr cur);
parse an XSLT transformation param declaration and record its value.
ctxt : | the XSLT transformation context |
cur : | the "param" element |
xsltStackElemPtr xsltParseStylesheetCallerParam (xsltTransformContextPtr ctxt,xmlNodePtr cur);
parse an XSLT transformation param declaration, compute its value but doesn't record it.
ctxt : | the XSLT transformation context |
cur : | the "param" element |
Returns : | the new xsltStackElemPtr or NULL |
int xsltAddStackElemList (xsltTransformContextPtr ctxt, xsltStackElemPtr elems);
add the new element list at this level of the stack.
ctxt : | xn XSLT transformation context |
elems : | a stack element list |
Returns : | 0 in case of success, -1 in case of failure. |
void xsltFreeGlobalVariables (xsltTransformContextPtr ctxt);
Free up the data associated to the global variables its value.
ctxt : | the XSLT transformation context |
xmlXPathObjectPtr xsltVariableLookup (xsltTransformContextPtr ctxt, constxmlChar *name, constxmlChar *ns_uri);
Search in the Variable array of the context for the given variable value.
ctxt : | the XSLT transformation context |
name : | the variable name |
ns_uri : | the variable namespace URI |
Returns : | the value or NULL if not found |
xmlXPathObjectPtr xsltXPathVariableLookup (void *ctxt, constxmlChar *name, constxmlChar *ns_uri);
This is the entry point when a varibale is needed by the XPath interpretor.
ctxt : | a void * but the the XSLT transformation context actually |
name : | the variable name |
ns_uri : | the variable namespace URI |
Returns : | the value or NULL if not found |
<< namespaces | keys >> |