Package com.sun.msv.verifier.psvi
Interface TypedContentHandler
-
public interface TypedContentHandlerReceives notification of the typed content of the document.This interface can be considered as the SAX ContentHandler plus type-information. It is intended to help applications to interpret the incoming document.
Consider a following RELAX NG pattern and instance:
Events are reported in the following order:A B startDocument() startElement(root) startAttribute(foo) characterChunk("true", com.sun.msv.datatype.xsd.BooleanType) endAttribute(foo) endAttributePart() startElement(child) characterChunk("A", com.sun.msv.datatype.xsd.NMTOKENType) characterChunk("B", com.sun.msv.datatype.xsd.NMTOKENType) endElement(child, MSV's internal object that represents the child element) endElement(root, MSV's internal object that represents the root element) endDocument()- Author:
- Kohsuke KAWAGUCHI
- See Also:
TypeDetector
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcharacterChunk(String literal, org.relaxng.datatype.Datatype type)receives notification of a string.voidendAttribute(String namespaceURI, String localName, String qName, AttributeExp type)receives notification of the end of an attribute.voidendAttributePart()this method is called after the start/endAttribute method are called for all attributes.voidendDocument()receives notification of the end of a document.voidendElement(String namespaceURI, String localName, String qName, ElementExp type)receives notification of the end of an element.voidstartAttribute(String namespaceURI, String localName, String qName)receives notification of the start of an attribute.voidstartDocument(org.relaxng.datatype.ValidationContext context)receives notification of the start of a document.voidstartElement(String namespaceURI, String localName, String qName)receives notification of the start of an element.
-
-
-
Method Detail
-
startDocument
void startDocument(org.relaxng.datatype.ValidationContext context) throws SAXExceptionreceives notification of the start of a document.- Parameters:
context- This ValidationContext object is effective through the entire document.- Throws:
SAXException
-
endDocument
void endDocument() throws SAXExceptionreceives notification of the end of a document.- Throws:
SAXException
-
characterChunk
void characterChunk(String literal, org.relaxng.datatype.Datatype type) throws SAXException
receives notification of a string.- Parameters:
literal- the contents.type- assigned type. The validator assigns this type for this literal.- Throws:
SAXException
-
startElement
void startElement(String namespaceURI, String localName, String qName) throws SAXException
receives notification of the start of an element. If this element has attributes, the start/endAttribute methods are called after this method.- Throws:
SAXException
-
endElement
void endElement(String namespaceURI, String localName, String qName, ElementExp type) throws SAXException
receives notification of the end of an element.- Parameters:
type- the type of this element.- Throws:
SAXException
-
startAttribute
void startAttribute(String namespaceURI, String localName, String qName) throws SAXException
receives notification of the start of an attribute. the value of the attribute is reported through the characterChunk method.- Throws:
SAXException
-
endAttribute
void endAttribute(String namespaceURI, String localName, String qName, AttributeExp type) throws SAXException
receives notification of the end of an attribute.- Parameters:
type- assigned type.- Throws:
SAXException
-
endAttributePart
void endAttributePart() throws SAXExceptionthis method is called after the start/endAttribute method are called for all attributes.- Throws:
SAXException
-
-