Skip to content

Instantly share code, notes, and snippets.

@mresetar
Created November 9, 2017 13:54
Show Gist options
  • Save mresetar/34e3ada65cc23c077dfef0833e3c2f78 to your computer and use it in GitHub Desktop.
Save mresetar/34e3ada65cc23c077dfef0833e3c2f78 to your computer and use it in GitHub Desktop.
<xs:schema attributeFormDefault="unqualified" targetNamespace="http://www.example.org/vjezba2"
elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="recipe">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="title" />
<xs:element name="ingredient" maxOccurs="unbounded"
minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:byte" name="amount" use="optional" />
<xs:attribute type="xs:string" name="unit" use="optional" />
<xs:attribute type="xs:string" name="state" use="optional" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="instructions">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="step" maxOccurs="unbounded"
minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:string" name="name" />
<xs:attribute type="xs:string" name="prep_time" />
<xs:attribute type="xs:string" name="cook_time" />
</xs:complexType>
</xs:element>
</xs:schema>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment