Examples of lookupNamespaceURI()


Examples of org.apache.batik.dom.AbstractNode.lookupNamespaceURI()

                namespaceURI = SVGConstants.XMLNS_NAMESPACE_URI;
            } else {
                AbstractNode n;
                if (mode == EDIT_MODE) {
                    n = (AbstractNode) previewElement;
                    namespaceURI = n.lookupNamespaceURI(prefix);
                } else if (mode == ADD_NEW_ELEMENT) {
                    n = (AbstractNode) parentElement;
                    namespaceURI = n.lookupNamespaceURI(prefix);
                }
View Full Code Here

Examples of org.apache.batik.dom.AbstractNode.lookupNamespaceURI()

                if (mode == EDIT_MODE) {
                    n = (AbstractNode) previewElement;
                    namespaceURI = n.lookupNamespaceURI(prefix);
                } else if (mode == ADD_NEW_ELEMENT) {
                    n = (AbstractNode) parentElement;
                    namespaceURI = n.lookupNamespaceURI(prefix);
                }

            }
        }
        return namespaceURI;
View Full Code Here

Examples of org.apache.xerces.dom.NodeImpl.lookupNamespaceURI()

                    //System.out.println("[a:elem_a].lookupPrefix('http://www.example.com', false) == ns1");
                    Assertion.verify(elem.lookupPrefix("http://www.example.com").equals("ns1"),
                                     "[a:elem_a].lookupPrefix(http://www.example.com)==ns1");


                    Assertion.verify(elem.lookupNamespaceURI("xsi").equals("http://www.w3.org/2001/XMLSchema-instance"),
                                     "[a:elem_a].lookupNamespaceURI('xsi') == 'http://www.w3.org/2001/XMLSchema-instance'" );

                } else {
                    Assertion.verify( elem.lookupPrefix("http://www.example.com") == null,"lookupPrefix(http://www.example.com)==null");
                }
View Full Code Here

Examples of org.w3c.dom.Attr.lookupNamespaceURI()

    }

    protected void runTest() throws Throwable {
        Document document = dbf.newDocumentBuilder().newDocument();
        Attr attr = document.createAttributeNS("urn:test", "p:attr");
        assertNull(attr.lookupNamespaceURI("p"));
    }
}
View Full Code Here

Examples of org.w3c.dom.Attr.lookupNamespaceURI()

        NamedNodeMap attributes = ele.getAttributes();
        Attr attr = (Attr) attributes.item(0);
       
        assertEquals("Incorrect namespace returned for the attribute", namespace,
                attr.lookupNamespaceURI("ns"));
    }

}
View Full Code Here

Examples of org.w3c.dom.Document.lookupNamespaceURI()

        super(dbf);
    }

    protected void runTest() throws Throwable {
        Document document = dbf.newDocumentBuilder().newDocument();
        assertNull(document.lookupNamespaceURI("p"));
    }
}
View Full Code Here

Examples of org.w3c.dom.Document.lookupNamespaceURI()

    protected void runTest() throws Throwable {
        Document document = dbf.newDocumentBuilder().newDocument();
        Element documentElement = document.createElementNS("urn:test", "ns:root");
        documentElement.setAttributeNS(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, "xmlns:ns", "urn:test");
        document.appendChild(documentElement);
        assertEquals("urn:test", document.lookupNamespaceURI("ns"));
        // The following assertion is important to check that there is no infinite recursion
        // (Document delegates the lookup to its document element, but the document element must
        // not delegate to its parent if no matching declaration is found)
        assertNull(document.lookupNamespaceURI("p"));
    }
View Full Code Here

Examples of org.w3c.dom.Document.lookupNamespaceURI()

        document.appendChild(documentElement);
        assertEquals("urn:test", document.lookupNamespaceURI("ns"));
        // The following assertion is important to check that there is no infinite recursion
        // (Document delegates the lookup to its document element, but the document element must
        // not delegate to its parent if no matching declaration is found)
        assertNull(document.lookupNamespaceURI("p"));
    }
}
View Full Code Here

Examples of org.w3c.dom.DocumentFragment.lookupNamespaceURI()

        Document document = dbf.newDocumentBuilder().newDocument();
        DocumentFragment fragment = document.createDocumentFragment();
        Element element = document.createElementNS("urn:test", "ns:root");
        element.setAttributeNS(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, "xmlns:ns", "urn:test");
        fragment.appendChild(element);
        assertNull(fragment.lookupNamespaceURI("ns"));
    }
}
View Full Code Here

Examples of org.w3c.dom.Element.lookupNamespaceURI()

                                pfxs = pfxs.substring(idx + 1);
                                pfx = pfx.substring(0, idx);
                            } else {
                                pfxs = "";
                            }
                            String ns = el.lookupNamespaceURI(pfx);
                            schemaNode.setAttribute("xmlns:" + pfx,
                                                    ns);
                        }
                    }
                }
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.