http://www.tireme.fr/xs2dtd/xs2DTDHandler
Contents
Managing imports for the need of comment elements
Tracking information from original schema
xs2dtd — Root of the structure, including n schema2dtd structures
<xs:element name="xs2dtd"><xs:complexType mixed="false"></xs:element><xs:sequence></xs:complexType><xs:element ref="nsDefs"> </xs:element><xs:element maxOccurs="unbounded" ref="xs2dtdHandler"> </xs:element></xs:sequence>
nsDefs — Global definitions of all used namespaces
<xs:element name="nsDefs"><xs:complexType mixed="false"></xs:element><xs:sequence maxOccurs="unbounded"></xs:complexType><xs:element ref="nsDef"> </xs:element></xs:sequence>
nsDef — Namespace/prefix declaration
xs2dtdHandler — structure handling information from a Schema : contains only parameter entity definitions and element declaration
| Name | Type | Use | Default val. | Facets |
| handlerId | xs:ID | optional | ||
| type | Enumerated values: main | include | import |
<xs:element name="xs2dtdHandler"><xs:complexType mixed="false"></xs:element><xs:sequence><xs:element minOccurs="0" ref="globalProperties"> </xs:element><xs:element ref="declarations"> </xs:element></xs:sequence><xs:attribute name="handlerId" type="xs:ID" use="optional"/><xs:attribute name="type"></xs:complexType><xs:simpleType></xs:attribute><xs:restriction base="xs:string"></xs:simpleType><xs:enumeration value="main"/><xs:enumeration value="include"/><xs:enumeration value="import"/></xs:restriction>
globalProperties — Properties for the main structure
<xs:element name="globalProperties"><xs:complexType mixed="false"></xs:element><xs:sequence></xs:complexType><xs:element ref="xsProperties"> </xs:element><xs:element minOccurs="0" ref="sdProperties"> </xs:element></xs:sequence>
xsProperties — Properties extracted from XML Schema file relevant to the xs namespace itself
<xs:element name="xsProperties"><xs:complexType mixed="false"></xs:element><xs:sequence></xs:complexType><xs:element ref="xsFileProperties"> </xs:element><xs:choice><xs:element ref="targetNamespace"> </xs:element><xs:element ref="noTargetNamespace"> </xs:element></xs:choice><xs:element ref="qualificationScope"> </xs:element></xs:sequence>
qualificationScope — Misc informations about qualification (elemFormDefault, attributeFormDefault)
sdProperties — Properties extracted from XML Schema file relevant to the SchemaDoc namespace
<xs:element name="sdProperties"><xs:complexType mixed="false"></xs:element><xs:sequence maxOccurs="unbounded"></xs:complexType><xs:element ref="sdProperty"> </xs:element></xs:sequence>
sdProperty — Generic SchemaDoc property management
declarations — All declarations : parameter entities and element declarations, comment -from xs annotation- may be found.
<xs:element name="declarations"><xs:complexType mixed="false"></xs:element><xs:choice maxOccurs="unbounded"></xs:complexType><xs:element ref="peDef"> </xs:element><xs:element ref="elementDecl"> </xs:element><xs:element ref="attributesDecl"> </xs:element><xs:element ref="peRef"> </xs:element><xs:element ref="comment"> </xs:element><xs:element ref="notation"> </xs:element></xs:choice>
peDef — Parameter Entity declaration. May be a simple content model (from simpleType), a complex content model (from complexType, group), attributes declarations (complexType, attribute, attributeGroup)
peType — parameterEntities
attributePeType - attributeContentPEType - contentModelPeType - externalPeType
<xs:complexType mixed="false" name="peType"><xs:sequence></xs:complexType><xs:element ref="qName"> </xs:element><xs:element minOccurs="0" ref="comment"> </xs:element><xs:element maxOccurs="unbounded" minOccurs="0" ref="schemaOrigin"> </xs:element><xs:choice minOccurs="0"></xs:sequence><xs:element ref="externalRef"> </xs:element><xs:element ref="contentModel"> </xs:element><xs:element ref="attributes"> </xs:element><xs:element ref="attributeTypeContent"> </xs:element></xs:choice>
elementDecl — element declaration
<xs:element name="elementDecl"><xs:complexType mixed="false"></xs:element><xs:sequence></xs:complexType><xs:element ref="qName"> </xs:element><xs:element maxOccurs="unbounded" minOccurs="0" ref="schemaOrigin"> </xs:element><xs:element minOccurs="0" ref="comment"> </xs:element><xs:element ref="contentModel"> </xs:element><xs:element minOccurs="0" ref="attributes"> </xs:element></xs:sequence>
attributesDecl — case of complex type redefinition, a new attribute is defined. In this cas, it generates a peDef and an attribute declaration -for an elemRef- with a peRef. The attributes decl refers to an element declared somewhere (referenced by elementRef)
<xs:element name="attributesDecl"><xs:complexType mixed="false"></xs:element><xs:sequence></xs:complexType><xs:element ref="elementRef"> </xs:element><xs:element maxOccurs="unbounded" minOccurs="0" ref="schemaOrigin"> </xs:element><xs:element ref="attributes"> </xs:element></xs:sequence>
publicEntitySetName — Reference to a public declared name, in the case where inclusion is not managed by xs2dtd
qNameType — qualified name (namespace and local name)
comment — comment : may include any XSD structure, and particulary : xs:annotation elements and original xs structures (complexTypes, simpleTypes, ect...)