<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           elementFormDefault="qualified">


    <xs:element name="Book">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="Title" type="xs:string"/>
                <xs:element name="Author" type="xs:string"/>
                <xs:element name="Date" type="xs:gYear"/>
                <xs:element name="ISBN" type="xs:string"/>
                <xs:element name="Publisher" type="xs:string" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="BarnesAndNoble">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="Book" maxOccurs="unbounded" />
            </xs:sequence>
            <xs:assert test=".//Publisher = ('Wrox Press', 'New Riders')"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="Borders">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="Book" maxOccurs="unbounded" />
            </xs:sequence>
            <xs:assert test=".//Publisher = ('Wrox Press', 'New Riders')"/>
        </xs:complexType>
    </xs:element>

</xs:schema>