Gnome XSLT Library Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# variables

## Name

variables --

## Synopsis

    #define     XSLT_REGISTER_VARIABLE_LOOKUP   (ctxt)
    int         xsltEvalGlobalVariables         (xsltTransformContextPtr ctxt);
    void        xsltPushStack                   (xsltTransformContextPtr ctxt);
    void        xsltPopStack                    (xsltTransformContextPtr ctxt);
    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        xsltFreeVariableHashes          (xsltTransformContextPtr ctxt);
    xmlXPathObjectPtr xsltVariableLookup        (xsltTransformContextPtr ctxt,
                                                 const xmlChar *name,
                                                 const xmlChar *ns_uri);
    int         xsltRegisterVariable            (xsltTransformContextPtr ctxt,
                                                 const xmlChar *name,
                                                 const xmlChar *ns_uri,
                                                 const xmlChar *select,
                                                 xmlNodePtr tree,
                                                 int param);
    xmlXPathObjectPtr xsltXPathVariableLookup   (void *ctxt,
                                                 const xmlChar *name,
                                                 const xmlChar *ns_uri);

## Description

## Details

### XSLT_REGISTER_VARIABLE_LOOKUP()

    #define     XSLT_REGISTER_VARIABLE_LOOKUP(ctxt)

`ctxt` : |

### xsltEvalGlobalVariables ()

    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

### xsltPushStack ()

    void        xsltPushStack                   (xsltTransformContextPtr ctxt);

`ctxt` : |

### xsltPopStack ()

    void        xsltPopStack                    (xsltTransformContextPtr ctxt);

`ctxt` : |

### xsltParseGlobalVariable ()

    void        xsltParseGlobalVariable         (xsltStylesheetPtr style,
                                                 xmlNodePtr cur);

parse an XSLT transformation variable declaration and record its value.

`style` : | the XSLT stylesheet
`cur` : | the "variable" element

### xsltParseGlobalParam ()

    void        xsltParseGlobalParam            (xsltStylesheetPtr style,
                                                 xmlNodePtr cur);

parse an XSLT transformation param declaration and record its value.

`style` : | the XSLT stylesheet
`cur` : | the "param" element

### xsltParseStylesheetVariable ()

    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

### xsltParseStylesheetParam ()

    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

### xsltParseStylesheetCallerParam ()

    xsltStackElemPtr xsltParseStylesheetCallerParam
                                                (xsltTransformContextPtr ctxt,
                                                 xmlNodePtr cur);

parse an XSLT transformation param declaration, compute its value but doesn't record it.

It returns the new xsltStackElemPtr or NULL

`ctxt` : | the XSLT transformation context
`cur` : | the "param" element
Returns : |

### xsltAddStackElemList ()

    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.

### xsltFreeVariableHashes ()

    void        xsltFreeVariableHashes          (xsltTransformContextPtr ctxt);

`ctxt` : |

### xsltVariableLookup ()

    xmlXPathObjectPtr xsltVariableLookup        (xsltTransformContextPtr ctxt,
                                                 const xmlChar *name,
                                                 const xmlChar *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

### xsltRegisterVariable ()

    int         xsltRegisterVariable            (xsltTransformContextPtr ctxt,
                                                 const xmlChar *name,
                                                 const xmlChar *ns_uri,
                                                 const xmlChar *select,
                                                 xmlNodePtr tree,
                                                 int param);

Computes and register a new variable value.

`ctxt` : | the XSLT transformation context
`name` : | the variable name
`ns_uri` : | the variable namespace URI
`select` : | the expression which need to be evaluated to generate a value
`tree` : | the tree if select is NULL
`param` : | this is a parameter actually
Returns : | 0 in case of success, -1 in case of error

### xsltXPathVariableLookup ()

    xmlXPathObjectPtr xsltXPathVariableLookup   (void *ctxt,
                                                 const xmlChar *name,
                                                 const xmlChar *ns_uri);

`ctxt` : |
`name` : |
`ns_uri` : |
Returns : |

<<< Previous Page | Home | Up | Next Page >>>
namespaces | keys