Class ResolverXPointer


  • public class ResolverXPointer
    extends ResourceResolverSpi
    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 Detail

      • LOG

        private static final org.slf4j.Logger LOG
      • XP_LENGTH

        private static final int XP_LENGTH
    • Constructor Detail

      • ResolverXPointer

        public ResolverXPointer()
    • Method Detail

      • engineIsThreadSafe

        public boolean engineIsThreadSafe()
        Description copied from class: ResourceResolverSpi
        Tells if the implementation does can be reused by several threads safely. It normally means that the implementation does not have any member, or there is member change between engineCanResolve and engineResolve invocations. Or it maintains all member info in ThreadLocal methods.
        Overrides:
        engineIsThreadSafe in class ResourceResolverSpi
      • isXPointerSlash

        private static boolean isXPointerSlash​(java.lang.String uri)
        Method isXPointerSlash
        Parameters:
        uri -
        Returns:
        true if begins with xpointer
      • isXPointerId

        private static boolean isXPointerId​(java.lang.String uri)
        Method isXPointerId
        Parameters:
        uri -
        Returns:
        whether it has an xpointer id
      • getXPointerId

        private static java.lang.String getXPointerId​(java.lang.String uri)
        Method getXPointerId
        Parameters:
        uri -
        Returns:
        xpointerId to search.