|
307 | 307 | <!-- Not imposing any HTMLBook specific constraints on menu content; deferring to HTML5 spec -->
|
308 | 308 | <xs:element name="menu" type="any_elems_attrs"/>
|
309 | 309 |
|
310 |
| -<!--ToDo: Open question: Allow h1-h6 at beginning (or even middle) of navs? --> |
311 |
| -<xs:element name="nav" type="block_xor_inline_children"/> |
| 310 | +<!--Follows the EPUB 3 spec for nav elements; see http://www.idpf.org/epub/30/spec/epub30-contentdocs.html#sec-xhtml-nav --> |
| 311 | +<xs:element name="nav"> |
| 312 | + <xs:complexType> |
| 313 | + <xs:sequence> |
| 314 | + <xs:group ref="headings" minOccurs="0"/> |
| 315 | + <xs:element name="ol" type="nav_doc_ol"/> |
| 316 | + </xs:sequence> |
| 317 | + <xs:attributeGroup ref="globals"/> |
| 318 | + </xs:complexType> |
| 319 | +</xs:element> |
312 | 320 |
|
313 | 321 | <xs:element name="object">
|
314 | 322 | <xs:complexType mixed="true">
|
|
328 | 336 | <xs:sequence>
|
329 | 337 | <xs:element ref="li" minOccurs="0" maxOccurs="unbounded"/>
|
330 | 338 | </xs:sequence>
|
331 |
| - <xs:attribute name="reversed"> |
332 |
| - <xs:simpleType> |
333 |
| - <xs:restriction base="xs:string"> |
334 |
| - <!-- Must be a case-insensitive match for "reversed" or empty string --> |
335 |
| - <xs:pattern value="([Rr][Ee][Vv][Ee][Rr][Ss][Ee][Dd])?"/> |
336 |
| - </xs:restriction> |
337 |
| - </xs:simpleType> |
338 |
| - </xs:attribute> |
339 |
| - <xs:attribute name="start" type="xs:integer"/> |
340 |
| - <xs:attribute name="type"> |
341 |
| - <xs:simpleType> |
342 |
| - <xs:restriction base="xs:token"> |
343 |
| - <xs:enumeration value="decimal"/> |
344 |
| - <xs:enumeration value="lower-alpha"/> |
345 |
| - <xs:enumeration value="upper-alpha"/> |
346 |
| - <xs:enumeration value="lower-roman"/> |
347 |
| - <xs:enumeration value="upper-roman"/> |
348 |
| - </xs:restriction> |
349 |
| - </xs:simpleType> |
350 |
| - </xs:attribute> |
| 339 | + <xs:attributeGroup ref="ol_attrs"/> |
351 | 340 | <xs:attributeGroup ref="globals"/>
|
352 | 341 | </xs:complexType>
|
353 | 342 | </xs:element>
|
|
1249 | 1238 | <xs:attribute name="class" use="required" type="subheadingtype"/>
|
1250 | 1239 | <xs:attributeGroup ref="globals_minus_class"/>
|
1251 | 1240 | </xs:complexType>
|
| 1241 | + |
| 1242 | +<!-- Custom types for Nav Document (following EPUB 3 spec; see http://www.idpf.org/epub/30/spec/epub30-contentdocs.html#sec-xhtml-nav) --> |
| 1243 | +<xs:complexType name="nav_doc_ol"> |
| 1244 | + <xs:sequence> |
| 1245 | + <xs:element name="li" type="nav_doc_li" minOccurs="0" maxOccurs="unbounded"/> |
| 1246 | + </xs:sequence> |
| 1247 | + <xs:attributeGroup ref="ol_attrs"/> |
| 1248 | + <xs:attributeGroup ref="globals"/> |
| 1249 | +</xs:complexType> |
| 1250 | + |
| 1251 | +<xs:complexType name="nav_doc_li" mixed="true"> |
| 1252 | + <xs:choice> |
| 1253 | + <xs:element ref="span"/> |
| 1254 | + <xs:sequence> |
| 1255 | + <xs:element ref="a"/> |
| 1256 | + <xs:element name="ol" minOccurs="0" type="nav_doc_ol"/> |
| 1257 | + </xs:sequence> |
| 1258 | + </xs:choice> |
| 1259 | + <xs:attributeGroup ref="globals"/> |
| 1260 | +</xs:complexType> |
1252 | 1261 |
|
1253 | 1262 | <!-- General handling for elements that can accept only inline children -->
|
1254 | 1263 | <xs:complexType name="inline_children_only" mixed="true">
|
|
1448 | 1457 | <xs:attribute name="class" type="xs:NMTOKENS"/>
|
1449 | 1458 | </xs:attributeGroup>
|
1450 | 1459 |
|
| 1460 | +<!-- Attributes used by <ol> elements --> |
| 1461 | +<xs:attributeGroup name="ol_attrs"> |
| 1462 | + <xs:attribute name="reversed"> |
| 1463 | + <xs:simpleType> |
| 1464 | + <xs:restriction base="xs:string"> |
| 1465 | + <!-- Must be a case-insensitive match for "reversed" or empty string --> |
| 1466 | + <xs:pattern value="([Rr][Ee][Vv][Ee][Rr][Ss][Ee][Dd])?"/> |
| 1467 | + </xs:restriction> |
| 1468 | + </xs:simpleType> |
| 1469 | + </xs:attribute> |
| 1470 | + <xs:attribute name="start" type="xs:integer"/> |
| 1471 | + <xs:attribute name="type"> |
| 1472 | + <xs:simpleType> |
| 1473 | + <xs:restriction base="xs:token"> |
| 1474 | + <xs:enumeration value="decimal"/> |
| 1475 | + <xs:enumeration value="lower-alpha"/> |
| 1476 | + <xs:enumeration value="upper-alpha"/> |
| 1477 | + <xs:enumeration value="lower-roman"/> |
| 1478 | + <xs:enumeration value="upper-roman"/> |
| 1479 | + </xs:restriction> |
| 1480 | + </xs:simpleType> |
| 1481 | + </xs:attribute> |
| 1482 | +</xs:attributeGroup> |
| 1483 | + |
1451 | 1484 | <!-- Media attributes used by both <audio> and <video> elements -->
|
1452 | 1485 | <xs:attributeGroup name="generalmediaattributes">
|
1453 | 1486 | <xs:attribute name="src" type="xs:anyURI"/>
|
|
0 commit comments