<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

	<!--Major revision to local element declarations and separate complex elements for PersonAudit. 2 Sept 2007-->
	<!--Major revision to support the generation of graphic organizers and to use native XML text rather than included XHTML. 9 Sept. 2007-->
	<xsd:annotation>
		<xsd:documentation>The choice for this Schema is to use a document centered design rather than data centered.  This approach tightly bundles the information without the complexity of resolving many-to-many relationships.  Simple Dublin Core is included as part of the XMLSchema definition despite concerns as to visibility; it is best to make provisions for it as the technology improves.  Note that I usually work offline so the include is to a local copy.</xsd:documentation>
	</xsd:annotation>

	<xsd:include schemaLocation="file:///c:/Documents and Settings/name/My Documents/XML projects/LocalDublinCore/dc.xsd"/>

	<!--1.-->
	<xsd:element name="CNTNTUnit">
		<xsd:annotation>
			<xsd:documentation>Content unit is simply a block of text together with its audit trail and links. The basic data of the content unit is UnitId, Title, Topic, and UnitContent.  It's audit trail is simple: Authors, EntryDate,and ModificationDate. Links relate the content unit to topics and/or specific other content units; the relationships are drawn from two common approaches: (1) response to from bulletin board technology and (2) parent, child, sibling, cousin from linguistic semantic webs. TopicLinks supports the linkages.  Finally there is one element Approval" that indicates the current state of the content unit.  If the state is approved for display, the person giving the approval and the date are captured as an audit trail.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="UnitId" type="xsd:positiveInteger">
					<xsd:annotation>
						<xsd:documentation>UnitId is a unique identifier key for the document CNTNTUnit. It is to system derived; XSLT generate-id() function is one possible method of derivation.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element ref="Authors" maxOccurs="unbounded"/>
				<xsd:element ref="Editors" maxOccurs="unbounded" minOccurs="0"/>
				<xsd:element ref="Approvers" maxOccurs="unbounded" minOccurs="0"/>
				<xsd:element ref="TitleFormat"/>
				<xsd:element name="Topic" type="xsd:string" maxOccurs="unbounded">
					<xsd:annotation>
						<xsd:documentation>Topic(s) are what create relationships among the content units. It is deliberate that there are no constraints on topic even though this may create difficulties because of misspellings, etc. A browse function integrated into the search page should minimize this problem. In topic links it serves as an alternative key - a key in a many to many relationship.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element ref="GOSelect" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:element ref="GOFormula" minOccurs="0"/>
				<xsd:element ref="GOLimitTo" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:element name="UnitContents" type="xsd:hexBinary"/>
				<!--I've tried a variety of definition for Unit Contents - none of which work; UnitContent is the start of a work-around.-->
				<!--<xsd:element ref="UnitContent" maxOccurs="unbounded"/>-->
				<xsd:element ref="TopicLinks" maxOccurs="unbounded"/>
				<xsd:element name="ApprovedForDisplay" type="TypeYesNo" default="no">
					<xsd:annotation>
						<xsd:documentation>ApprovedForDisplay is a boolean value set to no on the creation or modification of a content unit. Only an individual with editorial privileges can set it to yes. If the value is no, the content unit will not be displayed when requested by the user.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="DublinCore" type="elementContainer"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<!--1.2-->
	<xsd:element name="Authors">
		<xsd:annotation>
			<xsd:documentation>Authors is the portion of the person audit trail which tracks the original creator(s) of a content unit.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="Author" type="xsd:string">
					<xsd:annotation>
						<xsd:documentation>Author contains the name(s) of the creator of the UnitContent. Author is retrieved from the security data using the foreign key AuthorId.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="AuthorId" type="xsd:positiveInteger">
					<xsd:annotation>
						<xsd:documentation>AuthorId is a foreign key to the security data. It is used to retrieve Author when the XML document is created through the web application.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="EntryDate" type="xsd:dateTime">
					<xsd:annotation>
						<xsd:documentation>EntryDate is the date on which the Author(s) created the CNTNTUnit</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<!--1.3-->
	<xsd:element name="Editors">
		<xsd:annotation>
			<xsd:documentation>Editors is the audit trail which tracks the modification of content.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="Editor" type="xsd:string">
					<xsd:annotation>
						<xsd:documentation>Editor contains the name(s) of one who changes the content of UnitContent. Editor is retrieved from the security data using the foreign key EditorId.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="EditorId" type="xsd:positiveInteger">
					<xsd:annotation>
						<xsd:documentation>EditorId is a foreign key to the security data. It is used to retrieve Editor when the XML document is modified through the web application.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="EditingDate" type="xsd:dateTime">
					<xsd:annotation>
						<xsd:documentation>EditingDate, if present, is the date on which the content of UnitContent was modified."</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<!--1.4-->
	<xsd:element name="Approvers">
		<xsd:annotation>
			<xsd:documentation>Approvers is the audit trail for the release to public viewing.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="ApprovedBy" type="xsd:string">
					<xsd:annotation>
						<xsd:documentation>ApprovedBy is the UserId of the individual with editorial privileges who released the content unit for display (setting of ApprovedForDisplay to yes).</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="ApproverId" type="xsd:positiveInteger">
					<xsd:annotation>
						<xsd:documentation>ApproverId is a foreign key to the security data. It is used to retrieve ApprovedBy when the XML document is released for display through the web application.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="ApprovalDate" type="xsd:dateTime">
					<xsd:annotation>
						<xsd:documentation>ApprovalDate serves as the time-stamp of the releasing of the content unit for display (setting of ApprovedForDisplay to yes).</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<!--1.5-->
	<xsd:element name="TitleFormat">
		<xsd:annotation>
			<xsd:documentation>TitleFormat is a short description of the contents of the CNTNTUnit. TitleFormat with UnitId appended is the normal heading for the content unit.  Two types of content units (exercises and prompts) have a set format for title.  These are reflect by the choice option in the XML schema declaration.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:choice>
				<xsd:element name="Title" type="xsd:string">
					<xsd:annotation>
						<xsd:documentation>Title is a short description of the contents of the CNTNTUnit without constaints on its contents.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element ref="FormattedTitle1"/>
			</xsd:choice>
		</xsd:complexType>
	</xsd:element>

	<!--1.5.2-->
	<xsd:element name="FormattedTitle1">
		<xsd:annotation>
			<xsd:documentation>FormattedTitle1 is a short description of the contents of the CNTNTUnit in which the initial portion of the title is in a fixed format.  This format applies to writing exercise and prompt units. While no other formatted titles are currently planned, the name is numbered to allow for simple expansion of the concept should the need arise.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="TitleType" type="TypeTitleClass">
					<xsd:annotation>
						<xsd:documentation>TitleType identifies the formatted title as either exercise or prompt"&gt;</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="Series" fixed="Series">
					<xsd:annotation>
						<xsd:documentation>Series is simply a fixed value (the word "series") to identify the following integer to the user.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="SeriesId" type="xsd:positiveInteger">
					<xsd:annotation>
						<xsd:documentation>SeriesId is used to group the content units most commonly by levels of difficulty."&gt;</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="Occurence" fixed="Number">
					<xsd:annotation>
						<xsd:documentation>Number is simply a fixed value (the word "number" to identify the following integer for the user."</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="OccurenceNumber" type="xsd:positiveInteger">
					<xsd:annotation>
						<xsd:documentation>OccurenceNumber is simply an integer used by the system to select the exercise or writing prompt of the day."></xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="Title" type="xsd:string">
					<xsd:annotation>
						<xsd:documentation>Title is a short description of the contents of the CNTNTUnit without constaints on its contents.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<!--1.5.2a-->
	<xsd:simpleType name="TypeTitleClass">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="Exercise"/>
			<xsd:enumeration value="Prompt"/>
		</xsd:restriction>
	</xsd:simpleType>

	<!--1.7-->
	<xsd:element name="GOSelect">
		<xsd:annotation>
			<xsd:documentation>GOSelect is an element used to categorize elements for selection in the building of a graphic organizer for a poetic form.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:choice>
				<xsd:sequence>
					<xsd:element name="Form" type="xsd:string" fixed="Form">
						<xsd:annotation>
							<xsd:documentation>Form is a fixed value element identifying the document as describing some type of poetic element (line, stanza or poem) that is defined by specific restrictions.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="FormClass" type="TypeFormClass">
						<xsd:annotation>
							<xsd:documentation>TypeFormClass defines a poetic form as base, additive, compound, topical, generative, adaptive, or variant. Note only forms are used in creating default graphic organizers.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="GOLineStanza" type="xsd:string" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>GOLineStanza is a description of the number of lines in each stanza.  This is used to build a basic graphic organizer for the poem form - a base form.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="GOLineCalculation" type="xsd:string" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>GOLineCalculation is a formula for modifying the basic GOLineStanza description as the result of integrating additive and compound forms into the base form.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
				<xsd:sequence>
					<xsd:element name="Figure" type="xsd:string" fixed="Figure">
						<xsd:annotation>
							<xsd:documentation>Figure is a fixed value element identifying the document the document as describing a rhetorical trope or schema in classical Western rhetoric.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="FigureName" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation>FigureName is the name of a particular trope or schema or other rhetorical device.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
				<xsd:sequence>
					<xsd:element name="School" type="xsd:string" fixed="School">
						<xsd:annotation>
							<xsd:documentation>School is a fixed value element identifying the document as describing a poetic school (aesthetic sense).</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="SchoolName" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation>SchoolName is the common name of the poetic school described by the document.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
				<xsd:sequence>
					<xsd:element name="Definition" type="xsd:string" fixed="Definition">
						<xsd:annotation>
							<xsd:documentation>Definition is a fixed value element identifying the document as defining a poetic element.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="DefinedItem" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation>DefinedItem is the name of the poetic element being defined.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="SeeItem" type="xsd:string" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>SeeItem is a cross-reference to the DefinedItem carrying the definition. For example, "Iambic" pointing to "Iam".</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
				<xsd:sequence>
					<xsd:element name="Typographical" type="xsd:string" fixed="Typographical">
						<xsd:annotation>
							<xsd:documentation>Typographical is a fixed value element identifying the document as describing a particular typographical presentation of the poetic form. This usually modifies the calculation of the number of lines or indicates a split within the lines.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="TypographicalVariant" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation>TypographicalVariant is the name of the typographic variant described in the document.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="GOLineCalculation" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation>GOLineCalculation is a formula for modifying the basic GOLineStanza description as the result of integrating typographical considerations into the poetic form.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
				<xsd:sequence>
					<xsd:element name="Other" type="xsd:string" fixed="Other">
						<xsd:annotation>
							<xsd:documentation>Other is a fixed value element identifying the document as describing some element of poetry that is not included in the previous element groupings.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="OtherNameGroup" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation>OtherName is the name of the group to which the element described in the document belongs.  For example: point of view, voice ...</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:choice>
		</xsd:complexType>
	</xsd:element>

	<!--1.7a-->
	<xsd:simpleType name="TypeFormClass">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="base form"/>
			<xsd:enumeration value="additive form"/>
			<xsd:enumeration value="topical form"/>
			<xsd:enumeration value="compound form"/>
			<xsd:enumeration value="generative form"/>
			<xsd:enumeration value="adaptive form"/>
			<xsd:enumeration value="variant form"/>
		</xsd:restriction>
	</xsd:simpleType>

	<!--1.8-->
	<xsd:element name="GOFormula">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="NoOccurences" type="xsd:positiveInteger"/>
				<xsd:element name="OccuringItem" type="xsd:string"/>
				<xsd:element name="OccuringItemUnitId" type="xsd:positiveInteger"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<!--1.9-->
	<xsd:element name="GOLimitTo">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="LimitedToItem" type="xsd:string"/>
				<xsd:element name="LimitedToItemUnitId" type="xsd:positiveInteger"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<!--1.10a-->
	<!--<xsd:simpleType name="TypeUnitContentMime">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="XHTML"/>
			<xsd:enumeration value="jpeg"/>
			<xsd:enumeration value="png"/>
		</xsd:restriction>
	</xsd:simpleType>-->
	<!--1.10-->
	<xsd:element name="UnitContent">
		<xsd:annotation>
			<xsd:documentation>UnitContent is the primary descriptive section of information in the document. Content descriptive element names are not used because the multi-lingual and multi-cultural nature of the site does not permit the identification of an exhaustive list of elements. A single content block is not used because the technical implementation of such a block destroys most advantages of the XML database structure.  Therefore, the simple elements are described by their presentation characteristics. Note that all elements are optional, unbounded and unsequenced."</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:choice>
				<xsd:element name="ExternalBuildRoutine" type="xsd:string">
					<xsd:annotation>
						<xsd:documentation>ExternalBuildRoutine is a tag to a specific routine in the Java which builds a form - exercise, prompt, graphic organizer, browse/search forms and user response are the primary users.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:sequence>
					<xsd:element name="TextFormat" type="TypeTextFormat">
						<xsd:annotation>
							<xsd:documentation>TextFormat is the element which describes the presentation characteristics of the text content of the document.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="TextContent" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation>Text Content is the primary content of the document. Line returns are assumed to be preserved in presentation; if there is no line return the next content element is assumed to be inline.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
				<xsd:element name="EmbedURL" type="xsd:anyURI">
					<xsd:annotation>
						<xsd:documentation>EmbedURL is the element that allows the inclusion of an external URL. Note that the named navigation links serve the function of internal URL's.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="AmazonURL" type="xsd:anyURI">
					<xsd:annotation>
						<xsd:documentation>AmazonURL is a URL which is wrapped in Amazon specific code so that this site receives a commission for purchases initiated on this site.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:sequence>
					<xsd:element name="MimeType" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation>MimeType is the element which identifies the type of information included in the following binary data.  This is used primarily to allow the inclusion of jpeg elements. Note: I have samples to copy but have not yet entered the necessary inclusions of external schema.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="MimeItem" type="xsd:hexBinary">
						<xsd:annotation>
							<xsd:documentation>MimeItem is the unparsed binary element to be included in the document.  Most frequently, this is a graphic element although audio and video are potential entries.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="MimeTitle" type="xsd:string" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>MimeTitle is an optional label for the binary content.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
				<xsd:sequence>
					<xsd:element name="Bold" type="TypeYesNo">
						<xsd:annotation>
							<xsd:documentation>Bold is the indicator that the CellContent is to be shown in bold, usually an indication that the cell is either a column or row heading.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="CellNo" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation>CellNo is the position of the CellContent within the table in row-comma-column format.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="CellContent" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation>CellContent is the text which is to appear in the specified table cell.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:choice>
		</xsd:complexType>
	</xsd:element>
	<!--1.10.a-->
	<xsd:simpleType name="TypeTextFormat">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="CenteredHeading"/>
			<xsd:enumeration value="LeftJustifiedHeading"/>
			<xsd:enumeration value="BoldLabel"/>
			<xsd:enumeration value="ShortDescription"/>
			<xsd:enumeration value="StandardText"/>
			<xsd:enumeration value="HangingText"/>
			<xsd:enumeration value="StandardList"/>
			<xsd:enumeration value="HangingList"/>
		</xsd:restriction>
	</xsd:simpleType>

	<!--1.12-->
	<xsd:element name="TopicLinks">
		<xsd:annotation>
			<xsd:documentation>TopicLinks is the group item that supports the sequential (board-like) access as well as the web (WordNet-like) access. Some of these links are derived or set by the author but it is assumed that individuals with editorial status will take primary responsibility for the links.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="LinkRelation" type="xsd:string">
					<xsd:annotation>
						<xsd:documentation>LinkRelation identifies the relationship between the content units. It is named in the direction from this CNTNTUnit to CNTNTUnit. It has been determined that it is logically improbable that all relationships can be identified in advance.  Therefore, no enumeration restraint is defined although the input form can have a drop-down list of the most common values. Note that the LinkRelation is the secondary ordering item in the navigational menus.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="LinkClass" type="TypeLinkClass">
					<xsd:annotation>
						<xsd:documentation>LinkClass identifies the classification of the relationship for the purpose of ordering and positioning of the related content units in the navigational menus. The values of this element are constrained to enumerating values.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:choice>
					<xsd:element name="LinkTopic" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation>LinkTopic identifies the CNTNTUnit(s) that are linked to this comment unit. The access path is defined by LinkTopic=Topic. This is primarily used for web relationships.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="LinkUnitId" type="xsd:integer">
						<xsd:annotation>
							<xsd:documentation>LinkUnitId identifies the CNTNTUnit that is linked the this comment unit.  The access path is defined by LinkUnitId=UnitId.  This is primarily used for sequential or hierarchical/tree relationships.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:choice>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<!--1.12a-->
	<xsd:simpleType name="TypeLinkClass">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="response to"/>
			<xsd:enumeration value="parent"/>
			<xsd:enumeration value="sibling"/>
			<xsd:enumeration value="cousin"/>
			<xsd:enumeration value="child"/>
		</xsd:restriction>
	</xsd:simpleType>

	<!--13.1a-->
	<xsd:simpleType name="TypeYesNo">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="yes"/>
			<xsd:enumeration value="no"/>
		</xsd:restriction>
	</xsd:simpleType>
</xsd:schema>