1
0
mirror of https://github.com/suk-ws/ph-Bookshelf.git synced 2025-01-19 15:25:03 +08:00
ph-Bookshelf/assets/xsd/book.xsd
Eyre_S 2fcdeafc72
更新为 version 2.0 配置文件格式,书籍目录添加 Separator 支持,解析器部分跟进更新
- 支持了新的 bookshelf 以及其中的 config/link/book 解析
- 支持了新的 page/chapter/separator 以及 root_book 的解析
- 暂不支持 book.xml 根配置的解析
- 添加了为 Separator 设置的 css 样式
2023-02-26 16:12:45 +08:00

63 lines
1.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="https://book.sukazyo.cc"
xmlns="https://book.sukazyo.cc"
elementFormDefault="qualified"
>
<xs:include schemaLocation="https://book.sukazyo.cc/assets/xsd/configuations.xsd" />
<xs:element name="Book">
<xs:complexType>
<xs:sequence>
<xs:element name="book_name" type="xs:string" />
<xs:element name="contents" type="bookContents" />
</xs:sequence>
<xs:attribute name="version" type="xs:string" />
</xs:complexType>
</xs:element>
<xs:complexType name="bookContents">
<xs:sequence>
<xs:element name="Page" type="bookPage" />
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="bookContent" />
<xs:element name="Separator" />
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:group name="bookContent">
<xs:choice>
<xs:element name="Chapter" type="bookChapter" />
<xs:element name="Page" type="bookPage" />
</xs:choice>
</xs:group>
<xs:complexType name="bookChapter">
<xs:sequence>
<xs:element name="caption" type="xs:string" />
<xs:group ref="bookContent" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="root" type="xs:string" />
</xs:complexType>
<xs:complexType name="bookPage">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="id" type="xs:string" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:schema>