Package com.sun.msv.verifier.identity
Class SelectorMatcher
java.lang.Object
com.sun.msv.verifier.identity.Matcher
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.
- Author:
- Kohsuke KAWAGUCHI
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Matcher[]
child matchers.protected IdentityConstraint
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
characters
(char[] buf, int start, int len) protected void
endElement
(org.relaxng.datatype.Datatype type) protected final int
getDepth()
protected void
onAttributeMatched
(String namespaceURI, String localName, String value, org.relaxng.datatype.Datatype type) this method is called when the attribute matches the XPath.protected void
onElementMatched
(String namespaceURI, String localName) this method is called when the element matches the XPath.protected void
called when this bundle is deactivated.Methods inherited from class com.sun.msv.verifier.identity.PathMatcher
onAttribute, start, startElement
-
Field Details
-
idConst
-
children
child matchers.
-
-
Method Details
-
onRemoved
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.- Throws:
SAXException
-
onElementMatched
Description copied from class:PathMatcher
this method is called when the element matches the XPath.- Specified by:
onElementMatched
in classPathMatcher
- Throws:
SAXException
-
onAttributeMatched
protected void onAttributeMatched(String namespaceURI, String localName, 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 classPathMatcher
-
getDepth
protected final int getDepth() -
endElement
- Specified by:
endElement
in classMatcher
- Throws:
SAXException
-
characters
- Overrides:
characters
in classMatcher
- Throws:
SAXException
-