Module org.apache.santuario.xmlsec
Class ResolverXPointer
java.lang.Object
org.apache.xml.security.utils.resolver.ResourceResolverSpi
org.apache.xml.security.utils.resolver.implementations.ResolverXPointer
Handles barename XPointer Reference URIs.
To retain comments while selecting an element by an identifier ID,
use the following full XPointer: URI='#xpointer(id('ID'))'.
To retain comments while selecting the entire document,
use the following full XPointer: URI='#xpointer(/)'.
This XPointer contains a simple XPath expression that includes
the root node, which the second to last step above replaces with all
nodes of the parse tree (all descendants, plus all attributes,
plus all namespaces nodes).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final System.Loggerprivate static final Stringprivate static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanThis method helps theResourceResolverto decide whether aResourceResolverSpiis able to perform the requested action.engineResolveURI(ResourceResolverContext context) This is the workhorse method used to resolve resources.private static StringgetXPointerId(String uri) Method getXPointerIdprivate static booleanisXPointerId(String uri) Method isXPointerIdprivate static booleanisXPointerSlash(String uri) Method isXPointerSlash
-
Field Details
-
LOG
-
XP
- See Also:
-
XP_LENGTH
private static final int XP_LENGTH
-
-
Constructor Details
-
ResolverXPointer
public ResolverXPointer()
-
-
Method Details
-
engineResolveURI
public XMLSignatureInput engineResolveURI(ResourceResolverContext context) throws ResourceResolverException This is the workhorse method used to resolve resources.- Specified by:
engineResolveURIin classResourceResolverSpi- Parameters:
context- Context to use to resolve resources.- Returns:
- the resource wrapped around a XMLSignatureInput
- Throws:
ResourceResolverException
-
engineCanResolveURI
This method helps theResourceResolverto decide whether aResourceResolverSpiis able to perform the requested action.- Specified by:
engineCanResolveURIin classResourceResolverSpi- Parameters:
context- Context in which to do resolution.- Returns:
- true if the engine can resolve the uri
-
isXPointerSlash
Method isXPointerSlash- Parameters:
uri-- Returns:
- true if begins with xpointer
-
isXPointerId
Method isXPointerId- Parameters:
uri-- Returns:
- whether it has an xpointer id
-
getXPointerId
Method getXPointerId- Parameters:
uri-- Returns:
- xpointerId to search.
-