<?xml version="1.0"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:complexType name="publisher">
  <xsd:simpleContent>
    <xsd:extension base="xsd:string">
      <xsd:attribute name="href" type="xsd:string"/>
    </xsd:extension>
  </xsd:simpleContent>
</xsd:complexType>

<xsd:complexType name="cite">
  <xsd:simpleContent>
    <xsd:extension base="xsd:string">
      <xsd:attribute name="label" type="xsd:string"/>
    </xsd:extension>
  </xsd:simpleContent>
</xsd:complexType>

<xsd:complexType name="series">
  <xsd:simpleContent>
    <xsd:extension base="xsd:string">
      <xsd:attribute name="href" type="xsd:string"/>
    </xsd:extension>
  </xsd:simpleContent>
</xsd:complexType>

<!-- ************************************************************************************************* -->
<xsd:complexType name="proceedings">
  <xsd:choice maxOccurs="unbounded">
    <xsd:element name="address" type="xsd:string" minOccurs="0"/>
    <xsd:element name="author" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element name="booktitle" type="xsd:string" minOccurs="0"/>
    <xsd:element name="cite" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element name="crossref" type="xsd:string" minOccurs="0"/>
    <xsd:element name="editor" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element name="ee" type="xsd:string" minOccurs="0"/>
    <xsd:element name="isbn" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element name="journal" type="xsd:string" minOccurs="0"/>
    <xsd:element name="month" type="xsd:string" minOccurs="0"/>
    <xsd:element name="note" type="xsd:string" minOccurs="0"/>
    <xsd:element name="number" type="xsd:string" minOccurs="0"/>
    <xsd:element name="publisher" type="publisher" minOccurs="0"/>
    <xsd:element name="series" type="series" minOccurs="0"/>
    <xsd:element name="title" type="xsd:string" maxOccurs="unbounded"/>
    <xsd:element name="url" type="xsd:string" minOccurs="0"/>
    <xsd:element name="volume" type="xsd:string" minOccurs="0"/>
    <xsd:element name="year" type="xsd:string"/>
  </xsd:choice>
  <xsd:attribute name="key" type="xsd:string" use="required"/>
  <xsd:attribute name = "mdate" type="xsd:string" />
</xsd:complexType>

<xsd:complexType name="inproceedings">
  <xsd:choice maxOccurs="unbounded">
    <xsd:element name="author" type="xsd:string" maxOccurs="unbounded"/>
    <xsd:element name="title" type="xsd:string"/>
    <xsd:element name="pages" type="xsd:string" minOccurs="0"/>
    <xsd:element name="year" type="xsd:string"/>
    <xsd:element name="month" type="xsd:string" minOccurs="0"/>
    <xsd:element name="number" type="xsd:string" minOccurs="0"/>
    <xsd:element name="crossref" type="xsd:string" minOccurs="0"/>
    <xsd:element name="booktitle" type="xsd:string"/>
    <xsd:element name="ee" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element name="url" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element name="cdrom" type="xsd:string" minOccurs="0"/>
    <xsd:element name="cite" type="cite" minOccurs="0" maxOccurs="unbounded"/>
    <!--
    <xsd:element name="note" type="xsd:string" minOccurs="0"/>
    -->
  </xsd:choice>
  <xsd:attribute name="key" type="xsd:string" use="required"/>
  <xsd:attribute name = "mdate" type="xsd:string" />
</xsd:complexType>

<xsd:complexType name="article">
  <xsd:choice maxOccurs="unbounded">
    <xsd:element name="author" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
<!--    <xsd:element name="cdrom" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element name="cite" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
-->
    <xsd:element name="editor" type="xsd:string" minOccurs="0"/>
    <xsd:element name="ee" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element name="journal" type="xsd:string"/>
    <xsd:element name="month" type="xsd:string" minOccurs="0"/>
    <xsd:element name="number" type="xsd:string" minOccurs="0"/>
    <xsd:element name="pages" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element name="publisher" type="xsd:string" minOccurs="0"/>
    <xsd:element name="title" type="xsd:string"/>
    <xsd:element name="url" type="xsd:string" minOccurs="0"/>
    <xsd:element name="volume" type="xsd:string" minOccurs="0"/>
    <xsd:element name="year" type="xsd:string"/>
    <xsd:element name="crossref" type="xsd:string" minOccurs="0"/>
    <xsd:element name="booktitle" type="xsd:string" minOccurs="0"/>
 </xsd:choice>
  <xsd:attribute name="key" type="xsd:string" use="required"/>
<!--  <xsd:attribute name="rating" type="xsd:string"/>
  <xsd:attribute name="reviewid" type="xsd:string"/> -->
  <xsd:attribute name = "mdate" type="xsd:string" />
 
</xsd:complexType>

<xsd:complexType name="www">
  <xsd:sequence>
    <xsd:element name="author" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element name="title" type="xsd:string"/>
    <xsd:element name="url" type="xsd:string"/>
    <!--
    <xsd:element name="editor" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element name="booktitle" type="xsd:string" minOccurs="0"/>
    <xsd:element name="year" type="xsd:string" minOccurs="0"/>
    -->
  </xsd:sequence>
  <xsd:attribute name="key" type="xsd:string" use="required"/>
  <xsd:attribute name = "mdate" type="xsd:string" />
</xsd:complexType>

<!-- ************************************************************************************************* -->

<xsd:complexType name="dblp">
  <xsd:choice maxOccurs="unbounded">
    <xsd:element name="article" type="article" maxOccurs="unbounded">
    </xsd:element>
    <xsd:element name="inproceedings" type="inproceedings" maxOccurs="unbounded">
    </xsd:element>
    <!-- <xsd:element name="proceedings" type="proceedings" maxOccurs="unbounded"/> -->
    <xsd:element name="www" type="www" maxOccurs="unbounded"/>
  </xsd:choice>
</xsd:complexType>

<xsd:element name="dblp" type="dblp">
    <xsd:key name = "articleKey">
        <xsd:selector xpath =  ".//article" />
        <xsd:field xpath =  "@key" />
    </xsd:key>
    <xsd:key name = "inproceedingsKey">
        <xsd:selector xpath =  ".//inproceedings" />
        <xsd:field xpath =  "@key" />
    </xsd:key>
</xsd:element>
    

</xsd:schema>
