|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <xs:schema |
|
3 xmlns:xs="http://www.w3.org/2001/XMLSchema" |
|
4 xmlns:xi="http://www.w3.org/2001/XInclude" |
|
5 xmlns:templ="http://www.s60.com/xml/templateml/1" |
|
6 targetNamespace="http://www.s60.com/xml/templateml/1" |
|
7 elementFormDefault="qualified"> |
|
8 |
|
9 <xs:import namespace="http://www.w3.org/2001/XInclude" schemaLocation="XInclude.xsd"/> |
|
10 |
|
11 <xs:simpleType name="boolType"> |
|
12 <xs:restriction base="xs:string"> |
|
13 <xs:enumeration value="true"/> |
|
14 <xs:enumeration value="false"/> |
|
15 </xs:restriction> |
|
16 </xs:simpleType> |
|
17 |
|
18 <xs:complexType name="tagType"> |
|
19 <xs:attribute name="name" type="xs:string"/> |
|
20 <xs:attribute name="value" type="xs:string"/> |
|
21 </xs:complexType> |
|
22 |
|
23 <xs:complexType name="templateType" mixed="true"> |
|
24 <xs:sequence> |
|
25 <xs:element ref="xi:include" minOccurs="0" maxOccurs="unbounded"/> |
|
26 </xs:sequence> |
|
27 <xs:attribute name="file" type="xs:string"> |
|
28 <xs:annotation> |
|
29 <xs:documentation> |
|
30 Path to the file where the template's text is defined. |
|
31 Should be relative to the current implementation file. |
|
32 </xs:documentation> |
|
33 </xs:annotation> |
|
34 </xs:attribute> |
|
35 </xs:complexType> |
|
36 |
|
37 |
|
38 <xs:complexType name="outputType"> |
|
39 <xs:choice minOccurs="0" maxOccurs="unbounded"> |
|
40 <xs:element name="template" type="templ:templateType"> |
|
41 <xs:annotation> |
|
42 <xs:documentation><![CDATA[ |
|
43 Specifies the template used to generate the current output file.<br/> |
|
44 <br/> |
|
45 The template text can either be specified directly in the element, or |
|
46 in a file specified by the 'file' attribute. |
|
47 ]]> |
|
48 </xs:documentation> |
|
49 </xs:annotation> |
|
50 </xs:element> |
|
51 <xs:element name="filter" type="templ:filterType"> |
|
52 <xs:annotation> |
|
53 <xs:documentation><![CDATA[ |
|
54 Defines a filter usable in the Jinja template of the current output file.<br/> |
|
55 <br/> |
|
56 The filter is defined as a Python lambda function either directly in the element, or |
|
57 in a file specified by the 'file' attribute. |
|
58 ]]> |
|
59 </xs:documentation> |
|
60 </xs:annotation> |
|
61 </xs:element> |
|
62 </xs:choice> |
|
63 <xs:attribute name="file" type="xs:string"> |
|
64 <xs:annotation> |
|
65 <xs:documentation> |
|
66 The name of the output file. |
|
67 </xs:documentation> |
|
68 </xs:annotation> |
|
69 </xs:attribute> |
|
70 <xs:attribute name="dir" type="xs:string"> |
|
71 <xs:annotation> |
|
72 <xs:documentation> |
|
73 The directory where the output file is generated. |
|
74 </xs:documentation> |
|
75 </xs:annotation> |
|
76 </xs:attribute> |
|
77 <xs:attribute name="ref" type="xs:string"> |
|
78 <xs:annotation> |
|
79 <xs:documentation> |
|
80 The ConfML setting reference from where the output file's path and name are |
|
81 taken from. |
|
82 </xs:documentation> |
|
83 </xs:annotation> |
|
84 </xs:attribute> |
|
85 <xs:attribute name="encoding" type="xs:string"> |
|
86 <xs:annotation> |
|
87 <xs:documentation> |
|
88 Defines the encoding of the output file. Can be any of the encodings supported |
|
89 by the Python codecs module (see http://docs.python.org/library/codecs.html#standard-encodings). |
|
90 </xs:documentation> |
|
91 </xs:annotation> |
|
92 </xs:attribute> |
|
93 <xs:attribute name="bom" type="templ:boolType" use="optional"> |
|
94 <xs:annotation> |
|
95 <xs:documentation> |
|
96 <![CDATA[ |
|
97 Defines the BOM scheme for Unicode encodings.<br/> |
|
98 <br/> |
|
99 If set to 'true', a BOM will always be written to the output file, |
|
100 if to 'false', it will never be. If the bom attribute is not defined |
|
101 at all, the BOM scheme is left up to the used encoding, e.g. UTF-16 |
|
102 writes the BOM, but UTF-16-BE doesn't.<br/> |
|
103 <br/> |
|
104 For encodings other than Unicode, this attribute does nothing. |
|
105 ]]> |
|
106 </xs:documentation> |
|
107 </xs:annotation> |
|
108 </xs:attribute> |
|
109 </xs:complexType> |
|
110 |
|
111 <xs:complexType name="filterType" mixed="true"> |
|
112 <xs:sequence> |
|
113 <xs:element ref="xi:include" minOccurs="0" maxOccurs="unbounded"/> |
|
114 </xs:sequence> |
|
115 <xs:attribute name="name" type="xs:NCName"> |
|
116 <xs:annotation> |
|
117 <xs:documentation> |
|
118 The name of the filter, used to reference it from the Jinja template. |
|
119 </xs:documentation> |
|
120 </xs:annotation> |
|
121 </xs:attribute> |
|
122 <xs:attribute name="file" type="xs:string"> |
|
123 <xs:annotation> |
|
124 <xs:documentation> |
|
125 Path to the file where the filter's Python code is defined. |
|
126 Should be relative to the current implementation file. |
|
127 </xs:documentation> |
|
128 </xs:annotation> |
|
129 </xs:attribute> |
|
130 </xs:complexType> |
|
131 |
|
132 <xs:element name="templateml"> |
|
133 <xs:complexType> |
|
134 <xs:choice minOccurs="0" maxOccurs="unbounded"> |
|
135 <xs:element name="desc" type="xs:string"/> |
|
136 <xs:element name="tag" type="templ:tagType"/> |
|
137 <xs:element name="output" type="templ:outputType"> |
|
138 <xs:annotation> |
|
139 <xs:documentation> |
|
140 Defines an output file, its properties and the template used to generate it. |
|
141 </xs:documentation> |
|
142 </xs:annotation> |
|
143 </xs:element> |
|
144 <xs:element name="filter" type="templ:filterType"> |
|
145 <xs:annotation> |
|
146 <xs:documentation><![CDATA[ |
|
147 Defines a filter usable in any template in the current TemplateML implementation.<br/> |
|
148 <br/> |
|
149 The filter is defined as a Python lambda function either directly in the element, or |
|
150 in a file referenced by the 'file' attribute. |
|
151 ]]> |
|
152 </xs:documentation> |
|
153 </xs:annotation> |
|
154 </xs:element> |
|
155 </xs:choice> |
|
156 </xs:complexType> |
|
157 </xs:element> |
|
158 </xs:schema> |