Java Code Examples for org.w3c.dom.Attr#getBaseURI()

The following examples show how to use org.w3c.dom.Attr#getBaseURI() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DomUtils.java    From teamengine with Apache License 2.0 6 votes vote down vote up
static public Map<QName, String> getAttributes(Node node) {
    Map<QName, String> atts = new HashMap<QName, String>();
    NamedNodeMap nnm = node.getAttributes();
    if (nnm != null) {
        for (int i = 0; i < nnm.getLength(); i++) {
            Attr att = (Attr) nnm.item(i);
            String uri = att.getBaseURI();
            String localname = att.getLocalName();
            String prefix = att.getPrefix();
            QName name;
            if (uri == null) {
                name = new QName(localname);
            } else if (prefix == null) {
                name = new QName(uri, localname);
            } else {
                name = new QName(uri, localname, prefix);
            }
            if (prefix == null
                    || !(prefix.equals("xmlns") || prefix.equals("xml"))) {
                atts.put(name, att.getValue());
            }
        }
    }
    return atts;
}
 
Example 2
Source File: DocumentResolver.java    From freehealth-connector with GNU Affero General Public License v3.0 4 votes vote down vote up
private void processElement(Attr uri, String baseURI, Node selectedElem, String id) throws ResourceResolverException {
   if (selectedElem == null) {
      Object[] exArgs = new Object[]{id};
      throw new ResourceResolverException("signature.Verification.MissingID", exArgs, uri.getBaseURI(), baseURI);
   }
}
 
Example 3
Source File: DocumentResolver.java    From freehealth-connector with GNU Affero General Public License v3.0 4 votes vote down vote up
private void processElement(Attr uri, String baseURI, Node selectedElem, String id) throws ResourceResolverException {
   if (selectedElem == null) {
      Object[] exArgs = new Object[]{id};
      throw new ResourceResolverException("signature.Verification.MissingID", exArgs, uri.getBaseURI(), baseURI);
   }
}
 
Example 4
Source File: DocumentResolver.java    From freehealth-connector with GNU Affero General Public License v3.0 4 votes vote down vote up
private void processElement(Attr uri, String baseURI, Node selectedElem, String id) throws ResourceResolverException {
   if (selectedElem == null) {
      Object[] exArgs = new Object[]{id};
      throw new ResourceResolverException("signature.Verification.MissingID", exArgs, uri.getBaseURI(), baseURI);
   }
}
 
Example 5
Source File: DocumentResolver.java    From freehealth-connector with GNU Affero General Public License v3.0 4 votes vote down vote up
private void processElement(Attr uri, String baseURI, Node selectedElem, String id) throws ResourceResolverException {
   if (selectedElem == null) {
      Object[] exArgs = new Object[]{id};
      throw new ResourceResolverException("signature.Verification.MissingID", exArgs, uri.getBaseURI(), baseURI);
   }
}
 
Example 6
Source File: DocumentResolver.java    From freehealth-connector with GNU Affero General Public License v3.0 4 votes vote down vote up
private void processElement(Attr uri, String baseURI, Node selectedElem, String id) throws ResourceResolverException {
   if (selectedElem == null) {
      Object[] exArgs = new Object[]{id};
      throw new ResourceResolverException("signature.Verification.MissingID", exArgs, uri.getBaseURI(), baseURI);
   }
}