Package org.apache.tuscany.sca.common.xml.stax.reader

Examples of org.apache.tuscany.sca.common.xml.stax.reader.NamespaceContextImpl.register()


        boolean found = false;
        for (String prefix : getPrefixes(expression)) {
            String namespace = context.getNamespaceURI(prefix);
            if (namespace != null && !XMLConstants.NULL_NS_URI.equals(namespace)) {
                nsContext.register(prefix, namespace);
                if ( (namespace.equals("http://docs.oasis-open.org/ns/opencsa/sca/200912")) && !prefix.equals(XMLConstants.DEFAULT_NS_PREFIX))
                  found = true;
            }
        }
       
View Full Code Here


                  found = true;
            }
        }
       
        if(!found) {
            nsContext.register("__sca", "http://docs.oasis-open.org/ns/opencsa/sca/200912");
        }
        return nsContext;
    }

    /**
 
View Full Code Here

     * @param namespace
     * @param context
     */
    public void registerPrefix(String prefix, String namespace, NamespaceContext context) {
      NamespaceContextImpl nsContext = (NamespaceContextImpl) context;
      nsContext.register(prefix, namespace);
    }
   
    /**
     * Parse the XPath expression to collect all the prefixes for namespaces
     * @param expression
View Full Code Here

        super(registry.getExtensionPoint(FactoryExtensionPoint.class).getFactory(AssemblyFactory.class));
        this.policyFactory = registry.getExtensionPoint(FactoryExtensionPoint.class).getFactory(PolicyFactory.class);
       
        this.xpathHelper = XPathHelper.getInstance(registry);
        NamespaceContextImpl nsContext = new NamespaceContextImpl(null);
        nsContext.register("sca", "http://docs.oasis-open.org/ns/opencsa/sca/200912");
        XPath path = xpathHelper.newXPath();
        try {
            appliesToExpression = xpathHelper.compile(path, nsContext, appliesToString);
        } catch (XPathExpressionException e) {
            throw new IntrospectionException(e);
View Full Code Here

        NamespaceContextImpl nsContext = new NamespaceContextImpl(null);

        for (String prefix : getPrefixes(expression)) {
            String namespace = context.getNamespaceURI(prefix);
            if (namespace != null && !XMLConstants.NULL_NS_URI.equals(namespace)) {
                nsContext.register(prefix, namespace);
            }
        }
        return nsContext;
    }
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.