Package com.volantis.xml.namespace

Examples of com.volantis.xml.namespace.NamespacePrefixTracker.startPrefixMapping()


        String responseNamespace = configuration.getResponseNamespaceURI();
        String responsePrefix = configuration.getResponseDefaultPrefixURI();

        NamespacePrefixTracker namespaceManager =
                context.getNamespacePrefixTracker();
        namespaceManager.startPrefixMapping(responsePrefix,
                                            responseNamespace);

        consumer.startPrefixMapping(responsePrefix, responseNamespace);

        // Get the qnames that are constant for this operation process
View Full Code Here


        consumer.startElement(responseNamespace, MESSAGE, messageQName,
                              new AttributesImpl());

        // If the parts have a prefix we need to map them now.
        if (partPrefix != null) {
            namespaceManager.startPrefixMapping(partPrefix,
                                                partNamespace);

            consumer.startPrefixMapping(partPrefix, partNamespace);

        }
View Full Code Here

     * Ensures that a qualified variable reference can be evaluated
     * @throws Exception if an error occurs
     */
    public void testQualifiedVariableEvaluate() throws Exception {
        NamespacePrefixTracker manager = context.getNamespacePrefixTracker();
        manager.startPrefixMapping("p", "http://myNamespace");

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

    public void testFunctionArgSequence() throws Exception {
        ImmutableExpandedName functionName =
                new ImmutableExpandedName("http://myNamespace", "test");
        NamespacePrefixTracker manager = context.getNamespacePrefixTracker();

        manager.startPrefixMapping("function",
                                   functionName.getNamespaceURI());

        context.registerFunction(
                functionName,
                new Function() {
View Full Code Here

    public void testExpressionWithFunction() throws Exception {
        ImmutableExpandedName functionName =
                new ImmutableExpandedName("http://myNamespace", "test");
        NamespacePrefixTracker manager = context.getNamespacePrefixTracker();

        manager.startPrefixMapping("function",
                                   functionName.getNamespaceURI());

        context.getCurrentScope().declareVariable(
                new ImmutableExpandedName("", "myVar"),
                result);
View Full Code Here

    public void testFunctionThrowingExpressionException() throws Exception {
        ImmutableExpandedName functionName =
                new ImmutableExpandedName("http://myNamespace", "test");
        NamespacePrefixTracker manager = context.getNamespacePrefixTracker();

        manager.startPrefixMapping("function",
                                   functionName.getNamespaceURI());

        context.registerFunction(
                functionName,
                new Function() {
View Full Code Here

        // retrieve the NamespacePrefixTracker from the pipeline context
        NamespacePrefixTracker namespaceManager =
                getPipelineContext().getNamespacePrefixTracker();

        // forward this event to the tracker
        namespaceManager.startPrefixMapping(prefix, uri);

        // forward this event to the next process
        super.startPrefixMapping(prefix, uri);
    }
View Full Code Here

                = process.getPipeline().getPipelineContext();
       
        // Update pipeline contexts NamespacePrefixTracker with a prefix
        // and namespace pair
        NamespacePrefixTracker tracker = context.getNamespacePrefixTracker();
        tracker.startPrefixMapping(prefix, namespace);

        assertEquals("NamespacePrefixTracker was not updated with the " +
                     "startPrefixMapping event",
                     namespace,
                     tracker.getNamespaceURI(prefix));      
View Full Code Here

       
        NamespacePrefixTracker tracker =
                pipeline.getPipelineContext().getNamespacePrefixTracker();
       
        // register the prefix with the tracker
        tracker.startPrefixMapping("p", "testNamespace");
           
        // invoke startElement on the rule
        Object returned = rule.startElement(dynamicProcess, eName, atts);    
       
        // ensure the process was added to the pipeline
View Full Code Here

        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",
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.