[osis-core] Just the header

Patrick Durusau osis-core@bibletechnologieswg.org
Mon, 13 May 2002 08:20:07 -0400


This is a multi-part message in MIME format.
--------------010200030604030901010805
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Guys,

I think the problem is that I have been changing too many things at once 
and then not being able to trace the problems.

Attached is just the header material. Should allow elements to occur as 
shown, (only one title since title will recur when I insert the right 
model).

Validates with XMLSpy.

Note that I have converted a lot of stuff to xs:string simply to get it 
to validate, not to indicate a decision, just to check the integrity of 
this part.

About to leave now, but will do similar things for the rest of the 
schema by pieces.

Poor way to proceed but it looks like it may work better for me in 
isolating the problem areas.

Next big chunk will probably be <p> and <verse> with mixed content models.

Then I will move onto the regexes, etc.

Note that these are working documents and not actual interations of the 
schema.

Patrick

-- 
Patrick Durusau
Director of Research and Development
Society of Biblical Literature
pdurusau@emory.edu


--------------010200030604030901010805
Content-Type: text/plain;
 name="OSISCore_1.test2.xsd"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="OSISCore_1.test2.xsd"

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
	elementFormDefault="unqualified">

<xs:element name="osisText">
	<xs:complexType>
		<xs:sequence>
			<xs:element ref="header" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="front" minOccurs="0" maxOccurs="1"/>
			<xs:element ref="body" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="back" minOccurs="0" maxOccurs="1"/>
		</xs:sequence>
			<xs:attribute name="work" type="osisWork" use="optional"/>
			<xs:attribute name="refSys" type="osisRef" use="optional"/>
			<xs:attributeGroup ref="globalAttributes"/>
	</xs:complexType>
</xs:element>


<xs:element name="header">

	<xs:complexType>
		<xs:sequence>
			<xs:element ref="title" minOccurs="0"/>
			<xs:element ref="contributor" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="creator" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="subject" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="description" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="publisher" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="type" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="format" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="identifier" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="source" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="language" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="relation" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="coverage" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="rights" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="revisionDesc" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
</xs:element>

<!-- elements for header, with exception of title -->

<xs:element name="contributor">
	<xs:complexType>
		<xs:simpleContent> 	
			<xs:extension base="xs:string">
				<xs:attributeGroup ref="globalAttributes"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
</xs:element>

<xs:element name="creator">
	<xs:complexType>
		<xs:simpleContent> 	
			<xs:extension base="xs:string">
				<xs:attribute name="resp" type="xs:string" use="required"/>
				<xs:attribute name="role" type="xs:string" use="required"/>
				<xs:attributeGroup ref="globalAttributes"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
</xs:element>

<xs:element name="subject">
	<xs:complexType>
		<xs:simpleContent> 	
			<xs:extension base="xs:string">
				<xs:attributeGroup ref="globalAttributes"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
</xs:element>

<xs:element name="description">
	<xs:complexType>
		<xs:simpleContent> 	
			<xs:extension base="xs:string">
				<xs:attributeGroup ref="globalAttributes"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
</xs:element>

<xs:element name="publisher">
	<xs:complexType>
		<xs:simpleContent> 	
			<xs:extension base="xs:string">
				<xs:attributeGroup ref="globalAttributes"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
</xs:element>

<xs:element name="type">
	<xs:complexType>
		<xs:simpleContent> 	
			<xs:extension base="xs:string">
				<xs:attributeGroup ref="globalAttributes"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
</xs:element>

<xs:element name="format">
	<xs:complexType>
		<xs:simpleContent> 	
			<xs:extension base="xs:string">
				<xs:attributeGroup ref="globalAttributes"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
</xs:element>

<xs:element name="identifier">
	<xs:complexType>
		<xs:simpleContent> 	
			<xs:extension base="xs:string">
				<xs:attributeGroup ref="globalAttributes"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
</xs:element>

<xs:element name="source">
	<xs:complexType>
		<xs:simpleContent> 	
			<xs:extension base="xs:string">
				<xs:attributeGroup ref="globalAttributes"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
</xs:element>

<xs:element name="language">
	<xs:complexType>
		<xs:simpleContent> 	
			<xs:extension base="xs:string">
				<xs:attributeGroup ref="globalAttributes"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
</xs:element>

<xs:element name="relation">
	<xs:complexType>
		<xs:simpleContent> 	
			<xs:extension base="xs:string">
				<xs:attributeGroup ref="globalAttributes"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
</xs:element>

<xs:element name="coverage">
	<xs:complexType>
		<xs:simpleContent> 	
			<xs:extension base="xs:string">
				<xs:attributeGroup ref="globalAttributes"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
</xs:element>

<xs:element name="rights">
	<xs:complexType>
		<xs:simpleContent> 	
			<xs:extension base="xs:string">
				<xs:attributeGroup ref="globalAttributes"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
</xs:element>

<xs:element name="revisionDesc">
	<xs:complexType>
		<xs:sequence>
			<xs:element ref="date" minOccurs="1"/>
			<xs:element ref="resp" minOccurs="1"/>
			<xs:element ref="p" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attributeGroup ref="globalAttributes"/>
		<xs:attribute name="TEIform" fixed="revisionDesc"/>
	</xs:complexType>
</xs:element>


<!-- end of header elements -->

<!-- major structural elements -->

<xs:element name="front">
	<xs:complexType>
		<xs:sequence>
			<xs:element ref="title" minOccurs="0"/>
			<xs:element ref="div" minOccurs="1" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attributeGroup ref="globalAttributes"/>
	</xs:complexType>
</xs:element>

<xs:element name="body">
	<xs:complexType>
		<xs:sequence>
			<xs:element ref="title" minOccurs="0"/>
			<xs:element ref="div" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attributeGroup ref="globalAttributes"/>
		<xs:attribute name="TEIform" fixed="body"/>
	</xs:complexType>
</xs:element>
	
<xs:element name="back">
	<xs:complexType>
		<xs:sequence>
			<xs:element ref="title" minOccurs="0"/>
			<xs:element ref="div" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attributeGroup ref="globalAttributes"/>
		<xs:attribute name="TEIform" fixed="back"/>
	</xs:complexType>
</xs:element>

<!-- end of major structural elements -->


<!-- elements to just validate the foregoing -->

<xs:element name="date" type="xs:string"/>

<xs:element name="div" type="xs:string"/>

<xs:element name="p" type="xs:string"/>

<xs:element name="resp" type="xs:string"/>

<xs:element name="title" type="xs:string"/>


<xs:attributeGroup name="globalAttributes">
		<xs:attribute name="ews" type="xs:string" use="optional"/>
		<xs:attribute name="ID" type="xs:ID" use="optional"/>
		<xs:attribute name="lang" type="xs:string" use="optional"/>
		<xs:attribute name="type" type="xs:string" use="optional"/>
		<xs:attribute name="n" type="xs:string" use="optional"/>
</xs:attributeGroup>



<!-- simple types -->

<xs:simpleType name="osisWork">
	<xs:restriction base="xs:string"/>
</xs:simpleType>

<xs:simpleType name="osisRef">
	<xs:restriction base="xs:string"/>
</xs:simpleType>

</xs:schema>
--------------010200030604030901010805--