Skip to content

Commit 43556f6

Browse files
author
Sanders Kleinfeld
committed
Spec updates for new header content model.
1 parent 13dc1e4 commit 43556f6

File tree

1 file changed

+55
-36
lines changed

1 file changed

+55
-36
lines changed

index.html

Lines changed: 55 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,13 @@
7676
<h2>Notes on the HTMLBook Specification</h2>
7777
<p>Requirements for HTML5 elements in the HTMLBook specification are below. Special semantic inflections for <code>data-type</code> attributes, unless otherwise noted, come from <a href="http://idpf.org/epub/vocab/structure/">EPUB 3 Structural Semantics Vocabulary</a></p>
7878
<p>Many content models refer to &ldquo;Block elements&rdquo; or &ldquo;Inline elements&rdquo;; please see <a href="#block_elements">Block Elements</a> and <a href="#inline_elements">Inline Elements</a> for the corresponding list of HTML5 elements that belong to each of these categories.</p>
79-
<p>If no content model or attribute requirements are explicitly specified, then HTMLBook adopts the corresponding requirements in the [[!HTML5]] Specification</a></p>
79+
<p>If no content model or attribute requirements are explicitly specified, then HTMLBook adopts the corresponding requirements in the [[!HTML5]] Specification</p>
8080
</section>
8181
<section>
8282
<h2>Revision History and Notes</h2>
8383
<dl>
84+
<dt>8 April 2014</dt>
85+
<dd>Updated specifications for section subtitles to comply with best practices set forth in <a href="http://www.w3.org/TR/html5/common-idioms.html#common-idioms">&ldquo;Common idioms without dedicated elements&rdquo;</a> in [[!HTML5]] Specification.</dd>
8486
<dt>29 December 2013</dt>
8587
<dd>Minor revisions for clarity</dd>
8688
<dt>13 August 2013</dt>
@@ -98,7 +100,7 @@ <h1>Book Component elements</h1>
98100
<h2>Book</h2>
99101
<p><strong>HTML element</strong>: <code>&lt;body&gt;</code></p>
100102
<p><strong>Attribute requirements</strong>: <code>data-type="book"</code> <span data-type="footnote">(Not in [[EPUB3SSV]]; from [[DOCBOOK]])</span></p>
101-
<p><strong>Content model</strong>: First child must be <code>&lt;h1&gt;</code> that contains book title; then zero or more <code>&lt;h2&gt;</code> elements for subtitle content; then one or more Book Component elements as children (<code>&lt;div&gt;</code> for Part elements, <code>&lt;nav&gt;</code> for Table of Contents, and <code>&lt;section&gt;</code> elements for all other book divisions)</p>
103+
<p><strong>Content model</strong>: Optional <code>&lt;h1&gt;</code> that contains book title or <a href="#header_block">Header block</a> that contains book title and optional subtitle content; then one or more Book Component elements as children (<code>&lt;div&gt;</code> for Part elements, <code>&lt;nav&gt;</code> for Table of Contents, and <code>&lt;section&gt;</code> elements for all other book divisions)</p>
102104
<p>
103105
<strong>Example</strong>
104106
</p>
@@ -114,7 +116,7 @@ <h2>Book</h2>
114116
<h2>Chapter</h2>
115117
<p><strong>HTML element</strong>: <code>&lt;section&gt;</code></p>
116118
<p><strong>Attribute requirements</strong>: <code>data-type="chapter"</code></p>
117-
<p><strong>Content model</strong>: First child must be <code>&lt;h1&gt;</code> that contains chapter title; then zero or more <code>&lt;h2&gt;</code> elements for subtitle content; then zero or more Block Elements; then zero or more Sect1 children (<code>&lt;section data-type="sect1"&gt;</code>)</p>
119+
<p><strong>Content model</strong>: First child must be either <code>&lt;h1&gt;</code> that contains chapter title or <a href="#header_block">Header block</a> that contains chapter title and optional subtitle content; then zero or more Block Elements; then zero or more Sect1 children (<code>&lt;section data-type="sect1"&gt;</code>)</p>
118120
<p>
119121
<strong>Example</strong>
120122
</p>
@@ -131,7 +133,7 @@ <h2>Chapter</h2>
131133
<h2>Appendix</h2>
132134
<p><strong>HTML element</strong>: <code>&lt;section&gt;</code></p>
133135
<p><strong>Attribute requirements</strong>: <code>data-type="appendix"</code> or <code>data-type="afterword"</code>, depending on content</p>
134-
<p><strong>Content model</strong>: First child must be <code>&lt;h1&gt;</code> that contains appendix title; then zero or more <code>&lt;h2&gt;</code> elements for subtitle content; then zero or more Block Elements; then zero or more Sect1 children (<code>&lt;section data-type="sect1"&gt;</code>)</p>
136+
<p><strong>Content model</strong>: First child must be either <code>&lt;h1&gt;</code> that contains appendix title or <a href="#header_block">Header block</a> that contains appendix title and optional subtitle content; then zero or more Block Elements; then zero or more Sect1 children (<code>&lt;section data-type="sect1"&gt;</code>)</p>
135137
<p>
136138
<strong>Example</strong>
137139
</p>
@@ -147,7 +149,7 @@ <h2>Appendix</h2>
147149
<h2>Bibliography</h2>
148150
<p><strong>HTML element</strong>: <code>&lt;section&gt;</code></p>
149151
<p><strong>Attribute requirements</strong>: <code>data-type="bibliography"</code></p>
150-
<p><strong>Content model</strong>: First child must be <code>&lt;h1&gt;</code> that contains bibliography title; then zero or more <code>&lt;h2&gt;</code> elements for subtitle content; then zero or more Block Elements; then zero or more Sect1 children (<code>&lt;section data-type="sect1"&gt;</code>)</p>
152+
<p><strong>Content model</strong>: First child must be either <code>&lt;h1&gt;</code> that contains bibliography title or <a href="#header_block">Header block</a> that contains bibliography title and optional subtitle content; then zero or more Block Elements; then zero or more Sect1 children (<code>&lt;section data-type="sect1"&gt;</code>)</p>
151153
<p>
152154
<strong>Example</strong>
153155
</p>
@@ -163,7 +165,7 @@ <h2>Bibliography</h2>
163165
<h2>Glossary</h2>
164166
<p><strong>HTML element</strong>: <code>&lt;section&gt;</code></p>
165167
<p><strong>Attribute requirements</strong>: <code>data-type="glossary"</code></p>
166-
<p><strong>Content model</strong>: First child must be <code>&lt;h1&gt;</code> that contains glossary title; then zero or more <code>&lt;h2&gt;</code> elements for subtitle content; then zero or more Block Elements; then zero or more Sect1 children (<code>&lt;section data-type="sect1"&gt;</code>)</p>
168+
<p><strong>Content model</strong>: First child must be either <code>&lt;h1&gt;</code> that contains glossary title or <a href="#header_block">Header block</a> that contains glossary title and optional subtitle content; then zero or more Block Elements; then zero or more Sect1 children (<code>&lt;section data-type="sect1"&gt;</code>)</p>
167169
<p><strong>Best practices</strong>: List of glossary terms should be marked up using <code>&lt;dl&gt;</code> elements with a <code>data-type</code> of "glossary", with <code>&lt;dt&gt;</code> children with a <code>data-type</code> of "glossterm" and <code>&lt;dd&gt;</code> children with a <code>data-type</code> of "glossdef". Term text should be wrapped in a <code>&lt;dfn&gt;</code>. However, none of this is formally required by the spec.</p>
168170
<p>
169171
<strong>Example</strong>
@@ -184,7 +186,7 @@ <h2>Glossary</h2>
184186
<h2>Preface</h2>
185187
<p><strong>HTML element</strong>: <code>&lt;section&gt;</code></p>
186188
<p><strong>Attribute requirements</strong>: <code>data-type="preface"</code>, <code>data-type="foreword"</code>, or <code>data-type="introduction"</code>, depending on content</p>
187-
<p><strong>Content model</strong>: First child must be <code>&lt;h1&gt;</code> that contains preface title; then zero or more <code>&lt;h2&gt;</code> elements for subtitle content; then zero or more Block Elements; then zero or more Sect1 children (<code>&lt;section data-type="sect1"&gt;</code>)</p>
189+
<p><strong>Content model</strong>: First child must be either <code>&lt;h1&gt;</code> that contains preface title or <a href="#header_block">Header block</a> that contains preface title and optional subtitle content; then zero or more Block Elements; then zero or more Sect1 children (<code>&lt;section data-type="sect1"&gt;</code>)</p>
188190
<p>
189191
<strong>Example</strong>
190192
</p>
@@ -200,7 +202,7 @@ <h2>Preface</h2>
200202
<h2>Frontmatter</h2>
201203
<p><strong>HTML element</strong>: <code>&lt;section&gt;</code></p>
202204
<p><strong>Attribute requirements</strong>: <code>data-type="halftitlepage"</code>, <code>data-type="titlepage"</code>, <code>data-type="copyright-page"</code>, or <code>data-type="dedication"</code>, depending on content</p>
203-
<p><strong>Content model</strong>: First child must be <code>&lt;h1&gt;</code> that contains frontmatter section title; then zero or more <code>&lt;h2&gt;</code> elements for subtitle content; then zero or more Block Elements; then zero or more Sect1 children (<code>&lt;section data-type="sect1"&gt;</code>)</p>
205+
<p><strong>Content model</strong>: First child must be either <code>&lt;h1&gt;</code> that contains frontmatter section title or <a href="#header_block">Header block</a> that contains frontmatter title and optional subtitle content; then zero or more Block Elements; then zero or more Sect1 children (<code>&lt;section data-type="sect1"&gt;</code>)</p>
204206
<p>
205207
<strong>Example</strong>
206208
</p>
@@ -213,7 +215,7 @@ <h2>Frontmatter</h2>
213215
<h2>Backmatter</h2>
214216
<p><strong>HTML element</strong>: <code>&lt;section&gt;</code></p>
215217
<p><strong>Attribute requirements</strong>: <code>data-type="colophon"</code>, <code>data-type="acknowledgments"</code>, <code>data-type="afterword"</code>, or <code>data-type="conclusion"</code>, depending on content</p>
216-
<p><strong>Content model</strong>: First child must be <code>&lt;h1&gt;</code> that contains backmatter section title; then zero or more <code>&lt;h2&gt;</code> elements for subtitle content; then zero or more Block Elements; then zero or more Sect1 children (<code>&lt;section data-type="sect1"&gt;</code>)</p>
218+
<p><strong>Content model</strong>: First child must be either <code>&lt;h1&gt;</code> that contains backmatter section title or <a href="#header_block">Header block</a> that contains backmatter title and optional subtitle content; then zero or more Block Elements; then zero or more Sect1 children (<code>&lt;section data-type="sect1"&gt;</code>)</p>
217219
<p>
218220
<strong>Example</strong>
219221
</p>
@@ -229,7 +231,7 @@ <h2>Backmatter</h2>
229231
<h2>Part</h2>
230232
<p><strong>HTML element</strong>: <code>&lt;div&gt;</code></p>
231233
<p><strong>Atttribute requirements</strong>: <code>data-type="part"</code></p>
232-
<p><strong>Content model</strong>: First child must be <code>&lt;h1&gt;</code> that contains part title; then zero or more <code>&lt;h2&gt;</code> elements for subtitle content; then zero or more Block Elements that compose the optional Part introduction; then one or more <code>&lt;section&gt;</code> elements representing Book Component children other than a Part</p>
234+
<p><strong>Content model</strong>: First child must be either <code>&lt;h1&gt;</code> that contains part title or <a href="#header_block">Header block</a> that contains part title and optional subtitle content; then zero or more Block Elements that compose the optional Part introduction; then one or more <code>&lt;section&gt;</code> elements representing Book Component children other than a Part</p>
233235
<p>
234236
<strong>Example</strong>
235237
</p>
@@ -267,7 +269,7 @@ <h2>Table of Contents</h2>
267269
<h2>Index</h2>
268270
<p><strong>HTML element</strong>: <code>&lt;section&gt;</code></p>
269271
<p><strong>Attribute requirements</strong>: <code>data-type="index"</code></p>
270-
<p><strong>Content model</strong>: First child must be <code>&lt;h1&gt;</code> that contains index title; then zero or more <code>&lt;h2&gt;</code> elements for subtitle content; then zero or more Block Elements; then zero or more Sect1 children (<code>&lt;section data-type="sect1"&gt;</code>)</p>
272+
<p><strong>Content model</strong>: First child must be either <code>&lt;h1&gt;</code> that contains index title or <a href="#header_block">Header block</a> that contains index title and optional subtitle content; then zero or more Block Elements; then zero or more Sect1 children (<code>&lt;section data-type="sect1"&gt;</code>)</p>
271273
<p><strong>Best practices</strong>: HTMLBook recommends following the [[EPUBINDEX]] specification and using <code>&lt;ol&gt;</code>/<code>&lt;li&gt;</code> elements for marking up index entries, with <code>data-type</code> attributes used for semantic inflection as appropriate, but none of this is a formal spec requirement</p>
272274
<p>
273275
<strong>Example</strong>
@@ -291,13 +293,13 @@ <h2>Index</h2>
291293
<h2>Sections</h2>
292294
<p><strong>HTML element</strong>: <code>&lt;section&gt;</code></p>
293295
<p><strong>Attribute requirements</strong>: <code>data-type="sect1"</code>, <code>data-type="sect2"</code>, <code>data-type="sect3"</code>, <code>data-type="sect4"</code>, <code>data-type="sect5"</code> <span data-type="footnote">(From [[DOCBOOK]] vocabulary)</span>, depending on hierarchy level. <code>sect1</code> is used for <code>&lt;section&gt;</code> elements nested directly in main Book components ("chapter", "appendix", etc.). <code>sect2</code> is used for <code>&lt;section&gt;</code> elements nested in a <code>sect1</code> <code>&lt;section&gt;</code>, <code>sect3</code> is used for <code>&lt;section&gt;</code> elements nested in a <code>sect2</code> <code>&lt;section&gt;</code>, and so on.</p>
294-
<p><strong>Content model</strong>: The first child must be a main heading element corresponding to the hierarchy level indicated by <code>data-type</code> value, as follows:</p>
296+
<p><strong>Content model</strong>: The first child must either be a main heading element corresponding to the hierarchy level indicated by <code>data-type</code> value, as follows:</p>
295297
<pre data-type="programlisting">"sect1" -&gt; h1
296298
"sect2" -&gt; h2
297299
"sect3" -&gt; h3
298300
"sect4" -&gt; h4
299301
"sect5" -&gt; h5</pre>
300-
<p>The heading is followed by zero or more subheading elements whose hierarchy level is one lower than the main heading (e.g., <code>&lt;h2&gt;</code> for a <code>sect1</code>), folloed by zero or more Block elements, followed by zero or more <code>&lt;section&gt;</code> elements with a <code>data-type</code> value one level lower in the hierarchy, as long as the parent section is a "sect4" or higher (e.g., <code>&lt;section data-type="sect4"&gt;</code> nested in <code>&lt;section data-type="sect3"&gt;</code>)</p>
302+
<p>or a <a href="#header_block">Header block</a> that contains section title and optional subtitle content. This is followed by zero or more Block elements, followed by zero or more <code>&lt;section&gt;</code> elements with a <code>data-type</code> value one level lower in the hierarchy, as long as the parent section is a "sect4" or higher (e.g., <code>&lt;section data-type="sect4"&gt;</code> nested in <code>&lt;section data-type="sect3"&gt;</code>)</p>
301303
<p><strong>Example</strong>:</p>
302304
<pre data-type="programlisting">&lt;section data-type="sect1"&gt;
303305
&lt;h1&gt;A-Head&lt;/h1&gt;
@@ -530,29 +532,6 @@ <h2>Blockquote</h2>
530532
&lt;p&gt;When in the course of human events...&lt;/p&gt;
531533
&lt;p data-type="attribution"&gt;U.S. Declaration of Independence&lt;/p&gt;
532534
&lt;/blockquote&gt;</pre>
533-
</section>
534-
<section data-type="sect2" id="_headings">
535-
<h2>Headings</h2>
536-
<p><strong>HTML elements</strong>: <code>&lt;h1&gt;</code>, <code>&lt;h2&gt;</code>, <code>&lt;h3&gt;</code>, <code>&lt;h4&gt;</code>, <code>&lt;h5&gt;</code>, or <code>&lt;h6&gt;</code></p>
537-
<p><strong>Content Model</strong>: text and/or zero or more Inline elements</p>
538-
<p><strong>Notes</strong>: Many main book components (e.g., chapters, parts, appendixes) require headings. The appropriate
539-
element from <code>&lt;h1&gt;</code>-<code>&lt;h6&gt;</code> is outlined below, as well as in the corresponding documentation for these
540-
components:</p>
541-
<pre data-type="programlisting">book title -&gt; h1
542-
part title -&gt; h1
543-
chapter title -&gt; h1
544-
preface title -&gt; h1
545-
appendix title -&gt; h1
546-
colophon title -&gt; h1
547-
dedication title -&gt; h1
548-
glossary title -&gt; h1
549-
bibliography title -&gt; h1
550-
sect1 title -&gt; h1
551-
sect2 title -&gt; h2
552-
sect3 title -&gt; h3
553-
sect4 title -&gt; h4
554-
sect5 title -&gt; h5
555-
sidebar title -&gt; h5</pre>
556535
</section>
557536
<section data-type="sect2" id="_equation">
558537
<h2>Equation</h2>
@@ -654,6 +633,46 @@ <h2>Subscripts</h2>
654633
<pre data-type="programlisting">&lt;p&gt;The formula for water is H&lt;sub&gt;2&lt;/sub&gt;O&lt;/p&gt;</pre>
655634
</section>
656635
</section>
636+
<section data-type="sect1" id="_heading_elements">
637+
<h1>Heading Elements</h1>
638+
<section data-type="sect2" id="_headings">
639+
<h2>Headings</h2>
640+
<p><strong>HTML elements</strong>: <code>&lt;h1&gt;</code>, <code>&lt;h2&gt;</code>, <code>&lt;h3&gt;</code>, <code>&lt;h4&gt;</code>, <code>&lt;h5&gt;</code>, or <code>&lt;h6&gt;</code></p>
641+
<p><strong>Content Model</strong>: text and/or zero or more Inline elements</p>
642+
<p><strong>Notes</strong>: Many main book components (e.g., chapters, parts, appendixes) require headings. The appropriate
643+
element from <code>&lt;h1&gt;</code>-<code>&lt;h6&gt;</code> is outlined below, as well as in the corresponding documentation for these
644+
components:</p>
645+
<pre data-type="programlisting">book title -&gt; h1
646+
part title -&gt; h1
647+
chapter title -&gt; h1
648+
preface title -&gt; h1
649+
appendix title -&gt; h1
650+
colophon title -&gt; h1
651+
dedication title -&gt; h1
652+
glossary title -&gt; h1
653+
bibliography title -&gt; h1
654+
sect1 title -&gt; h1
655+
sect2 title -&gt; h2
656+
sect3 title -&gt; h3
657+
sect4 title -&gt; h4
658+
sect5 title -&gt; h5
659+
sidebar title -&gt; h5</pre>
660+
</section>
661+
<section data-type="sect1" id="header_block">
662+
<h1>Header</h1>
663+
<p><strong>HTML element</strong>: <code>&lt;header&gt;</code></p>
664+
<p><strong>Content Model</strong>: A Heading element at the proper level designated (<code>h1</code>&ndash;<code>h5</code>)
665+
for the parent Book Component, as outlined in the previous <a href="#_headings">Headings</a> section (e.g., an <code>&lt;h1&gt;</code> for a chapter <code>&lt;header&gt;</code>); then zero or more <code>&lt;p&gt;</code> elements for subtitles or author attributions, each of which must have a <code>data-type</code> of either <code>subtitle</code> or <code>author</code></p>
666+
<p><strong>Example</strong>:</p>
667+
<pre data-type="programlisting">&lt;section data-type="chapter"&gt;
668+
&lt;header&gt;
669+
&lt;h1&gt;Chapter title&lt;/h1&gt;
670+
&lt;p data-type="subtitle"&gt;Chapter subtitle&lt;/p&gt;
671+
&lt;/header&gt;
672+
&lt;!-- Chapter content here... --&gt;
673+
&lt;/section&gt;</pre>
674+
</section>
675+
</section>
657676
<section data-type="sect1" id="_interactive_elements">
658677
<h1>Interactive Elements</h1>
659678
<section data-type="sect2" id="_video">

0 commit comments

Comments
 (0)