Top Description Fields Constructors Methods
com.sun.msv.verifier.identity

public Class SelectorMatcher

extends PathMatcher
Class Inheritance
Imports
org.relaxng.datatype.Datatype, org.xml.sax.SAXException, com.sun.msv.grammar.xmlschema.IdentityConstraint

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

Modifier and TypeField and Description
protected IdentityConstraint

Constructor Summary

AccessConstructor and Description
pack-priv
SelectorMatcher(IDConstraintChecker owner, IdentityConstraint idConst, String namespaceURI, String localName)

Method Summary

Modifier and TypeMethod and Description
protected void
onAttributeMatched(String namespaceURI, String localName, String value, Datatype type)

Implements abstract com.sun.msv.verifier.identity.PathMatcher.onAttributeMatched.

this method is called when the attribute matches the XPath.
protected void
onElementMatched(String namespaceURI, String localName)

Implements abstract com.sun.msv.verifier.identity.PathMatcher.onElementMatched.

this method is called when the element matches the XPath.
protected void
onRemoved()

Overrides com.sun.msv.verifier.identity.MatcherBundle.onRemoved.

called when this bundle is deactivated.
Inherited from com.sun.msv.verifier.identity.PathMatcher:
onAttributestartstartElement

Field Detail

idConstback to summary
protected IdentityConstraint idConst

Constructor Detail

SelectorMatcherback to summary
pack-priv SelectorMatcher(IDConstraintChecker owner, IdentityConstraint idConst, String namespaceURI, String localName) throws SAXException

Method Detail

onAttributeMatchedback to summary
protected void onAttributeMatched(String namespaceURI, String localName, String value, Datatype type)

Implements abstract com.sun.msv.verifier.identity.PathMatcher.onAttributeMatched.

Doc from com.sun.msv.verifier.identity.PathMatcher.onAttributeMatched.

this method is called when the attribute matches the XPath.

onElementMatchedback to summary
protected void onElementMatched(String namespaceURI, String localName) throws SAXException

Implements abstract com.sun.msv.verifier.identity.PathMatcher.onElementMatched.

Doc from com.sun.msv.verifier.identity.PathMatcher.onElementMatched.

this method is called when the element matches the XPath.

onRemovedback to summary
protected void onRemoved() throws SAXException

Overrides com.sun.msv.verifier.identity.MatcherBundle.onRemoved.

Doc from com.sun.msv.verifier.identity.MatcherBundle.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.