Skip to content

Commit 27081cd

Browse files
author
Sanders Kleinfeld
committed
Minor Schema tweaks for "pre" and "aside" elements.
1 parent 30d2ab7 commit 27081cd

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

htmlbook.xsd

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?xml version="1.0"?>
22
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:svg="http://www.w3.org/2000/svg" targetNamespace="http://www.w3.org/1999/xhtml" elementFormDefault="qualified" attributeFormDefault="unqualified">
33

4+
<!-- ToDos: Indexterm data attributes; special schema for footnotes (thinking <aside class="footnote">); enumerated class for admonitions/examples on div? -->
5+
46
<xs:import namespace="http://www.w3.org/1998/Math/MathML" schemaLocation="mathml3/mathml3.xsd"/>
57
<xs:import namespace="http://www.w3.org/2000/svg" schemaLocation="svg/SVG.xsd"/>
68

@@ -488,7 +490,15 @@
488490

489491
<xs:element name="p" type="inline_children_only"/>
490492

491-
<xs:element name="pre" type="inline_children_only"/>
493+
<xs:element name="pre">
494+
<xs:complexType>
495+
<xs:complexContent>
496+
<xs:extension base="inline_children_only">
497+
<xs:attribute name="data-language" type="xs:token"/>
498+
</xs:extension>
499+
</xs:complexContent>
500+
</xs:complexType>
501+
</xs:element>
492502

493503
<!-- Default global version of "section" element is for chapter-level book divisions
494504
(allows for modularization of HTML files at the chapter level),
@@ -1714,8 +1724,7 @@
17141724
<xs:group ref="blockelements" minOccurs="0" maxOccurs="unbounded"/>
17151725
</xs:sequence>
17161726
<!-- Note: special class attr restrictions here -->
1717-
<xs:attribute name="class" use="required" fixed="sidebar"/>
1718-
<xs:attributeGroup ref="globals_minus_class"/>
1727+
<xs:attributeGroup ref="globals"/>
17191728
</xs:complexType>
17201729

17211730
<!-- Subheadings: support subtitles, author attributions, etc. -->

0 commit comments

Comments
 (0)