javax.xml.crypto.dom
Interface DOMIdMap

All Known Implementing Classes:
DOMSignContext, DOMValidateContext

public interface DOMIdMap

A DOM ID to Element mapping interface. This interface contains methods that register and retrieve Elements with ID attributes. These methods are useful for identifying URIReferences that refer to elements with ID attributes.


Method Summary
 Element getElementById(java.lang.String idValue)
          Returns the Element with the specified ID attribute value.
 void setIdAttributeNS(Element element, java.lang.String namespaceURI, java.lang.String localName)
          Registers the element's attribute specified by the namespace URI and local name to be of type ID.
 

Method Detail

getElementById

public Element getElementById(java.lang.String idValue)
Returns the Element with the specified ID attribute value.

Parameters:
idValue - the value of the ID
Returns:
the Element with the specified ID attribute value, or null if none.
Throws:
java.lang.NullPointerException - if idValue is null
See Also:
setIdAttributeNS(org.w3c.dom.Element, java.lang.String, java.lang.String)

setIdAttributeNS

public void setIdAttributeNS(Element element,
                             java.lang.String namespaceURI,
                             java.lang.String localName)
Registers the element's attribute specified by the namespace URI and local name to be of type ID. The attribute must have a non-empty value.

Parameters:
element - the element
namespaceURI - the namespace URI of the attribute (specify null if not applicable)
localName - the local name of the attribute
Throws:
java.lang.IllegalArgumentException - if localName is not an attribute of the specified element or it does not contain a specific value
java.lang.NullPointerException - if element or localName is null
See Also:
getElementById(java.lang.String)