1 <?xml version=
"1.0" encoding=
"UTF-8" ?>
3 A format for describing pottery glazes, samples and pieces.
6 <xs:schema xmlns:
xs=
"http://www.w3.org/2001/XMLSchema"
7 xmlns:
db=
"http://docbook.org/ns/docbook"
8 targetNamespace=
"tag:fenglich.fastmail.fm,2007:Pottery"
9 xmlns=
"tag:fenglich.fastmail.fm,2007:Pottery"
10 elementFormDefault=
"qualified">
13 <xs:import schemaLocation=
"xml.xsd"
14 namespace=
"http://www.w3.org/XML/1998/namespace"/>
16 <xs:import schemaLocation=
"docbook.xsd"
17 namespace=
"http://docbook.org/ns/docbook"/>
18 <!-- xml:id per http://www.w3.org/TR/2005/REC-xml-id-20050909/ -->
20 <xs:import schemaLocation="xmlid.xsd"
21 namespace="http://www.w3.org/XML/1998/namespace"/>
24 <xs:simpleType name=
"sampleIDsType">
25 <xs:list itemType=
"sampleIDType"/>
28 <xs:simpleType name=
"sampleIDType">
29 <xs:restriction base=
"xs:string">
30 <xs:pattern value=
"(T|W)\d+"/>
34 <xs:element name=
"pottery" type=
"potteryType"/>
36 <xs:complexType name=
"potteryType">
38 <xs:restriction base=
"xs:anyType">
40 <xs:element name=
"components"
43 type=
"componentsType">
44 <!-- TODO How do I put a uniqueness constraint on string(component)?. -->
47 <xs:element name=
"pieces"
53 <xs:element name=
"samples"
59 <xs:element name=
"clays"
63 <xs:unique name=
"unique-clays-name">
64 <xs:selector xpath=
"clay"/>
65 <xs:field xpath=
"@name"/>
69 <xs:element name=
"glazes"
73 <xs:unique name=
"unique-glaze-name">
74 <!-- TODO Why doesn't this work? -->
75 <xs:selector xpath=
"glaze"/>
76 <xs:field xpath=
"@name"/>
79 <xs:unique name=
"unique-glaze-productID">
80 <!-- TODO Why doesn't this work? -->
81 <xs:selector xpath=
"glaze"/>
82 <xs:field xpath=
"@productID"/>
88 <xs:attribute name=
"version" type=
"xs:decimal"/>
89 <xs:attribute ref=
"xml:lang" use=
"required"/>
94 <xs:complexType name=
"samplesType">
96 <xs:element name=
"sample" type=
"sampleType" minOccurs=
"1" maxOccurs=
"unbounded"/>
100 <xs:complexType name=
"piecesType">
102 <xs:element name=
"piece" type=
"pieceType" minOccurs=
"0" maxOccurs=
"unbounded"/>
106 <xs:complexType name=
"imageType">
108 <xs:extension base=
"xs:NCName"/>
112 <xs:complexType name=
"pieceType">
114 <xs:restriction base=
"xs:anyType">
116 <xs:element name=
"measurementsWhenDone"
119 <!-- HWD, Measurements are in millimeters. -->
121 <xs:attribute name=
"height" type=
"xs:positiveInteger"/>
122 <xs:attribute name=
"width" type=
"xs:positiveInteger"/>
123 <xs:attribute name=
"depth" type=
"xs:positiveInteger"/>
126 <xs:element name=
"image"
129 maxOccurs=
"unbounded"/>
130 <xs:element name=
"clayref"
133 maxOccurs=
"unbounded"/>
134 <xs:element name=
"glazing"
137 maxOccurs=
"unbounded"/>
138 <xs:element name=
"brushon"
141 maxOccurs=
"unbounded"/>
142 <xs:element ref=
"db:para"
144 maxOccurs=
"unbounded"/>
146 <xs:attribute ref=
"xml:id" use=
"required"/>
151 <xs:complexType name=
"claysType">
153 <xs:element name=
"clay" type=
"clayType" minOccurs=
"1" maxOccurs=
"unbounded"/>
157 <xs:complexType name=
"recipeType">
159 <xs:element name=
"component" type=
"componentRefType" minOccurs=
"1" maxOccurs=
"unbounded"/>
163 <xs:complexType name=
"componentRefType">
164 <xs:attribute name=
"idref" type=
"xs:IDREF" use=
"required"/>
165 <xs:attribute name=
"replacementFor" type=
"xs:IDREF" use=
"optional"/>
166 <xs:attribute name=
"parts" use=
"required">
168 <xs:restriction base=
"xs:decimal">
169 <xs:minExclusive value=
"0"/>
170 <xs:maxInclusive value=
"100"/>
176 <xs:complexType name=
"clayType">
177 <xs:attribute ref=
"xml:id" use=
"required"/>
178 <xs:attribute name=
"name" type=
"xs:normalizedString" use=
"required"/>
179 <xs:attribute name=
"manufacturer" type=
"xs:normalizedString" use=
"required"/>
180 <xs:attribute name=
"productID" type=
"xs:normalizedString" use=
"required"/>
183 <xs:complexType name=
"clayrefType">
184 <xs:attribute name=
"idref" type=
"xs:IDREF" use=
"required"/>
185 <xs:attribute name=
"weightWhenWet" type=
"xs:positiveInteger" use=
"optional"/>
188 <xs:complexType name=
"glazesType">
190 <xs:element name=
"glaze" type=
"glazeType" minOccurs=
"0" maxOccurs=
"unbounded"/>
194 <xs:complexType name=
"glazeType">
196 <xs:restriction base=
"xs:anyType">
198 <xs:element ref=
"db:para"
200 maxOccurs=
"unbounded"/>
201 <xs:element name=
"recipe"
205 <xs:unique name=
"unique-componentref">
206 <!-- TODO Why doesn't this work? -->
207 <xs:selector xpath=
"component"/>
208 <xs:field xpath=
"@idref"/>
209 <xs:field xpath=
"@replacementFor"/>
213 <xs:attribute ref=
"xml:id" use=
"required"/>
214 <xs:attribute name=
"name" type=
"xs:normalizedString" use=
"required"/>
215 <xs:attribute name=
"manufacturer" type=
"xs:normalizedString" use=
"required"/>
216 <xs:attribute name=
"productID" type=
"xs:normalizedString" use=
"optional"/>
217 <xs:attribute name=
"type" use=
"optional">
219 <xs:restriction base =
"xs:string">
220 <xs:enumeration value =
"BrushOn"/>
229 <xs:complexType name=
"sampleType">
231 <xs:element name=
"image" type=
"imageType" minOccurs=
"0" maxOccurs=
"unbounded"/>
232 <xs:element name=
"brick" type=
"brickType" minOccurs=
"1" maxOccurs=
"unbounded"/>
233 <xs:element name=
"glazing" type=
"glazingType" minOccurs=
"0" maxOccurs=
"unbounded"/>
234 <xs:element name=
"brushon" type=
"brushonType" minOccurs=
"0" maxOccurs=
"unbounded"/>
235 <xs:element name=
"clayref" type=
"clayrefType" minOccurs=
"1" maxOccurs=
"unbounded"/>
236 <xs:element ref=
"db:para"
238 maxOccurs=
"unbounded"/>
240 <xs:attribute name=
"date" type=
"xs:date" use=
"required"/>
243 <xs:complexType name=
"brickType">
244 <xs:attribute ref=
"xml:id" use=
"required"/>
247 <xs:complexType name=
"glazingType">
248 <xs:attribute name=
"idref" use=
"required" type=
"xs:IDREF"/>
249 <xs:attribute name=
"hydrometerGravity" use=
"optional" type=
"hydrometerGravityType"/>
250 <xs:attribute name=
"sieved" use=
"required" type=
"xs:boolean"/>
253 <xs:complexType name=
"brushonType">
254 <xs:attribute name=
"idref" use=
"required" type=
"xs:IDREF"/>
257 <xs:simpleType name=
"hydrometerGravityType">
258 <xs:restriction base=
"xs:integer"/>
261 <xs:complexType name=
"componentType">
263 <xs:extension base=
"xs:normalizedString">
264 <xs:attribute ref=
"xml:id" use=
"required"/>
265 <xs:attribute name=
"price" type=
"xs:positiveInteger" use=
"optional"/>
266 <xs:attribute name=
"priceIsFor" type=
"xs:positiveInteger" use=
"optional"/>
271 <xs:complexType name=
"componentsType">
273 <xs:element name=
"component" type=
"componentType" minOccurs=
"1" maxOccurs=
"unbounded"/>
279 vim: et:ts=4:sw=4:sts=4