public class TDTDReader
extends com.sun.xml.dtdparser.DTDHandlerBase
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
Modifier | Constructor and Description |
---|---|
protected |
TDTDReader(ErrorReceiver errorReceiver,
Options opts,
InputSource _bindInfo) |
Modifier and Type | Method and Description |
---|---|
void |
attributeDecl(String elementName,
String attributeName,
String attributeType,
String[] enumeration,
short attributeUse,
String defaultValue) |
void |
childElement(String elementName,
short occurence) |
void |
connector(short connectorType) |
protected CPropertyInfo |
createAttribute(String elementName,
String attributeName,
String attributeType,
String[] enums,
short attributeUse,
String defaultValue) |
void |
endContentModel(String elementName,
short contentModelType) |
void |
endDTD() |
void |
endModelGroup(short occurence) |
protected void |
error(Locator loc,
String prop,
Object... args) |
void |
error(SAXParseException e) |
void |
fatalError(SAXParseException e) |
static Model |
parse(InputSource dtd,
InputSource bindingInfo,
ErrorReceiver errorReceiver,
Options opts)
Parses DTD grammar and a binding information into BGM.
|
void |
setDocumentLocator(Locator loc) |
void |
startContentModel(String elementName,
short contentModelType) |
void |
startDTD(com.sun.xml.dtdparser.InputEntity entity) |
void |
startModelGroup() |
void |
warning(SAXParseException e) |
characters, comment, endCDATA, externalGeneralEntityDecl, externalParameterEntityDecl, ignorableWhitespace, internalGeneralEntityDecl, internalParameterEntityDecl, mixedElement, notationDecl, processingInstruction, startCDATA, unparsedEntityDecl
protected TDTDReader(ErrorReceiver errorReceiver, Options opts, InputSource _bindInfo) throws AbortException
AbortException
public static Model parse(InputSource dtd, InputSource bindingInfo, ErrorReceiver errorReceiver, Options opts)
This method is just a utility method that covers 80% of the use cases.
bindingInfo
- binding information file, if any. Can be null.public void startDTD(com.sun.xml.dtdparser.InputEntity entity) throws SAXException
startDTD
in interface com.sun.xml.dtdparser.DTDEventListener
startDTD
in class com.sun.xml.dtdparser.DTDHandlerBase
SAXException
public void endDTD() throws SAXException
endDTD
in interface com.sun.xml.dtdparser.DTDEventListener
endDTD
in class com.sun.xml.dtdparser.DTDHandlerBase
SAXException
public void attributeDecl(String elementName, String attributeName, String attributeType, String[] enumeration, short attributeUse, String defaultValue) throws SAXException
attributeDecl
in interface com.sun.xml.dtdparser.DTDEventListener
attributeDecl
in class com.sun.xml.dtdparser.DTDHandlerBase
SAXException
protected CPropertyInfo createAttribute(String elementName, String attributeName, String attributeType, String[] enums, short attributeUse, String defaultValue) throws SAXException
SAXException
public void startContentModel(String elementName, short contentModelType) throws SAXException
startContentModel
in interface com.sun.xml.dtdparser.DTDEventListener
startContentModel
in class com.sun.xml.dtdparser.DTDHandlerBase
SAXException
public void endContentModel(String elementName, short contentModelType) throws SAXException
endContentModel
in interface com.sun.xml.dtdparser.DTDEventListener
endContentModel
in class com.sun.xml.dtdparser.DTDHandlerBase
SAXException
public void startModelGroup() throws SAXException
startModelGroup
in interface com.sun.xml.dtdparser.DTDEventListener
startModelGroup
in class com.sun.xml.dtdparser.DTDHandlerBase
SAXException
public void endModelGroup(short occurence) throws SAXException
endModelGroup
in interface com.sun.xml.dtdparser.DTDEventListener
endModelGroup
in class com.sun.xml.dtdparser.DTDHandlerBase
SAXException
public void connector(short connectorType) throws SAXException
connector
in interface com.sun.xml.dtdparser.DTDEventListener
connector
in class com.sun.xml.dtdparser.DTDHandlerBase
SAXException
public void childElement(String elementName, short occurence) throws SAXException
childElement
in interface com.sun.xml.dtdparser.DTDEventListener
childElement
in class com.sun.xml.dtdparser.DTDHandlerBase
SAXException
public void setDocumentLocator(Locator loc)
setDocumentLocator
in interface com.sun.xml.dtdparser.DTDEventListener
setDocumentLocator
in class com.sun.xml.dtdparser.DTDHandlerBase
public void error(SAXParseException e) throws SAXException
error
in interface com.sun.xml.dtdparser.DTDEventListener
error
in class com.sun.xml.dtdparser.DTDHandlerBase
SAXException
public void fatalError(SAXParseException e) throws SAXException
fatalError
in interface com.sun.xml.dtdparser.DTDEventListener
fatalError
in class com.sun.xml.dtdparser.DTDHandlerBase
SAXException
public void warning(SAXParseException e) throws SAXException
warning
in interface com.sun.xml.dtdparser.DTDEventListener
warning
in class com.sun.xml.dtdparser.DTDHandlerBase
SAXException
Copyright © 2019 JBoss by Red Hat. All rights reserved.