home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / boot / i386 / rescue / usr / share / hal / fdi / fdi.rng < prev   
Extensible Markup Language  |  2006-11-29  |  2KB  |  83 lines

  1. <?xml version="1.0"?>
  2. <grammar 
  3.     xmlns="http://relaxng.org/ns/structure/1.0"
  4.     datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
  5. >
  6.     <start>
  7.         <element name="deviceinfo">
  8.             <attribute name="version">
  9.                 <choice>
  10.                     <value>0.1</value>
  11.                     <value>0.2</value>
  12.                 </choice>    
  13.             </attribute>    
  14.             <zeroOrMore>    
  15.                 <ref name="device"/>
  16.             </zeroOrMore>
  17.         </element>    
  18.     </start>
  19.     <define name="device">
  20.         <element name="device">
  21.             <zeroOrMore>
  22.                 <choice>
  23.                     <ref name="match"/>
  24.                     <ref name="merge"/>
  25.                 </choice>
  26.             </zeroOrMore>
  27.         </element>
  28.     </define>
  29.     <define name="match">
  30.         <element name="match">
  31.             <attribute name="key"/>
  32.             <choice>
  33.                 <attribute name="bool">
  34.                     <data type="boolean"/>
  35.                 </attribute>
  36.                 <attribute name="int">
  37.                     <data type="string"/>
  38.                 </attribute>    
  39.                 <attribute name="string">
  40.                     <text/>
  41.                 </attribute>
  42.             </choice>
  43.             <zeroOrMore>
  44.                 <choice>
  45.                     <ref name="match"/>
  46.                     <ref name="merge"/>
  47.                 </choice>
  48.             </zeroOrMore>
  49.         </element>
  50.     </define>
  51.     <define name="merge">
  52.         <element name="merge">
  53.             <attribute name="key"/>
  54.             <choice>
  55.                 <group>
  56.                     <attribute name="type">
  57.                         <value>string</value>
  58.                     </attribute>
  59.                     <text/>
  60.                 </group>
  61.                 <group>
  62.                     <attribute name="type">
  63.                         <value>int</value>
  64.                     </attribute>
  65.                     <data type="int"/>
  66.                 </group>
  67.                 <group>
  68.                     <attribute name="type">
  69.                         <value>bool</value>
  70.                     </attribute>
  71.                     <data type="boolean"/>
  72.                 </group>
  73.                 <group>
  74.                     <attribute name="type">
  75.                         <value>double</value>
  76.                     </attribute>
  77.                     <data type="double"/>
  78.                 </group>
  79.             </choice>
  80.         </element>
  81.     </define>
  82. </grammar>
  83.