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, java.util.EventListener
public class TDTDReader
- extends com.sun.xml.dtdparser.DTDHandlerBase
Parses DTD grammar along with binding information into BGM.
| 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 |
|
Method Summary |
void |
attributeDecl(java.lang.String elementName,
java.lang.String attributeName,
java.lang.String attributeType,
java.lang.String[] enumeration,
short attributeUse,
java.lang.String defaultValue)
|
void |
childElement(java.lang.String elementName,
short occurence)
|
void |
connector(short connectorType)
|
void |
endContentModel(java.lang.String elementName,
short contentModelType)
|
void |
endDTD()
|
void |
endModelGroup(short occurence)
|
void |
error(org.xml.sax.SAXParseException e)
|
void |
fatalError(org.xml.sax.SAXParseException e)
|
static Model |
parse(org.xml.sax.InputSource dtd,
org.xml.sax.InputSource bindingInfo,
ErrorReceiver errorReceiver,
Options opts)
Parses DTD grammar and a binding information into BGM. |
void |
setDocumentLocator(org.xml.sax.Locator loc)
|
void |
startContentModel(java.lang.String elementName,
short contentModelType)
|
void |
startDTD(com.sun.xml.dtdparser.InputEntity entity)
|
void |
startModelGroup()
|
void |
warning(org.xml.sax.SAXParseException e)
|
| Methods inherited from class com.sun.xml.dtdparser.DTDHandlerBase |
characters, comment, endCDATA, externalGeneralEntityDecl, externalParameterEntityDecl, ignorableWhitespace, internalGeneralEntityDecl, internalParameterEntityDecl, mixedElement, notationDecl, processingInstruction, startCDATA, unparsedEntityDecl |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parse
public static Model parse(org.xml.sax.InputSource dtd,
org.xml.sax.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
public void startDTD(com.sun.xml.dtdparser.InputEntity entity)
throws org.xml.sax.SAXException
- Specified by:
startDTD in interface com.sun.xml.dtdparser.DTDEventListener- Overrides:
startDTD in class com.sun.xml.dtdparser.DTDHandlerBase
- Throws:
org.xml.sax.SAXException
endDTD
public void endDTD()
throws org.xml.sax.SAXException
- Specified by:
endDTD in interface com.sun.xml.dtdparser.DTDEventListener- Overrides:
endDTD in class com.sun.xml.dtdparser.DTDHandlerBase
- Throws:
org.xml.sax.SAXException
attributeDecl
public void attributeDecl(java.lang.String elementName,
java.lang.String attributeName,
java.lang.String attributeType,
java.lang.String[] enumeration,
short attributeUse,
java.lang.String defaultValue)
throws org.xml.sax.SAXException
- Specified by:
attributeDecl in interface com.sun.xml.dtdparser.DTDEventListener- Overrides:
attributeDecl in class com.sun.xml.dtdparser.DTDHandlerBase
- Throws:
org.xml.sax.SAXException
startContentModel
public void startContentModel(java.lang.String elementName,
short contentModelType)
throws org.xml.sax.SAXException
- Specified by:
startContentModel in interface com.sun.xml.dtdparser.DTDEventListener- Overrides:
startContentModel in class com.sun.xml.dtdparser.DTDHandlerBase
- Throws:
org.xml.sax.SAXException
endContentModel
public void endContentModel(java.lang.String elementName,
short contentModelType)
throws org.xml.sax.SAXException
- Specified by:
endContentModel in interface com.sun.xml.dtdparser.DTDEventListener- Overrides:
endContentModel in class com.sun.xml.dtdparser.DTDHandlerBase
- Throws:
org.xml.sax.SAXException
startModelGroup
public void startModelGroup()
throws org.xml.sax.SAXException
- Specified by:
startModelGroup in interface com.sun.xml.dtdparser.DTDEventListener- Overrides:
startModelGroup in class com.sun.xml.dtdparser.DTDHandlerBase
- Throws:
org.xml.sax.SAXException
endModelGroup
public void endModelGroup(short occurence)
throws org.xml.sax.SAXException
- Specified by:
endModelGroup in interface com.sun.xml.dtdparser.DTDEventListener- Overrides:
endModelGroup in class com.sun.xml.dtdparser.DTDHandlerBase
- Throws:
org.xml.sax.SAXException
connector
public void connector(short connectorType)
throws org.xml.sax.SAXException
- Specified by:
connector in interface com.sun.xml.dtdparser.DTDEventListener- Overrides:
connector in class com.sun.xml.dtdparser.DTDHandlerBase
- Throws:
org.xml.sax.SAXException
childElement
public void childElement(java.lang.String elementName,
short occurence)
throws org.xml.sax.SAXException
- Specified by:
childElement in interface com.sun.xml.dtdparser.DTDEventListener- Overrides:
childElement in class com.sun.xml.dtdparser.DTDHandlerBase
- Throws:
org.xml.sax.SAXException
setDocumentLocator
public void setDocumentLocator(org.xml.sax.Locator loc)
- Specified by:
setDocumentLocator in interface com.sun.xml.dtdparser.DTDEventListener- Overrides:
setDocumentLocator in class com.sun.xml.dtdparser.DTDHandlerBase
error
public void error(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
- Specified by:
error in interface com.sun.xml.dtdparser.DTDEventListener- Overrides:
error in class com.sun.xml.dtdparser.DTDHandlerBase
- Throws:
org.xml.sax.SAXException
fatalError
public void fatalError(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
- Specified by:
fatalError in interface com.sun.xml.dtdparser.DTDEventListener- Overrides:
fatalError in class com.sun.xml.dtdparser.DTDHandlerBase
- Throws:
org.xml.sax.SAXException
warning
public void warning(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
- Specified by:
warning in interface com.sun.xml.dtdparser.DTDEventListener- Overrides:
warning in class com.sun.xml.dtdparser.DTDHandlerBase
- Throws:
org.xml.sax.SAXException