org.apache.ws.jaxme.xs.util
public class DTDParser extends XSLogicalParser
Nested Class Summary | |
---|---|
protected static class | DTDParser.ChildToken |
class | DTDParser.DtdDeclHandler Implementation of a {@link DeclHandler} for reading
the element and attribute declarations. |
class | DTDParser.DTDAttribute This class is used to collect the attributes in the
DTD temporarily. |
class | DTDParser.DTDElement This class is used to collect the elements in the
DTD temporarily. |
static class | DTDParser.StringBufferReader This class is similar to a StringReader, except that
it allows to extend the input dynamically. |
Method Summary | |
---|---|
protected void | addChildren(XsTTopLevelElement pElement, XsTExplicitGroup pGroup, DTDParser.ChildToken pToken, Locator pLocator) Adds the childs to a group. |
protected void | createAttribute(XsGAttrDecls pAttrDecls, DTDParser.DTDAttribute pAttribute) Creates a new attribute. |
protected XsTTopLevelElement | createElement(XsESchema pSchema, String pName, String pModel, DTDParser.DTDAttribute[] pAttributes, Locator pLocator) Creates an element named pName with the
content model pModel and the attribute
list pAttrs in the schema pSchema . |
XSContext | getData() |
protected String | getDummyElementName() |
Locator | getLocator() Returns the document locator. |
protected String | getMultiplicity(String pToken) Returns a tokens multiplicity. |
XsAnyURI | getTargetNamespace() Returns the created schemas target namespace. |
protected void | parse(XsESchema pSchema, InputSource pSource) Parses the given {@link org.xml.sax.InputSource} and
converts it into an instance of
{@link org.apache.ws.jaxme.xs.xml.XsESchema}. |
XSSchema | parse(InputSource pInputSource) |
protected DTDParser.ChildToken | parseChildren(String pModel, Locator pLocator) Converts a list of children into its tokens. |
protected XsGAttrDecls | parseChildren(XsTTopLevelElement pElement, String pModel, Locator pLocator) Parses a content model with children. |
protected XsGAttrDecls | parseMixed(XsTTopLevelElement pElement, String pModel, Locator pLocator, boolean pHasAttributes) Parses a mixed content model. |
protected void | runXMLReader(InputSource pSource) Parses the given DTD, filling the parsers
temporary map of elements. |
void | setLocator(Locator pLocator) Sets the document locator. |
protected void | setMultiplicity(XsAGOccurs pOccurs, String pMultiplicity) Sets the objects multiplicity. |
void | setTargetNamespace(XsAnyURI pTargetNamespace) Sets the created schemas target namespace. |
pName
with the
content model pModel
and the attribute
list pAttrs
in the schema pSchema
.children ::= (choice | seq) ('?' | '*' | '+')? cp ::= (Name | choice | seq) ('?' | '*' | '+')? choice ::= '(' S? cp ( S? '|' S? cp )+ S? ')' seq ::= '(' S? cp ( S? ',' S? cp )* S? ')'
Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*' | '(' S? '#PCDATA' S? ')'