Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
com.sun.msv.reader.dtd.DTDReader
TREXGrammar
object that exactly matches to
the parsed DTD.
Each element declaration will have its own ReferenceExp by the name
of the element.
Note that this class does NOT extend GrammarReader, because DTD
is not written in XML format.
Field Summary | |
static String | |
static String | |
static String |
Fields inherited from interface com.sun.msv.scanner.dtd.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 | |
|
Method Summary | |
void |
|
void |
|
void |
|
void |
|
void |
|
Datatype |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
Locator |
|
TREXGrammar |
|
void |
|
void |
|
void |
|
boolean |
|
void |
|
void |
|
static TREXGrammar |
|
static TREXGrammar |
|
void |
|
String |
|
void |
|
void |
|
void |
|
void | |
void |
|
void |
|
void | |
void |
|
void |
|
public static final String ERR_UNDECLARED_PREFIX
public static final String ERR_UNDEFINED_ELEMENT
public static final String WRN_ATTEMPT_TO_USE_NAMESPACE
public void attributeDecl(String elementName, String attributeName, String attributeType, String[] enums, short attributeUse, String defaultValue) throws SAXException
- Specified by:
- attributeDecl in interface DTDEventListener
public void characters(ch[] , int start, int length) throws SAXException
- Specified by:
- characters in interface DTDEventListener
public void childElement(String elementName, short occurence)
- Specified by:
- childElement in interface DTDEventListener
public void comment(String n) throws SAXException
- Specified by:
- comment in interface DTDEventListener
public void connector(short type) throws SAXException
- Specified by:
- connector in interface DTDEventListener
public Datatype createDatatype(String name)
Obtains a Datatype object from its name.
public void endCDATA() throws SAXException
- Specified by:
- endCDATA in interface DTDEventListener
public void endContentModel(String elementName, short type)
- Specified by:
- endContentModel in interface DTDEventListener
public void endModelGroup(short occurence)
- Specified by:
- endModelGroup in interface DTDEventListener
public void error(SAXParseException e) throws SAXException
- Specified by:
- error in interface DTDEventListener
public void externalGeneralEntityDecl(String n, String p, String s) throws SAXException
- Specified by:
- externalGeneralEntityDecl in interface DTDEventListener
public void externalParameterEntityDecl(String n, String p, String s) throws SAXException
- Specified by:
- externalParameterEntityDecl in interface DTDEventListener
public void fatalError(SAXParseException e) throws SAXException
- Specified by:
- fatalError in interface DTDEventListener
public Locator getDeclaredLocationOf(Object o)
public TREXGrammar getResult()
Obtains the parsed grammar object.
- Returns:
- null if there was an error. Otherwise a parsed grammar object will be returned.
public void ignorableWhitespace(ch[] , int start, int length) throws SAXException
- Specified by:
- ignorableWhitespace in interface DTDEventListener
public void internalGeneralEntityDecl(String n, String v) throws SAXException
- Specified by:
- internalGeneralEntityDecl in interface DTDEventListener
public void internalParameterEntityDecl(String n, String v) throws SAXException
- Specified by:
- internalParameterEntityDecl in interface DTDEventListener
public boolean isUnparsedEntity(String entityName)
public void mixedElement(String elementName)
- Specified by:
- mixedElement in interface DTDEventListener
public void notationDecl(String name, String publicId, String systemId) throws SAXException
- Specified by:
- notationDecl in interface DTDEventListener
public static TREXGrammar parse(InputSource source, GrammarReaderController controller, ExpressionPool pool)
public void processingInstruction(String target, String data) throws SAXException
- Specified by:
- processingInstruction in interface DTDEventListener
public String resolveNamespacePrefix(String prefix)
public void setDatatypeLibrary(DatatypeLibrary datatypeLibrary)
public void setDeclaredLocationOf(Object o)
public void setDocumentLocator(Locator loc)
- Specified by:
- setDocumentLocator in interface DTDEventListener
public void startCDATA() throws SAXException
- Specified by:
- startCDATA in interface DTDEventListener
public void startContentModel(String elementName, short type)
- Specified by:
- startContentModel in interface DTDEventListener
public void startDTD(InputEntity in) throws SAXException
- Specified by:
- startDTD in interface DTDEventListener
public void startModelGroup()
- Specified by:
- startModelGroup in interface DTDEventListener
public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException
- Specified by:
- unparsedEntityDecl in interface DTDEventListener
public void warning(SAXParseException e) throws SAXException
- Specified by:
- warning in interface DTDEventListener