Lines Matching full:variable
2 * variables.c: Implementation of the variable storage and lookup
127 * insinde an xsl:variable and xsl:param to the lifetime of the
163 * When evaluating "select" expressions of xsl:variable
165 * to the variable itself; otherwise the tragment will be
298 * global variable or a doc acquired via the
558 * Example: The fragment of the variable must not be freed
561 * <xsl:variable name="bar">
563 * </xsl:variable>
576 * Cache or free the variable structure.
638 * First lookup expects the variable name and URI to
681 * @name: the variable name
682 * @nameURI: the variable namespace URI
684 * Checks whether a variable or param is already defined.
689 * Returns 1 if variable is present, 2 if param is present, 3 if this
786 * @variable: the variable or parameter item
789 * Evaluate a variable value.
794 xsltEvalVariable(xsltTransformContextPtr ctxt, xsltStackElemPtr variable,
806 if ((ctxt == NULL) || (variable == NULL))
810 * A variable or parameter are evaluated on demand; thus the
818 "Evaluating variable '%s'\n", variable->name));
820 if (variable->select != NULL) {
832 xpExpr = xmlXPathCompile(variable->select);
859 * <xsl:variable name="pos" select="position()"/>
866 * the variable needs to be evaluated in the context of
891 * then those need to be stored inside the variable; otherwise
893 * we leave the scope of the variable.
895 ctxt->contextVariable = variable;
896 variable->flags |= XSLT_VAR_IN_SELECT;
900 variable->flags ^= XSLT_VAR_IN_SELECT;
918 "Failed to evaluate the expression of variable '%s'.\n",
919 variable->name);
933 if (variable->tree == NULL) {
936 if (variable->tree) {
951 * is not directly dependant of the param/variable itself.
956 * Attach the Result Tree Fragment to the variable;
957 * when the variable is freed, it will also free
960 variable->fragment = container;
967 ctxt->contextVariable = variable;
969 * Process the sequence constructor (variable->tree).
972 xsltApplyOneTemplate(ctxt, ctxt->node, variable->tree,
1009 * @elem: the variable or parameter
1012 * Evaluates a the value of a global xsl:variable or
1038 "Evaluating global variable %s\n", elem->name));
1081 * variable value is evaluated with the same context as that used
1138 "Evaluating global variable %s failed\n", elem->name);
1141 "Evaluating global variable %s failed\n", elem->name);
1279 "Global variable %s already defined\n", elem->name);
1301 * @name: the variable name
1302 * @ns_uri: the variable namespace URI
1308 * Register a new variable value. If @value is NULL it unregisters
1309 * the variable
1332 "Defining global variable %s\n", name);
1357 "redefinition of global variable %s\n", elem->name);
1383 * parameter/variable table without any change.
1513 * variable value is evaluated with the same context as that used
1560 * global variable/parameter hash table.
1672 * variable/parameter hash table.
1697 * context's global variable/parameter hash table.
1716 * Computes a new variable value.
1735 "Building variable %s", comp->name));
1760 * @comp: the compiled XSLT-variable (or param) instruction
1764 * Computes and registers a new variable.
1780 xsltStackElemPtr variable;
1794 "XSLT-variable: Redefinition of variable '%s'.\n", comp->name);
1812 variable = xsltBuildVariable(ctxt, (xsltStylePreCompPtr) comp, tree);
1813 xsltAddStackElem(ctxt, variable);
1820 * @name: the variable name
1821 * @ns_uri: the variable namespace URI
1823 * Search in the Variable
1824 * variable value.
1835 * Lookup the global variables in XPath global variable hash table
1844 "global variable not found %s\n", name));
1867 * @name: the variable name
1868 * @ns_uri: the variable namespace URI
1870 * Search in the Variable array of the context for the given
1871 * variable value.
1890 "uncomputed variable %s\n", name));
1899 "variable not found %s\n", name));
1974 * @cur: the "variable" element
1976 * Parses a global XSLT 'variable' declaration at compilation time
2003 "xsl:variable : compilation failed\n");
2009 "xsl:variable : missing name attribute\n");
2014 * Parse the content (a sequence constructor) of xsl:variable.
2025 "Registering global variable %s\n", comp->name);
2099 * @inst: the xsl:variable instruction element
2101 * Registers a local XSLT 'variable' instruction at transformation time
2120 "The XSLT 'variable' instruction was not compiled.\n");
2132 "Registering variable '%s'\n", comp->name));
2190 * @name: the variable name
2191 * @ns_uri: the variable namespace URI
2209 "Lookup variable '%s'\n", name));
2218 * First lookup expects the variable name and URI to
2223 xsltStackElemPtr variable = NULL, cur;
2231 variable = cur;
2240 * global variable, then this will be also executed.
2255 variable = cur;
2264 if (variable) {
2265 if (variable->computed == 0) {
2269 "uncomputed variable '%s'\n", name));
2271 variable->value = xsltEvalVariable(tctxt, variable, NULL);
2272 variable->computed = 1;
2274 if (variable->value != NULL) {
2275 valueObj = xmlXPathObjectCopy(variable->value);
2291 "variable not found '%s'\n", name));
2296 "Variable '{%s}%s' has not been declared.\n", ns_uri, name);
2299 "Variable '%s' has not been declared.\n", name);
2305 "found variable '%s'\n", name));