<?xml version="1.0"?>
<!--

RELAX NG schema for RSS 0.91

	This version:
		http://nul.jp/2003/schema/rss-0.91-20030629.rng
	Latest version:
		http://nul.jp/2003/schema/rss-0.91.rng

Copyright (c) 2003, T. Kobayashi, ether@users.sourceforge.jp
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

  * Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer. 
  * Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution. 
  * The name of the author may not be used to endorse or promote products
    derived from this software without specific prior written permission. 

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

-->
<grammar
	xmlns="http://relaxng.org/ns/structure/1.0"
	datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
>
	<start><ref name="rss"/></start>

	<define name="description"><element name="description"><text/></element></define>
	<define name="link"><element name="link"><data type="anyURI"/></element></define>
	<define name="title"><element name="title"><text/></element></define>
	<define name="url"><element name="url"><data type="anyURI"/></element></define>

	<define name="rss">
		<element name="rss">
			<attribute name="version"><value>0.91</value></attribute>

			<element name="channel"><interleave>

				<ref name="description"/>
				<element name="language"><data type="language"/></element>
				<ref name="link"/>
				<ref name="title"/>

				<optional>
					<element name="copyright"><text/></element>
				</optional>

				<optional>
					<element name="docs"><data type="anyURI"/></element>
					<!-- should be http://my.netscape.com/publish/formats/rss-spec-0.91.html -->
				</optional>

				<optional>
					<element name="image"><interleave>
						<ref name="url"/>
						<ref name="link"/>
						<ref name="title"/>
						<optional><ref name="description"/></optional>
						<optional>
							<element name="width">
								<data type="integer">
									<param name="minInclusive">1</param>
									<param name="maxInclusive">144</param>
								</data>
							</element>
						</optional>
						<optional>
							<element name="height">
								<data type="integer">
									<param name="minInclusive">1</param>
									<param name="maxInclusive">400</param>
								</data>
							</element>
						</optional>
					</interleave></element>
				</optional>

				<zeroOrMore>
					<element name="item"><interleave>
						<ref name="title"/>
						<ref name="link"/>
						<optional><ref name="description"/></optional>
					</interleave></element>
				</zeroOrMore>

				<optional>
					<element name="lastBuildDate"><text/></element>
				</optional>

				<optional>
					<element name="managingEditor"><text/></element>
				</optional>

				<optional>
					<element name="pubDate"><text/></element>
				</optional>

				<optional>
					<element name="rating"><text/></element>
				</optional>

				<optional>
					<element name="skipDays">
						<oneOrMore>
							<element name="day">
								<choice>
									<value>Sunday</value>
									<value>Monday</value>
									<value>Tuesday</value>
									<value>Wednesday</value>
									<value>Thursday</value>
									<value>Friday</value>
									<value>Saturday</value>
								</choice>
							</element>
						</oneOrMore>
					</element>
				</optional>

				<optional>
					<element name="skipHours">
						<oneOrMore>
							<element name="hour">
								<data type="integer">
									<param name="minInclusive">0</param>
									<param name="maxInclusive">23</param>
								</data>
							</element>
						</oneOrMore>
					</element>
				</optional>

				<optional>
					<element name="textinput"><interleave>
						<ref name="title"/>
						<ref name="link"/>
						<ref name="description"/>
						<element name="name"><text/></element>
					</interleave></element>
				</optional>

				<optional>
					<element name="webMaster"><text/></element>
				</optional>

			</interleave></element>
		</element>

	</define>
</grammar>
