mirror of
https://github.com/suk-ws/ph-Bookshelf.git
synced 2024-12-04 08:56:52 +08:00
add ph-bookshelf xml schema.
This commit is contained in:
parent
2b99426289
commit
7369ba23f3
46
assets/xsd/book.xsd
Normal file
46
assets/xsd/book.xsd
Normal file
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="https://book.sukazyo.cc/assets/xsd/book.xsd"
|
||||
xmlns="https://book.sukazyo.cc/assets/xsd/book.xsd"
|
||||
elementFormDefault="qualified"
|
||||
>
|
||||
|
||||
<xs:include schemaLocation="https://book.sukazyo.cc/assets/xsd/configuations.xsd" />
|
||||
|
||||
<xs:element name="Book" type="rootBook" />
|
||||
|
||||
<xs:complexType name="rootBook">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="bookChapter">
|
||||
<xs:attribute name="id" type="xs:string" use="required" />
|
||||
<xs:attribute name="name" type="xs:string" use="required" />
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="bookChapter">
|
||||
<xs:choice maxOccurs="unbounded">
|
||||
|
||||
<xs:element name="Chapter">
|
||||
<xs:complexType>
|
||||
<xs:complexContent>
|
||||
<xs:extension base="bookChapter">
|
||||
<xs:attribute name="name" type="xs:string" use="required" />
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="Page">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="id" type="xs:string" use="required" />
|
||||
<xs:attribute name="name" type="xs:string" use="required" />
|
||||
<xs:attributeGroup ref="phb-config-level-page" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
|
||||
</xs:schema>
|
75
assets/xsd/bookshelf.xsd
Normal file
75
assets/xsd/bookshelf.xsd
Normal file
@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="https://book.sukazyo.cc/assets/xsd/bookshelf.xsd"
|
||||
xmlns="https://book.sukazyo.cc/assets/xsd/bookshelf.xsd"
|
||||
elementFormDefault="qualified"
|
||||
>
|
||||
|
||||
<xs:include schemaLocation="https://book.sukazyo.cc/assets/xsd/book.xsd" />
|
||||
<xs:include schemaLocation="https://book.sukazyo.cc/assets/xsd/configuations.xsd" />
|
||||
|
||||
<xs:element name="BookShelf">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
|
||||
<xs:element name="configurations" type="phb-config-level-site" />
|
||||
|
||||
<xs:element name="links" type="linkCollection" />
|
||||
|
||||
<xs:element name="books" type="bookCollection" />
|
||||
|
||||
<xs:element name="rootBook" type="rootBook" />
|
||||
|
||||
</xs:sequence>
|
||||
<xs:attribute name="siteName" type="xs:string" use="required" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:complexType name="linkCollection">
|
||||
<xs:choice maxOccurs="unbounded">
|
||||
|
||||
<xs:element name="Link">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" use="required" />
|
||||
<xs:attribute name="href" type="xs:anyURI" use="required" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="Collection">
|
||||
<xs:complexType>
|
||||
<xs:complexContent>
|
||||
<xs:extension base="linkCollection">
|
||||
<xs:attribute name="name" type="xs:string" use="required" />
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="bookCollection">
|
||||
<xs:choice maxOccurs="unbounded">
|
||||
|
||||
<xs:element name="Book">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" use="required" />
|
||||
<xs:attribute name="id" type="xs:string" use="required" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="Collection">
|
||||
<xs:complexType>
|
||||
<xs:complexContent>
|
||||
<xs:extension base="bookCollection">
|
||||
<xs:attribute name="name" type="xs:string" use="required" />
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
|
||||
</xs:schema>
|
41
assets/xsd/configurations.xsd
Normal file
41
assets/xsd/configurations.xsd
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="https://book.sukazyo.cc/assets/xsd/configurations.xsd"
|
||||
xmlns="https://book.sukazyo.cc/assets/xsd/configurations.xsd"
|
||||
elementFormDefault="qualified"
|
||||
>
|
||||
|
||||
<xs:complexType name="phb-config-level-site">
|
||||
<xs:all minOccurs="0">
|
||||
<xs:element name="old.title.gen" type="xs:boolean" />
|
||||
<xs:element name="highlightjs" type="xs:boolean" />
|
||||
<xs:element name="highlightjs.languages" type="xs:string" />
|
||||
<xs:element name="highlightjs.theme" type="xs:string" />
|
||||
<xs:element name="codeblock.bg-color" type="xs:string" />
|
||||
<xs:element name="codeblock.fg-color" type="xs:string" />
|
||||
<xs:element name="codeblock.tab-size" type="xs:integer" />
|
||||
<xs:element name="regex.highlight" type="xs:boolean" />
|
||||
<xs:element name="listing.marker.rainbow" type="xs:boolean" />
|
||||
<xs:element name="title.permalink.flash" type="xs:boolean" />
|
||||
<xs:element name="web-title.rolling" type="xs:boolean" />
|
||||
<xs:element name="site.robots" type="xs:string" />
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:attributeGroup name="phb-config-level-page">
|
||||
<xs:attribute name="old.title.gen" type="xs:boolean" />
|
||||
<xs:attribute name="old.title.gen" type="xs:boolean" />
|
||||
<xs:attribute name="highlightjs" type="xs:boolean" />
|
||||
<xs:attribute name="highlightjs.languages" type="xs:string" />
|
||||
<xs:attribute name="highlightjs.theme" type="xs:string" />
|
||||
<xs:attribute name="codeblock.bg-color" type="xs:string" />
|
||||
<xs:attribute name="codeblock.fg-color" type="xs:string" />
|
||||
<xs:attribute name="codeblock.tab-size" type="xs:integer" />
|
||||
<xs:attribute name="regex.highlight" type="xs:boolean" />
|
||||
<xs:attribute name="listing.marker.rainbow" type="xs:boolean" />
|
||||
<xs:attribute name="title.permalink.flash" type="xs:boolean" />
|
||||
<xs:attribute name="web-title.rolling" type="xs:boolean" />
|
||||
</xs:attributeGroup>
|
||||
|
||||
</xs:schema>
|
Loading…
Reference in New Issue
Block a user