home *** CD-ROM | disk | FTP | other *** search
/ Chip 2011 November / CHIP_2011_11.iso / Programy / Inne / Gry / Enigma / Enigma-1.01-w7.exe / data / schemas / index.xsd < prev    next >
Extensible Markup Language  |  2009-12-13  |  8KB  |  165 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' version="0.2" xml:lang="en">
  3.   <xs:annotation>
  4.     <xs:documentation>
  5.       XML schema definitions for Enigma levelpack index
  6.       Copyright ┬⌐ 2006 Ronald Lamprecht
  7.       GPL2
  8.     </xs:documentation>
  9.   </xs:annotation>
  10.   <xs:element name="index">
  11.     <xs:complexType>
  12.       <xs:sequence>
  13.         <xs:element name="info" minOccurs="1" maxOccurs="1">
  14.           <xs:annotation>
  15.             <xs:documentation>
  16.               Description of the index:
  17.               title    - identifying title of the levelpack
  18.               group    - default levelpack group
  19.               owner    - user name of levelpack creator - "system" for distributed packs
  20.               release  - compatibility version number of levelpack
  21.               revision - modification version number of levelpack
  22.               location - default sorting position of levelpack within a group
  23.               network  - true if levelpack is built for 2-player network game, false for standard single user game
  24.               enigma   - compatibility required Enigma release version.
  25.             </xs:documentation>
  26.           </xs:annotation>
  27.           <xs:complexType>
  28.             <xs:attribute name="title" type="xs:string" use="required"/>
  29.             <xs:attribute name="group" type="xs:string" use="required"/>
  30.             <xs:attribute name="owner" type="xs:string" use="required"/>
  31.             <xs:attribute name="release" type="xs:positiveInteger" use="required"/>
  32.             <xs:attribute name="revision" type="xs:positiveInteger" use="required"/>
  33.             <xs:attribute name="location" type="xs:float" use="required"/>
  34.             <xs:attribute name="network" type="xs:boolean" use="required"/>
  35.             <xs:attribute name="enigma" type="xs:float" use="required"/>
  36.           </xs:complexType>
  37.         </xs:element> <!-- info -->
  38.  
  39.         <xs:element name="update" minOccurs="0" maxOccurs="1">
  40.           <xs:annotation>
  41.             <xs:documentation>
  42.               Url's needed for updates:
  43.               indexurl  - url to obtain updates of the index itself
  44.               levelurl  - url base to download new levels.
  45.             </xs:documentation>
  46.           </xs:annotation>
  47.           <xs:complexType>
  48.             <xs:attribute name="indexurl" type="xs:anyURI" use="required"/>
  49.             <xs:attribute name="levelurl" type="xs:anyURI" use="required"/>
  50.           </xs:complexType>
  51.         </xs:element> <!-- update -->
  52.         
  53.         <xs:element name="attributes" minOccurs="1" maxOccurs="1">
  54.           <xs:annotation>
  55.             <xs:documentation>
  56.               A dictionary for future additions. These attributes will be readable
  57.               by future Lua index extensions.
  58.             </xs:documentation>
  59.           </xs:annotation>
  60.           <xs:complexType>
  61.             <xs:sequence>
  62.               <xs:element name="property" minOccurs="0" maxOccurs="unbounded">
  63.                 <xs:annotation>
  64.                   <xs:documentation>
  65.                     All simple key-value-properties.
  66.                   </xs:documentation>
  67.                 </xs:annotation>
  68.                 <xs:complexType>
  69.                   <xs:attribute name="key" type="xs:string" use="required"/>
  70.                   <xs:attribute name="value" type="xs:string" use="required"/>
  71.                 </xs:complexType>
  72.               </xs:element> <!-- property -->
  73.             </xs:sequence>
  74.           </xs:complexType>
  75.         </xs:element> <!-- attributes -->
  76.  
  77.         <xs:element name="lua" minOccurs="0" maxOccurs="1">
  78.           <xs:annotation>
  79.             <xs:documentation>
  80.               Future Lua index extension. Per levelpack control of level menu
  81.               display, levelpack scoring etc..
  82.               Possible elements are: luamain-CDATA, i18n
  83.               Possible attributes are: libpath
  84.             </xs:documentation>
  85.           </xs:annotation>
  86.           <xs:complexType>
  87.             <xs:sequence>
  88.               <xs:any namespace="##targetNamespace" minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
  89.             </xs:sequence>
  90.             <xs:anyAttribute namespace="##targetNamespace" processContents="skip"/>
  91.           </xs:complexType>
  92.         </xs:element> <!-- lua -->
  93.         
  94.         <xs:element name="levels" minOccurs="1" maxOccurs="1" >
  95.           <xs:annotation>
  96.             <xs:documentation>
  97.               The sequence of the level elements is the sequence of levels in the pack.
  98.             </xs:documentation>
  99.           </xs:annotation>
  100.           <xs:complexType>
  101.             <xs:sequence>
  102.               <xs:element name="level" minOccurs="0" maxOccurs="unbounded" >
  103.                 <xs:annotation>
  104.                   <xs:documentation>
  105.                     The attributes either identify a level, are cached from the level
  106.                     metadata to avoid unnecessary level loads or describe variation from
  107.                     the level default. See the level description in the reference manual
  108.                     for more information on the single attributes:
  109.                     _seq    - an auto generated counter just for human readability that will never be used
  110.                     _title  - cached level title
  111.                     _xpath  - identifying relative path, url or normed oxyd identifier of the level
  112.                     id      - identifying level id
  113.                     author  - cached level author name
  114.                     score   - cached score version of level
  115.                     rel     - identifying release version of level
  116.                     rev     - identifying revision version of level that announces level updates
  117.                     easy    - cached has easy mode level flag
  118.                     ctrl    - variation in control of level default
  119.                     unit    - variation in score unit of level default
  120.                     target  - variation in score target of level default
  121.                     Attributes with leading underscore are just named this way to generate human
  122.                     readable indices. Future attribute additions are transparent to Enigma 1.0 -
  123.                     they will be ignored but are maintained on all index modifications.
  124.                   </xs:documentation>
  125.                 </xs:annotation>
  126.                 <xs:complexType>
  127.                   <xs:attribute name="_seq" type="xs:positiveInteger" use="optional"/>
  128.                   <xs:attribute name="_title" type="xs:string" use="required"/>
  129.                   <xs:attribute name="_xpath" type="xs:string" use="required"/>
  130.                   <xs:attribute name="id" type="xs:string" use="required"/>
  131.                   <xs:attribute name="author" type="xs:string" use="required"/>
  132.                   <xs:attribute name="score" type="xs:positiveInteger" use="required"/>
  133.                   <xs:attribute name="rel" type="xs:positiveInteger" use="required"/>
  134.                   <xs:attribute name="rev" type="xs:unsignedShort" use="required"/>
  135.                   <xs:attribute name="easy" type="xs:boolean" use="required"/>
  136.                   <xs:attribute name="ctrl" type="controlType" use="required"/>
  137.                   <xs:attribute name="unit" type="scoreunitType" use="required"/>
  138.                   <xs:attribute name="target" type="xs:string" use="required"/>
  139.                   <xs:anyAttribute namespace="##targetNamespace" processContents="skip"/>
  140.                 </xs:complexType>
  141.               </xs:element> <!-- level -->
  142.             </xs:sequence>
  143.           </xs:complexType>
  144.         </xs:element> <!-- levels -->
  145.         <xs:any namespace="##targetNamespace" minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
  146.       </xs:sequence>
  147.     </xs:complexType>
  148.   </xs:element> <!-- index -->
  149.  
  150.   <xs:simpleType name="controlType">
  151.     <xs:restriction base="xs:string">
  152.       <xs:enumeration value="force"/>
  153.       <xs:enumeration value="balance"/>
  154.       <xs:enumeration value="key"/>
  155.       <xs:enumeration value="other"/>
  156.     </xs:restriction>
  157.   </xs:simpleType>
  158.   <xs:simpleType name="scoreunitType">
  159.     <xs:restriction base="xs:string">
  160.       <xs:enumeration value="duration"/>
  161.       <xs:enumeration value="number"/>
  162.     </xs:restriction>
  163.   </xs:simpleType>
  164. </xs:schema>
  165.