@likecoin/epubcheck-ts 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/README.md +339 -0
- package/dist/index.cjs +1904 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +523 -0
- package/dist/index.d.ts +523 -0
- package/dist/index.js +1895 -0
- package/dist/index.js.map +1 -0
- package/package.json +69 -0
- package/schemas/applications.rng +429 -0
- package/schemas/aria.rng +3355 -0
- package/schemas/block.rng +488 -0
- package/schemas/common.rng +1076 -0
- package/schemas/container.rng +24 -0
- package/schemas/core-scripting.rng +950 -0
- package/schemas/data.rng +161 -0
- package/schemas/datatypes.rng +401 -0
- package/schemas/embed.rng +980 -0
- package/schemas/epub-mathml3-inc.rng +161 -0
- package/schemas/epub-nav-30.rnc +44 -0
- package/schemas/epub-nav-30.rng +19985 -0
- package/schemas/epub-nav-30.sch +87 -0
- package/schemas/epub-prefix-attr.rng +17 -0
- package/schemas/epub-shared-inc.rng +29 -0
- package/schemas/epub-ssml-attrs.rng +17 -0
- package/schemas/epub-svg-30.rnc +17 -0
- package/schemas/epub-svg-30.rng +19903 -0
- package/schemas/epub-svg-30.sch +7 -0
- package/schemas/epub-svg-forgiving-inc.rng +315 -0
- package/schemas/epub-switch.rng +121 -0
- package/schemas/epub-trigger.rng +90 -0
- package/schemas/epub-type-attr.rng +12 -0
- package/schemas/epub-xhtml-30.rnc +6 -0
- package/schemas/epub-xhtml-30.rng +19882 -0
- package/schemas/epub-xhtml-30.sch +409 -0
- package/schemas/epub-xhtml-inc.rng +151 -0
- package/schemas/epub-xhtml-integration.rng +565 -0
- package/schemas/epub-xhtml-svg-mathml.rng +17 -0
- package/schemas/form-datatypes.rng +54 -0
- package/schemas/mathml3-common.rng +336 -0
- package/schemas/mathml3-content.rng +1552 -0
- package/schemas/mathml3-inc.rng +30 -0
- package/schemas/mathml3-presentation.rng +2341 -0
- package/schemas/mathml3-strict-content.rng +205 -0
- package/schemas/media.rng +374 -0
- package/schemas/meta.rng +754 -0
- package/schemas/microdata.rng +192 -0
- package/schemas/ncx.rng +308 -0
- package/schemas/ocf-container-30.rnc +37 -0
- package/schemas/ocf-container-30.rng +568 -0
- package/schemas/opf.rng +15 -0
- package/schemas/opf20.rng +513 -0
- package/schemas/package-30.rnc +133 -0
- package/schemas/package-30.rng +1153 -0
- package/schemas/package-30.sch +444 -0
- package/schemas/phrase.rng +746 -0
- package/schemas/rdfa.rng +552 -0
- package/schemas/revision.rng +106 -0
- package/schemas/ruby.rng +141 -0
- package/schemas/sectional.rng +278 -0
- package/schemas/structural.rng +298 -0
- package/schemas/tables.rng +420 -0
- package/schemas/web-components.rng +184 -0
- package/schemas/web-forms.rng +975 -0
- package/schemas/web-forms2.rng +1236 -0
|
@@ -0,0 +1,568 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<grammar datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="urn:oasis:names:tc:opendocument:xmlns:container" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rendition="http://www.idpf.org/2013/rendition">
|
|
3
|
+
|
|
4
|
+
<!-- Inlined from datatypes.rng -->
|
|
5
|
+
|
|
6
|
+
<div xml:id="datatypes-common">
|
|
7
|
+
<define name="datatype.ID">
|
|
8
|
+
<ref name="datatype.ID.lexical"/>
|
|
9
|
+
</define>
|
|
10
|
+
<define name="datatype.IDREF">
|
|
11
|
+
<ref name="datatype.IDREF.lexical"/>
|
|
12
|
+
</define>
|
|
13
|
+
<define name="datatype.IDREFS">
|
|
14
|
+
<ref name="datatype.IDREFS.lexical"/>
|
|
15
|
+
</define>
|
|
16
|
+
<define name="datatype.languagecode">
|
|
17
|
+
<ref name="datatype.BCP47"/>
|
|
18
|
+
</define>
|
|
19
|
+
<!-- http://www.w3.org/TR/xmlschema11-2/#language -->
|
|
20
|
+
<define name="datatype.BCP47">
|
|
21
|
+
<data type="language"/>
|
|
22
|
+
</define>
|
|
23
|
+
<!-- http://www.w3.org/TR/xmlschema11-2/#ID -->
|
|
24
|
+
<define name="datatype.ID.xsd">
|
|
25
|
+
<data type="ID"/>
|
|
26
|
+
</define>
|
|
27
|
+
<!-- http://www.w3.org/TR/xmlschema11-2/#NCName -->
|
|
28
|
+
<define name="datatype.IDREF.lexical">
|
|
29
|
+
<data type="NCName"/>
|
|
30
|
+
</define>
|
|
31
|
+
<define name="datatype.IDREFS.lexical">
|
|
32
|
+
<list>
|
|
33
|
+
<oneOrMore>
|
|
34
|
+
<ref name="datatype.IDREF.lexical"/>
|
|
35
|
+
</oneOrMore>
|
|
36
|
+
</list>
|
|
37
|
+
</define>
|
|
38
|
+
<define name="datatype.ID.lexical">
|
|
39
|
+
<data type="NCName"/>
|
|
40
|
+
</define>
|
|
41
|
+
<!-- http://www.w3.org/TR/xmlschema11-2/#IDREF -->
|
|
42
|
+
<define name="datatype.IDREF.xsd">
|
|
43
|
+
<data type="IDREF"/>
|
|
44
|
+
</define>
|
|
45
|
+
<!-- http://www.w3.org/TR/xmlschema11-2/#IDREFS -->
|
|
46
|
+
<define name="datatype.IDREFS.xsd">
|
|
47
|
+
<data type="IDREFS"/>
|
|
48
|
+
</define>
|
|
49
|
+
<!-- http://www.w3.org/TR/xmlschema11-2/#NMTOKEN -->
|
|
50
|
+
<define name="datatype.NMTOKEN">
|
|
51
|
+
<data type="NMTOKEN"/>
|
|
52
|
+
</define>
|
|
53
|
+
<!-- http://www.w3.org/TR/xmlschema11-2/#NMTOKENS -->
|
|
54
|
+
<define name="datatype.NMTOKENS">
|
|
55
|
+
<data type="NMTOKENS"/>
|
|
56
|
+
</define>
|
|
57
|
+
<!-- http://www.w3.org/TR/xmlschema11-2/#string -->
|
|
58
|
+
<define name="datatype.string">
|
|
59
|
+
<data type="string"/>
|
|
60
|
+
</define>
|
|
61
|
+
<define name="datatype.string.nonempty">
|
|
62
|
+
<data type="token">
|
|
63
|
+
<param name="minLength">1</param>
|
|
64
|
+
</data>
|
|
65
|
+
</define>
|
|
66
|
+
<define name="datatype.text">
|
|
67
|
+
<text/>
|
|
68
|
+
</define>
|
|
69
|
+
<!-- http://www.w3.org/TR/xmlschema11-2/#nt-dateRep -->
|
|
70
|
+
<define name="datatype.date">
|
|
71
|
+
<data type="date"/>
|
|
72
|
+
</define>
|
|
73
|
+
<!-- http://www.w3.org/TR/xmlschema11-2/#nt-dateTimeRep -->
|
|
74
|
+
<define name="datatype.dateTime">
|
|
75
|
+
<data type="dateTime"/>
|
|
76
|
+
</define>
|
|
77
|
+
<!-- http://www.w3.org/TR/xmlschema11-2/#nt-timeRep -->
|
|
78
|
+
<define name="datatype.date.or.dateTime">
|
|
79
|
+
<choice>
|
|
80
|
+
<ref name="datatype.date"/>
|
|
81
|
+
<ref name="datatype.dateTime"/>
|
|
82
|
+
</choice>
|
|
83
|
+
</define>
|
|
84
|
+
<define name="datatype.LEIRI">
|
|
85
|
+
<data type="anyURI"/>
|
|
86
|
+
</define>
|
|
87
|
+
<!--
|
|
88
|
+
http://www.w3.org/TR/xmlschema11-2/#anyURI
|
|
89
|
+
http://tools.ietf.org/html/rfc3986#appendix-B
|
|
90
|
+
http://www.w3.org/TR/html5/urls.html#valid-url-potentially-surrounded-by-spaces
|
|
91
|
+
-->
|
|
92
|
+
<define name="datatype.URI">
|
|
93
|
+
<data type="anyURI"/>
|
|
94
|
+
</define>
|
|
95
|
+
<define name="datatype.URI.absolute">
|
|
96
|
+
<data type="anyURI"/>
|
|
97
|
+
</define>
|
|
98
|
+
<define name="datatype.IRI">
|
|
99
|
+
<ref name="datatype.URI"/>
|
|
100
|
+
</define>
|
|
101
|
+
<define name="datatype.character.encoding">
|
|
102
|
+
<ref name="datatype.iana.charset"/>
|
|
103
|
+
</define>
|
|
104
|
+
<define name="datatype.iana.charset">
|
|
105
|
+
<data type="NMTOKEN"/>
|
|
106
|
+
</define>
|
|
107
|
+
<!--
|
|
108
|
+
http://www.w3.org/TR/html5/infrastructure.html#valid-mime-type
|
|
109
|
+
http://tools.ietf.org/html/rfc4288#section-4.2
|
|
110
|
+
http://tools.ietf.org/html/rfc2616#section-3.7
|
|
111
|
+
-->
|
|
112
|
+
<define name="datatype.mimetype">
|
|
113
|
+
<data type="string">
|
|
114
|
+
<param name="pattern">[a-zA-Z0-9!#$&+\-\^_]+/[a-zA-Z0-9!#$&+\-\^_]+.*</param>
|
|
115
|
+
</data>
|
|
116
|
+
</define>
|
|
117
|
+
<define name="datatype.mimetype.nocharset">
|
|
118
|
+
<ref name="datatype.mimetype"/>
|
|
119
|
+
</define>
|
|
120
|
+
<!--
|
|
121
|
+
http://www.w3.org/TR/xmlschema11-2/#nonNegativeInteger
|
|
122
|
+
http://www.w3.org/TR/html5/common-microsyntaxes.html#non-negative-integers
|
|
123
|
+
-->
|
|
124
|
+
<define name="datatype.non-negative.integer">
|
|
125
|
+
<data type="nonNegativeInteger"/>
|
|
126
|
+
</define>
|
|
127
|
+
<!-- http://www.w3.org/TR/xmlschema11-2/#positiveInteger -->
|
|
128
|
+
<define name="datatype.positive.integer">
|
|
129
|
+
<data type="positiveInteger"/>
|
|
130
|
+
</define>
|
|
131
|
+
<!-- http://www.w3.org/TR/xmlschema11-2/#integer -->
|
|
132
|
+
<define name="datatype.integer">
|
|
133
|
+
<data type="integer"/>
|
|
134
|
+
</define>
|
|
135
|
+
<!--
|
|
136
|
+
http://www.w3.org/TR/xmlschema11-2/#nt-floatRep
|
|
137
|
+
http://www.w3.org/TR/html5/common-microsyntaxes.html#real-numbers
|
|
138
|
+
-->
|
|
139
|
+
<define name="datatype.float">
|
|
140
|
+
<data type="float"/>
|
|
141
|
+
</define>
|
|
142
|
+
<define name="datatype.float.positive">
|
|
143
|
+
<data type="float">
|
|
144
|
+
<param name="minExclusive">0</param>
|
|
145
|
+
</data>
|
|
146
|
+
</define>
|
|
147
|
+
<define name="datatype.float.non-negative">
|
|
148
|
+
<data type="float">
|
|
149
|
+
<param name="minInclusive">0</param>
|
|
150
|
+
</data>
|
|
151
|
+
</define>
|
|
152
|
+
<define name="datatype.token">
|
|
153
|
+
<data type="string">
|
|
154
|
+
<param name="pattern">[^\s]+</param>
|
|
155
|
+
</data>
|
|
156
|
+
</define>
|
|
157
|
+
<define name="datatype.space.separated.tokens">
|
|
158
|
+
<list>
|
|
159
|
+
<zeroOrMore>
|
|
160
|
+
<ref name="datatype.token"/>
|
|
161
|
+
</zeroOrMore>
|
|
162
|
+
</list>
|
|
163
|
+
</define>
|
|
164
|
+
</div>
|
|
165
|
+
<div xml:id="datatypes-smil">
|
|
166
|
+
<!--
|
|
167
|
+
http://www.w3.org/TR/smil/smil-timing.html#TimingSyntax-Full-clock-value
|
|
168
|
+
http://www.w3.org/TR/smil/smil-timing.html#TimingSyntax-Partial-clock-value
|
|
169
|
+
http://www.w3.org/TR/smil/smil-timing.html#TimingSyntax-Timecount-value
|
|
170
|
+
-->
|
|
171
|
+
<define name="datatype.smil.npt">
|
|
172
|
+
<choice>
|
|
173
|
+
<data type="string">
|
|
174
|
+
<param name="pattern">(\s*)[0-9]+:[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(\s*)</param>
|
|
175
|
+
</data>
|
|
176
|
+
<data type="string">
|
|
177
|
+
<param name="pattern">(\s*)[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(\s*)</param>
|
|
178
|
+
</data>
|
|
179
|
+
<data type="string">
|
|
180
|
+
<param name="pattern">(\s*)[0-9]+(\.[0-9]+)?(h|min|s|ms)?(\s*)</param>
|
|
181
|
+
</data>
|
|
182
|
+
</choice>
|
|
183
|
+
</define>
|
|
184
|
+
</div>
|
|
185
|
+
<div xml:id="datatypes-vocab">
|
|
186
|
+
<define name="datatype.property">
|
|
187
|
+
<data type="NMTOKEN"/>
|
|
188
|
+
</define>
|
|
189
|
+
<define name="datatype.properties">
|
|
190
|
+
<data type="NMTOKENS"/>
|
|
191
|
+
</define>
|
|
192
|
+
<define name="datatype.prefixdecl">
|
|
193
|
+
<text/>
|
|
194
|
+
</define>
|
|
195
|
+
<!-- \s*([\i-[:]][\c-[:]]*: +[^ ]+)(\s+[\i-[:]][\c-[:]]*: +[^ ]+)*\s* -->
|
|
196
|
+
</div>
|
|
197
|
+
<div xml:id="datatypes-ssml">
|
|
198
|
+
<!-- http://www.w3.org/TR/speech-synthesis11/#edef_phoneme -->
|
|
199
|
+
<define name="datatype.ssml.PhoneticExpression">
|
|
200
|
+
<data type="string"/>
|
|
201
|
+
</define>
|
|
202
|
+
<define name="datatype.ssml.PhoneticAlphabet">
|
|
203
|
+
<data type="string">
|
|
204
|
+
<param name="pattern">(ipa|x-.+)</param>
|
|
205
|
+
</data>
|
|
206
|
+
</define>
|
|
207
|
+
</div>
|
|
208
|
+
<div xml:id="datatypes-html5">
|
|
209
|
+
<define name="datatype.html5.browsing.context.name.or.keyword">
|
|
210
|
+
<data type="string">
|
|
211
|
+
<param name="pattern">()|([^_].*)|(_[bB][lL][aA][nN][kK])|(_[sS][eE][lL][fF])|(_[pP][aA][rR][eE][nN][tT])|(_[tT][oO][pP])</param>
|
|
212
|
+
</data>
|
|
213
|
+
</define>
|
|
214
|
+
<define name="datatype.html5.browsing.context.name">
|
|
215
|
+
<data type="string">
|
|
216
|
+
<param name="pattern">()|([^_].*)</param>
|
|
217
|
+
</data>
|
|
218
|
+
</define>
|
|
219
|
+
<define name="datatype.html5.token">
|
|
220
|
+
<data type="string">
|
|
221
|
+
<param name="pattern">[^\s]+</param>
|
|
222
|
+
</data>
|
|
223
|
+
</define>
|
|
224
|
+
<!-- http://www.w3.org/TR/html5/common-microsyntaxes.html#space-separated-tokens -->
|
|
225
|
+
<define name="datatype.html5.space.separated.tokens">
|
|
226
|
+
<list>
|
|
227
|
+
<zeroOrMore>
|
|
228
|
+
<ref name="datatype.html5.token"/>
|
|
229
|
+
</zeroOrMore>
|
|
230
|
+
</list>
|
|
231
|
+
</define>
|
|
232
|
+
<define name="datatype.html5.ordered.set.unique.tokens">
|
|
233
|
+
<ref name="datatype.html5.space.separated.tokens"/>
|
|
234
|
+
</define>
|
|
235
|
+
<define name="datatype.html5.URL.spaces">
|
|
236
|
+
<ref name="datatype.URI"/>
|
|
237
|
+
</define>
|
|
238
|
+
<!--
|
|
239
|
+
http://dev.w3.org/csswg/css3-mediaqueries/#syntax
|
|
240
|
+
http://www.w3.org/TR/html5/common-microsyntaxes.html#mq
|
|
241
|
+
-->
|
|
242
|
+
<define name="datatype.html5.media.query">
|
|
243
|
+
<data type="string"/>
|
|
244
|
+
</define>
|
|
245
|
+
<define name="datatype.html5.name">
|
|
246
|
+
<data type="string"/>
|
|
247
|
+
</define>
|
|
248
|
+
<define name="datatype.html5.name.reference">
|
|
249
|
+
<data type="string">
|
|
250
|
+
<param name="pattern">#.+</param>
|
|
251
|
+
</data>
|
|
252
|
+
</define>
|
|
253
|
+
<define name="datatype.html5.year">
|
|
254
|
+
<data type="token">
|
|
255
|
+
<param name="pattern">[0-9]{4}</param>
|
|
256
|
+
</data>
|
|
257
|
+
</define>
|
|
258
|
+
<define name="datatype.html5.yearless">
|
|
259
|
+
<data type="token">
|
|
260
|
+
<param name="pattern">(--)?(0[0-9]|1[0-2])-(0[0-9]|[1-2][0-9]|3[0-1])</param>
|
|
261
|
+
</data>
|
|
262
|
+
</define>
|
|
263
|
+
<define name="datatype.html5.duration">
|
|
264
|
+
<data type="token">
|
|
265
|
+
<param name="pattern">(((P[0-9]+D)|(P([0-9]+D)?T((([0-9]+H)([0-9]+M)?([0-9]+(\.[0-9]{1,3})?S)?)|(([0-9]+H)?([0-9]+M)([0-9]+(\.[0-9]{1,3})?S)?)|(([0-9]+H)?([0-9]+M)?([0-9]+(\.[0-9]{1,3})?S)))))|( *(([0-9]+ *[WDHM])|([0-9]+(\.[0-9]{1,3})? *S)) *)+)</param>
|
|
266
|
+
</data>
|
|
267
|
+
</define>
|
|
268
|
+
<!-- http://www.w3.org/TR/html5/common-microsyntaxes.html#months -->
|
|
269
|
+
<define name="datatype.html5.month">
|
|
270
|
+
<data type="token">
|
|
271
|
+
<param name="pattern">([0-9]{4,})-([0-9]{2})</param>
|
|
272
|
+
</data>
|
|
273
|
+
</define>
|
|
274
|
+
<!-- http://www.w3.org/TR/html5/common-microsyntaxes.html#dates -->
|
|
275
|
+
<define name="datatype.html5.date">
|
|
276
|
+
<data type="token">
|
|
277
|
+
<param name="pattern">([0-9]{4,})-([0-9]{2})-([0-9]{2})</param>
|
|
278
|
+
</data>
|
|
279
|
+
</define>
|
|
280
|
+
<!-- http://www.w3.org/TR/html5/common-microsyntaxes.html#times -->
|
|
281
|
+
<define name="datatype.html5.time">
|
|
282
|
+
<data type="token">
|
|
283
|
+
<param name="pattern">([0-9]{2}):([0-9]{2})(:[0-9]{2}(\.[0-9]{1,3})?)?</param>
|
|
284
|
+
</data>
|
|
285
|
+
</define>
|
|
286
|
+
<!-- http://www.w3.org/TR/html5/common-microsyntaxes.html#local-dates-and-times -->
|
|
287
|
+
<define name="datatype.html5.datetime.local">
|
|
288
|
+
<data type="token">
|
|
289
|
+
<param name="pattern">([0-9]{4,})-([0-9]{2})-([0-9]{2})([T ])([0-9]{2}):([0-9]{2})(:[0-9]{2}(\.[0-9]{1,3})?)?</param>
|
|
290
|
+
</data>
|
|
291
|
+
</define>
|
|
292
|
+
<!-- http://www.w3.org/TR/html5/common-microsyntaxes.html#global-dates-and-times -->
|
|
293
|
+
<define name="datatype.html5.datetime.global">
|
|
294
|
+
<data type="token">
|
|
295
|
+
<param name="pattern">([0-9]{4,})-([0-9]{2})-([0-9]{2})([T ])([0-9]{2}):([0-9]{2})(:[0-9]{2}(\.[0-9]{1,3})?)?(Z|((\+|-)([0-9]{2}):?([0-9]{2})))?</param>
|
|
296
|
+
</data>
|
|
297
|
+
</define>
|
|
298
|
+
<define name="datatype.html5.datetime">
|
|
299
|
+
<ref name="datatype.html5.datetime.global"/>
|
|
300
|
+
</define>
|
|
301
|
+
<!-- http://www.w3.org/TR/html5/common-microsyntaxes.html#vaguer-moments-in-time -->
|
|
302
|
+
<define name="datatype.html5.date.or.time">
|
|
303
|
+
<choice>
|
|
304
|
+
<ref name="datatype.html5.year"/>
|
|
305
|
+
<ref name="datatype.html5.yearless"/>
|
|
306
|
+
<ref name="datatype.html5.week"/>
|
|
307
|
+
<ref name="datatype.html5.date"/>
|
|
308
|
+
<ref name="datatype.html5.month"/>
|
|
309
|
+
<ref name="datatype.html5.time"/>
|
|
310
|
+
<ref name="datatype.html5.datetime.global"/>
|
|
311
|
+
<ref name="datatype.html5.duration"/>
|
|
312
|
+
</choice>
|
|
313
|
+
</define>
|
|
314
|
+
<!-- http://www.w3.org/TR/html5/common-microsyntaxes.html#vaguer-moments-in-time -->
|
|
315
|
+
<define name="datatype.html5.date.optional.time">
|
|
316
|
+
<choice>
|
|
317
|
+
<ref name="datatype.html5.date"/>
|
|
318
|
+
<ref name="datatype.html5.datetime.global"/>
|
|
319
|
+
</choice>
|
|
320
|
+
</define>
|
|
321
|
+
<define name="datatype.html5.week">
|
|
322
|
+
<data type="token">
|
|
323
|
+
<param name="pattern">([0-9]{4,})-W([0-9]{2})</param>
|
|
324
|
+
</data>
|
|
325
|
+
</define>
|
|
326
|
+
<define name="datatype.html5.accesskey">
|
|
327
|
+
<ref name="datatype.html5.ordered.set.unique.tokens"/>
|
|
328
|
+
</define>
|
|
329
|
+
<define name="datatype.html5.coords.rectangle">
|
|
330
|
+
<data type="token">
|
|
331
|
+
<param name="pattern">-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+</param>
|
|
332
|
+
</data>
|
|
333
|
+
</define>
|
|
334
|
+
<define name="datatype.html5.coords.circle">
|
|
335
|
+
<data type="token">
|
|
336
|
+
<param name="pattern">-?[0-9]+,-?[0-9]+,[0-9]+</param>
|
|
337
|
+
</data>
|
|
338
|
+
</define>
|
|
339
|
+
<define name="datatype.html5.coords.poly">
|
|
340
|
+
<data type="token">
|
|
341
|
+
<param name="pattern">-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+(,-?[0-9]+,-?[0-9]+)*</param>
|
|
342
|
+
</data>
|
|
343
|
+
</define>
|
|
344
|
+
<define name="datatype.html5.js">
|
|
345
|
+
<data type="string"/>
|
|
346
|
+
</define>
|
|
347
|
+
<define name="datatype.html5.script">
|
|
348
|
+
<data type="string"/>
|
|
349
|
+
</define>
|
|
350
|
+
<define name="datatype.html5.script.documentation">
|
|
351
|
+
<data type="string"/>
|
|
352
|
+
</define>
|
|
353
|
+
<define name="datatype.html5.iframe.srcdoc.xml">
|
|
354
|
+
<data type="string"/>
|
|
355
|
+
</define>
|
|
356
|
+
<define name="datatype.style">
|
|
357
|
+
<data type="string"/>
|
|
358
|
+
</define>
|
|
359
|
+
<define name="datatype.html5.sizes">
|
|
360
|
+
<list>
|
|
361
|
+
<oneOrMore>
|
|
362
|
+
<data type="string">
|
|
363
|
+
<param name="pattern">[1-9][0-9]*x[1-9][0-9]*</param>
|
|
364
|
+
</data>
|
|
365
|
+
</oneOrMore>
|
|
366
|
+
</list>
|
|
367
|
+
</define>
|
|
368
|
+
<define name="datatype.html5.emailaddress">
|
|
369
|
+
<data type="string">
|
|
370
|
+
<param name="pattern">[^@]+@[^@]+</param>
|
|
371
|
+
</data>
|
|
372
|
+
</define>
|
|
373
|
+
<define name="datatype.html5.emailaddresslist">
|
|
374
|
+
<data type="string">
|
|
375
|
+
<param name="pattern">([^@]+@[^@]+,)*([^@]+@[^@]+)</param>
|
|
376
|
+
</data>
|
|
377
|
+
</define>
|
|
378
|
+
<!-- http://www.w3.org/TR/html5/common-microsyntaxes.html#colors -->
|
|
379
|
+
<define name="datatype.html5.color">
|
|
380
|
+
<data type="string">
|
|
381
|
+
<param name="pattern">#([A-Fa-f0-9]{6})</param>
|
|
382
|
+
</data>
|
|
383
|
+
</define>
|
|
384
|
+
</div>
|
|
385
|
+
<div xml:id="datatypes-html5forms">
|
|
386
|
+
<define name="datatype.html5.forms.mimetypelist">
|
|
387
|
+
<data type="string"/>
|
|
388
|
+
</define>
|
|
389
|
+
<!-- http://www.w3.org/TR/html5/forms.html#attr-form-accept-charset -->
|
|
390
|
+
<define name="datatype.html5.forms.charsetlist">
|
|
391
|
+
<list>
|
|
392
|
+
<oneOrMore>
|
|
393
|
+
<ref name="datatype.character.encoding"/>
|
|
394
|
+
</oneOrMore>
|
|
395
|
+
</list>
|
|
396
|
+
</define>
|
|
397
|
+
<define name="datatype.html5.forms.pattern">
|
|
398
|
+
<data type="string"/>
|
|
399
|
+
</define>
|
|
400
|
+
<define name="datatype.html5.forms.string.nolinebreaks">
|
|
401
|
+
<data type="string"/>
|
|
402
|
+
</define>
|
|
403
|
+
</div>
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
<!-- Inlined from container.rng -->
|
|
408
|
+
|
|
409
|
+
<define name="ocf.rootfile.attlist" combine="interleave">
|
|
410
|
+
<interleave>
|
|
411
|
+
<optional>
|
|
412
|
+
<ref name="mr.rendition.attr"/>
|
|
413
|
+
</optional>
|
|
414
|
+
<optional>
|
|
415
|
+
<ref name="mr.layout.attr"/>
|
|
416
|
+
</optional>
|
|
417
|
+
<optional>
|
|
418
|
+
<ref name="mr.language.attr"/>
|
|
419
|
+
</optional>
|
|
420
|
+
<optional>
|
|
421
|
+
<ref name="mr.accessMode.attr"/>
|
|
422
|
+
</optional>
|
|
423
|
+
<optional>
|
|
424
|
+
<ref name="mr.label.attr"/>
|
|
425
|
+
</optional>
|
|
426
|
+
</interleave>
|
|
427
|
+
</define>
|
|
428
|
+
<define name="mr.rendition.attr">
|
|
429
|
+
<attribute name="rendition:media">
|
|
430
|
+
<data type="string">
|
|
431
|
+
<param name="pattern">\s*(((only|not)\s+)?all|\([^>)]+\))(\s+and\s+\([^>)]+\))*\s*(,\s*(((only|not)\s+)?all|\([^>)]+\))(\s+and\s+\([^>)]+\))*\s*)*</param>
|
|
432
|
+
</data>
|
|
433
|
+
</attribute>
|
|
434
|
+
</define>
|
|
435
|
+
<define name="mr.layout.attr">
|
|
436
|
+
<attribute name="rendition:layout">
|
|
437
|
+
<choice>
|
|
438
|
+
<value>reflowable</value>
|
|
439
|
+
<value>pre-paginated</value>
|
|
440
|
+
</choice>
|
|
441
|
+
</attribute>
|
|
442
|
+
</define>
|
|
443
|
+
<define name="mr.language.attr">
|
|
444
|
+
<attribute name="rendition:language">
|
|
445
|
+
<ref name="datatype.languagecode"/>
|
|
446
|
+
</attribute>
|
|
447
|
+
</define>
|
|
448
|
+
<define name="mr.accessMode.attr">
|
|
449
|
+
<attribute name="rendition:accessMode">
|
|
450
|
+
<list>
|
|
451
|
+
<oneOrMore>
|
|
452
|
+
<choice>
|
|
453
|
+
<value>auditory</value>
|
|
454
|
+
<value>tactile</value>
|
|
455
|
+
<value>textual</value>
|
|
456
|
+
<value>visual</value>
|
|
457
|
+
</choice>
|
|
458
|
+
</oneOrMore>
|
|
459
|
+
</list>
|
|
460
|
+
</attribute>
|
|
461
|
+
</define>
|
|
462
|
+
<define name="mr.label.attr">
|
|
463
|
+
<attribute name="rendition:label"/>
|
|
464
|
+
</define>
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
<start>
|
|
468
|
+
<ref name="ocf.container"/>
|
|
469
|
+
</start>
|
|
470
|
+
<define name="ocf.container">
|
|
471
|
+
<element name="container">
|
|
472
|
+
<interleave>
|
|
473
|
+
<ref name="ocf.container.attlist"/>
|
|
474
|
+
<ref name="ocf.container.content"/>
|
|
475
|
+
</interleave>
|
|
476
|
+
</element>
|
|
477
|
+
</define>
|
|
478
|
+
<define name="ocf.container.attlist">
|
|
479
|
+
<attribute name="version">
|
|
480
|
+
<value>1.0</value>
|
|
481
|
+
</attribute>
|
|
482
|
+
</define>
|
|
483
|
+
<define name="ocf.container.content">
|
|
484
|
+
<ref name="ocf.rootfiles"/>
|
|
485
|
+
<optional>
|
|
486
|
+
<ref name="ocf.links"/>
|
|
487
|
+
</optional>
|
|
488
|
+
</define>
|
|
489
|
+
<define name="ocf.rootfiles">
|
|
490
|
+
<element name="rootfiles">
|
|
491
|
+
<interleave>
|
|
492
|
+
<ref name="ocf.rootfiles.attlist"/>
|
|
493
|
+
<ref name="ocf.rootfiles.content"/>
|
|
494
|
+
</interleave>
|
|
495
|
+
</element>
|
|
496
|
+
</define>
|
|
497
|
+
<define name="ocf.rootfiles.attlist">
|
|
498
|
+
<empty/>
|
|
499
|
+
</define>
|
|
500
|
+
<define name="ocf.rootfiles.content">
|
|
501
|
+
<oneOrMore>
|
|
502
|
+
<ref name="ocf.rootfile"/>
|
|
503
|
+
</oneOrMore>
|
|
504
|
+
</define>
|
|
505
|
+
<define name="ocf.rootfile">
|
|
506
|
+
<element name="rootfile">
|
|
507
|
+
<interleave>
|
|
508
|
+
<ref name="ocf.rootfile.attlist"/>
|
|
509
|
+
<ref name="ocf.rootfile.content"/>
|
|
510
|
+
</interleave>
|
|
511
|
+
</element>
|
|
512
|
+
</define>
|
|
513
|
+
<define name="ocf.rootfile.attlist">
|
|
514
|
+
<interleave>
|
|
515
|
+
<attribute name="full-path">
|
|
516
|
+
<ref name="datatype.URI"/>
|
|
517
|
+
</attribute>
|
|
518
|
+
<attribute name="media-type">
|
|
519
|
+
<value>application/oebps-package+xml</value>
|
|
520
|
+
</attribute>
|
|
521
|
+
</interleave>
|
|
522
|
+
</define>
|
|
523
|
+
<define name="ocf.rootfile.content">
|
|
524
|
+
<empty/>
|
|
525
|
+
</define>
|
|
526
|
+
<define name="ocf.links">
|
|
527
|
+
<element name="links">
|
|
528
|
+
<interleave>
|
|
529
|
+
<ref name="ocf.links.attlist"/>
|
|
530
|
+
<ref name="ocf.links.content"/>
|
|
531
|
+
</interleave>
|
|
532
|
+
</element>
|
|
533
|
+
</define>
|
|
534
|
+
<define name="ocf.links.attlist">
|
|
535
|
+
<empty/>
|
|
536
|
+
</define>
|
|
537
|
+
<define name="ocf.links.content">
|
|
538
|
+
<oneOrMore>
|
|
539
|
+
<ref name="ocf.link"/>
|
|
540
|
+
</oneOrMore>
|
|
541
|
+
</define>
|
|
542
|
+
<define name="ocf.link">
|
|
543
|
+
<element name="link">
|
|
544
|
+
<interleave>
|
|
545
|
+
<ref name="ocf.link.attlist"/>
|
|
546
|
+
<ref name="ocf.link.content"/>
|
|
547
|
+
</interleave>
|
|
548
|
+
</element>
|
|
549
|
+
</define>
|
|
550
|
+
<define name="ocf.link.attlist">
|
|
551
|
+
<interleave>
|
|
552
|
+
<attribute name="href">
|
|
553
|
+
<ref name="datatype.URI"/>
|
|
554
|
+
</attribute>
|
|
555
|
+
<attribute name="rel">
|
|
556
|
+
<ref name="datatype.space.separated.tokens"/>
|
|
557
|
+
</attribute>
|
|
558
|
+
<optional>
|
|
559
|
+
<attribute name="media-type">
|
|
560
|
+
<ref name="datatype.mimetype"/>
|
|
561
|
+
</attribute>
|
|
562
|
+
</optional>
|
|
563
|
+
</interleave>
|
|
564
|
+
</define>
|
|
565
|
+
<define name="ocf.link.content">
|
|
566
|
+
<empty/>
|
|
567
|
+
</define>
|
|
568
|
+
</grammar>
|
package/schemas/opf.rng
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
|
|
3
|
+
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
|
4
|
+
|
|
5
|
+
<include href="opf20.rng"/>
|
|
6
|
+
<include href="opf12.rng"/>
|
|
7
|
+
|
|
8
|
+
<start>
|
|
9
|
+
<choice>
|
|
10
|
+
<ref name="OPF20.package-element"/>
|
|
11
|
+
<ref name="OPF12.package-element"/>
|
|
12
|
+
</choice>
|
|
13
|
+
</start>
|
|
14
|
+
|
|
15
|
+
</grammar>
|