org.w3c.dom.Element.getBaseURI()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(176)

本文整理了Java中org.w3c.dom.Element.getBaseURI()方法的一些代码示例,展示了Element.getBaseURI()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getBaseURI()方法的具体详情如下:
包路径:org.w3c.dom.Element
类名称:Element
方法名:getBaseURI

Element.getBaseURI介绍

暂无

代码示例

代码示例来源:origin: apache/batik

/**
 * Returns the base URI of the referer element.
 */
protected String getRefererBaseURI(Element ref) {
  return ref.getBaseURI();
}

代码示例来源:origin: apache/servicemix-bundles

@Override
public String getBaseURI() {
  return element.getBaseURI();
}

代码示例来源:origin: xyz.cofe/common

@Override
public String getBaseURI() {
  return element.getBaseURI();
}

代码示例来源:origin: apache/cxf

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);
    }
  }
}

代码示例来源:origin: org.opensingular/form-core

/**
 * @see org.w3c.dom.Node#getBaseURI()
 */
public String getBaseURI() {
  return getAtualInterno().getBaseURI();
}

代码示例来源:origin: org.opensingular/singular-commons

/**
 * @see org.w3c.dom.Node#getBaseURI()
 */
public String getBaseURI() {
  return getCurrentInternal().getBaseURI();
}

代码示例来源:origin: Geomatys/geotoolkit

@Override
public String getBaseURI() {
  final Element elem = getElement();
  return elem != null ? elem.getBaseURI() : null;
}

代码示例来源:origin: org.opensingular/form-core

/**
 * @see org.w3c.dom.Node#getBaseURI()
 */
@Override
public String getBaseURI() {
  return original.get().getBaseURI();
}

代码示例来源:origin: org.opensingular/singular-commons

/**
 * @see org.w3c.dom.Node#getBaseURI()
 */
@Override
public String getBaseURI() {
  return original.get().getBaseURI();
}

代码示例来源:origin: org.daisy.pipeline/common-utils

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();
  }
}

代码示例来源:origin: org.apache.ws.commons.axiom/dom-testsuite

/**
* 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);
 }
/**

代码示例来源:origin: org.apache.ws.commons.axiom/dom-testsuite

/**
* 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);
 }
/**

代码示例来源:origin: org.apache.ws.commons.axiom/dom-testsuite

/**
* 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);
 }
/**

代码示例来源:origin: org.apache.ws.commons.axiom/dom-testsuite

/**
  * 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);
}
  /**

代码示例来源:origin: metafacture/metafacture-core

@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");
}

代码示例来源:origin: org.apache.ws.commons.axiom/dom-testsuite

/**
  * 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);
   }
  /**

代码示例来源:origin: apache/batik

String baseURI = paintElement.getBaseURI();
ParsedURL purl = new ParsedURL(baseURI, uri);

代码示例来源:origin: apache/batik

return "";
String baseURI = e.getBaseURI();
ParsedURL purl = new ParsedURL(baseURI, uriStr);

代码示例来源:origin: apache/cxf

String baseURI = null;
try {
  baseURI = el.getBaseURI();
} catch (Exception ex) {

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

String baseURI = null;
try {
  baseURI = el.getBaseURI();
} catch (Exception ex) {

相关文章

微信公众号

最新文章

更多