@likecoin/epubcheck-ts 0.2.3 → 0.2.4

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.
Files changed (66) hide show
  1. package/README.md +8 -8
  2. package/bin/epubcheck.js +4 -4
  3. package/bin/epubcheck.ts +4 -4
  4. package/dist/index.cjs +265 -14
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.cts +1 -0
  7. package/dist/index.d.ts +1 -0
  8. package/dist/index.js +265 -14
  9. package/dist/index.js.map +1 -1
  10. package/package.json +2 -2
  11. package/schemas/applications.rng +0 -429
  12. package/schemas/aria.rng +0 -3355
  13. package/schemas/block.rng +0 -488
  14. package/schemas/common.rng +0 -1076
  15. package/schemas/container.rng +0 -24
  16. package/schemas/core-scripting.rng +0 -950
  17. package/schemas/data.rng +0 -161
  18. package/schemas/datatypes.rng +0 -401
  19. package/schemas/embed.rng +0 -980
  20. package/schemas/epub-mathml3-inc.rng +0 -161
  21. package/schemas/epub-nav-30.rnc +0 -44
  22. package/schemas/epub-nav-30.rng +0 -19985
  23. package/schemas/epub-nav-30.sch +0 -87
  24. package/schemas/epub-prefix-attr.rng +0 -17
  25. package/schemas/epub-shared-inc.rng +0 -29
  26. package/schemas/epub-ssml-attrs.rng +0 -17
  27. package/schemas/epub-svg-30.rnc +0 -17
  28. package/schemas/epub-svg-30.rng +0 -19903
  29. package/schemas/epub-svg-30.sch +0 -7
  30. package/schemas/epub-svg-forgiving-inc.rng +0 -315
  31. package/schemas/epub-switch.rng +0 -121
  32. package/schemas/epub-trigger.rng +0 -90
  33. package/schemas/epub-type-attr.rng +0 -12
  34. package/schemas/epub-xhtml-30.rnc +0 -6
  35. package/schemas/epub-xhtml-30.rng +0 -19882
  36. package/schemas/epub-xhtml-30.sch +0 -409
  37. package/schemas/epub-xhtml-inc.rng +0 -151
  38. package/schemas/epub-xhtml-integration.rng +0 -565
  39. package/schemas/epub-xhtml-svg-mathml.rng +0 -17
  40. package/schemas/form-datatypes.rng +0 -54
  41. package/schemas/mathml3-common.rng +0 -336
  42. package/schemas/mathml3-content.rng +0 -1552
  43. package/schemas/mathml3-inc.rng +0 -30
  44. package/schemas/mathml3-presentation.rng +0 -2341
  45. package/schemas/mathml3-strict-content.rng +0 -205
  46. package/schemas/media.rng +0 -374
  47. package/schemas/meta.rng +0 -754
  48. package/schemas/microdata.rng +0 -192
  49. package/schemas/ncx.rng +0 -308
  50. package/schemas/ocf-container-30.rnc +0 -37
  51. package/schemas/ocf-container-30.rng +0 -568
  52. package/schemas/opf.rng +0 -15
  53. package/schemas/opf20.rng +0 -513
  54. package/schemas/package-30.rnc +0 -133
  55. package/schemas/package-30.rng +0 -1153
  56. package/schemas/package-30.sch +0 -444
  57. package/schemas/phrase.rng +0 -746
  58. package/schemas/rdfa.rng +0 -552
  59. package/schemas/revision.rng +0 -106
  60. package/schemas/ruby.rng +0 -141
  61. package/schemas/sectional.rng +0 -278
  62. package/schemas/structural.rng +0 -298
  63. package/schemas/tables.rng +0 -420
  64. package/schemas/web-components.rng +0 -184
  65. package/schemas/web-forms.rng +0 -975
  66. package/schemas/web-forms2.rng +0 -1236
