Class PathMatcher.SinglePathMatcher

java.lang.Object
com.sun.msv.verifier.identity.Matcher
com.sun.msv.verifier.identity.PathMatcher.SinglePathMatcher
Enclosing class:
PathMatcher

private class PathMatcher.SinglePathMatcher extends Matcher
the XPath matching engine.

This class implements the matching engine for single "Path".

The outer PathMatcher uses multiple instances of this class and thereby implements the matching engine for the whole "Selector".

This class only supports the subset defined in XML Schema Part 1. Extra care must be taken to call the testInitialMatch method after the creation of an object.

When a match is found, this class notifies the parent object by using a flag.

  • Field Details

    • activeSteps

      private boolean[][] activeSteps
      stores matched steps. first dimension is expanded as the depth goes deep. second dimension is always equal to the size of steps.
    • path

      protected final XPath path
    • elementMatched

      private boolean elementMatched
      this flag is set to true when the path contains an attribute step and the current element matches the element part of the path. When this flag is true, we need to honor the onAttribute event and check if the path really matches to the attribute.
  • Constructor Details

    • SinglePathMatcher

      protected SinglePathMatcher(XPath path)
  • Method Details