summaryrefslogtreecommitdiff
path: root/tex/context/modules/mkii/x-fig-00.xsd
blob: 615841a1e6c20faf1bea579c473cc9cbaa0a1835 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?xml version="1.0"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:annotation>
  <xsd:documentation xml:lang="en">
    <p>This schema described the figure database. This base 
    can be used to collect graphics that later can be used 
    in applications like ConTeXt.</p>   
    <p>author: Tobias Burnus &amp; Hans Hagen, copyright:
    PRAGMA-ADE / Hasselt NL</p> 
  </xsd:documentation>
</xsd:annotation>

<xsd:element name="figurelibrary" type="figureLibraryType" />

<xsd:element name="comment" type="nonZeroString" />

<xsd:complexType name="figureLibraryType">
  <xsd:sequence>
    <xsd:element name="description" type="descriptionType" />
    <xsd:element name="figure"      type="figureType" 
                 minOccurs="0"      maxOccurs="unbounded" />
  </xsd:sequence>
  <xsd:attribute name="language" type="xsd:language" />
</xsd:complexType>

<xsd:complexType name="descriptionType">
  <xsd:sequence>
    <xsd:element name="organization" type="nonZeroString" />
    <xsd:element name="project"      type="nonZeroString" />
    <xsd:element name="product"      type="nonZeroString" />
    <xsd:element ref="comment"       minOccurs="0" />
  </xsd:sequence>
</xsd:complexType>

<xsd:complexType name="figureType">
  <xsd:sequence>
    <xsd:choice>
      <xsd:element name="file"  type="NZNormalizedString" />
      <xsd:element name="dummy" type="dummyType" />
    </xsd:choice>
    <xsd:element name="label"     type="NZNormalizedString" />
    <xsd:element name="copyright" type="nonZeroString" />
    <xsd:element ref="comment"    minOccurs="0" />
  </xsd:sequence>
</xsd:complexType>

<xsd:complexType name="dummyType">
  <xsd:simpleContent>
    <xsd:extension base="nonZeroString">
      <xsd:attribute name="width"  type="TeXUnit" use="required" />
      <xsd:attribute name="height" type="TeXUnit" use="required" />
    </xsd:extension>
  </xsd:simpleContent>
</xsd:complexType>

<xsd:simpleType name="nonZeroString">
  <xsd:restriction base="xsd:string">
    <xsd:minLength value="1" />
  </xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="NZNormalizedString">
  <xsd:restriction base="xsd:normalizedString">
    <xsd:minLength value="1" />
  </xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="TeXUnit">
  <xsd:restriction base="xsd:string">
    <xsd:pattern 
       value='[0-9]*(,|\.|[0-9])?[0-9]*(cm|mm|in|pt|pc|em|ex|bp|dd|cc|sp)' />
  </xsd:restriction>
</xsd:simpleType>

</xsd:schema>