Class SelectorMatcher


  • public class SelectorMatcher
    extends PathMatcher
    XPath matcher that tests the selector of an identity constraint. This object is created whenever an element with identity constraints is found. XML Schema guarantees that we can see if an element has id constraints at the startElement method. This mathcer then monitor startElement/endElement and find matches to the specified XPath. Every time it finds a match ("target node" in XML Schema terminology), it creates a FieldsMatcher.
    • Constructor Detail

      • SelectorMatcher

        SelectorMatcher​(IDConstraintChecker owner,
                        IdentityConstraint idConst,
                        java.lang.String namespaceURI,
                        java.lang.String localName)
                 throws org.xml.sax.SAXException
        Throws:
        org.xml.sax.SAXException
    • Method Detail

      • onRemoved

        protected void onRemoved()
                          throws org.xml.sax.SAXException
        Description copied from class: MatcherBundle
        called when this bundle is deactivated. This method is called by the endElement method when this bundle is removed. A derived class can override this method to do whatever necessary.
        Overrides:
        onRemoved in class MatcherBundle
        Throws:
        org.xml.sax.SAXException
      • onElementMatched

        protected void onElementMatched​(java.lang.String namespaceURI,
                                        java.lang.String localName)
                                 throws org.xml.sax.SAXException
        Description copied from class: PathMatcher
        this method is called when the element matches the XPath.
        Specified by:
        onElementMatched in class PathMatcher
        Throws:
        org.xml.sax.SAXException
      • onAttributeMatched

        protected void onAttributeMatched​(java.lang.String namespaceURI,
                                          java.lang.String localName,
                                          java.lang.String value,
                                          org.relaxng.datatype.Datatype type)
        Description copied from class: PathMatcher
        this method is called when the attribute matches the XPath.
        Specified by:
        onAttributeMatched in class PathMatcher