Package com.sun.msv.verifier.psvi
Class TypeDetector
java.lang.Object
com.sun.msv.verifier.AbstractVerifier
com.sun.msv.verifier.Verifier
com.sun.msv.verifier.psvi.TypeDetector
- All Implemented Interfaces:
IDContextProvider2,IVerifier,org.iso_relax.verifier.VerifierHandler,org.relaxng.datatype.ValidationContext,ContentHandler,DTDHandler
assign types to the incoming SAX2 events and reports them to
the application handler through TypedContentHandler.
This class "augment" infoset by adding type information. The application can
receive augmented infoset by implementing TypedContentHandler.
- Author:
- Kohsuke KAWAGUCHI
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclasssignals that the document is ambiguous. -
Field Summary
FieldsFields inherited from class com.sun.msv.verifier.Verifier
current, docDecl, ERR_DUPLICATE_ID, ERR_MISSING_ATTRIBUTE, ERR_UNCOMPLETED_CONTENT, ERR_UNEXPECTED_ATTRIBUTE, ERR_UNEXPECTED_ELEMENT, ERR_UNEXPECTED_STARTTAG, ERR_UNEXPECTED_TEXT, ERR_UNSOLD_IDREF, errorHandler, hadError, panicLevelFields inherited from class com.sun.msv.verifier.AbstractVerifier
dummyLocator, idrefs, ids, locator, namespaceSupport, performIDcheck -
Constructor Summary
ConstructorsConstructorDescriptionTypeDetector(DocumentDeclaration documentDecl, TypedContentHandler handler, ErrorHandler errorHandler) TypeDetector(DocumentDeclaration documentDecl, ErrorHandler errorHandler) -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] buf, int start, int len) voidvoidendElement(String namespaceUri, String localName, String qName) protected org.relaxng.datatype.Datatype[]voidignorableWhitespace(char[] buf, int start, int len) protected voidonNextAcceptorReady(StartTagInfo sti, Acceptor nextAcceptor) this method is called from the startElement method after the tag name is processed and the child acceptor is created.voidsetContentHandler(TypedContentHandler handler) sets the TypedContentHandler which will received the type-augmented infoset.voidvoidstartElement(String namespaceUri, String localName, String qName, Attributes atts) protected voidMethods inherited from class com.sun.msv.verifier.Verifier
getCurrentElementType, getErrorHandler, getLastCharacterType, init, isValid, localizeMessage, onDuplicateId, onError, onError, setErrorHandler, setPanicModeMethods inherited from class com.sun.msv.verifier.AbstractVerifier
endPrefixMapping, getBaseUri, getLocator, isNotation, isUnparsedEntity, notationDecl, onID, processingInstruction, resolveNamespacePrefix, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDeclMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration, endPrefixMapping, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMappingMethods inherited from interface com.sun.msv.verifier.IVerifier
getLocator
-
Field Details
-
handler
-
-
Constructor Details
-
TypeDetector
-
TypeDetector
public TypeDetector(DocumentDeclaration documentDecl, TypedContentHandler handler, ErrorHandler errorHandler)
-
-
Method Details
-
setContentHandler
sets the TypedContentHandler which will received the type-augmented infoset. -
verifyText
- Overrides:
verifyTextin classVerifier- Throws:
SAXException
-
feedAttribute
protected org.relaxng.datatype.Datatype[] feedAttribute(Acceptor child, String uri, String localName, String qName, String value) throws SAXException - Overrides:
feedAttributein classVerifier- Throws:
SAXException
-
startElement
public void startElement(String namespaceUri, String localName, String qName, Attributes atts) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classVerifier- Throws:
SAXException
-
onNextAcceptorReady
Description copied from class:Verifierthis method is called from the startElement method after the tag name is processed and the child acceptor is created.This method is called before the attributes are consumed.
derived class can use this method to do something useful.
- Overrides:
onNextAcceptorReadyin classVerifier- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classVerifier- Throws:
SAXException
-
characters
- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classVerifier- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespacein interfaceContentHandler- Overrides:
ignorableWhitespacein classVerifier- Throws:
SAXException
-
startDocument
- Specified by:
startDocumentin interfaceContentHandler- Overrides:
startDocumentin classVerifier- Throws:
SAXException
-
endDocument
- Specified by:
endDocumentin interfaceContentHandler- Overrides:
endDocumentin classVerifier- Throws:
SAXException
-