[osis-core] <chapter> with two different models and stratgies for schema construction.
Todd Tillinghast
osis-core@bibletechnologieswg.org
Sun, 8 Jun 2003 12:44:15 -0600
Patrick,
The schema expresses what I have been trying to say with words (possibly
not very effictively). I think you now know what I have been trying to
say.
You will notice that the element definition of <osis> is not a masive
statement because of the use of named Complex types.
I agree, this should be an Aug and osis.1.5.1 issue.
I don't suppose the there will be an issue with using the "milestonable"
Complex type now and possibly extending the same elements that now
derive from "milestonable" from an other Complex types in the 1.5.1
schema. I am not saying that will be the case, but I think we should
leave that as an option when we look at things from the bigger
prespective. I also don't suppose anyone outside of our schema will be
using the named Complex type "milestonable".
Let me know if you find a problem with the XML files I sent last night,
as you consider tweeks to the schema.
Todd
> -----Original Message-----
> From: osis-core-admin@bibletechnologieswg.org
> [mailto:osis-core-admin@bibletechnologieswg.org] On Behalf Of
> Patrick Durusau
> Sent: Sunday, June 08, 2003 11:56 AM
> To: osis-core@bibletechnologieswg.org
> Subject: Re: [osis-core] <chapter> with two different models
> and stratgies for schema construction.
>
>
> Todd,
>
> Back online for a few minutes but about to get some sleep.
> Back on later
> today.
>
> Todd Tillinghast wrote:
>
> >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>.
> >
> Well, yes, but you have one global complex type and then define the
> "other" chapter element entirely in a content model. Clever
> but I don't
> know what it buys us in situations where I have to backup and use
> milestones. For example, I may think that I can use chapters
> (as opposed
> to divs) and all goes well until I hit one of the odd divisions that
> you, Chris and Troy were mentioning. At that point I do need
> to use the
> <chapter> milestones, and in fact have to backup to the last opening
> chapter element to do it. Question then is, do I back all the
> way up to
> make it completely consistent?
>
> Note that your solution solves the ambiguity problem by not
> allowing ref
> but defining the element inline. I was hearing you propose
> two elements
> of the same name, that is not what your proposal does, it creates
> elements with the "same" name in different spaces, but those
> names are
> in fact different. One operates only locally and the other globally.
>
> Still agree that we need to look at using more complexType
> definitions
> and extending from there but suspect that is an August agenda
> item. (In
> other words, I think I can finish the regexes and get all the other
> stuff validated today, so the gang can make sure I got
> everything from
> Dallas, but don't think I can restructure the entire schema
> in time for
> the quick release we need for 1.5. Since restructuring will
> (should) not
> have an impact on 1.5 documents, what do you think about an August
> release of 1.5.1?
>
> Hope you are having a great day!
>
> Patrick
>
> >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
> >
> >
> >-------------------------------------------------------------
> ----------
> >-
> >
> ><?xml version="1.0" encoding="UTF-8"?>
> ><osis xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="TwoElementsWithTheSameNameButDi
> fferentType.xsd">
> > <osisText>
> > <header/>
> > <div type="book">
> > <hi/>
> > <chapter><div></div></chapter>
> > </div>
> > <div type="book">
> > <div type="section">
> > <p>text text text text
> <chapter sID="A"/></p>
> > <p>
> > <chapter eID="A"/>
> > <chapter sID="B"/>
> > </p>
> > <chapter eID="B"/>
> > </div>
> > </div>
> > </osisText>
> ></osis>
> >
> >
> >-------------------------------------------------------------
> ----------
> >-
> >
> ><?xml version="1.0" encoding="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="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified" attributeFormDefault="unqualified">
> > <xs:complexType name="OSISType">
> > <xs:sequence>
> > <xs:element name="osisText"
> type="OSISTextType" maxOccurs="unbounded"/>
> > </xs:sequence>
> > </xs:complexType>
> > <xs:complexType name="OSISTextType">
> > <xs:sequence>
> > <xs:element name="header" type="HeaderType"/>
> > <xs:element name="div" type="DivType"
> maxOccurs="unbounded"/>
> > </xs:sequence>
> > </xs:complexType>
> > <xs:complexType name="SimpleContainerType">
> > <xs:sequence>
> > <xs:element name="seg" type="SegType"
> minOccurs="0" maxOccurs="unbounded"/>
> > <xs:element name="hi" type="HiType"
> minOccurs="0" maxOccurs="unbounded"/>
> > <xs:element name="divineName"
> type="DivineNameType" minOccurs="0" maxOccurs="unbounded"/>
> > </xs:sequence>
> > <xs:attribute name="type" type="xs:string"
> use="optional"/>
> > <xs:attribute name="osisID" type="xs:string"
> use="optional"/>
> > </xs:complexType>
> > <xs:complexType name="ContainerType">
> > <xs:complexContent>
> > <xs:extension base="SimpleContainerType">
> > <xs:sequence>
> > <xs:element name="div"
> type="DivType" minOccurs="0" maxOccurs="unbounded"/>
> > <xs:element name="p"
> type="PType" minOccurs="0" maxOccurs="unbounded"/>
> > </xs:sequence>
> > </xs:extension>
> > </xs:complexContent>
> > </xs:complexType>
> > <xs:complexType name="HeaderType"/>
> > <xs:complexType name="DivType">
> > <xs:complexContent>
> > <xs:extension base="ContainerType">
> > <xs:sequence>
> > <xs:element
> name="chapter" type="ChapterType" minOccurs="0"
> maxOccurs="unbounded"/>
> > </xs:sequence>
> > <xs:attribute name="scope"
> type="xs:string" use="optional"/>
> > </xs:extension>
> > </xs:complexContent>
> > </xs:complexType>
> > <xs:complexType name="PType" mixed="true">
> > <xs:complexContent mixed="true">
> > <xs:extension base="SimpleContainerType">
> > <xs:sequence>
> > <xs:element
> name="chapter" type="MilestoneChapterType" minOccurs="0"
> maxOccurs="unbounded"/>
> > </xs:sequence>
> > </xs:extension>
> > </xs:complexContent>
> > </xs:complexType>
> > <xs:complexType name="VerseType"/>
> > <xs:complexType name="ChapterType">
> > <xs:complexContent>
> > <xs:extension base="ContainerType">
> > <xs:attribute name="sID"
> type="xs:string" use="optional"/>
> > <xs:attribute name="eID"
> type="xs:string" use="optional"/>
> > </xs:extension>
> > </xs:complexContent>
> > </xs:complexType>
> > <xs:complexType name="MilestoneChapterType" mixed="false">
> > <xs:attribute name="sID" type="xs:string"
> use="optional"/>
> > <xs:attribute name="eID" type="xs:string"
> use="optional"/>
> > <xs:attribute name="osisID" type="xs:string"
> use="optional"/>
> > <xs:attribute name="type" type="xs:string"
> use="optional"/>
> > </xs:complexType>
> > <xs:complexType name="DivineNameType"/>
> > <xs:complexType name="HiType"/>
> > <xs:complexType name="SegType"/>
> > <xs:element name="osis">
> > <xs:complexType>
> > <xs:complexContent>
> > <xs:extension base="OSISType"/>
> > </xs:complexContent>
> > </xs:complexType>
> > </xs:element>
> ></xs:schema>
> >
> >
>
> --
> Patrick Durusau
> Director of Research and Development
> Society of Biblical Literature
> Patrick.Durusau@sbl-site.org
> Co-Editor, ISO 13250, Topic Maps -- Reference Model
>
> Topic Maps: Human, not artificial, intelligence at work!
>
>
>
>
> _______________________________________________
> osis-core mailing list
> osis-core@bibletechnologieswg.org
> http://www.bibletechnologieswg.org/mailman/lis> tinfo/osis-core
>