Skip to content

Commit

Permalink
first stab at "formats"
Browse files Browse the repository at this point in the history
  • Loading branch information
dret committed Jun 22, 2016
1 parent f623d7d commit 68ee110
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
10 changes: 6 additions & 4 deletions home-xml/draft-wilde-home-xml-04-files/home-xml.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml-stylesheet type="text/xsl" href="home-xml-02.xslt"?>
<resources xmlns="urn:ietf:params:xml:ns:homedoc" xml:base="tag:me@example.com,2016:">
<resources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:ietf:params:xml:ns:homedoc home-xml.xsd"
xmlns="urn:ietf:params:xml:ns:homedoc" xml:base="tag:me@example.com,2016:">
<resource rel="http://example.org/rel/widgets">
<link href="/widgets"/>
</resource>
Expand All @@ -14,9 +16,9 @@
<i>DELETE</i>
<i>PATCH</i>
</allow>
<representations>
<i>application/json</i>
</representations>
<formats>
<format mediatype="application/json"/>
</formats>
<accept-patch>
<i>application/json-patch+json</i>
</accept-patch>
Expand Down
15 changes: 14 additions & 1 deletion home-xml/draft-wilde-home-xml-04-files/home-xml.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,17 @@
<xs:complexType>
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element name="allow" type="home:arrayType"/>
<xs:element name="representations" type="home:arrayType"/>
<xs:element name="formats">
<xs:complexType>
<xs:sequence>
<xs:element name="format">
<xs:complexType>
<xs:attribute name="mediatype" type="home:mediaTypeType"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="accept-patch" type="home:arrayType"/>
<xs:element name="accept-post" type="home:arrayType"/>
<xs:element name="accept-put" type="home:arrayType"/>
Expand Down Expand Up @@ -77,4 +87,7 @@
<xs:element name="i"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="mediaTypeType">
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:schema>

0 comments on commit 68ee110

Please sign in to comment.