[osis-core] Element Review: <div>

Chris Little osis-core@bibletechnologieswg.org
Wed, 19 Jun 2002 15:49:37 -0700


>>Just to make sure the proposal is clear, what I am proposing is
>>to change the schema from
>>
>><xs:element name="div">
>><xs:complexType mixed="true">
>> <xs:sequence>
>>  <xs:element ref="div" minOccurs="0" maxOccurs="unbounded/>
>>  <xs:choice minOccurs="0" maxOccurs="unbounded"> [lots of stuff here]
>></xs:choice>
>> </xs:sequence>
>>
>>to
>>
>><xs:element name="div">
>><xs:complexType mixed="true">
>> <xs:sequence>
>>  <xs:choice minOccurs="0" maxOccurs="unbounded"> [lots of stuff here]
>></xs:choice>
>>  <xs:element ref="div" minOccurs="0" maxOccurs="unbounded/>
>> </xs:sequence>
>>
> Not sure how the suggested solution differs from:
> 
> <xs:element name="div">
>   <xs:complexType mixed="true">
>     <xs:choice minOccurs="0" maxOccurs="unbounded">
>         Lots of stuff but certainly:
>         <xs:element ref="div"/>
>     </xs:choice>
> </xs:element>
> 
> If you are going to have div as an optional element inside of the first
> choice, I am not sure what we are gaining from the second optional div?
> Or am I missing something real obvious?

This final schema segment is what I was really suggesting--making <div> 
just another choice (along with <title>, <milestone>, etc.) within a 
parent <div> element.  For the most common usage, mandating a sequence 
where all <div>'s follow all other elements would be fine, except that 
<milestone>'s also need to be allowed between sibling <div>'s.  However, 
there are cases where a <div> will break into a subsection (that should 
be marked with a child <div>) and then resume the previous section.  E.g.:

<div>
some stuff
<div>
finer discussion of some stuff
</div>
transitional stuff
some other stuff
<div>
finer discussion of some other stuff
</div>
concluding remarks
</div>

This would not work unless <div> were allowed as a choice along with the 
other elements allowed within <div>'s.

--Chris