Package com.volantis.xml.namespace

Examples of com.volantis.xml.namespace.DefaultNamespacePrefixTracker$State


        // @todo fix parameters
        context = new JXPathExpressionContext(
                factory,
                null,
                new DefaultNamespacePrefixTracker());
    }
View Full Code Here


    // javadoc inherited
    protected void setUp() throws Exception {
        super.setUp();
        // @todo later could use mock factory and namespace prefix tracker
        expressionFactory = new JXPathExpressionFactory();
        namespacePrefixTracker = new DefaultNamespacePrefixTracker();
        variables = new JXPathQualifiedVariables(expressionFactory,
                                                 namespacePrefixTracker);
    }
View Full Code Here

     * @return the expression context
     */
    private ExpressionContext createExpressionContext() {
        EnvironmentInteractionTracker eit =
                new SimpleEnvironmentInteractionTracker();
        NamespacePrefixTracker npt = new DefaultNamespacePrefixTracker();
        ExpressionContext context = ExpressionFactory.getDefaultInstance().
                createExpressionContext(eit, npt);
        return context;
    }
View Full Code Here

        super(name);
    }

    public void testGetUsedNamespaces() throws Exception {
        NamespacePrefixTracker namespacePrefixTracker =
            new DefaultNamespacePrefixTracker();
        JXPathFunctions functions =
            new JXPathFunctions(namespacePrefixTracker);
        ImmutableExpandedName nameA =
            new ImmutableExpandedName("http://spaceA",
                                      "a");
View Full Code Here

                     namespaceURLs);
    }

    public void testGetFunction() throws Exception {
        NamespacePrefixTracker namespacePrefixTracker =
            new DefaultNamespacePrefixTracker();
        JXPathFunctions functions =
            new JXPathFunctions(namespacePrefixTracker);
        ImmutableExpandedName nameA =
            new ImmutableExpandedName("http://spaceA",
                                      "a");
        ImmutableExpandedName nameB = new ImmutableExpandedName("", "b");
        ImmutableExpandedName nameC =
            new ImmutableExpandedName("http://spaceC",
                                      "c");
        Function a = new TestFunction();
        Function b = new TestFunction();

        functions.addFunction(nameA, a);
        functions.addFunction(nameB, b);

        // Add the non-default prefixes
        namespacePrefixTracker.startPrefixMapping("spaceA",
                                                  nameA.getNamespaceURI());
        namespacePrefixTracker.startPrefixMapping("spaceC",
                                                  nameC.getNamespaceURI());
       
        assertSame("function A",
                   a,
                   functions.getFunction("spaceA",
View Full Code Here

    public void testUnprefixedFunction() throws Exception {
        // create a function
        Function function = new TestFunction();
        // create a JXPathFunctions instance
        NamespacePrefixTracker namespacePrefixTracker =
            new DefaultNamespacePrefixTracker();
        JXPathFunctions functions =
            new JXPathFunctions(namespacePrefixTracker);

        ImmutableExpandedName eName = new ImmutableExpandedName("", "foo");
View Full Code Here

                   functions.getFunction(null, "foo", null));
    }

    public void testAddFunction() throws Exception {
        NamespacePrefixTracker namespacePrefixTracker =
            new DefaultNamespacePrefixTracker();
        JXPathFunctions functions =
            new JXPathFunctions(namespacePrefixTracker);
        ImmutableExpandedName nameA =
            new ImmutableExpandedName("http://spaceA",
                                      "a");
View Full Code Here

        final ExpressionFactory factory = ExpressionFactory.getDefaultInstance();
        final EnvironmentInteractionTracker simpleTracker =
                new SimpleEnvironmentInteractionTracker();
        final ExpressionContext exprContext = factory.
                createExpressionContext(simpleTracker,
                        new DefaultNamespacePrefixTracker());

        // Associate the expression context with the environment context.
        envContext.setExpressionContext(exprContext);

        // Create the initial request context.
View Full Code Here

                new ExpressionContextMock("expressionContext", expectations);

        environmentContext.expects.getExpressionContext().
                returns(expressionContext);

        DefaultNamespacePrefixTracker tracker =
                new DefaultNamespacePrefixTracker();
        tracker.startPrefixMapping("mcs",
                XDIMESchemata.XDIME2_MCS_NAMESPACE);

        expressionContext.expects.getNamespacePrefixTracker().returns(tracker);

        return environmentContext;
View Full Code Here

TOP

Related Classes of com.volantis.xml.namespace.DefaultNamespacePrefixTracker$State

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.