<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >

    <!-- PDFDocument, the root element -->	            
    <xs:element name="PDFDocument">
        <xs:complexType>
            <xs:element ref="PDFInfo"/>
            <xs:element ref="Pages"/>
        </xs:complexType>
    </xs:element>
    
    <!-- PDFInfo, this element contain the summary information about the pdf file -->	     
    <xs:element name="PDFInfo">
        <xs:complexType>
            <xs:element name="Title"      type="xs:string"/>
            <xs:element name="Subject"    type="xs:string"/>
            <xs:element name="Author"     type="xs:string"/>
            <xs:element name="Creator"    type="xs:string"/>
            <xs:element name="Producer"   type="xs:string"/>
            <xs:element name="CreateDate" type="xs:string"/>
            <xs:element name="KeyWords"   type="xs:string"/>
        </xs:complexType>
    </xs:element>
    
    <!-- Pages, contain all the page element -->	 
    <xs:element name="Pages">
        <xs:complexType>
            <xs:element ref="Page" minOccurs="0"  maxOccurs="unbounded"/>
        </xs:complexType>
    </xs:element>
    
    <!-- Page, text information and page number were stored in this element-->	 
    <xs:element name="Page">
        <xs:complexType>
            <xs:element name="PageNumber" type="xs:integer"/>
            <xs:element ref="PDFElement" minOccurs="0"  maxOccurs="unbounded"/>
        </xs:complexType>
    </xs:element>

    <!-- PDFElement, contain information about every piece of text extracted from the pdf file -->	 
    <xs:element name="PDFElement">
        <xs:complexType>
            <xs:element name="Coordinate_X" type="xs:integer"/>
            <xs:element name="Coordinate_Y" type="xs:integer"/>
            <xs:element name="DataString"   type="xs:string" />
        </xs:complexType>
    </xs:element>
    
</xs:schema>