A SAX parser converting a DTD into an instance of XML Schema.
createElement
protected XsTTopLevelElement createElement(XsESchema pSchema,
String pName,
String pModel,
DTDParser.DTDAttribute[] pAttributes,
Locator pLocator)
throws SAXExceptionCreates an element named pName with the
content model pModel and the attribute
list pAttrs in the schema pSchema.
getDummyElementName
protected String getDummyElementName()
getLocator
public Locator getLocator()
Returns the document locator.
getMultiplicity
protected String getMultiplicity(String pToken)
Returns a tokens multiplicity.
getTargetNamespace
public XsAnyURI getTargetNamespace()
Returns the created schemas target namespace.
parse
public XSSchema parse(InputSource pInputSource)
throws ParserConfigurationException,
IOException,
SAXExceptionThis is the logical parsers frontend for parsing the given
InputSource. If the parsed schema includes or imports other
schemas, they are also parsed and added to the parsers object
tree.
- parse in interface XSLogicalParser
parse
protected void parse(XsESchema pSchema,
InputSource pSource)
throws ParserConfigurationException,
IOException,
SAXExceptionParses the given
org.xml.sax.InputSource and
converts it into an instance of
XsESchema.
parseChildren
protected DTDParser.ChildToken parseChildren(String pModel,
Locator pLocator)
throws SAXExceptionConverts a list of children into its tokens.
parseChildren
protected XsGAttrDecls parseChildren(XsTTopLevelElement pElement,
String pModel,
Locator pLocator)
throws SAXExceptionParses a content model with children. This content
model is specified as follows:
children ::= (choice | seq) ('?' | '*' | '+')?
cp ::= (Name | choice | seq) ('?' | '*' | '+')?
choice ::= '(' S? cp ( S? '|' S? cp )+ S? ')'
seq ::= '(' S? cp ( S? ',' S? cp )* S? ')'
parseMixed
protected XsGAttrDecls parseMixed(XsTTopLevelElement pElement,
String pModel,
Locator pLocator,
boolean pHasAttributes)
throws SAXExceptionParses a mixed content model. The mixed content model
is specified as follows:
Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*'
| '(' S? '#PCDATA' S? ')'
runXMLReader
protected void runXMLReader(InputSource pSource)
throws ParserConfigurationException,
IOException,
SAXExceptionParses the given DTD, filling the parsers
temporary map of elements.
setLocator
public void setLocator(Locator pLocator)
Sets the document locator.
setMultiplicity
protected void setMultiplicity(XsAGOccurs pOccurs,
String pMultiplicity)Sets the objects multiplicity.
setTargetNamespace
public void setTargetNamespace(XsAnyURI pTargetNamespace)
Sets the created schemas target namespace.