Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Ticket #205: cml.xsd

File cml.xsd, 8.1 kB (added by Simon Detheridge <simon@widgit.com>, 3 years ago)

schema file for wsdl

Line 
1 <?xml version="1.0" ?>
2
3 <xsd:schema
4         targetNamespace="http://www.symgate.com/cml"
5         xmlns="http://www.symgate.com/cml"
6         xmlns:xsd="http://www.w3.org/2001/XMLSchema">
7        
8         <!-- this specifies which cml elements are valid in 'content' blocks, for example inside sentences. It is
9              recursive: for example, a link element can contain further content elements. -->
10         <xsd:complexType name="contentelement">
11                 <xsd:sequence>
12                         <xsd:choice maxOccurs="unbounded">
13                                 <xsd:element name="link" type="link" />
14                                 <xsd:element name="br" type="br" />
15                                 <xsd:element name="altlist" type="altlist" />
16                                 <xsd:element name="cmap" type="cmap" />
17                                 <xsd:element name="img" type="img" />
18                         </xsd:choice>
19                 </xsd:sequence>
20         </xsd:complexType>
21        
22         <!-- symsets currently supported, or in development for the symboliser -->
23         <xsd:simpleType name="symset">
24                 <xsd:restriction base="xsd:string">
25                         <xsd:enumeration value="Widrebus" /> <!-- Widgit Rebus -->
26                         <xsd:enumeration value="Widrebus_vi" /> <!-- Widgit Rebus for Visual Impairments -->
27                         <xsd:enumeration value="PCS" /> <!-- PCS symbols -->
28                         <xsd:enumeration value="Bliss" /> <!-- Bliss symbols -->
29                         <xsd:enumeration value="User" /> <!-- User-defined symbols -->
30                 </xsd:restriction>
31         </xsd:simpleType>
32        
33         <!-- symbol colours supported by the black & white symbol sets -->
34         <xsd:simpleType name="symsetcol">
35                 <xsd:restriction base="xsd:string">
36                         <xsd:enumeration value="Black" />
37                         <xsd:enumeration value="DarkGrey" />
38                         <xsd:enumeration value="LightGrey" />
39                         <xsd:enumeration value="White" />
40                         <xsd:enumeration value="Red" />
41                         <xsd:enumeration value="Green" />
42                         <xsd:enumeration value="Blue" />
43                         <xsd:enumeration value="Yellow" />
44                         <xsd:enumeration value="Cyan" />
45                         <xsd:enumeration value="Magenta" />
46                 </xsd:restriction>
47         </xsd:simpleType>
48
49         <!-- languages currently supported, or in development for the symboliser -->
50         <xsd:simpleType name="language">
51                 <xsd:restriction base="xsd:string">
52                         <xsd:enumeration value="ALL" />
53                         <xsd:enumeration value="UNKNOWN" />
54                         <xsd:enumeration value="Danish" />
55                         <xsd:enumeration value="Dutch" />
56                         <xsd:enumeration value="English_AU" />
57                         <xsd:enumeration value="English_UK" />
58                         <xsd:enumeration value="English_US" />
59                         <xsd:enumeration value="English_GENERIC" />
60                         <xsd:enumeration value="Finnish" />
61                         <xsd:enumeration value="French" />
62                         <xsd:enumeration value="German" />
63                         <xsd:enumeration value="Greek" />
64                         <xsd:enumeration value="Italian" />
65                         <xsd:enumeration value="Norwegian" />
66                         <xsd:enumeration value="Portuguese" />
67                         <xsd:enumeration value="Spanish" />
68                         <xsd:enumeration value="Swedish" />
69                 </xsd:restriction>
70         </xsd:simpleType>
71        
72         <!-- a symbol defines which graphics apply to a concept for a specific symset -->
73         <xsd:complexType name="symbol">
74                 <xsd:sequence>
75                         <xsd:element name="main" type="xsd:string" minOccurs="1" maxOccurs="1" />
76                         <xsd:element name="topleft" type="xsd:string" minOccurs="0" maxOccurs="1" />
77                         <xsd:element name="topright" type="xsd:string" minOccurs="0" maxOccurs="1" />
78                         <xsd:element name="bottomleft" type="xsd:string" minOccurs="0" maxOccurs="1" />
79                         <xsd:element name="bottomright" type="xsd:string" minOccurs="0" maxOccurs="1" />
80                         <xsd:element name="fullleft" type="xsd:string" minOccurs="0" maxOccurs="1" />
81                         <xsd:element name="fullright" type="xsd:string" minOccurs="0" maxOccurs="1" />
82                         <xsd:element name="top" type="xsd:string" minOccurs="0" maxOccurs="1" />
83                         <xsd:element name="extra" type="xsd:string" minOccurs="0" maxOccurs="1" />
84                 </xsd:sequence>
85                 <xsd:attribute name="symset" use="required" type="symset" />
86         </xsd:complexType>
87
88         <!-- a conceptcode defines the concept by number, as well as supplying information on it's part-of-speech
89                  and morphological tags. This is all the information we need to correctly specify a symbol, once the
90                  symset is known -->
91         <xsd:complexType name="conceptcode">
92                 <xsd:attribute name="code" use="required" type="xsd:string" />
93                 <xsd:attribute name="pos" use="required" type="xsd:string" />
94                 <xsd:attribute name="tags" use="optional" type="xsd:string" />
95                 <xsd:attribute name="base" use="required" type="xsd:string" />
96                 <xsd:attribute name="language" use="required" type="language" />
97         </xsd:complexType>
98        
99         <!-- a link defines a reference to another document. It tells the parser to load the referenced document
100              when the area of the document it encapsulates is clicked. -->
101         <xsd:complexType name="link">
102                 <xsd:complexContent>
103                         <xsd:extension base="contentelement">
104                                 <xsd:attribute name="href" use="required" type="xsd:anyURI" />
105                         </xsd:extension>
106                 </xsd:complexContent>
107         </xsd:complexType>
108
109         <!-- a br inserts a line-break within a paragraph -->
110         <xsd:complexType name="br" />
111        
112         <!-- an hr inserts a horizontal rule across the page. It is only allowed between paragraphs. -->
113         <xsd:complexType name="hr" />
114        
115         <!-- a calt element defines one alternative in an alternative list. The priority specifies how likely the
116              symboliser believes it is to be linguistically correct. Lower is better. If the 'preferred' attribute
117              is true, it shows the user has specified that they wish to use this alternative above any other. -->
118         <xsd:complexType name="calt">
119                 <xsd:complexContent>
120                         <xsd:extension base="contentelement">
121                                 <xsd:attribute name="priority" use="required" type="xsd:decimal" />
122                                 <xsd:attribute name="preferred" type="xsd:boolean" default="false" />
123                         </xsd:extension>
124                 </xsd:complexContent>
125         </xsd:complexType>
126
127         <!-- an altlist contains a list of alternatives, which could all describe the submitted text. -->
128         <xsd:complexType name="altlist">
129                 <xsd:sequence>
130                         <xsd:element name="calt" type="calt" minOccurs="2" maxOccurs="unbounded" />
131                 </xsd:sequence>
132         </xsd:complexType>
133
134         <!-- a cmap is a map of concepts to text. It may also specify that the text has emphasis (italic) or is
135              strong (bold) -->
136         <xsd:complexType name="cmap">
137                 <xsd:sequence>
138                         <xsd:sequence>
139                                 <xsd:element name="cc" type="conceptcode" minOccurs="0" maxOccurs="unbounded" />
140                         </xsd:sequence>
141                         <xsd:element name="text" type="xsd:string" />
142                 </xsd:sequence>
143                 <xsd:attribute name="emphasis" type="xsd:boolean" default="false"/>
144                 <xsd:attribute name="strong" type="xsd:boolean" default="false"/>
145         </xsd:complexType>
146        
147         <!-- an img specifies an inline image, not associated with any text. It can be loaded from any URI. -->
148         <xsd:complexType name="img">
149                 <xsd:attribute name="src" type="xsd:anyURI" use="required" />
150                 <xsd:attribute name="width" type="xsd:decimal" />
151                 <xsd:attribute name="height" type="xsd:decimal" />
152                 <xsd:attribute name="alt" type="xsd:string" />
153         </xsd:complexType>
154
155         <!-- a cs defines a sentence within the document. -->
156         <xsd:complexType name="cs">
157                 <xsd:complexContent>
158                         <xsd:extension base="contentelement" />
159                 </xsd:complexContent>
160         </xsd:complexType>
161        
162         <!-- a cp defines a paragraph within the document. It contains a list of sentences. It also has a size
163              attribute, relative to the base document size. Each size increment increases both text and symbol size
164              by ~10%. Increments can be negative. -->
165         <xsd:complexType name="cp">
166                 <xsd:sequence>
167                         <xsd:element name="cs" type="cs" maxOccurs="unbounded" />
168                 </xsd:sequence>
169                 <xsd:attribute name="size" type="xsd:decimal" default="0" />
170                 <xsd:attribute name="language" type="language" use="required" />
171         </xsd:complexType>
172
173         <!-- a body contains a list of paragraphs. It may also contain horizontal rules between the paragraphs. -->
174         <xsd:complexType name="body">
175                 <xsd:sequence>
176                         <xsd:choice maxOccurs="unbounded">
177                                 <xsd:element name="cp" type="cp" />
178                                 <xsd:element name="hr" type="hr" />
179                         </xsd:choice>
180                 </xsd:sequence>
181         </xsd:complexType>
182
183         <!-- a cml document contains a body. It may one day also contain a header! -->
184         <xsd:complexType name="cml">
185                 <xsd:sequence>
186                         <xsd:element name="body" type="body" />
187                 </xsd:sequence>
188         </xsd:complexType>
189        
190         <!-- this defines a top-level 'cml' element -->
191         <xsd:element name="cml" type="cml" />
192        
193 </xsd:schema>