[osis-core] Creation of annotation schema.

Todd Tillinghast osis-core@bibletechnologieswg.org
Fri, 31 Jan 2003 13:40:59 -0700


This is a multi-part message in MIME format.

------=_NextPart_000_0003_01C2C92E.63EE37B0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

All,

Unfortunately, we cannot derive ComplexTypes in an annotation schema
from ComplexTypes in osisCore.1.1.1.xsd because there are explicitly
named ComplexTypes in osisCore.1.1.1.xsd.  All elements are created with
"in line" ComplexTypes rather than with separate and explicitly declared
and named ComplexTypes.


Here is what I was hoping to do.
	<xs:redefine schemaLocation="OSISCore.1.1.1.xsd">
		<xs:simpleType name="annotations">
			<xs:restriction base="osisCorpus">
				... not allow <osisText> and add in
<annotations>...
			</xs:restriction>
		</xs:simpleType>
		<xs:simpleType name="ann">
			<xs:restriction base="note">
				.. no real change other than to require
the osisRef ..			</xs:restriction>
		</xs:simpleType>
	</xs:redefine>

As a result of having no ComplexTypes in osisCore.1.1.1.xsd I have taken
the more the other route to get the same result.
 
See the attached schema.

I also enumerated osisAnnotations as {A, B, C} and that should be
changed to a more meaning full list.  Please submit suggestions.

I used the name "ann" for the element that parallels "note" to avoid
confusion because "annotation" is a SimpleType in osisCore.1.1.1.xsd and
is defined in XML Schema.  Suggestions on a better name?

Just a rough version but it may do the job.

Todd




------=_NextPart_000_0003_01C2C92E.63EE37B0
Content-Type: text/xml;
	name="annotation.xsd"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="annotation.xsd"

<?xml version=3D"1.0" encoding=3D"UTF-8"?>=0D<!-- edited with XMLSPY v5 =
rel. 3 U (http://www.xmlspy.com) by Todd Tillinghast (ContentFrameworks) =
-->=0D<xs:schema xmlns:xs=3D"http://www.w3.org/2001/XMLSchema" =
elementFormDefault=3D"unqualified">=0D	<xs:include =
schemaLocation=3D"osisCore.1.1.1.xsd"/>=0D	<xs:element =
name=3D"annotations">=0D		<xs:complexType>=0D			<xs:sequence>=0D				=
<xs:element ref=3D"header"/>=0D				<xs:element ref=3D"ann" =
minOccurs=3D"0" maxOccurs=3D"unbounded"/>=0D			</xs:sequence>=0D		=
</xs:complexType>=0D	</xs:element>=0D	<xs:element name=3D"ann">=0D		=
<xs:annotation>=0D			<xs:documentation>=0D				<p>The &lt;annotations&gt; =
element ....</p>=0D			</xs:documentation>=0D		</xs:annotation>=0D		=
<xs:complexType mixed=3D"true">=0D			<xs:sequence>=0D				<xs:element =
ref=3D"ann" minOccurs=3D"0" maxOccurs=3D"unbounded"/>=0D				<xs:choice =
minOccurs=3D"0" maxOccurs=3D"unbounded">=0D					<xs:element =
ref=3D"a"/>=0D					<xs:element ref=3D"abbr"/>=0D					<xs:element =
ref=3D"catchWord"/>=0D					<xs:element ref=3D"date"/>=0D					<xs:element =
ref=3D"divineName"/>=0D					<xs:element ref=3D"hi"/>=0D					<xs:element =
ref=3D"figure"/>=0D					<xs:element ref=3D"foreign"/>=0D					<xs:element =
ref=3D"index"/>=0D					<xs:element ref=3D"inscription"/>=0D					=
<xs:element ref=3D"lg"/>=0D					<xs:element ref=3D"list"/>=0D					=
<xs:element ref=3D"mentioned"/>=0D					<xs:element =
ref=3D"milestone"/>=0D					<xs:element ref=3D"milestoneEnd"/>=0D					=
<xs:element ref=3D"milestoneStart"/>=0D					<xs:element =
ref=3D"name"/>=0D					<xs:element ref=3D"p"/>=0D					<xs:element =
ref=3D"q"/>=0D					<xs:element ref=3D"rdg"/>=0D					<xs:element =
ref=3D"reference"/>=0D					<xs:element ref=3D"seg"/>=0D					<xs:element =
ref=3D"table"/>=0D					<xs:element ref=3D"title"/>=0D					<xs:element =
ref=3D"verse"/>=0D					<xs:element ref=3D"w"/>=0D				</xs:choice>=0D			=
</xs:sequence>=0D			<xs:attributeGroup ref=3D"globalWithoutType"/>=0D			=
<xs:attribute name=3D"type" type=3D"annotationType" =
use=3D"optional"/>=0D			<xs:attribute name=3D"osisRef" =
type=3D"osisRefType" use=3D"required"/>=0D			<xs:attribute =
name=3D"TEIform" fixed=3D"note"/>=0D		</xs:complexType>=0D	=
</xs:element>=0D	<xs:simpleType name=3D"annotationType">=0D		<xs:union =
memberTypes=3D"osisAnnotations attributeExtension"/>=0D	=
</xs:simpleType>=0D	<xs:simpleType name=3D"osisAnnotations">=0D		=
<xs:restriction base=3D"xs:string">=0D			<xs:enumeration =
value=3D"A"/>=0D			<xs:enumeration value=3D"B"/>=0D			<xs:enumeration =
value=3D"C"/>=0D		</xs:restriction>=0D	</xs:simpleType>=0D</xs:schema>=0D
------=_NextPart_000_0003_01C2C92E.63EE37B0
Content-Type: text/xml;
	name="annotation.xml"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="annotation.xml"

<?xml version=3D"1.0" encoding=3D"UTF-8"?>=0D<annotations =
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" =
xsi:noNamespaceSchemaLocation=3D"annotation.xsd">=0D	<header>=0D		<work =
osisWork=3D"kjv">=0D			<refSystem>Bible.KJV</refSystem>=0D		</work>=0D	=
</header>=0D	<ann osisRef=3D"Ps.1.1">... same stuff as a note =
..</ann>=0D	<ann osisRef=3D"Ps.1.4-Ps.2.5">... same stuff as a note =
..</ann>=0D</annotations>=0D
------=_NextPart_000_0003_01C2C92E.63EE37B0--