Skip to content

Commit 9a0544e

Browse files
author
Sanders Kleinfeld
committed
Stripped out support for "hgroup", since W3C is removing support for it in HTML5. Added support for "value" attribute on "li" in "ol".
1 parent b420a47 commit 9a0544e

File tree

2 files changed

+12
-26
lines changed

2 files changed

+12
-26
lines changed

htmlbook.xsd

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,7 @@
229229
<xs:group ref="headings" minOccurs="0" maxOccurs="unbounded"/>
230230
<xs:group ref="blockelements" minOccurs="0" maxOccurs="unbounded"/>
231231
</xs:sequence>
232-
<!-- Option 2: hgroup followed by block elements -->
233-
<xs:sequence>
234-
<xs:element ref="hgroup"/>
235-
<xs:group ref="blockelements" minOccurs="0" maxOccurs="unbounded"/>
236-
</xs:sequence>
237-
<!-- Option 3: inlines and text only -->
232+
<!-- Option 2: inlines and text only -->
238233
<xs:group ref="inlineelements" minOccurs="0" maxOccurs="unbounded"/>
239234
</xs:choice>
240235
<xs:attributeGroup ref="globals"/>
@@ -474,7 +469,16 @@
474469
<xs:element name="ol">
475470
<xs:complexType>
476471
<xs:sequence>
477-
<xs:element ref="li" minOccurs="0" maxOccurs="unbounded"/>
472+
<!-- "li"s in an "ol" can have a value attribute -->
473+
<xs:element name="li" minOccurs="0" maxOccurs="unbounded">
474+
<xs:complexType>
475+
<xs:complexContent>
476+
<xs:extension base="block_xor_inline_children">
477+
<xs:attribute name="value" type="positive_int"/>
478+
</xs:extension>
479+
</xs:complexContent>
480+
</xs:complexType>
481+
</xs:element>
478482
</xs:sequence>
479483
<xs:attributeGroup ref="ol_attrs"/>
480484
<xs:attributeGroup ref="globals"/>
@@ -1318,15 +1322,6 @@
13181322

13191323
<xs:element name="figcaption" type="caption"/>
13201324

1321-
<xs:element name="hgroup">
1322-
<xs:complexType>
1323-
<xs:sequence>
1324-
<xs:group ref="headings" minOccurs="1" maxOccurs="unbounded"/>
1325-
</xs:sequence>
1326-
<xs:attributeGroup ref="globals"/>
1327-
</xs:complexType>
1328-
</xs:element>
1329-
13301325
<xs:element name="legend" type="inline_children_only"/>
13311326

13321327
<xs:element name="li" type="block_xor_inline_children"/>
@@ -1468,7 +1463,6 @@
14681463
</xs:element>
14691464

14701465
<!-- Heading elements -->
1471-
<!-- ToDo: Support hgroup in <section> to facilitate subheadings? Already allowed in <div> -->
14721466
<!-- ToDo: Should we require class="title" on all section heading titles? -->
14731467
<xs:element name="h1" type="inline_children_only"/>
14741468

samples/test_schema.html

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,6 @@ <h3>Another heading you choose</h3>
5252
<p>Test 123</p>
5353
</div>
5454

55-
<!-- An hgroup here -->
56-
<div id="third_div" class="third_test_block">
57-
<hgroup id="heading_group" class="heading_group" lang="fr">
58-
<h1>First heading</h1>
59-
<h1>Second heading</h1>
60-
</hgroup>
61-
<p>Test 123</p>
62-
</div>
6355

6456
<section class="sect2" id="a_sect2" lang="en">
6557
<h2>Test</h2>
@@ -204,7 +196,7 @@ <h1>Table of Contents</h1>
204196
<!-- Don't forget an ordered list -->
205197
<ol id="orderedlist" start="3" type="decimal" reversed="ReVersed" spellcheck="true">
206198
<li><p>This list item</p><p>Has multiple paragraphs</p></li>
207-
<li>This one is has just <em>one paragraph</em>, so no need to use block elements</li>
199+
<li value="2">This one is has just <em>one paragraph</em>, so no need to use block elements</li>
208200
<li>Just plain text</li>
209201
</ol>
210202

0 commit comments

Comments
 (0)