com.sun.msv.verifier.identity

Class IDConstraintChecker

Implemented Interfaces:
ContentHandler, DTDHandler, IDContextProvider2, IVerifier, ValidationContext, VerifierHandler

public class IDConstraintChecker
extends Verifier

Verifier with XML Schema-related enforcement.

This class can be used in the same way as Verifier. This class also checks XML Schema's identity constraint.

Author:
Kohsuke KAWAGUCHI

Field Summary

static String
ERR_DOUBLE_MATCH
static String
ERR_NOT_UNIQUE
static String
ERR_NOT_UNIQUE_DIAG
static String
ERR_UNDEFINED_KEY
static String
ERR_UNMATCHED_KEY_FIELD

Fields inherited from class com.sun.msv.verifier.Verifier

ERR_DUPLICATE_ID, ERR_MISSING_ATTRIBUTE, ERR_UNCOMPLETED_CONTENT, ERR_UNEXPECTED_ATTRIBUTE, ERR_UNEXPECTED_ELEMENT, ERR_UNEXPECTED_STARTTAG, ERR_UNEXPECTED_TEXT, ERR_UNSOLD_IDREF

Constructor Summary

IDConstraintChecker(XMLSchemaGrammar grammar, ErrorHandler errorHandler)

Method Summary

void
characters(char[] buf, int start, int len)
void
endDocument()
void
endElement(String namespaceUri, String localName, String qName)
static String
localizeMessage(String propertyName, Object arg)
static String
localizeMessage(String propertyName, Object[] args)
void
startDocument()

Methods inherited from class com.sun.msv.verifier.Verifier

characters, endDocument, endElement, getCurrentElementType, getErrorHandler, getLastCharacterType, ignorableWhitespace, isValid, localizeMessage, onDuplicateId, setErrorHandler, setPanicMode, startDocument, startElement

Methods inherited from class com.sun.msv.verifier.AbstractVerifier

endElement, endPrefixMapping, getBaseUri, getLocator, isNotation, isUnparsedEntity, notationDecl, onID, processingInstruction, resolveNamespacePrefix, setDocumentLocator, skippedEntity, startElement, startPrefixMapping, unparsedEntityDecl

Field Details

ERR_DOUBLE_MATCH

public static final String ERR_DOUBLE_MATCH

ERR_NOT_UNIQUE

public static final String ERR_NOT_UNIQUE

ERR_NOT_UNIQUE_DIAG

public static final String ERR_NOT_UNIQUE_DIAG

ERR_UNDEFINED_KEY

public static final String ERR_UNDEFINED_KEY

ERR_UNMATCHED_KEY_FIELD

public static final String ERR_UNMATCHED_KEY_FIELD

Constructor Details

IDConstraintChecker

public IDConstraintChecker(XMLSchemaGrammar grammar,
                           ErrorHandler errorHandler)

Method Details

characters

public void characters(char[] buf,
                       int start,
                       int len)
            throws SAXException
Overrides:
characters in interface Verifier

endDocument

public void endDocument()
            throws SAXException
Overrides:
endDocument in interface Verifier

endElement

public void endElement(String namespaceUri,
                       String localName,
                       String qName)
            throws SAXException
Overrides:
endElement in interface Verifier

localizeMessage

public static String localizeMessage(String propertyName,
                                     Object arg)

localizeMessage

public static String localizeMessage(String propertyName,
                                     Object[] args)
Overrides:
localizeMessage in interface Verifier

startDocument

public void startDocument()
            throws SAXException
Overrides:
startDocument in interface Verifier