[osis-core] <chapter> with two different models and stratgies for schema construction.
Todd Tillinghast
osis-core@bibletechnologieswg.org
Sun, 8 Jun 2003 09:40:14 -0600
This is a multi-part message in MIME format.
------=_NextPart_000_0004_01C32DA1.F7B00B40
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Patrick,
I have attached a mini-schema and a related document to demonstrate the
following:
1) A schema with an element with the same name but a different model.
(<chapter>.
2) Strategy to use named simple and complex types rather than named
elements (other than <osis>.
3) Opportunity to use Complex and Simple types by extension. This will
help us in the future. (For example to do the things Kirk is wanting to
do, will be easier if there a number of named Simple and Complex types
that can be extended and supplanted.
The sample XML document is simple but demonstrates <chapter> as a
milestone and as a container. (Try to add content to <chapter/> that is
a child of <p>.)
I have not put a lot of thought into the most strategic "extension"
hierarchy. The extension model is only to demonstrate the idea.
Todd
------=_NextPart_000_0004_01C32DA1.F7B00B40
Content-Type: text/xml;
name="TwoElementsText.xml"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="TwoElementsText.xml"
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<osis xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" =
xsi:noNamespaceSchemaLocation=3D"TwoElementsWithTheSameNameButDifferentTy=
pe.xsd">
<osisText>
<header/>
<div type=3D"book">
<hi/>
<chapter><div></div></chapter>
</div>
<div type=3D"book">
<div type=3D"section">
<p>text text text text <chapter sID=3D"A"/></p>
<p>
<chapter eID=3D"A"/>
<chapter sID=3D"B"/>
</p>
<chapter eID=3D"B"/>
</div>
</div>
</osisText>
</osis>
------=_NextPart_000_0004_01C32DA1.F7B00B40
Content-Type: text/xml;
name="TwoElementsWithTheSameNameButDifferentType.xsd"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="TwoElementsWithTheSameNameButDifferentType.xsd"
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<!-- edited with XMLSPY v5 rel. 3 U (http://www.xmlspy.com) by Todd =
Tillinghast (CF) -->
<!-- edited with XML Spy v4.3 U (http://www.xmlspy.com) by Todd =
Tillinghast (private) -->
<xs:schema xmlns:xs=3D"http://www.w3.org/2001/XMLSchema" =
elementFormDefault=3D"qualified" attributeFormDefault=3D"unqualified">
<xs:complexType name=3D"OSISType">
<xs:sequence>
<xs:element name=3D"osisText" type=3D"OSISTextType" =
maxOccurs=3D"unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name=3D"OSISTextType">
<xs:sequence>
<xs:element name=3D"header" type=3D"HeaderType"/>
<xs:element name=3D"div" type=3D"DivType" maxOccurs=3D"unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name=3D"SimpleContainerType">
<xs:sequence>
<xs:element name=3D"seg" type=3D"SegType" minOccurs=3D"0" =
maxOccurs=3D"unbounded"/>
<xs:element name=3D"hi" type=3D"HiType" minOccurs=3D"0" =
maxOccurs=3D"unbounded"/>
<xs:element name=3D"divineName" type=3D"DivineNameType" =
minOccurs=3D"0" maxOccurs=3D"unbounded"/>
</xs:sequence>
<xs:attribute name=3D"type" type=3D"xs:string" use=3D"optional"/>
<xs:attribute name=3D"osisID" type=3D"xs:string" use=3D"optional"/>
</xs:complexType>
<xs:complexType name=3D"ContainerType">
<xs:complexContent>
<xs:extension base=3D"SimpleContainerType">
<xs:sequence>
<xs:element name=3D"div" type=3D"DivType" minOccurs=3D"0" =
maxOccurs=3D"unbounded"/>
<xs:element name=3D"p" type=3D"PType" minOccurs=3D"0" =
maxOccurs=3D"unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name=3D"HeaderType"/>
<xs:complexType name=3D"DivType">
<xs:complexContent>
<xs:extension base=3D"ContainerType">
<xs:sequence>
<xs:element name=3D"chapter" type=3D"ChapterType" minOccurs=3D"0" =
maxOccurs=3D"unbounded"/>
</xs:sequence>
<xs:attribute name=3D"scope" type=3D"xs:string" use=3D"optional"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name=3D"PType" mixed=3D"true">
<xs:complexContent mixed=3D"true">
<xs:extension base=3D"SimpleContainerType">
<xs:sequence>
<xs:element name=3D"chapter" type=3D"MilestoneChapterType" =
minOccurs=3D"0" maxOccurs=3D"unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name=3D"VerseType"/>
<xs:complexType name=3D"ChapterType">
<xs:complexContent>
<xs:extension base=3D"ContainerType">
<xs:attribute name=3D"sID" type=3D"xs:string" use=3D"optional"/>
<xs:attribute name=3D"eID" type=3D"xs:string" use=3D"optional"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name=3D"MilestoneChapterType" mixed=3D"false">
<xs:attribute name=3D"sID" type=3D"xs:string" use=3D"optional"/>
<xs:attribute name=3D"eID" type=3D"xs:string" use=3D"optional"/>
<xs:attribute name=3D"osisID" type=3D"xs:string" use=3D"optional"/>
<xs:attribute name=3D"type" type=3D"xs:string" use=3D"optional"/>
</xs:complexType>
<xs:complexType name=3D"DivineNameType"/>
<xs:complexType name=3D"HiType"/>
<xs:complexType name=3D"SegType"/>
<xs:element name=3D"osis">
<xs:complexType>
<xs:complexContent>
<xs:extension base=3D"OSISType"/>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:schema>
------=_NextPart_000_0004_01C32DA1.F7B00B40--