Package net.sf.saxon.expr

Examples of net.sf.saxon.expr.VariableReference


    public Expression bindVariable(StructuredQName qName) throws XPathException {
        XPathVariable var = variables.get(qName);
        if (var==null) {
            if (autoDeclare) {
                return new VariableReference(declareVariable(qName));
            } else {
                throw new XPathException("Undeclared variable in XPath expression: $" + qName.getClarkName());
            }
        } else {
            return new VariableReference(var);
        }
    }
View Full Code Here


    public final Expression bindVariable(StructuredQName qName) throws XPathException {
        // bindVariable is called at compile time, but the JAXP variable resolver
        // is designed to be called at run time. So we need to create a variable now,
        // which will call the variableResolver when called upon to return the run-time value
        if (variableResolver != null) {
            return new VariableReference(new JAXPVariable(qName, variableResolver));
        } else {
            throw new XPathException(
                    "Variable is used in XPath expression, but no JAXP VariableResolver is available");
        }
    }
View Full Code Here

    public VariableReference bindVariable(StructuredQName qName) throws XPathException {
        XPathVariable var = (XPathVariable)variables.get(qName);
        if (var==null) {
            throw new XPathException("Undeclared variable in a standalone expression");
        } else {
            return new VariableReference(var);
        }
    }
View Full Code Here

     * @throws XPathException if the variable has not been declared
    */

    public VariableReference bindVariable(StructuredQName qName) throws XPathException {
        XSLVariableDeclaration xslVariableDeclaration = element.bindVariable(qName);
        VariableReference var = new VariableReference();
        xslVariableDeclaration.registerReference(var);
        return var;
    }
View Full Code Here

    public final VariableReference bindVariable(StructuredQName qName) throws XPathException {
        // bindVariable is called at compile time, but the JAXP variable resolver
        // is designed to be called at run time. So we need to create a variable now,
        // which will call the variableResolver when called upon to return the run-time value
        if (variableResolver != null) {
            return new VariableReference(new JAXPVariable(qName, variableResolver));
        } else {
            throw new XPathException(
                    "Variable is used in XPath expression, but no JAXP VariableResolver is available");
        }
    }
View Full Code Here

TOP

Related Classes of net.sf.saxon.expr.VariableReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.