Package org.apache.xml.security.utils
Class IdResolver
java.lang.Object
org.apache.xml.security.utils.IdResolver
Purpose of this class is to enable the XML Parser to keep track of ID
attributes. This is done by 'registering' attributes of type ID at the
IdResolver. This is necessary if we create a document from scratch and we
sign some resources with a URI using a fragent identifier...
The problem is that if you do not validate a document, you cannot use the
The problem is that if you do not validate a document, you cannot use the
getElementByID
functionality. So this modules uses some implicit
knowledge on selected Schemas and DTDs to pick the right Element for a given
ID: We know that all @Id
attributes in an Element from the XML
Signature namespace are of type ID
.- Author:
- $Author$
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic Element
getElementById
(Document doc, String id) Method getElementByIdstatic void
registerElementById
(Element element, String idValue) Method registerElementByIdstatic void
registerElementById
(Element element, Attr id) Method registerElementById
-
Method Details
-
registerElementById
Method registerElementById- Parameters:
element
-idValue
-
-
registerElementById
Method registerElementById- Parameters:
element
-id
-
-
getElementById
Method getElementById- Parameters:
doc
-id
-- Returns:
- the element obtained by the Id, or null if it is not found.
-