<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: contents.xsd,v 1.3 2009/12/17 22:02:23 ginger Exp $ -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:annotation>
		<xs:documentation>**********************</xs:documentation>
		<xs:documentation>***** HISTORY  *****</xs:documentation>
		<xs:documentation>**********************</xs:documentation>
		<xs:documentation>2009-12-17: Fixed a typo on the dateModified element. Was missing the second letter 'i'</xs:documentation>
	</xs:annotation>
	<xs:annotation>
		<xs:documentation>***************************************************</xs:documentation>
		<xs:documentation>*****  COMPLEX TYPES (alpha order)   *****</xs:documentation>
		<xs:documentation>***************************************************</xs:documentation>
		<xs:documentation>bodyType - is the main content of an OPML document</xs:documentation>
		<xs:documentation>headType - provides title, date and window information</xs:documentation>
		<xs:documentation>outlineType - is a tree of distinct content pieces to be organized in outliner applications</xs:documentation>
		<xs:documentation>outlineWithTypeType - allows for building on the base OPML outline tag with type having a controlled vocabulary and allows type to be extended or restricted separately from other outline attributes</xs:documentation>
	</xs:annotation>

	<xs:attributeGroup name="typeAttribute">
		<xs:annotation>
			<xs:documentation>type - indicator of how the attributes on the outline element are to be interpreted</xs:documentation>
		</xs:annotation>
		<xs:attribute name="type" type="union.typeType" use="optional" default="text"/>
	</xs:attributeGroup>

	<xs:complexType name="bodyType">
		<xs:annotation>
			<xs:documentation>bodyType - contains one or more outline elements</xs:documentation>
			<xs:documentation>outline - the contents to be displayed; may contain encoded HMTL markup; see outlineType</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="outline" type="outlineWithTypeType" minOccurs="1" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="headType">
		<xs:annotation>
			<xs:documentation>headType - contains zero or more of the optional elements defined below</xs:documentation>
			<xs:documentation>title - title or name of the document</xs:documentation>
			<xs:documentation>dateCreated - a date-time indicating when the document is created; conforms to RFC 822 (http://asg.web.cmu.edu/rfc/rfc822.html); see the Simple Types section for more information</xs:documentation>
			<xs:documentation>dateModified - a date-time indicating when the document has last modified; conforms to RFC 822 (http://asg.web.cmu.edu/rfc/rfc822.html); see the Simple Types section for more information</xs:documentation>
			<xs:documentation>ownerName - the owner of the document</xs:documentation>
			<xs:documentation>ownerEmail - the email address of the owner of the document; see the Simple Types section for more information</xs:documentation>
			<xs:documentation>ownerId - an http address of a web page that contains a form that allows a human reader to communicate with the author of the document via email or other means</xs:documentation>
			<xs:documentation>docs - an http address of documentation for the format used in the OPML file</xs:documentation>
			<xs:documentation>expansionState - a comma separated list of line numbers that are expanded. The line numbers indicate which headlines to expand. Order is important. For each element in the list, X, starting at the first summit , navigate flatdown X times and expand. Repeat for each element in the list.</xs:documentation>
			<xs:documentation>vertScrollState - is a number indicating which line of the outline is displayed on the top line of the window. This number is calculated with the expansion state already applied.</xs:documentation>
			<xs:documentation>windowTop - is a number indicating the pixel location of the top edge of the window</xs:documentation>
			<xs:documentation>windowLeft - is a number indicating the pixel location of the left edge of the window</xs:documentation>
			<xs:documentation>windowBottom - is a number indicating the pixel location of bottom top edge of the window</xs:documentation>
			<xs:documentation>windowRight - is a number indicating the pixel location of the right edge of the window</xs:documentation>
		</xs:annotation>

		<xs:sequence>
			<xs:element name="title" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="dateCreated" type="rfc822Type" minOccurs="0" maxOccurs="1"/>
			<xs:element name="dateModified" type="rfc822Type" minOccurs="0" maxOccurs="1"/>
			<xs:element name="ownerName" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="ownerEmail" type="tEmailAddress" minOccurs="0" maxOccurs="1"/>
			<xs:element name="ownerId" type="xs:anyURI" minOccurs="0" maxOccurs="1"/>
			<xs:element name="docs" type="xs:anyURI" minOccurs="0" maxOccurs="1"/>
			<xs:element name="expansionState" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="vertScrollState" type="xs:positiveInteger" minOccurs="0" maxOccurs="1"/>
			<xs:element name="windowTop" type="xs:integer" minOccurs="0" maxOccurs="1"/>
			<xs:element name="windowLeft" type="xs:integer" minOccurs="0" maxOccurs="1"/>
			<xs:element name="windowBottom" type="xs:integer" minOccurs="0" maxOccurs="1"/>
			<xs:element name="windowRight" type="xs:integer" minOccurs="0" maxOccurs="1"/>
		</xs:sequence>
	</xs:complexType>


	<xs:complexType name="outlineType" mixed="true">
		<xs:annotation>
			<xs:documentation>text - the content to be displayed to users</xs:documentation>
			<xs:documentation>isComment - indicates whether the outline is commented or not; by convention if an outline is commented, then all subordinate outlines are considered commented</xs:documentation>
			<xs:documentation>isBreakpoint - indicates whether a breakpoint is set on this outline</xs:documentation>
			<xs:documentation>created - generation date-time of the outline node</xs:documentation>
			<xs:documentation>category - comma-separated, slash-delimited sets of strings</xs:documentation>
			<xs:documentation>description - the top-level description element from a feed</xs:documentation>
			<xs:documentation>url - an http address to display in a browser or a pointer an OPML file</xs:documentation>
			<xs:documentation>htmlUrl - the top-level link element from a feed; that is a feed attribute that tells a reader where the HTML version of the feed exists</xs:documentation>
			<xs:documentation>xmlUrl - the http address of the feed in XML</xs:documentation>
			<xs:documentation>title - the top-level title element from a feed</xs:documentation>
			<xs:documentation>version - the type of feed (e.g. RSS2, RSS1, etc.)</xs:documentation>
			<xs:documentation>language - the top-level language element from a feed</xs:documentation>
		</xs:annotation>

		<xs:attribute name="text" type="xs:string" use="required"/>
		<xs:attribute name="isComment" type="xs:boolean" use="optional" default="false"/>
		<xs:attribute name="isBreakpoint" type="xs:boolean" use="optional" default="false"/>
		<xs:attribute name="created" type="rfc822Type" use="optional"/>
		<xs:attribute name="category" type="xs:string" use="optional"/>
		<xs:attribute name="description" type="xs:string" use="optional"/>
		<xs:attribute name="url" type="xs:anyURI" use="optional"/>
		<xs:attribute name="htmlUrl" type="xs:anyURI" use="optional"/>
		<xs:attribute name="xmlUrl" type="xs:anyURI" use="optional"/>
		<xs:attribute name="title" type="xs:string" use="optional"/>
		<xs:attribute name="version" type="xs:string" use="optional"/>
		<xs:attribute name="language" type="union.languageType" use="optional"/>
	</xs:complexType>

	
	<xs:complexType name="outlineWithTypeType" mixed="true">
		<xs:annotation>
			<xs:documentation>outlineWithTypeType - allows for building on the base OPML outline tag with type having a controlled vocabulary and allows type to be extended or restricted separately from other outline attributes</xs:documentation>
			<xs:documentation>outline - the contents to be displayed; may contain encoded HMTL markup</xs:documentation>
			<xs:documentation>typeAttribute - defines the contents of the type attribute</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="outlineType">
				<xs:sequence>
					<xs:element name="outline" type="outlineWithTypeType" minOccurs="0" maxOccurs="unbounded"/>
				</xs:sequence>
				<xs:attributeGroup ref="typeAttribute"/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>


	<xs:annotation>
		<xs:documentation>************************************************</xs:documentation>
		<xs:documentation>*****  SIMPLE TYPES (alpha order)   *****</xs:documentation>
		<xs:documentation>************************************************</xs:documentation>
		<xs:documentation>rfc822Type - defines a date-time format of the form Mon, 00 Jan 0000 00:00:00 +0000</xs:documentation>
		<xs:documentation>tEmailAddress - defines an email address of the form person@some.org</xs:documentation>
		<xs:documentation>typeType - a list of terms that are acceptable values for the attribute type on the outline element</xs:documentation>
		<xs:documentation>union.languageType - allows the term unknown to be used with the built-in W3C language type of 2-letter language identifiers</xs:documentation>
		<xs:documentation>union.typeType - concatenates together free text string and a list of acceptable type values</xs:documentation>
		<xs:documentation>unknownType - defines the term called unknown that is used in the union.languageType</xs:documentation>
		<xs:documentation>versionType - defines the version numbers for existing OPML specifications</xs:documentation>
	</xs:annotation>

	<xs:simpleType name="rfc822Type">
		<xs:annotation>
			<xs:documentation>Got from http://www.thearchitect.co.uk/schemas/rss-2_0.xsd and it is called tRfc822FormatDate; The notes from this rss-2_0.xsd schema are copied below</xs:documentation>
			<xs:documentation>A date-time displayed in RFC-822 format.</xs:documentation>
			<xs:documentation>Using the regexp definition of rfc-822 date by Sam Ruby at http://www.intertwingly.net/blog/1360.html</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:pattern value="(((Mon)|(Tue)|(Wed)|(Thu)|(Fri)|(Sat)|(Sun)), *)?\d\d? +((Jan)|(Feb)|(Mar)|(Apr)|(May)|(Jun)|(Jul)|(Aug)|(Sep)|(Oct)|(Nov)|(Dec)) +\d\d(\d\d)? +\d\d:\d\d(:\d\d)? +(([+\-]?\d\d\d\d)|(UT)|(GMT)|(EST)|(EDT)|(CST)|(CDT)|(MST)|(MDT)|(PST)|(PDT)|\w)"/>
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="tEmailAddress">
		<xs:annotation>
			<xs:documentation>Using the regexp definiton of E-Mail Address by Lucadean from the .NET RegExp Pattern Repository at http://www.3leaf.com/default/NetRegExpRepository.aspx</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:pattern value="([a-zA-Z0-9_\-])([a-zA-Z0-9_\-\.]*)@(\[((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}|((([a-zA-Z0-9\-]+)\.)+))([a-zA-Z]{2,}|(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\])"/>
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="typeType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="atom"/>
			<xs:enumeration value="include"/>
			<xs:enumeration value="link"/>
			<xs:enumeration value="text"/>
			<xs:enumeration value="rdf"/>
			<xs:enumeration value="rss"/>
			<xs:enumeration value="text/x-opml"/>
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="union.languageType">
		<xs:union memberTypes="xs:language unknownType"/>
	</xs:simpleType>

	<xs:simpleType name="union.typeType">
		<xs:union memberTypes="xs:string typeType"/>
	</xs:simpleType>

	<xs:simpleType name="unknownType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="unknown"/>
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="versionType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="1.0"/>
			<xs:enumeration value="2.0"/>
		</xs:restriction>
	</xs:simpleType>

	<xs:annotation>
		<xs:documentation>**********************************</xs:documentation>
		<xs:documentation>***** SCHEMA PUPOSE *****</xs:documentation>
		<xs:documentation>**********************************</xs:documentation>
		<xs:documentation>Define base OPML 2.0 elements and attributes</xs:documentation>
		<xs:documentation>OPML stands for Outline Processor Markup Language and is used for exchanging information between outliners and Internet services. It is intended to be the file format for outliner applications. It can also be used to exchange subscription lists between feed readers and aggregators.</xs:documentation>

		<xs:documentation>*******************************</xs:documentation>
		<xs:documentation>*****SCHEMA INTENT  *****</xs:documentation>
		<xs:documentation>*******************************</xs:documentation>
		<xs:documentation>Intended to be called by an overarching schema that creates an OPML 2.0 document</xs:documentation>
		<xs:documentation>The overarching schema defines the root element called opml</xs:documentation>

		<xs:documentation>******************************</xs:documentation>
		<xs:documentation>*****  NAMESPACES  *****</xs:documentation>
		<xs:documentation>******************************</xs:documentation>
		<xs:documentation>No extra namespaces are used in this schema</xs:documentation>
		<xs:documentation>The W3C schema is in the xs namespace</xs:documentation>	
		<xs:documentation>The overarching schema used to create the OPML document may use a namespace</xs:documentation>

		<xs:documentation>********************************</xs:documentation>
		<xs:documentation>*****  ROOT ELEMENT *****</xs:documentation>
		<xs:documentation>********************************</xs:documentation>
		<xs:documentation>This schema does not contain a root element</xs:documentation>
		<xs:documentation>The overarching schema needs to define the root element and call this schema to create OPML</xs:documentation>

		<xs:documentation>*******************************************</xs:documentation>
		<xs:documentation>***** SCHEMA DEVELOPMENT  *****</xs:documentation>
		<xs:documentation>*******************************************</xs:documentation>
		<xs:documentation>Tends to follow the Venetian Blind approach that defines types that can be extended</xs:documentation>
		<xs:documentation>Interprets the OPML 2.0 specification by Dave Winer found at: http://www.opml.org/spec2</xs:documentation>
		<xs:documentation>Created: 2006-04-20</xs:documentation>
		<xs:documentation>Last Modified 2009-12-17</xs:documentation>

		<xs:documentation>**********************************</xs:documentation>
		<xs:documentation>***** SCHEMA AUTHOR  *****</xs:documentation>
		<xs:documentation>**********************************</xs:documentation>
		<xs:documentation>Katy Ginger, University Corporation for Atmospheric Research (UCAR), Digital Library for Earth System Education (DLESE) Program Center; email: support@dlese.org or ginger@ucar.edu</xs:documentation>

		<xs:documentation>******************************************</xs:documentation>
		<xs:documentation>*****  LICENSE INFORMATION  *****</xs:documentation>
		<xs:documentation>******************************************</xs:documentation>
		<xs:documentation>Copyright  (c) 2006 University Corporation for Atmospheric Research (UCAR) P.O. Box 3000, Boulder, CO 80307, United States of America</xs:documentation>
		<xs:documentation>This schema is free software; you can redistribute them and/or modify them under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. These schemas are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this project; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</xs:documentation>

		<xs:documentation>******************************************************</xs:documentation>
		<xs:documentation>*****  OTHER COPYRIGHT INFORMATION  *****</xs:documentation>
		<xs:documentation>******************************************************</xs:documentation>
		
		<xs:documentation>Parts of this page are copied and developed from Dave Winer's OPML specification found at: http://www.opml.org/spec2. Per the request of that document, its copyright notice is included here and applies to information in this directory and corresponding subdirectories:

&#169; Copyright 2000 UserLand Software, Inc. All Rights Reserved.
&#169; Copyright 2006 Scripting News, Inc. All Rights Reserved.

UserLand Software, Inc. and Scripting News, Inc. are refererred to in the following as "the Companies."

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and these paragraphs are included on all such copies and derivative works. 

This document may not be modified in any way, such as by removing the copyright notice or references to the Companies or other organizations. Further, while these copyright restrictions apply to the written OPML specification, no claim of ownership is made by the Companies to the format it describes. Any party may, for commercial or non-commercial purposes, implement this format without royalty or license fee to the Companies. The limited permissions granted herein are perpetual and will not be revoked by the Companies or their successors or assigns.

This document and the information contained herein is provided on an "AS IS" basis and THE COMPANIES DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.</xs:documentation>
	</xs:annotation>
</xs:schema>
