Examples of ImmutableExpandedName


Examples of com.volantis.xml.namespace.ImmutableExpandedName

        factory = ExpressionFactory.getDefaultInstance();
    }

    public void testGetName() throws Exception {
        ExpandedName name = new ImmutableExpandedName("uri://",
                                                      "fred");
        ExpandedName other = new MutableExpandedName("uri://",
                                                     "jim");
        Value value = new SimpleStringValue(factory, "hello");
        Variable nameVar = new SimpleVariable(factory,
View Full Code Here

Examples of com.volantis.xml.namespace.ImmutableExpandedName

        assertTrue("name for otherVar not immutable",
                   otherVar.getName() instanceof ImmutableExpandedName);
    }

    public void testGetValue() throws Exception {
        ExpandedName name = new ImmutableExpandedName("uri://",
                                                      "fred");
        ExpandedName other = new MutableExpandedName("uri://",
                                                     "jim");
        Value value = new SimpleStringValue(factory, "hello");
        Variable nameVar = new SimpleVariable(factory,
View Full Code Here

Examples of com.volantis.xml.namespace.ImmutableExpandedName

public class TokenizeFunctionTestCase extends PipelineTestAbstract {


    // javadoc inherited
    public void registerExpressionFunctions(ExpressionContext context) {
        context.registerFunction(new ImmutableExpandedName(
                Namespace.PIPELINE.getURI(), "tokenize"),
                new TokenizeFunction()
        );
    }
View Full Code Here

Examples of com.volantis.xml.namespace.ImmutableExpandedName

                   scopeB.getEnclosingScope());
    }

    public void testDeclareVariable() throws Exception {

        ExpandedName nameX = new ImmutableExpandedName("", "x");
        ExpandedName nameY = new ImmutableExpandedName("", "y");
        ExpandedName nameX2 = new ImmutableExpandedName("http://myNamespace",
                                                        "x");
        Value x = factory.createStringValue("x");
        Value y = factory.createStringValue("y");
        Value x2 = factory.createStringValue("x2");
View Full Code Here

Examples of com.volantis.xml.namespace.ImmutableExpandedName

        }
    }

    public void testResolveVariable() throws Exception {

        ExpandedName nameX = new ImmutableExpandedName("", "x");
        ExpandedName nameY = new ImmutableExpandedName("", "y");
        ExpandedName nameX2 = new ImmutableExpandedName("http://myNamespace",
                                                        "x");
        ExpandedName duff = new ImmutableExpandedName("http://myNamespace",
                                                      "duff");
        Value x = factory.createStringValue("x");
        Value y = factory.createStringValue("y");
        Value x2 = factory.createStringValue("x2");
View Full Code Here

Examples of com.volantis.xml.namespace.ImmutableExpandedName

        Item[] items = new Item[3];
        items[0] = factory.createStringValue("a");
        items[1] = factory.createStringValue("b");
        items[2] = factory.createStringValue("c");    
        context.getCurrentScope().declareVariable(
                   new ImmutableExpandedName("", "myVar"),
                   factory.createSequence(items));
       Expression exp = compileExpression("$myVar=(\"a\",\"b\",\"c\")");
       Value result = exp.evaluate(context);   
 
       assertTrue("Sequence comparison failed :" +
View Full Code Here

Examples of com.volantis.xml.namespace.ImmutableExpandedName

        Item[] right = {factory.createDoubleValue(2.2),
                 factory.createIntValue(42),
                 factory.createDoubleValue(10101010)};

        context.getCurrentScope().declareVariable(
            new ImmutableExpandedName("", "left"),
            factory.createSequence(left));
        context.getCurrentScope().declareVariable(
            new ImmutableExpandedName("", "right"),
            factory.createSequence(right));

        Expression exp = compileExpression("$left = (($right))");
        Value result = exp.evaluate(context);     
        assertTrue("Nested variable comparison failed",
View Full Code Here

Examples of com.volantis.xml.namespace.ImmutableExpandedName

    public void testQualifiedVariableEvaluate() throws Exception {
        NamespacePrefixTracker manager = context.getNamespacePrefixTracker();
        manager.startPrefixMapping("p", "http://myNamespace");

        context.getCurrentScope().declareVariable(
                new ImmutableExpandedName("http://myNamespace",
                                          "var"),
                result);

        Expression exp = compileExpression("$p:var");
View Full Code Here

Examples of com.volantis.xml.namespace.ImmutableExpandedName

     * Ensures that an unqualified variable reference can be evaluated
     * @throws Exception if an error occurs
     */
    public void testUnqualifiedVariableEvaluate() throws Exception {
        context.getCurrentScope().declareVariable(
                new ImmutableExpandedName("", "myVar"),
                result);

        Expression exp = compileExpression("$myVar");

        assertTrue("Variable expression evaluation failed",
View Full Code Here

Examples of com.volantis.xml.namespace.ImmutableExpandedName

        items[0] = factory.createStringValue("a");
        items[1] = factory.createStringValue("b");
        items[2] = factory.createStringValue("c");

        context.getCurrentScope().declareVariable(
                new ImmutableExpandedName("", "myVar"),
                factory.createSequence(items));

        Expression exp = compileExpression("$myVar[1]");

        assertTrue("Variable expression evaluation failed",
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.