Class SelectorMatcher
java.lang.Object
com.sun.msv.verifier.identity.Matcher
com.sun.msv.verifier.identity.MatcherBundle
com.sun.msv.verifier.identity.PathMatcher
com.sun.msv.verifier.identity.SelectorMatcher
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.
-
Field Summary
FieldsFields inherited from class MatcherBundle
children -
Constructor Summary
ConstructorsConstructorDescriptionSelectorMatcher(IDConstraintChecker owner, IdentityConstraint idConst, String namespaceURI, String localName) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidonAttributeMatched(String namespaceURI, String localName, String value, org.relaxng.datatype.Datatype type) this method is called when the attribute matches the XPath.protected voidonElementMatched(String namespaceURI, String localName) this method is called when the element matches the XPath.protected voidcalled when this bundle is deactivated.Methods inherited from class PathMatcher
onAttribute, start, startElementMethods inherited from class MatcherBundle
characters, endElement, getDepth
-
Field Details
-
idConst
-
-
Constructor Details
-
SelectorMatcher
SelectorMatcher(IDConstraintChecker owner, IdentityConstraint idConst, String namespaceURI, String localName) throws SAXException - Throws:
SAXException
-
-
Method Details
-
onRemoved
Description copied from class:MatcherBundlecalled 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:
onRemovedin classMatcherBundle- Throws:
SAXException
-
onElementMatched
Description copied from class:PathMatcherthis method is called when the element matches the XPath.- Specified by:
onElementMatchedin classPathMatcher- Throws:
SAXException
-
onAttributeMatched
protected void onAttributeMatched(String namespaceURI, String localName, String value, org.relaxng.datatype.Datatype type) Description copied from class:PathMatcherthis method is called when the attribute matches the XPath.- Specified by:
onAttributeMatchedin classPathMatcher
-