Class XPathNormalizerWithXPath

All Implemented Interfaces:
Rewriter<DOMResource,XPathRefinedByRFC5147CharScheme,XPathRefinedByRFC5147CharScheme>

public class XPathNormalizerWithXPath extends XPathNormalizer
A XPathNormalizer that generates normalized path expressions by using an XPath expression that is evaluated on the context node in question.

The context item on which the XPath will be evaluated, is determined by XPathRewriterBase.getTextNodeAtPosition(S9ApiResource, String, int, Mode). This is generally a text node.

  • Field Details

    • PATH_FUNCTION_XPATH

      public static final String PATH_FUNCTION_XPATH
      An XPath expression suitable for normalizing path expressions to nodes.

      Generates a path expression using the path(.) XPath function. This result in a path expression stepping from the root element to the context node. Element names are QNames in Clark notation.

      See Also:
    • FROM_ROOT_CLARK_XPATH

      public static final String FROM_ROOT_CLARK_XPATH
      An XPath expression suitable for normalizing path expressions to nodes.

      Generates a simple path expression stepping from the root element to the context node. Element names are QNames in Clark notation.

      See Also:
    • FROM_DEEPEST_ID_CLARK_XPATH

      public static final String FROM_DEEPEST_ID_CLARK_XPATH
      An XPath expression suitable for normalizing path expressions to nodes.

      Generates a path expression stepping from the deepest element with an XML-ID (@xml:id) to the context node. Element names are QNames in Clark notation.

      See Also:
  • Constructor Details

    • XPathNormalizerWithXPath

      public XPathNormalizerWithXPath(net.sf.saxon.s9api.XPathCompiler xPathCompiler, String xpath)
  • Method Details