/** * <b>DOM</b>: Implements * {@link org.w3c.dom.xpath.XPathNSResolver#lookupNamespaceURI(String)}. */ public String lookupNamespaceURI(String prefix) { return ((AbstractNode) contextNode).lookupNamespaceURI(prefix); } }
/** * <b>DOM</b>: Implements * {@link org.w3c.dom.xpath.XPathNSResolver#lookupNamespaceURI(String)}. */ public String lookupNamespaceURI(String prefix) { return ((AbstractNode) contextNode).lookupNamespaceURI(prefix); } }
/** * Looks up for the namespaceURI based on the given prefix. Uses the * Node.lookupNamespaceURI method, starting from the parent element of * the element being edited / created. * * @param prefix * The given prefix * @return namespaceURI or null */ private String getNamespaceURI(String prefix) { String namespaceURI = null; if (prefix != null) { if (prefix.equals(SVGConstants.XMLNS_PREFIX)) { 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); } } } return namespaceURI; }
/** * Looks up for the namespaceURI based on the given prefix. Uses the * Node.lookupNamespaceURI method, starting from the parent element of * the element being edited / created. * * @param prefix * The given prefix * @return namespaceURI or null */ private String getNamespaceURI(String prefix) { String namespaceURI = null; if (prefix != null) { if (prefix.equals(SVGConstants.XMLNS_PREFIX)) { 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); } } } return namespaceURI; }
&& prefix != null) { String pns = ((AbstractNode) originalElement).lookupNamespaceURI(prefix); if (pns != null && pns.equals(namespaceURI)) { return prefix; String ln = attr.getLocalName(); AbstractNode oe = (AbstractNode) originalElement; String pns = oe.lookupNamespaceURI(ln); if (pns != null && pns.equals(namespaceURI)) { return ln;
&& prefix != null) { String pns = ((AbstractNode) originalElement).lookupNamespaceURI(prefix); if (pns != null && pns.equals(namespaceURI)) { return prefix; String ln = attr.getLocalName(); AbstractNode oe = (AbstractNode) originalElement; String pns = oe.lookupNamespaceURI(ln); if (pns != null && pns.equals(namespaceURI)) { return ln;
AbstractNode de = (AbstractNode) ((Document) this).getDocumentElement(); return de.lookupNamespaceURI(prefix); case ENTITY_NODE: case NOTATION_NODE: = (AbstractNode) ((Attr) this).getOwnerElement(); if (owner != null) { return owner.lookupNamespaceURI(prefix); if (n.getNodeType() == ELEMENT_NODE) { AbstractNode an = (AbstractNode) n; return an.lookupNamespaceURI(prefix);
String ln = attr.getLocalName(); AbstractNode oe = (AbstractNode) originalElement; String pns = oe.lookupNamespaceURI(ln); if (pns != null && pns.equals(namespaceURI)) { return ln;
AbstractNode de = (AbstractNode) ((Document) this).getDocumentElement(); return de.lookupNamespaceURI(prefix); case ENTITY_NODE: case NOTATION_NODE: = (AbstractNode) ((Attr) this).getOwnerElement(); if (owner != null) { return owner.lookupNamespaceURI(prefix); if (n.getNodeType() == ELEMENT_NODE) { AbstractNode an = (AbstractNode) n; return an.lookupNamespaceURI(prefix);
AbstractNode de = (AbstractNode) ((Document) this).getDocumentElement(); return de.lookupNamespaceURI(prefix); case ENTITY_NODE: case NOTATION_NODE: = (AbstractNode) ((Attr) this).getOwnerElement(); if (owner != null) { return owner.lookupNamespaceURI(prefix); if (n.getNodeType() == ELEMENT_NODE) { AbstractNode an = (AbstractNode) n; return an.lookupNamespaceURI(prefix);