<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
    ns="http://jelix.org/ns/project/1.0"
    datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
    >

   <include href="item_infos.rng">
      <define name="dependencies">
         <element name="dependencies">
            <element name="jelix">
               <attribute name="maxversion" />
               <attribute name="minversion" />
            </element>
         </element>
      </define>
   </include>

   <start>
      <element name="project">
         <ref name="info" />
         <optional>
            <ref name="notes" />
         </optional>
         <ref name="dependencies" />
         <optional>
            <ref name="directories"/>
         </optional>
         <ref name="entrypoints"/>
      </element>
   </start>


   <define name="directories">
      <!-- this element contains path of different directories
      this is useful only for IDE or other developement tools
      it is not used by jelix itself -->
      <element name="directories">
         <!-- following elements should contains a relative path to the application directory -->
         <element name="config"><text/></element>
         <element name="log"><text/></element>
         <element name="var"><text/></element>
         <element name="www"><text/></element>
         <element name="temp"><text/></element>
      </element>
   </define>
   
   <define name="entrypoints">
      <element name="entrypoints">
         <oneOrMore>
            <element name="entry">
               <!-- relative path of the php file to the www directory -->
               <attribute name="file" />
               <!-- relative path of the ini file to the config directory -->
               <attribute name="config" />
               <!-- type of the entry point 'classic', 'soap'...-->
               <optional>
                  <attribute name="type" />
               </optional>
            </element>
         </oneOrMore>
      </element>
   </define>

</grammar>