c3d2-web/xsd/atom031.xsd

199 lines
7.7 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema targetNamespace="http://purl.org/atom/ns#" elementFormDefault="qualified" attributeFormDefault="unqualified"
xmlns:atom="http://purl.org/atom/ns#" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:documentation>
This version of the Atom API schema is based on version 0.3 of the Atom API and format specifications,
found here http://www.ietf.org/internet-drafts/draft-ietf-atompub-protocol-00.txt
and here http://www.ietf.org/internet-drafts/draft-ietf-atompub-format-00.txt.
</xs:documentation>
</xs:annotation>
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/03/xml.xsd" />
<xs:element name="feed" type="atom:feedType">
<xs:annotation>
<xs:documentation>
The Atom feed is defined in section 4 of the format spec.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="feedinfoType">
<xs:choice maxOccurs="unbounded">
<xs:element name="title" type="atom:contentType" />
<xs:element name="author" type="atom:authorType" />
<xs:element name="contributor" type="atom:authorType" />
<xs:element name="tagline" type="atom:contentType" />
<xs:element name="link" type="atom:linkType" />
<xs:element name="id" type="atom:uriType" />
<xs:element name="generator" type="atom:generatorType" />
<xs:element name="copyright" type="atom:contentType" />
<xs:element name="info" type="atom:contentType" />
<xs:element name="modified" type="atom:dateTimeType" />
</xs:choice>
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:complexType>
<xs:complexType name="feedType">
<xs:sequence>
<xs:element name="feedinfo" type="atom:feedinfoType" />
<xs:element name="entry" type="atom:entryType" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="version" type="atom:versionType" use="required" />
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:complexType>
<xs:element name="entry" type="atom:entryType">
<xs:annotation>
<xs:documentation>
The Atom feed is defined in section 4.13 of the format spec.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="entryType">
<xs:choice maxOccurs="unbounded">
<xs:element name="title" type="atom:contentType" />
<xs:element name="author" type="atom:authorType" />
<xs:element name="id" type="atom:stringType" />
<xs:element name="modified" type="atom:dateTimeType" />
<xs:element name="issued" type="atom:dateTimeType" />
<xs:element name="created" type="atom:dateTimeType" />
<xs:element name="summary" type="atom:contentType" />
<xs:element name="generator" type="atom:generatorType" />
<xs:element name="link" type="atom:linkType" />
<xs:element name="contributor" type="atom:authorType" />
<xs:element name="content" type="atom:contentType" />
</xs:choice>
<xs:attribute name="version" type="atom:versionType" use="required" />
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:complexType>
<xs:complexType name="contentType" mixed="true">
<xs:annotation>
<xs:documentation>
The Atom content construct is defined in section 3.1 of the format spec.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="type" use="optional" default="text/plain" />
<xs:attribute name="mode" use="optional" default="xml">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="xml" />
<xs:enumeration value="escaped" />
<xs:enumeration value="base64" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:complexType>
<xs:complexType name="authorType">
<xs:annotation>
<xs:documentation>
The Atom person construct is defined in section 3.2 of the format spec.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="name" type="atom:stringType" />
<xs:element name="url" type="atom:uriType" minOccurs="0" maxOccurs="1" />
<xs:element name="email" type="atom:emailType" minOccurs="0" maxOccurs="1" />
</xs:sequence>
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:complexType>
<xs:complexType name="linkType">
<xs:annotation>
<xs:documentation>
The Atom link construct is defined in section 3.4 of the format spec.
</xs:documentation>
</xs:annotation>
<xs:attribute name="rel" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="alternate" />
<xs:enumeration value="start" />
<xs:enumeration value="next" />
<xs:enumeration value="prev" />
<xs:enumeration value="service.edit" />
<xs:enumeration value="service.post" />
<xs:enumeration value="service.feed" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="type" use="required" type="xs:string" />
<xs:attribute name="href" use="required" type="xs:anyURI" />
<xs:attribute name="hreflang" use="optional" type="xs:NMTOKEN" />
<xs:attribute name="title" use="optional" type="xs:string" />
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:complexType>
<xs:complexType name="generatorType">
<xs:annotation>
<xs:documentation>
The Atom generator element is defined in section 4.9 of the format spec.
</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="url" use="optional" type="xs:anyURI" />
<xs:attribute name="version" use="optional" type="atom:versionType" />
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="uriType">
<xs:simpleContent>
<xs:extension base="xs:anyURI">
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="stringType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="dateTimeType">
<xs:simpleContent>
<xs:extension base="atom:iso8601dateTime">
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="iso8601dateTime">
<xs:annotation>
<xs:documentation>
The Atom date construct is defined in section 3.3 of the format spec.
</xs:documentation>
</xs:annotation>
<xs:union memberTypes="xs:dateTime xs:date xs:gYearMonth xs:gYear"/>
</xs:simpleType>
<xs:simpleType name="versionType">
<xs:annotation>
<xs:documentation>
General description for a version number.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:normalizedString">
<xs:pattern value="\d+\.\d+" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="emailType">
<xs:simpleContent>
<xs:extension base="atom:emailSimpleType">
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="emailSimpleType">
<xs:annotation>
<xs:documentation>
Schema definition for an email address.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:normalizedString">
<xs:pattern value="\w+@(\w+\.)+\w+" />
</xs:restriction>
</xs:simpleType>
<xs:attributeGroup name="commonAttributes">
<xs:attribute ref="xml:base" />
<xs:attribute ref="xml:lang" />
</xs:attributeGroup>
</xs:schema>