Class ContentHandlerAdaptor
java.lang.Object
com.sun.msv.writer.ContentHandlerAdaptor
- All Implemented Interfaces:
DocumentHandler
Adapt SAX2 ContentHandler as a SAX1 DocumentHandler.
This class wraps a ContentHandler and makes it act as a DocumentHandler.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) final classAdapt a SAX1 AttributeList as a SAX2 Attributes object. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ContentHandlerAdaptor.AttributeListAdapterprivate final AttributesImplprivate final ContentHandlerprivate final String[]private final booleanprivate final NamespaceSupportprivate final boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) Adapt a SAX1 characters event.voidAdapt a SAX1 end document event.voidendElement(String qName) Adapt a SAX1 end element event.voidignorableWhitespace(char[] ch, int start, int length) Adapt a SAX1 ignorable whitespace event.voidprocessingInstruction(String target, String data) Adapt a SAX1 processing instruction event.private String[]processName(String qName, boolean isAttribute) (package private) voidreportError(String message) Report a non-fatal error.voidsetDocumentLocator(Locator locator) Adapt a SAX1 document locator event.voidAdapt a SAX1 start document event.voidstartElement(String qName, AttributeList qAtts) Adapt a SAX1 startElement event.
-
Field Details
-
nsSupport
-
contentHandler
-
attAdapter
-
atts
-
namespaces
private final boolean namespaces- See Also:
-
prefixes
private final boolean prefixes- See Also:
-
nameParts
-
-
Constructor Details
-
ContentHandlerAdaptor
-
-
Method Details
-
setDocumentLocator
Adapt a SAX1 document locator event.- Specified by:
setDocumentLocatorin interfaceDocumentHandler- Parameters:
locator- A document locator.- See Also:
-
startDocument
Adapt a SAX1 start document event.- Specified by:
startDocumentin interfaceDocumentHandler- Throws:
SAXException- The client may raise a processing exception.- See Also:
-
endDocument
Adapt a SAX1 end document event.- Specified by:
endDocumentin interfaceDocumentHandler- Throws:
SAXException- The client may raise a processing exception.- See Also:
-
startElement
Adapt a SAX1 startElement event.If necessary, perform Namespace processing.
- Specified by:
startElementin interfaceDocumentHandler- Parameters:
qName- The qualified (prefixed) name.qAtts- The XML 1.0 attribute list (with qnames).- Throws:
SAXException
-
endElement
Adapt a SAX1 end element event.- Specified by:
endElementin interfaceDocumentHandler- Parameters:
qName- The qualified (prefixed) name.- Throws:
SAXException- The client may raise a processing exception.- See Also:
-
characters
Adapt a SAX1 characters event.- Specified by:
charactersin interfaceDocumentHandler- Parameters:
ch- An array of characters.start- The starting position in the array.length- The number of characters to use.- Throws:
SAXException- The client may raise a processing exception.- See Also:
-
ignorableWhitespace
Adapt a SAX1 ignorable whitespace event.- Specified by:
ignorableWhitespacein interfaceDocumentHandler- Parameters:
ch- An array of characters.start- The starting position in the array.length- The number of characters to use.- Throws:
SAXException- The client may raise a processing exception.- See Also:
-
processingInstruction
Adapt a SAX1 processing instruction event.- Specified by:
processingInstructionin interfaceDocumentHandler- Parameters:
target- The processing instruction target.data- The remainder of the processing instruction- Throws:
SAXException- The client may raise a processing exception.- See Also:
-
processName
- Throws:
SAXException
-
reportError
Report a non-fatal error.- Parameters:
message- The error message.- Throws:
SAXException- The client may throw an exception.
-