1
0
mirror of https://github.com/suk-ws/ph-Bookshelf.git synced 2024-12-05 09:26:52 +08:00
ph-Bookshelf/assets/xsd/bookshelf.xsd

75 lines
2.1 KiB
XML

<?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>