<?xml version="1.0" encoding="iso-8859-1"?>
<!--
	File:		updates.xsd
	Author:		Chriztian Steinmeier
	Created:	2007-08-15
	Description
		XMLSchema for my (blog-)updates XML format.

-->
<xsd:schema
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	targetNamespace="http://xmlns.greystate.dk/2003/updates"
	xmlns="http://xmlns.greystate.dk/2003/updates"
>

	<!-- Main description -->
	<xsd:annotation>
		<xsd:documentation xml:lang="en">
			<p xmlns="http://www.w3.org/1999/xhtml">
				A simple XML format for describing entries in a 'news' or blog section.
			</p>
			<p xmlns="http://www.w3.org/1999/xhtml">
				Typical prefix is <var>upd</var> eg. <code>&lt;upd:updates&gt;...&lt;/upd:updates&gt;</code>
			</p>
		</xsd:documentation>
	</xsd:annotation>

	<!-- Root element -->
	<xsd:element name="updates">
    	<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="entry" minOccurs="0" maxOccurs="unbounded" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="entry">
		<xsd:annotation>
			<xsd:documentation xml:lang="en">
				<p xmlns="http://www.w3.org/1999/xhtml">
					Contains a single entry resource.
				</p>
			</xsd:documentation>
		</xsd:annotation>

		<xsd:complexType>
	       	<xsd:sequence>
	           	<xsd:element ref="title" minOccurs="1" maxOccurs="1" />
				<xsd:element ref="body" minOccurs="1" maxOccurs="1" />
			</xsd:sequence>

			<xsd:attribute name="date" type="xsd:date" use="optional" />
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="title" type="xsd:string" />
	<xsd:element name="body" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation xml:lang="en">
				<p xmlns="http://www.w3.org/1999/xhtml">
					Contains standard XHTML
				</p>
			</xsd:documentation>
		</xsd:annotation>
	</xsd:element>

		
</xsd:schema>
