/** * Returns the base URI of the referer element. */ protected String getRefererBaseURI(Element ref) { return ref.getBaseURI(); }
@Override public String getBaseURI() { return element.getBaseURI(); }
@Override public String getBaseURI() { return element.getBaseURI(); }
private void updateJaxwsBindingMapValue(Element value) { String baseURI = value.getBaseURI(); for (Map.Entry<Element, Element> entry : jaxwsBindingsMap.entrySet()) { String uri = entry.getValue().getBaseURI(); if (uri != null && uri.equals(baseURI)) { jaxwsBindingsMap.put(entry.getKey(), value); } } }
/** * @see org.w3c.dom.Node#getBaseURI() */ public String getBaseURI() { return getAtualInterno().getBaseURI(); }
/** * @see org.w3c.dom.Node#getBaseURI() */ public String getBaseURI() { return getCurrentInternal().getBaseURI(); }
@Override public String getBaseURI() { final Element elem = getElement(); return elem != null ? elem.getBaseURI() : null; }
/** * @see org.w3c.dom.Node#getBaseURI() */ @Override public String getBaseURI() { return original.get().getBaseURI(); }
/** * @see org.w3c.dom.Node#getBaseURI() */ @Override public String getBaseURI() { return original.get().getBaseURI(); }
public static void writeStartElement(XMLStreamWriter writer, Element element, boolean copyAttributes, boolean copyNamespaceNodes, boolean copyBaseURI) throws XMLStreamException { String prefix = element.getPrefix(); String ns = element.getNamespaceURI(); String localPart = element.getLocalName(); if (prefix != null) writer.writeStartElement(prefix, localPart, ns); else if (ns != null) writer.writeStartElement(ns, localPart); else writer.writeStartElement(localPart); if (copyAttributes) { writeAttributes(writer, element, copyNamespaceNodes); } if (copyBaseURI) { if (writer instanceof BaseURIAwareXMLStreamWriter) { String baseURI = element.getBaseURI(); ((BaseURIAwareXMLStreamWriter)writer).setBaseURI(baseURI == null ? null : URI.create(baseURI)); } else throw new IllegalArgumentException(); } }
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; Element bodyElem; NodeList bodyList; String baseURI; doc = (Document) load("barfoo_base", false); bodyList = doc.getElementsByTagName("body"); bodyElem = (Element) bodyList.item(0); baseURI = bodyElem.getBaseURI(); assertEquals("nodegetbaseuri09", "http://www.w3.org/DOM/EmployeeID", baseURI); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; Element docElem; String baseURI; doc = (Document) load("barfoo_base", false); docElem = doc.getDocumentElement(); baseURI = docElem.getBaseURI(); assertEquals("nodegetbaseuri05", "http://www.w3.org/DOM/L3Test", baseURI); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; Element newElement; String baseURI; Node appended; NodeList bodyList; Element bodyElem; String htmlNS = "http://www.w3.org/1999/xhtml"; doc = (Document) load("barfoo_base", true); bodyList = doc.getElementsByTagName("body"); bodyElem = (Element) bodyList.item(0); newElement = doc.createElementNS(htmlNS, "meta"); newElement.setAttribute("content", "text/xml"); appended = bodyElem.appendChild(newElement); baseURI = newElement.getBaseURI(); assertEquals("nodegetbaseuri07", "http://www.w3.org/DOM/EmployeeID", baseURI); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; String baseURI; NodeList pList; Element pElem; doc = (Document) load("external_barfoo", true); pList = doc.getElementsByTagName("p"); pElem = (Element) pList.item(2); assertNotNull("pElemNotNull", pElem); baseURI = pElem.getBaseURI(); assertURIEquals("equalsExternalBarFoo", null, null, null, null, "external_widget", null, null, Boolean.TRUE, baseURI); } /**
@SuppressWarnings("rawtypes") private StreamPipe getTransformation() throws InitializationError { final NodeList nodes = config.getElementsByTagName(TRANSFORMATION_TAG); if (nodes.getLength() == 0) { return null; } final Element transformationElement = (Element) nodes.item(0); final String type = transformationElement.getAttribute(TYPE_ATTR); final String src = transformationElement.getAttribute(SRC_ATTR); if (MIME_METAMORPH.equals(type)) { if (src.isEmpty()) { final InputSource transformationSource = new InputSource(getDataEmbedded(transformationElement)); transformationSource.setSystemId(transformationElement.getBaseURI()); return new Metamorph(transformationSource); } return new Metamorph(src); } else if (MIME_JAVACLASS.equals(type)) { if (src.isEmpty()) { throw new InitializationError( "class defining transformation not specified"); } return ReflectionUtil.loadClass(src, StreamPipe.class).newInstance(); } throw new InitializationError("transformation of type " + type + " is not supperted"); }
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; Element docElem; String baseURI; String documentURI; doc = (Document) load("barfoo", false); docElem = doc.getDocumentElement(); baseURI = docElem.getBaseURI(); assertURIEquals("baseURI", null, null, null, null, "barfoo", null, null, Boolean.TRUE, baseURI); documentURI = doc.getDocumentURI(); assertEquals("baseURIEqualsDocURI", documentURI, baseURI); } /**
String baseURI = paintElement.getBaseURI(); ParsedURL purl = new ParsedURL(baseURI, uri);
return ""; String baseURI = e.getBaseURI(); ParsedURL purl = new ParsedURL(baseURI, uriStr);
String baseURI = null; try { baseURI = el.getBaseURI(); } catch (Exception ex) {
String baseURI = null; try { baseURI = el.getBaseURI(); } catch (Exception ex) {