@@ -1,161 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <grammar ns="http://www.w3.org/1998/Math/MathML" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
- <!--
4
- #####################################################################
5
-
6
- MathML validation based on the schemas from the Nu Html Checker,
7
- with the following changes:
8
- - Content MathML is only allowed in annotation-xml
9
- - annotation-xml follows the restrictions defined in
10
- EPUB Content Documents
11
- - EPUB SSML attributes are allowed
12
-
13
- #####################################################################
14
- -->
15
- <include href="mathml3-inc.rng">
16
- <!-- extend to circumvent datatype collisions -->
17
- <define name="NonMathMLAtt">
18
- <attribute>
19
- <anyName>
20
- <except>
21
- <nsName ns=""/>
22
- <nsName/>
23
- <nsName ns="http://www.w3.org/XML/1998/namespace"/>
24
- <nsName ns="http://www.w3.org/1999/xhtml"/>
25
- <nsName ns="http://www.w3.org/2001/xml-events"/>
26
- <nsName ns="http://www.w3.org/2001/10/synthesis"/>
27
- <nsName ns="http://www.idpf.org/2007/ops"/>
28
- </except>
29
- </anyName>
30
- <ref name="datatype.string"/>
31
- </attribute>
32
- </define>
33
- <!-- as ops allows presentation mathml only at top level, kill the contribution to MathExpression -->
34
- <define name="MathExpression">
35
- <choice>
36
- <ref name="semantics"/>
37
- <ref name="PresentationExpression"/>
38
- </choice>
39
- </define>
40
- <!-- override annotation-xml with EPUB restrictions -->
41
- <define name="annotation-xml">
42
- <ref name="epub.annotation-xml"/>
43
- </define>
44
- </include>
45
- <!--
46
- Common attribute extensions
47
- - epub:type
48
- -->
49
- <define name="CommonAtt" combine="interleave">
50
- <optional>
51
- <ref name="epub.type.attr"/>
52
- </optional>
53
- </define>
54
- <!-- - SSML attributes -->
55
- <define name="CommonAtt" combine="interleave">
56
- <optional>
57
- <ref name="epub.ssml.ph.attr"/>
58
- </optional>
59
- </define>
60
- <!-- - xml:base -->
61
- <define name="CommonAtt" combine="interleave">
62
- <optional>
63
- <ref name="common.attrs.xmlbase"/>
64
- </optional>
65
- </define>
66
- <!-- - ARIA -->
67
- <define name="CommonAtt" combine="interleave">
68
- <optional>
69
- <ref name="aria.global"/>
70
- </optional>
71
- </define>
72
- <define name="annotation-xml.model.xhtml" combine="choice">
73
- <ref name="common.inner.flow"/>
74
- </define>
75
- <define name="annotation-xml.model.svg" combine="choice">
76
- <ref name="svg"/>
77
- </define>
78
- <!--
79
- The following comes from validator.nu’s xhtml5-svg-mathml.rnc driver:
80
- in our integration, <mtext> is the only MathML "token element" that can
81
- contain HTML element content; the <mi>, <mn>, <mo> and <ms> elements
82
- cannot; see http://www.w3.org/Bugs/Public/show_bug.cgi?id=9859#c8 for a
83
- rationale
84
- -->
85
- <define name="mtext.content" combine="choice">
86
- <ref name="common.elem.phrasing"/>
87
- </define>
88
- <!-- EPUB very specific annotation-xml restrictions: -->
89
- <define name="epub.annotation-xml">
90
- <choice>
91
- <ref name="annotation-xml.xhtml"/>
92
- <ref name="annotation-xml.svg"/>
93
- <ref name="epub.annotation-xml.mathml.content"/>
94
- <ref name="epub.annotation-xml.mathml.presentation"/>
95
- </choice>
96
- </define>
97
- <define name="epub.annotation-xml.attributes">
98
- <ref name="CommonAtt"/>
99
- <optional>
100
- <ref name="cd"/>
101
- </optional>
102
- <optional>
103
- <ref name="src"/>
104
- </optional>
105
- </define>
106
- <define name="epub.annotation-xml.mathml.content">
107
- <element name="annotation-xml">
108
- <ref name="epub.annotation-xml.model.mathml.content"/>
109
- <ref name="epub.annotation-xml.attributes"/>
110
- <ref name="epub.att-encoding.mathml.content"/>
111
- <ref name="epub.att-name.mathml.content"/>
112
- </element>
113
- </define>
114
- <define name="epub.annotation-xml.model.mathml.content">
115
- <zeroOrMore>
116
- <ref name="ContExp"/>
117
- </zeroOrMore>
118
- </define>
119
- <define name="epub.att-encoding.mathml.content">
120
- <attribute name="encoding">
121
- <choice>
122
- <value type="string" datatypeLibrary="">MathML-Content</value>
123
- <value type="string" datatypeLibrary="">application/mathml-content+xml</value>
124
- </choice>
125
- </attribute>
126
- </define>
127
- <define name="epub.att-name.mathml.content">
128
- <attribute name="name">
129
- <value type="string" datatypeLibrary="">contentequiv</value>
130
- </attribute>
131
- </define>
132
- <define name="epub.annotation-xml.mathml.presentation">
133
- <element name="annotation-xml">
134
- <ref name="epub.annotation-xml.model.mathml.presentation"/>
135
- <ref name="epub.annotation-xml.attributes"/>
136
- <ref name="epub.att-encoding.mathml.presentation"/>
137
- <optional>
138
- <ref name="epub.att-name.mathml.presentation"/>
139
- </optional>
140
- </element>
141
- </define>
142
- <define name="epub.annotation-xml.model.mathml.presentation">
143
- <zeroOrMore>
144
- <ref name="MathExpression"/>
145
- </zeroOrMore>
146
- </define>
147
- <define name="epub.att-encoding.mathml.presentation">
148
- <attribute name="encoding">
149
- <choice>
150
- <value type="string" datatypeLibrary="">MathML</value>
151
- <value>MathML-Presentation</value>
152
- <value type="string" datatypeLibrary="">application/mathml-presentation+xml</value>
153
- </choice>
154
- </attribute>
155
- </define>
156
- <define name="epub.att-name.mathml.presentation">
157
- <attribute name="name">
158
- <data type="NCName"/>
159
- </attribute>
160
- </define>
161
- </grammar>
@@ -1,44 +0,0 @@
1
-
2
- default namespace = "http://www.w3.org/1999/xhtml"
3
- namespace epub = "http://www.idpf.org/2007/ops"
4
-
5
-
6
- # #####################################################################
7
- ## RELAX NG Schema for EPUB: EPUB Navigation Documents #
8
- # #####################################################################
9
-
10
- include "epub-xhtml-30.rnc" {
11
- nav.attrs = nav.attrs.noepubtype
12
- }
13
-
14
- ## "reset" the definition of nav.attrs to what it was
15
- ## before epub:type was set to augment common.attrs.basic
16
- nav.attrs.noepubtype =
17
- ( common.attrs.id?
18
- & common.attrs.class?
19
- & common.attrs.title?
20
- & common.attrs.base?
21
- & common.attrs.space?
22
- & common.attrs.i18n
23
- & common.attrs.present
24
- & common.attrs.other
25
- & ( common.attrs.aria.implicit.navigation
26
- | common.attrs.aria.landmark.navigation
27
- | common.attrs.aria.role.doc-index
28
- | common.attrs.aria.role.doc-pagelist
29
- | common.attrs.aria.role.doc-toc
30
- )?
31
- )
32
-
33
- html5.headings.class = hgroup.elem | h1.elem | h2.elem | h3.elem | h4.elem | h5.elem | h6.elem
34
-
35
- epub.nav = element nav { epub.type.attr & nav.attrs.noepubtype & epub.nav.content }
36
- epub.nav.content = html5.headings.class?, epub.nav.ol
37
-
38
- epub.nav.ol = element ol { ol.attrs & epub.nav.ol.content }
39
- epub.nav.ol.content = epub.nav.oli+
40
-
41
- epub.nav.oli = element li { oli.attrs & epub.nav.oli.content }
42
- epub.nav.oli.content = a.elem.phrasing | ((a.elem.phrasing | span.elem), epub.nav.ol)
43
-
44
- common.elem.flow |= epub.nav