Examples of translateNamespacePrefixToUri()


Examples of org.jaxen.ContextSupport.translateNamespacePrefixToUri()

            Object contextNode = contextNodeSet.get(0);
            if (namedAccess) {
                // get the iterator over the nodes and check it
                String uri = null;
                if (hasPrefix) {
                    uri = support.translateNamespacePrefixToUri(prefix);
                    if (uri == null) {
                        throw new UnresolvableException("XPath expression uses unbound namespace prefix " + prefix);
                    }
                }
                Iterator axisNodeIter = iterableAxis.namedAccessIterator(
View Full Code Here

Examples of org.jaxen.ContextSupport.translateNamespacePrefixToUri()

        List newNodeSet = new ArrayList(contextSize);
       
        if (namedAccess) {
            String uri = null;
            if (hasPrefix) {
                uri = support.translateNamespacePrefixToUri(prefix);
                if (uri == null) {
                    throw new UnresolvableException("XPath expression uses unbound namespace prefix " + prefix);
                }
            }
            for (int i = 0; i < contextSize; ++i) {
View Full Code Here

Examples of org.jaxen.ContextSupport.translateNamespacePrefixToUri()

            Object contextNode = contextNodeSet.get(0);
            if (namedAccess) {
                // get the iterator over the nodes and check it
                String uri = null;
                if (hasPrefix) {
                    uri = support.translateNamespacePrefixToUri(prefix);
                    if (uri == null) {
                        throw new UnresolvableException("XPath expression uses unbound namespace prefix " + prefix);
                    }
                }
                Iterator axisNodeIter = iterableAxis.namedAccessIterator(
View Full Code Here

Examples of org.jaxen.ContextSupport.translateNamespacePrefixToUri()

        List newNodeSet = new ArrayList(contextSize);
       
        if (namedAccess) {
            String uri = null;
            if (hasPrefix) {
                uri = support.translateNamespacePrefixToUri(prefix);
                if (uri == null) {
                    throw new UnresolvableException("XPath expression uses unbound namespace prefix " + prefix);
                }
            }
            for (int i = 0; i < contextSize; ++i) {
View Full Code Here

Examples of org.jaxen.NamespaceContext.translateNamespacePrefixToUri()

                           "http://cheese.org");
        xpath.addNamespace("squeeze",
                           "http://squeeze.org");
        NamespaceContext nsContext = xpath.getNamespaceContext();
        assertEquals( "http://cheese.org",
                      nsContext.translateNamespacePrefixToUri( "cheese" ) );
        assertEquals( "http://squeeze.org",
                      nsContext.translateNamespacePrefixToUri( "squeeze" ) );

    }
View Full Code Here

Examples of org.jaxen.NamespaceContext.translateNamespacePrefixToUri()

                           "http://squeeze.org");
        NamespaceContext nsContext = xpath.getNamespaceContext();
        assertEquals( "http://cheese.org",
                      nsContext.translateNamespacePrefixToUri( "cheese" ) );
        assertEquals( "http://squeeze.org",
                      nsContext.translateNamespacePrefixToUri( "squeeze" ) );

    }

}
View Full Code Here

Examples of org.jaxen.SimpleNamespaceContext.translateNamespacePrefixToUri()

     */
    public void testMapCopy() {
        Map map = new HashMap();
        SimpleNamespaceContext context = new SimpleNamespaceContext(map);
        map.put("pre", "http://www.example.org/");
        assertNull(context.translateNamespacePrefixToUri("pre"));
    }
    public void testCantUseNonStringsAsValues() {
        Map map = new HashMap();
        map.put("key", new Object());
View Full Code Here

Examples of org.jaxen.SimpleNamespaceContext.translateNamespacePrefixToUri()

        Document doc = builder.newDocument();
        Element root = doc.createElementNS("http://www.example.org/", "pre:root");
        doc.appendChild(root);
        context.addElementNamespaces(new org.jaxen.dom.DocumentNavigator(), root);
       
        assertEquals("http://www.example.org/", context.translateNamespacePrefixToUri("pre"));
    }
    public void testSerialization() throws IOException, ClassNotFoundException {
       
        // construct test object
View Full Code Here

Examples of org.jaxen.SimpleNamespaceContext.translateNamespacePrefixToUri()

        ObjectInputStream ois = new ObjectInputStream(in);
        Object o = ois.readObject();
        SimpleNamespaceContext copy = (SimpleNamespaceContext) o;
       
        // test the result
        assertEquals("http://www.a.com", copy.translateNamespacePrefixToUri("a"));
        assertEquals("http://www.b.com", copy.translateNamespacePrefixToUri("b"));
        assertEquals("", "");
       
    }
   
View Full Code Here

Examples of org.jaxen.SimpleNamespaceContext.translateNamespacePrefixToUri()

        Object o = ois.readObject();
        SimpleNamespaceContext copy = (SimpleNamespaceContext) o;
       
        // test the result
        assertEquals("http://www.a.com", copy.translateNamespacePrefixToUri("a"));
        assertEquals("http://www.b.com", copy.translateNamespacePrefixToUri("b"));
        assertEquals("", "");
       
    }
   
}
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.