-
Notifications
You must be signed in to change notification settings - Fork 0
/
heading-conf.rnc
executable file
·56 lines (49 loc) · 2.15 KB
/
heading-conf.rnc
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
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
start = hierarchy
hierarchy =
element hierarchy {
attribute media-type { text }?,
attribute xml:base { xsd:anyURI }?,
## If there is content before the first splitting point,
## it will be referred to by the toc as 'Frontmatter' or, if present, the
## value of generated-frontmatter-title. If generated-frontmatter-title
## is the empty string (or whitespace-only), the toc entry will be left out.
attribute generated-frontmatter-title { text }?,
attribute max-population { xsd:integer }?,
attribute max-text-length { xsd:integer },
anonymous-division-title?,
(unconditional-split* & conditional-split* & heading*)
}
## Currently not supported by the splitter.
anonymous-division-title = attribute anonymous-division-title { text }
## Currently not supported by the splitter.
title = attribute title { text }
level = attribute level { xsd:integer }
unconditional-split =
element unconditional-split {
(attribute remove { "yes" }
| attribute linear { "no" })?,
content-selector
}
conditional-split =
element conditional-split {
attribute remove { "yes" }?,
## Whether an up-to-8-word preview of the paragraph (or the next paragraph, if the current is empty
## or if it only consists of asterisks etc.) should be included in the toc nav element / the ncx.
## Default: yes.
attribute nav { "no" }?,
content-selector
}
heading =
## Headings that will otherwise be selected for toc generation may be excluded from toc generation
## by adding a class '_notoc' (in the HTML file).
element heading {
content-selector, anonymous-division-title?, title?, level?
}
content-selector = (elt, attr?) | (elt?, attr)
elt = attribute elt { xsd:NMTOKEN }
## Currently only epub:type, class, and id will be regarded as specializations
## of a generic element when it comes to comparing whether a given element matches the selector.
attr =
attribute attr { xsd:NMTOKEN },
attribute attval { xsd:NMTOKEN }