diff options
| author | Jorge L. Williams <jorge.williams@rackspace.com> | 2011-04-15 00:36:34 -0500 |
|---|---|---|
| committer | Jorge L. Williams <jorge.williams@rackspace.com> | 2011-04-15 00:36:34 -0500 |
| commit | 7bc72749ed6ab6f06108b3ec5add40f3607616a8 (patch) | |
| tree | 6d10cb9bfda166f11481ab5740a345a6aa9ec9f2 /docs | |
| parent | 2484117da7dc281b2e3c96281a41af7e7730c475 (diff) | |
Added common extensions.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/guide/src/docbkx/xsd/api-common.xsd | 56 | ||||
| -rw-r--r-- | docs/guide/src/docbkx/xsd/extensions.xsd | 56 | ||||
| -rw-r--r-- | docs/guide/src/docbkx/xsd/version.xsd | 200 |
3 files changed, 312 insertions, 0 deletions
diff --git a/docs/guide/src/docbkx/xsd/api-common.xsd b/docs/guide/src/docbkx/xsd/api-common.xsd new file mode 100644 index 00000000..5e8ebeda --- /dev/null +++ b/docs/guide/src/docbkx/xsd/api-common.xsd @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?> + +<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved --> + + +<schema + elementFormDefault="qualified" + attributeFormDefault="unqualified" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:capi="http://docs.openstack.org/common/api/v1.0" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://docs.openstack.org/common/api/v1.0" +> + <annotation> + <xsd:appinfo + xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <xsdxt:title>Open Stack Common API Schema Types 1.0</xsdxt:title> + <xsdxt:link rev="index" href="extensions.xsd" /> + <xsdxt:link rev="index" href="limits.xsd" /> + <xsdxt:link rev="index" href="version.xsd" /> + </xsd:appinfo> + <xsd:documentation + xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> + This is the main index XML Schema document + for Common API Schema Types Version 1.0. + </p> + </xsd:documentation> + </annotation> + <include schemaLocation="extensions.xsd"> + <annotation> + <xsd:documentation + xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> + Types related to extensions. + </p> + </xsd:documentation> + </annotation> + </include> + <include schemaLocation="version.xsd"> + <annotation> + <xsd:documentation + xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> + Types related to API version details. + </p> + </xsd:documentation> + </annotation> + </include> +</schema> diff --git a/docs/guide/src/docbkx/xsd/extensions.xsd b/docs/guide/src/docbkx/xsd/extensions.xsd new file mode 100644 index 00000000..2d16a945 --- /dev/null +++ b/docs/guide/src/docbkx/xsd/extensions.xsd @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<xsd:schema elementFormDefault="qualified" attributeFormDefault="unqualified" + targetNamespace="http://docs.openstack.org/common/api/v1.0" + xmlns:ext="http://docs.openstack.org/common/api/v1.0" + xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:atom="http://www.w3.org/2005/Atom" + xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + + <!-- Import ATOM specific schema definitions --> + <xsd:import namespace="http://www.w3.org/2005/Atom" schemaLocation="./atom/atom.xsd" /> + + <xsd:element name="extensions" type="ext:Extensions"/> + <xsd:element name="extension" type="ext:Extension"/> + + <xsd:complexType name="Extensions"> + <xsd:sequence> + <xsd:element name="extension" type="ext:Extension" minOccurs="0" maxOccurs="unbounded" /> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <xsd:complexType name="Extension"> + <xsd:sequence> + <xsd:element name="description" type="xsd:string" minOccurs="1" /> + <xsd:element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" /> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required"/> + <xsd:attribute name="namespace" type="xsd:anyURI" use="required"/> + <xsd:attribute name="alias" type="ext:Alias" use="required"/> + <xsd:attribute name="updated" type="xsd:dateTime" use="optional"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + <xsd:assert vc:minVersion="1.1" test="atom:link[@rel='describedby']"> + <xsd:annotation> + <xsd:documentation + xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> + There should be at least one atom link + with a describedby relation. + </p> + </xsd:documentation> + </xsd:annotation> + </xsd:assert> + </xsd:complexType> + + <xsd:simpleType name="Alias"> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="\w+\-\w+" /> + </xsd:restriction> + </xsd:simpleType> + +</xsd:schema> diff --git a/docs/guide/src/docbkx/xsd/version.xsd b/docs/guide/src/docbkx/xsd/version.xsd new file mode 100644 index 00000000..bbc86a6d --- /dev/null +++ b/docs/guide/src/docbkx/xsd/version.xsd @@ -0,0 +1,200 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" + targetNamespace="http://docs.openstack.org/common/api/v1.0" + xmlns:vers="http://docs.openstack.org/common/api/v1.0" + xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:atom="http://www.w3.org/2005/Atom" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + + <!-- Import ATOM specific schema definitions --> + <xs:import namespace="http://www.w3.org/2005/Atom" schemaLocation="./atom/atom.xsd" /> + + <!-- Multiple choices --> + <xs:element name="choices" type="vers:VersionChoiceList" /> + + <!-- Versioning --> + <xs:element name="versions" type="vers:VersionChoiceList" /> + <xs:element name="version" type="vers:VersionChoice" vc:minVersion="1.0" vc:maxVersion="1.1"/> + <xs:element name="version" type="vers:VersionChoiceRoot" vc:minVersion="1.1"/> + + <!-- Types --> + <xs:simpleType name="VersionStatus"> + <xs:annotation> + <xs:documentation> + <html:p> + The VersionStatus type describes a service's operational status. + </html:p> + </xs:documentation> + </xs:annotation> + + <xs:restriction base="xs:string"> + <xs:enumeration value="DEPRECATED" /> + <xs:enumeration value="ALPHA" /> + <xs:enumeration value="BETA" /> + <xs:enumeration value="CURRENT" /> + </xs:restriction> + </xs:simpleType> + + <xs:complexType name="VersionChoiceList"> + <xs:annotation> + <xs:documentation> + <html:p> + A version choice list outlines a collection of service version choices. + </html:p> + </xs:documentation> + </xs:annotation> + + <xs:sequence> + <xs:element name="version" type="vers:VersionChoice" minOccurs="1" maxOccurs="unbounded" /> + <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + </xs:sequence> + <xs:anyAttribute namespace="##other" processContents="lax"/> + <xs:assert vc:minVersion="1.1" test="every $v in vers:version satisfies $v/atom:link[@rel='self']"> + <xs:annotation> + <xs:documentation> + <html:p> + In version lists, every single version must + contain at least one self link. + </html:p> + </xs:documentation> + </xs:annotation> + </xs:assert> + </xs:complexType> + + <xs:complexType name="VersionChoiceRoot" vc:minVersion="1.1"> + <xs:complexContent> + <xs:extension base="vers:VersionChoice"> + <xs:assert test="atom:link[@rel='describedby']"> + <xs:annotation> + <xs:documentation> + <html:p> + When used as a root element, a version choice + must contain at least one describedby link. + </html:p> + </xs:documentation> + </xs:annotation> + </xs:assert> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="VersionChoice"> + <xs:annotation> + <xs:documentation> + <html:p> + A version choice contains relevant information about an available service + that a user can then use to target a specific version of the service. Note + that both the descriptive media types and the atom link references are + not manditory and are offered as message enrichment elements rather + than message requirements. + </html:p> + </xs:documentation> + </xs:annotation> + + <xs:sequence> + <xs:element name="media-types" type="vers:MediaTypeList" minOccurs="0" maxOccurs="1" /> + <xs:element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" /> + <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + </xs:sequence> + + <xs:attribute name="id" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation> + <html:p> + The ID of a version choice represents the service version's unique + identifier. This ID is guaranteed to be unique only among the + service version choices outlined in the VersionChoiceList. + </html:p> + </xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="status" type="vers:VersionStatus" use="required"> + <xs:annotation> + <xs:documentation> + <html:p> + A version choice's status describes the current operational state of + the given service version. The operational status is captured in a + simple type enumeration called VersionStatus. + </html:p> + </xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="updated" type="xs:dateTime" use="optional"> + <xs:annotation> + <xs:documentation> + <html:p> + A version choice's updated attribute describes + the time when the version was updated. The + time should be updated anytime + <html:strong>anything</html:strong> in the + version has changed: documentation, + extensions, bug fixes. + </html:p> + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:complexType> + + <xs:complexType name="MediaTypeList"> + <xs:annotation> + <xs:documentation> + <html:p> + A MediaTypeList outlines a collection of valid media types for a given + service version. + </html:p> + </xs:documentation> + </xs:annotation> + + <xs:sequence> + <xs:element name="media-type" type="vers:MediaType" minOccurs="1" maxOccurs="unbounded" /> + <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + </xs:sequence> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:complexType> + + <xs:complexType name="MediaType"> + <xs:annotation> + <xs:documentation> + <html:p> + A MediaType describes what content types the service version understands. + </html:p> + </xs:documentation> + </xs:annotation> + <xs:sequence> + <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + </xs:sequence> + <xs:attribute name="base" type="xs:string" use="optional" default=""> + <xs:annotation> + <xs:documentation> + <html:p> + The base of a given media type describes the simple MIME type + that then a more complicated media type can be derived from. These + types are basic and provide no namespace or version specific + data are are only provided as a convenience. Because of this the + base attribute is declared as optional. + </html:p> + </xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="type" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation> + <html:p> + The type attribute of a MediaType describes the MIME specific + identifier of the media type in question. This identifier should include + a vendor namespace ( + <html:a href="http://tools.ietf.org/html/rfc2048">See RFC 2048</html:a>) + as well as a version suffix. + </html:p> + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:complexType> +</xs:schema> |
