Package com.volantis.xml.expression

Examples of com.volantis.xml.expression.PositionScope


                SimplePositionScope.class);
    }

    // javadoc inherited
    public void popPositionScope() {
        final PositionScope previous =
                ((SimplePositionScope)propertyContainer.getProperty(
                                SimplePositionScope.class)).getPrevious();

        if (previous == null) {
            throw new IllegalStateException(
View Full Code Here


        // with the same name.
        expressionContext.pushBlockScope();

        // Push a new position scope to track the iteration position
        expressionContext.pushPositionScope();
        PositionScope pc = expressionContext.getPositionScope();

        // Declare an unitialized variable.
        InternalExpressionScope scope = (InternalExpressionScope)
                expressionContext.getCurrentScope();
        Variable variable = scope.declareVariable(variableName);

        // Iterate over the sequence.
        int length = sequence.getLength();

        for (int i = 1; i <= length; i += 1) {
            // Increment to the next position in the sequence
            pc.increment();

            // Get the item.
            try {
                variable.setValue(sequence.getItem(i));
            } catch (SequenceIndexOutOfBoundsException e) {
View Full Code Here

                            new Object[]{new Integer(arguments.length),
                                         new Integer(0)}));
        }

        // This should never return a null value
        PositionScope pc = ((InternalExpressionContext)context).
                getPositionScope();

        return context.getFactory().createIntValue(pc.get());
    }
View Full Code Here

TOP

Related Classes of com.volantis.xml.expression.PositionScope

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.