Package client.net.sf.saxon.ce.om

Examples of client.net.sf.saxon.ce.om.ValueRepresentation


    public ValueRepresentation evaluateVariable(XPathContext context) throws XPathException {
        final Controller controller = context.getController();
        final Bindery b = controller.getBindery();

        final ValueRepresentation v = b.getGlobalVariable(getSlotNumber());

        if (v != null) {
            return v;
        } else {
            return actuallyEvaluate(context);
View Full Code Here


            if (!go) {
                // some other thread has evaluated the variable while we were waiting
                return b.getGlobalVariable(getSlotNumber());
            }

            ValueRepresentation value = getSelectValue(context);
            return b.saveGlobalVariableValue(this, value);

        } catch (XPathException err) {
            b.setNotExecuting(this);
            if (err instanceof XPathException.Circularity) {
View Full Code Here

    /**
    * Get the value of the range variable
    */

    public ValueRepresentation evaluateVariable(XPathContext context) throws XPathException {
        ValueRepresentation actual = context.evaluateLocalVariable(slotNumber);
        if (actual instanceof MemoClosure && ((MemoClosure)actual).isFullyRead()) {
            actual = ((MemoClosure)actual).materialize();
            context.setLocalVariable(slotNumber, actual);
        }
        return actual;
View Full Code Here

        } catch (XPathException e) {
            e.maybeSetLocation(getSourceLocator());
            throw e;
        }

        ValueRepresentation val = b.getGlobalVariableValue(this);
        if (wasSupplied || val!=null) {
            return val;
        } else {
            if (isRequiredParam()) {
                dynamicError("No value supplied for required global parameter $" +
View Full Code Here

     */

     public Expression simplify(ExpressionVisitor visitor) throws XPathException {
        operand = visitor.simplify(operand);
        if (operand instanceof Literal) {
            ValueRepresentation val = SequenceExtent.makeSequenceExtent(
                    iterate(visitor.getStaticContext().makeEarlyEvaluationContext()));
            return Literal.makeLiteral(Value.asValue(val));
        }
        return this;
    }
View Full Code Here

    /**
     * Evaluate the pattern - it should normally be ixsl:window() - uses
     * local variable to cache value so it can be used for a match test
     */
    public JavaScriptObject evaluate(XPathContext context) throws XPathException{
      ValueRepresentation valueRep = (ValueRepresentation)expression.evaluateItem(context);
      val = (JavaScriptObject)IXSLFunction.convertToJavaScript(valueRep);
      return val;
    }
View Full Code Here

  public Object getParameter(String namespaceURI, String localName) {
    String ns = (namespaceURI == null)? "" : namespaceURI;
    try {
     
      StructuredQName qn = new StructuredQName("", ns, localName);
      ValueRepresentation vr = controller.getParameter(qn);
      return IXSLFunction.convertToJavaScript(vr);
    } catch(Exception e) {
      Xslt20ProcessorImpl.handleException(e, "getParameter");
    }
    return null;
View Full Code Here

    public SequenceIterator iterate(XPathContext context) throws XPathException {
        // minimize stack consumption by evaluating nested LET expressions iteratively
        LetExpression let = this;
        while (true) {
            ValueRepresentation val = let.eval(context);
            context.setLocalVariable(let.getLocalSlotNumber(), val);
            if (let.action instanceof LetExpression) {
                let = (LetExpression) let.action;
            } else {
                break;
View Full Code Here

    public Item evaluateItem(XPathContext context) throws XPathException {
        // minimize stack consumption by evaluating nested LET expressions iteratively
        LetExpression let = this;
        while (true) {
            ValueRepresentation val = let.eval(context);
            context.setLocalVariable(let.getLocalSlotNumber(), val);
            if (let.action instanceof LetExpression) {
                let = (LetExpression) let.action;
            } else {
                break;
View Full Code Here

    public void process(XPathContext context) throws XPathException {
        // minimize stack consumption by evaluating nested LET expressions iteratively
        LetExpression let = this;
        while (true) {
            ValueRepresentation val = let.eval(context);
            context.setLocalVariable(let.getLocalSlotNumber(), val);
            if (let.action instanceof LetExpression) {
                let = (LetExpression) let.action;
            } else {
                break;
View Full Code Here

TOP

Related Classes of client.net.sf.saxon.ce.om.ValueRepresentation

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.