Package com.sun.tools.xjc.reader.dtd
Class TDTDReader
java.lang.Object
com.sun.xml.dtdparser.DTDHandlerBase
com.sun.tools.xjc.reader.dtd.TDTDReader
- All Implemented Interfaces:
com.sun.xml.dtdparser.DTDEventListener,EventListener
public class TDTDReader
extends com.sun.xml.dtdparser.DTDHandlerBase
Parses DTD grammar along with binding information into BGM.
- Author:
- Kohsuke KAWAGUCHI
-
Field Summary
Fields inherited from interface com.sun.xml.dtdparser.DTDEventListener
CHOICE, CONTENT_MODEL_ANY, CONTENT_MODEL_CHILDREN, CONTENT_MODEL_EMPTY, CONTENT_MODEL_MIXED, OCCURENCE_ONCE, OCCURENCE_ONE_OR_MORE, OCCURENCE_ZERO_OR_MORE, OCCURENCE_ZERO_OR_ONE, SEQUENCE, USE_FIXED, USE_IMPLIED, USE_NORMAL, USE_REQUIRED -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTDTDReader(ErrorReceiver errorReceiver, Options opts, InputSource _bindInfo) -
Method Summary
Modifier and TypeMethodDescriptionvoidattributeDecl(String elementName, String attributeName, String attributeType, String[] enumeration, short attributeUse, String defaultValue) voidchildElement(String elementName, short occurence) voidconnector(short connectorType) protected CPropertyInfocreateAttribute(String elementName, String attributeName, String attributeType, String[] enums, short attributeUse, String defaultValue) voidendContentModel(String elementName, short contentModelType) voidendDTD()voidendModelGroup(short occurence) protected final voidvoidvoidstatic Modelparse(InputSource dtd, InputSource bindingInfo, ErrorReceiver errorReceiver, Options opts) Parses DTD grammar and a binding information into BGM.voidvoidstartContentModel(String elementName, short contentModelType) voidstartDTD(com.sun.xml.dtdparser.InputEntity entity) voidvoidMethods inherited from class com.sun.xml.dtdparser.DTDHandlerBase
characters, comment, endCDATA, externalGeneralEntityDecl, externalParameterEntityDecl, ignorableWhitespace, internalGeneralEntityDecl, internalParameterEntityDecl, mixedElement, notationDecl, processingInstruction, startCDATA, unparsedEntityDecl
-
Constructor Details
-
TDTDReader
protected TDTDReader(ErrorReceiver errorReceiver, Options opts, InputSource _bindInfo) throws AbortException - Throws:
AbortException
-
-
Method Details
-
parse
public static Model parse(InputSource dtd, InputSource bindingInfo, ErrorReceiver errorReceiver, Options opts) Parses DTD grammar and a binding information into BGM.This method is just a utility method that covers 80% of the use cases.
- Parameters:
bindingInfo- binding information file, if any. Can be null.
-
startDTD
- Specified by:
startDTDin interfacecom.sun.xml.dtdparser.DTDEventListener- Overrides:
startDTDin classcom.sun.xml.dtdparser.DTDHandlerBase- Throws:
SAXException
-
endDTD
- Specified by:
endDTDin interfacecom.sun.xml.dtdparser.DTDEventListener- Overrides:
endDTDin classcom.sun.xml.dtdparser.DTDHandlerBase- Throws:
SAXException
-
attributeDecl
public void attributeDecl(String elementName, String attributeName, String attributeType, String[] enumeration, short attributeUse, String defaultValue) throws SAXException - Specified by:
attributeDeclin interfacecom.sun.xml.dtdparser.DTDEventListener- Overrides:
attributeDeclin classcom.sun.xml.dtdparser.DTDHandlerBase- Throws:
SAXException
-
createAttribute
protected CPropertyInfo createAttribute(String elementName, String attributeName, String attributeType, String[] enums, short attributeUse, String defaultValue) throws SAXException - Throws:
SAXException
-
startContentModel
- Specified by:
startContentModelin interfacecom.sun.xml.dtdparser.DTDEventListener- Overrides:
startContentModelin classcom.sun.xml.dtdparser.DTDHandlerBase- Throws:
SAXException
-
endContentModel
- Specified by:
endContentModelin interfacecom.sun.xml.dtdparser.DTDEventListener- Overrides:
endContentModelin classcom.sun.xml.dtdparser.DTDHandlerBase- Throws:
SAXException
-
startModelGroup
- Specified by:
startModelGroupin interfacecom.sun.xml.dtdparser.DTDEventListener- Overrides:
startModelGroupin classcom.sun.xml.dtdparser.DTDHandlerBase- Throws:
SAXException
-
endModelGroup
- Specified by:
endModelGroupin interfacecom.sun.xml.dtdparser.DTDEventListener- Overrides:
endModelGroupin classcom.sun.xml.dtdparser.DTDHandlerBase- Throws:
SAXException
-
connector
- Specified by:
connectorin interfacecom.sun.xml.dtdparser.DTDEventListener- Overrides:
connectorin classcom.sun.xml.dtdparser.DTDHandlerBase- Throws:
SAXException
-
childElement
- Specified by:
childElementin interfacecom.sun.xml.dtdparser.DTDEventListener- Overrides:
childElementin classcom.sun.xml.dtdparser.DTDHandlerBase- Throws:
SAXException
-
setDocumentLocator
- Specified by:
setDocumentLocatorin interfacecom.sun.xml.dtdparser.DTDEventListener- Overrides:
setDocumentLocatorin classcom.sun.xml.dtdparser.DTDHandlerBase
-
error
- Specified by:
errorin interfacecom.sun.xml.dtdparser.DTDEventListener- Overrides:
errorin classcom.sun.xml.dtdparser.DTDHandlerBase- Throws:
SAXException
-
fatalError
- Specified by:
fatalErrorin interfacecom.sun.xml.dtdparser.DTDEventListener- Overrides:
fatalErrorin classcom.sun.xml.dtdparser.DTDHandlerBase- Throws:
SAXException
-
warning
- Specified by:
warningin interfacecom.sun.xml.dtdparser.DTDEventListener- Overrides:
warningin classcom.sun.xml.dtdparser.DTDHandlerBase- Throws:
SAXException
-
error
-