<?xml version="1.0" encoding="UTF-8" ?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="page">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="page" minOccurs="0" maxOccurs="unbounded" >
        	<xs:annotation>
        		<xs:documentation>
        		This construct reflects hierarchical nature of the any API documentation - packages or 
        		modules include classes and interfaces or functions and constants.</xs:documentation>
        	</xs:annotation>
        </xs:element>
      </xs:sequence>      
      <xs:attribute name="title" type="xs:string" use="required" >
      	<xs:annotation>
      		<xs:documentation>
      		Title of the page resource, for example name of the method, class or tag.
      		</xs:documentation>
      	</xs:annotation>
      </xs:attribute>
      <xs:attribute name="type" use="required">
          <xs:annotation>
	          	<xs:documentation>Attribute indicates the type of the page resource. 
	          	If page describes class properties, then it is "C" or "class".
	          	Short name of the type can used as well as long name
	          	</xs:documentation>
          </xs:annotation>
          <xs:simpleType>
          <xs:restriction base="xs:NMTOKEN">
            <xs:enumeration value="D" />
            <xs:enumeration value="P" />
            <xs:enumeration value="C" />
            <xs:enumeration value="I" />
            <xs:enumeration value="M" />
            <xs:enumeration value="O" />
            <xs:enumeration value="V" />
            <xs:enumeration value="T" />
            <xs:enumeration value="S" />
            <xs:enumeration value="E" />
            <xs:enumeration value="document" />
            <xs:enumeration value="package" />
            <xs:enumeration value="class" />
            <xs:enumeration value="interface" />
            <xs:enumeration value="method" />
            <xs:enumeration value="property" />
            <xs:enumeration value="value" />
            <xs:enumeration value="tag" />
            <xs:enumeration value="style" />
            <xs:enumeration value="event" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="url" type="xs:string" use="required" >
      	<xs:annotation>
      		<xs:documentation>Full URL of the page resource</xs:documentation>
      	</xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>

  <xs:element name="pages">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="page" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

</xs:schema>
