<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.acetext.com/acetext20.xsd" xmlns:act="http://www.acetext.com/acetext20.xsd">
	<xsd:annotation>
		<xsd:documentation xml:lang="en">This XML schema defines the structure of all file formats used by AceText 2.0 (and later).  You can use this schema to read and write AceText Collection files (*.atc), and to copy and paste AceText clips and collections to and from the clipboard.  See http://www.acetext.com/xml.html for more information.</xsd:documentation>
	</xsd:annotation>
	<xsd:simpleType name="ClipKind">
		<xsd:restriction base="xsd:token">
            <xsd:enumeration value="text"/>
            <xsd:enumeration value="rectangular"/>
            <xsd:enumeration value="binary"/>
            <xsd:enumeration value="beforeafter"/>
            <xsd:enumeration value="webtext"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="Parameter">
		<xsd:restriction base="xsd:token">
            <xsd:pattern value="%[A-Za-z0-9_]+%"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:complexType name="Clip">
		<xsd:sequence>
			<xsd:element name="text" type="xsd:string" minOccurs="0"><xsd:annotation><xsd:documentation xml:lang="en">The text held by the clip.  Only used if kind in (text, rectangular)</xsd:documentation></xsd:annotation></xsd:element>
			<xsd:element name="before" type="xsd:string" minOccurs="0"><xsd:annotation><xsd:documentation xml:lang="en">The "before" text.  Only used if kind = beforeafter</xsd:documentation></xsd:annotation></xsd:element>
			<xsd:element name="after" type="xsd:string" minOccurs="0"><xsd:annotation><xsd:documentation xml:lang="en">The "after" text.  Only used if kind = beforeafter</xsd:documentation></xsd:annotation></xsd:element>
			<xsd:element name="bytes" type="xsd:hexBinary" minOccurs="0"><xsd:annotation><xsd:documentation xml:lang="en">The binary data held by the clip.  Only used if kind = binary</xsd:documentation></xsd:annotation></xsd:element>
			<xsd:element name="url" type="xsd:string" minOccurs="0"><xsd:annotation><xsd:documentation xml:lang="en">URL associated with the clip.  Can be used with any kind of clip.</xsd:documentation></xsd:annotation></xsd:element>
			<xsd:element name="guid" type="xsd:string" minOccurs="0"><xsd:annotation><xsd:documentation xml:lang="en">Globally unique ID used by RSS and Atom feeds to identify feed entries.  AceText uses this ID internally for clips that are part of a feed reader or writer.</xsd:documentation></xsd:annotation></xsd:element>
		</xsd:sequence>
		<xsd:attribute name="kind" type="act:ClipKind" use="required"><xsd:annotation><xsd:documentation xml:lang="en">Indicates the type of contents held by the clip.</xsd:documentation></xsd:annotation></xsd:attribute>
		<xsd:attribute name="label" type="xsd:string"><xsd:annotation><xsd:documentation xml:lang="en">Clip's label in the clip tree.  Clips without a label use the first line of the clip's contents as the label.</xsd:documentation></xsd:annotation></xsd:attribute>
		<xsd:attribute name="acetype" type="xsd:string"><xsd:annotation><xsd:documentation xml:lang="en">AceType abbreviation to select this clip via AceType.</xsd:documentation></xsd:annotation></xsd:attribute>
		<xsd:attribute name="date" type="xsd:dateTime"><xsd:annotation><xsd:documentation xml:lang="en">Date the clip was last modified, or the date the clip represents in a journal.</xsd:documentation></xsd:annotation></xsd:attribute>
		<xsd:attribute name="indent" type="xsd:boolean"><xsd:annotation><xsd:documentation xml:lang="en">Indicates if the clip should be indented when it's pasted.</xsd:documentation></xsd:annotation></xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="RecycledClip">
		<xsd:complexContent>
			<xsd:extension base="act:Clip">
				<xsd:attribute name="recycleddate" type="xsd:date" use="required"><xsd:annotation><xsd:documentation xml:lang="en">Date the clip was deleted.</xsd:documentation></xsd:annotation></xsd:attribute>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:simpleType name="SortOrder">
		<xsd:restriction base="xsd:token">
            <xsd:enumeration value="parent"><xsd:annotation><xsd:documentation xml:lang="en">Sort clips in the same way as they're sorted in the folder's parent folder.</xsd:documentation></xsd:annotation></xsd:enumeration>
            <xsd:enumeration value="none"><xsd:annotation><xsd:documentation xml:lang="en">Do not sort clips.</xsd:documentation></xsd:annotation></xsd:enumeration>
            <xsd:enumeration value="a-z"><xsd:annotation><xsd:documentation xml:lang="en">Sort clips alphabetically from A to Z by their labels.</xsd:documentation></xsd:annotation></xsd:enumeration>
            <xsd:enumeration value="z-a"><xsd:annotation><xsd:documentation xml:lang="en">Sort clips alphabetically from Z to A by their labels.</xsd:documentation></xsd:annotation></xsd:enumeration>
            <xsd:enumeration value="a-z_acetype"><xsd:annotation><xsd:documentation xml:lang="en">Sort clips alphabetically from A to Z by their AceType abbreviations.</xsd:documentation></xsd:annotation></xsd:enumeration>
            <xsd:enumeration value="z-a_acetype"><xsd:annotation><xsd:documentation xml:lang="en">Sort clips alphabetically from Z to A by their AceType abbreviations.</xsd:documentation></xsd:annotation></xsd:enumeration>
            <xsd:enumeration value="new-old"><xsd:annotation><xsd:documentation xml:lang="en">Sort clips by date from newest to oldest.</xsd:documentation></xsd:annotation></xsd:enumeration>
            <xsd:enumeration value="old-new"><xsd:annotation><xsd:documentation xml:lang="en">Sort clips by date from oldest to newest.</xsd:documentation></xsd:annotation></xsd:enumeration>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:complexType name="Folder">
		<xsd:choice minOccurs="0" maxOccurs="unbounded">
			<xsd:annotation><xsd:documentation xml:lang="en">A folder can contain any number of intermixed clips and folders.</xsd:documentation></xsd:annotation>
			<xsd:element name="folder" type="act:Folder"/>
			<xsd:element name="feedreader" type="act:FeedReader"/>
			<xsd:element name="feedwriter" type="act:FeedWriter"/>
			<xsd:element name="clip" type="act:Clip"/>
			<xsd:element name="recycledclip" type="act:RecycledClip"><xsd:annotation><xsd:documentation xml:lang="en">AceText's recycle bin collection file contains recycledclip instead of clip elements.  All other collections should contain only clip elements.</xsd:documentation></xsd:annotation></xsd:element>
		</xsd:choice>
		<xsd:attribute name="label" type="xsd:string"><xsd:annotation><xsd:documentation xml:lang="en">Folder's label in the clip tree.</xsd:documentation></xsd:annotation></xsd:attribute>
		<xsd:attribute name="sort" type="act:SortOrder"><xsd:annotation><xsd:documentation xml:lang="en">Sort order for clips in this folder.  The parent folder's sort order is used if the sort attribute is missing.</xsd:documentation></xsd:annotation></xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="FeedReader">
		<xsd:complexContent>
			<xsd:annotation><xsd:documentation xml:lang="en">Since the FeedReader type is an extension of the Folder type, it can technically contain subfolders and even sub-feed-readers.  However, it is recommended not to put anything into feed readers other than the clips retrieved from the feed, even if AceText allows the user to do otherwise.</xsd:documentation></xsd:annotation>
			<xsd:extension base="act:Folder">
				<xsd:attribute name="url" type="xsd:string" use="required"><xsd:annotation><xsd:documentation xml:lang="en">feed: or http: URL pointing to the RSS or Atom feed.</xsd:documentation></xsd:annotation></xsd:attribute>
				<xsd:attribute name="autorefresh" type="xsd:boolean"><xsd:annotation><xsd:documentation xml:lang="en">Indicates if AceText should automatically reload the feed (either daily, or at the frequency specified by the feed itself).</xsd:documentation></xsd:annotation></xsd:attribute>
				<xsd:attribute name="purgeclips" type="xsd:boolean"><xsd:annotation><xsd:documentation xml:lang="en">Indicates if AceText should delete all the clips from the feed reader folder when adding the clips from the current feed.</xsd:documentation></xsd:annotation></xsd:attribute>
				<xsd:attribute name="pubdate" type="xsd:dateTime"><xsd:annotation><xsd:documentation xml:lang="en">Date and time the feed was published (or the date it was retrieved if the feed doesn't specify its publication date).</xsd:documentation></xsd:annotation></xsd:attribute>
				<xsd:attribute name="refreshdate" type="xsd:dateTime"><xsd:annotation><xsd:documentation xml:lang="en">Date and time on or after which the feed should be automatically refreshed, according to the feed itself.</xsd:documentation></xsd:annotation></xsd:attribute>
				<xsd:attribute name="userttl" type="xsd:positiveInteger"><xsd:annotation><xsd:documentation xml:lang="en">User-specified time to live in minutes for the feed.  Only used if the feed itself doesn't specify.</xsd:documentation></xsd:annotation></xsd:attribute>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="FeedWriter">
		<xsd:complexContent>
			<xsd:annotation><xsd:documentation xml:lang="en">Since the FeedWriter type is an extension of the Folder type, it can technically contain subfolders and even sub-feed-readers.  However, it is recommended not to put anything into feed writers other than the clips that should be written into the feed.  Clips in subfolders will NOT be written into the feed.</xsd:documentation></xsd:annotation>
			<xsd:extension base="act:Folder">
				<xsd:attribute name="description" type="xsd:string" use="required"><xsd:annotation><xsd:documentation xml:lang="en">Description or summary of the feed</xsd:documentation></xsd:annotation></xsd:attribute>
				<xsd:attribute name="url" type="xsd:string" use="required"><xsd:annotation><xsd:documentation xml:lang="en">feed: or http: URL pointing to the location where the RSS feed will be published.</xsd:documentation></xsd:annotation></xsd:attribute>
				<xsd:attribute name="copyright" type="xsd:string"><xsd:annotation><xsd:documentation xml:lang="en">Copyright statement to be put into the feed.</xsd:documentation></xsd:annotation></xsd:attribute>
				<xsd:attribute name="writefile" type="xsd:boolean"><xsd:annotation><xsd:documentation xml:lang="en">Indicates if AceText should save the feed into a file.</xsd:documentation></xsd:annotation></xsd:attribute>
				<xsd:attribute name="filename" type="xsd:string"><xsd:annotation><xsd:documentation xml:lang="en">File to save the feed into.</xsd:documentation></xsd:annotation></xsd:attribute>
				<xsd:attribute name="writeftp" type="xsd:boolean"><xsd:annotation><xsd:documentation xml:lang="en">Indicates if AceText should upload the feed via FTP.</xsd:documentation></xsd:annotation></xsd:attribute>
				<xsd:attribute name="ftpserver" type="xsd:string"><xsd:annotation><xsd:documentation xml:lang="en">FTP server to upload to.</xsd:documentation></xsd:annotation></xsd:attribute>
				<xsd:attribute name="ftpport" type="xsd:positiveInteger"><xsd:annotation><xsd:documentation xml:lang="en">FTP server port.</xsd:documentation></xsd:annotation></xsd:attribute>
				<xsd:attribute name="ftplogin" type="xsd:string"><xsd:annotation><xsd:documentation xml:lang="en">FTP user name.</xsd:documentation></xsd:annotation></xsd:attribute>
				<xsd:attribute name="ftppassword" type="xsd:string"><xsd:annotation><xsd:documentation xml:lang="en">FTP password.  AceText will prompt for the password if none is specified.</xsd:documentation></xsd:annotation></xsd:attribute>
				<xsd:attribute name="ftppath" type="xsd:string"><xsd:annotation><xsd:documentation xml:lang="en">Full path to the file on the FTP server to be uploaded.</xsd:documentation></xsd:annotation></xsd:attribute>
				<xsd:attribute name="pubdate" type="xsd:dateTime"><xsd:annotation><xsd:documentation xml:lang="en">Date and time the feed was last written.</xsd:documentation></xsd:annotation></xsd:attribute>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="Collection">
		<xsd:complexContent>
			<xsd:annotation><xsd:documentation xml:lang="en">AceText Collection file (*.atc) and "AceText Collection" clipboard format.</xsd:documentation></xsd:annotation>
			<xsd:extension base="act:Folder">
				<xsd:sequence>
					<xsd:element name="parameters" minOccurs="0">
						<xsd:annotation><xsd:documentation xml:lang="en">History list for previously used parameter substitutions.  Some of the remembered parameters may not actually occur in the collection, if the clips previously containing these parameters were edited or deleted.</xsd:documentation></xsd:annotation>
						<xsd:complexType>
							<xsd:sequence>
								<xsd:element name="parameter" minOccurs="0" maxOccurs="unbounded">
									<xsd:complexType>
										<xsd:sequence>
											<xsd:element name="history" type="xsd:string" minOccurs="0" maxOccurs="10"><xsd:annotation><xsd:documentation xml:lang="en">Up to 10 previously used values for the parameter, from most recently used to least recently used.  For date, time and date+time parameters, the history items use xsd:date, xsd:time and xsd:dateTime values respectively.  For file name and content parameters, the history items must be file paths.</xsd:documentation></xsd:annotation></xsd:element>
										</xsd:sequence>
										<xsd:attribute name="name" type="act:Parameter" use="required"><xsd:annotation><xsd:documentation xml:lang="en">The parameter's name, including % signs.</xsd:documentation></xsd:annotation></xsd:attribute>
									</xsd:complexType>
								</xsd:element>
							</xsd:sequence>
						</xsd:complexType>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:element name="acetext">
		<xsd:complexType>
			<xsd:choice>
				<xsd:element name="collection" type="act:Collection">
					<xsd:annotation><xsd:documentation xml:lang="en">AceText Collection file (*.atc) and "AceText Collection" clipboard format.</xsd:documentation></xsd:annotation>
				</xsd:element>
				<xsd:element name="encryptedcollection">
					<xsd:annotation><xsd:documentation xml:lang="en">Password-protected AceText Collection file (*.atc).  The contents of the tag must be a CDATA section containing exactly as many bytes as indicated by the attribute.  There should be no extraneous whitespace.</xsd:documentation></xsd:annotation>
					<xsd:complexType>
						<xsd:simpleContent>
							<xsd:extension base="xsd:string">
								<xsd:attribute name="bytes" type="xsd:positiveInteger" use="required"/>
							</xsd:extension>
						</xsd:simpleContent>
					</xsd:complexType>
				</xsd:element>
				<xsd:element name="clip" type="act:Clip">
					<xsd:annotation><xsd:documentation xml:lang="en">"AceText Clip" clipboard format.</xsd:documentation></xsd:annotation>
				</xsd:element>
			</xsd:choice>
			<xsd:attribute name="version" fixed="2.0" type="xsd:token" use="required"><xsd:annotation><xsd:documentation xml:lang="en">AceText XML Schema version.  When encountering a greater version number, tell the user to upgrade.	The version number is only incremented when the schema changes, rather than with each release of AceText.

First version 2.0:
Schema at http://www.acetext.com/acetext20.xsd</xsd:documentation></xsd:annotation></xsd:attribute>
		</xsd:complexType>
	</xsd:element>
</xsd:schema>