<?xml version="1.0" encoding="UTF-8"?>
<!-- 
	Generated by CortexML version 4.0 dated 2005-02-21 10:16
	Release: beta1.5
	Cabinet: VCML
	Build ID: build1.5
	The declarations in this file are auto-generated
	from an object model under management by CortexML.
	You are advised not to modify this file. If you need
	to make any modifications, apply your edits to the
	object model in the CortexML repository and generate
	a new release.
-->
<xs:schema xmlns:table="http://purl.org/vcml/table/1.0/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:textext="http://purl.org/vcml/text-ext/1.0/" xmlns:text="http://purl.org/vcml/text/1.0/" targetNamespace="http://purl.org/vcml/table/1.0/">
	<xs:import namespace="http://purl.org/vcml/text-ext/1.0/" schemaLocation="vcml-textext.xsd"/>
	<xs:import namespace="http://purl.org/vcml/text/1.0/" schemaLocation="vcml-text.xsd"/>
	<xs:element name="caption">
		<xs:annotation>
			<xs:documentation>An optional caption for the table. This imports the text:inline-formatting group</xs:documentation>
		</xs:annotation>
		<xs:complexType mixed="true">
			<xs:group ref="text:inline-formatting" minOccurs="0"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="columns">
		<xs:annotation>
			<xs:documentation>The list of columns in the table.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence maxOccurs="unbounded">
				<xs:element ref="table:col"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="col">
		<xs:complexType>
			<xs:attribute name="name" type="xs:string" use="required">
				<xs:annotation>
					<xs:documentation>A reference name for the column</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="pri" type="xs:integer" default="0">
				<xs:annotation>
					<xs:documentation>The priority for the column. When rendering the table to a device with insufficient display space, columns with a lower priority will be dropped before those with a higher priority. Default priority is 0. </xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="topicref" type="xs:IDREF">
				<xs:annotation>
					<xs:documentation>A reference to a topic element which provides metadata about the contents of this column.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="width">
				<xs:annotation>
					<xs:documentation>The preferred width of the column specified as a percentage of the available column width.</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:decimal">
						<xs:minExclusive value="0"/>
						<xs:maxInclusive value="100"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="header">
		<xs:annotation>
			<xs:documentation>The header row for the table.</xs:documentation>
		</xs:annotation>
		<xs:complexType id="rowType">
			<xs:sequence>
				<xs:element ref="table:cell"  minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>	
	<xs:element name="cell" type="text:paraType"/>
	<xs:element name="row">
		<xs:annotation>
			<xs:documentation>A row in the body of the table.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="table:cell" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="id" type="xs:ID"/>
		</xs:complexType>
	</xs:element>	
	<xs:element name="table" substitutionGroup="textext:extensionBlock">
		<xs:annotation>
			<xs:documentation>A simple grid-like table model which supports priority-based rendering enabling columns to be dropped in a specified order when trying to render on narrow-screen devices.
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="textext:extensionBlockType">
					<xs:sequence>
					<xs:element ref="table:caption" minOccurs="0"/>
					<xs:element ref="table:columns"/>
					<xs:element ref="table:header" minOccurs="0"/>
					<xs:element ref="table:row" maxOccurs="unbounded"/> 
					</xs:sequence>
					<xs:attribute name="alt" type="xs:string">
						<xs:annotation>
							<xs:documentation>A textual description for the table which may be used in modalities not capable of rendering the table.</xs:documentation>
						</xs:annotation>
					</xs:attribute>
					<xs:attribute name="backgroundColor" type="text:cssColorType">
						<xs:annotation>
							<xs:documentation>The background colour to paint the cells of the table.</xs:documentation>
						</xs:annotation>
					</xs:attribute>
					<xs:attribute name="backgroundPattern" default="plain">
						<xs:annotation>
							<xs:documentation>Specifies how the background colour of the table cells should be rendered.</xs:documentation>
						</xs:annotation>
						<xs:simpleType>
							<xs:restriction base="xs:string">
								<xs:enumeration value="plain">
									<xs:annotation>
										<xs:documentation>The table should be rendered with all cells filled with the colour specified by backgroundColour.</xs:documentation>
									</xs:annotation>
								</xs:enumeration>
								<xs:enumeration value="rowstripe">
									<xs:annotation>
										<xs:documentation>Every other row should be coloured with the background coulour.</xs:documentation>
									</xs:annotation>
								</xs:enumeration>
								<xs:enumeration value="colstripe">
									<xs:annotation>
										<xs:documentation>Every other column should be coloured.</xs:documentation>
									</xs:annotation>
								</xs:enumeration>
								<xs:enumeration value="check">
									<xs:annotation>
										<xs:documentation>The table should be rendered as a chequer-board pattern.</xs:documentation>
									</xs:annotation>
								</xs:enumeration>
							</xs:restriction>
						</xs:simpleType>
					</xs:attribute>
					<xs:attribute name="border" type="xs:boolean" default="false">
						<xs:annotation>
							<xs:documentation>Specifies whether or not the table should be rendered with cell borders and table borders visible.</xs:documentation>
						</xs:annotation>
					</xs:attribute>
					<xs:attribute name="id" type="xs:ID"/>
					<xs:attributeGroup ref="text:lang-attrs"/>
				</xs:extension>
			</xs:complexContent>
		</xs:complexType>
	</xs:element>
</xs:schema>
