File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / libxml2 / test / relaxng / comps.rng
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:37:59 2012 UTC (12 years, 10 months ago) by misho
Branches: libxml2, MAIN
CVS tags: v2_9_1p0, v2_9_1, v2_8_0p0, v2_8_0, v2_7_8, HEAD
libxml2

<grammar xmlns="http://relaxng.org/ns/structure/1.0">
<start>
  <ref name="comps"/>
</start>

<define name="package-name">
  <text/>
</define>

<define name="group-name">
  <text/>
</define>

<define name="lang">
  <text/>
</define>

<define name="description-text">
  <text/>
</define>

<define name="comps">
  <element name="comps">
    <oneOrMore>
      <ref name="group"/>
    </oneOrMore>
    <ref name="grouphierarchy"/>
    <oneOrMore>
      <ref name="package"/>
    </oneOrMore>
  </element>
</define>

<define name="group">
  <element name="group">
    <element name="id">
      <ref name="group-name"/>
    </element>
    <interleave>
      <ref name="names"/>
      <optional>
        <element name="default">
          <choice>
            <value>true</value>
            <value>false</value>
          </choice>
        </element>
      </optional>
      <optional>
        <ref name="descriptions"/>
      </optional>
      <optional>
        <element name="uservisible">
          <choice>
            <value>true</value>
            <value>false</value>
          </choice>
        </element>
      </optional>
      <optional>
        <element name="langonly">
	  <ref name="lang"/>
        </element>
      </optional>
    </interleave>
    <optional>
      <element name="grouplist">
        <zeroOrMore>
	  <element name="groupreq">
	    <ref name="group-name"/>
	  </element>
        </zeroOrMore>
        <zeroOrMore>
	  <element name="metapkg">
	    <attribute name="type">
	      <choice>
	        <value>default</value>
	        <!-- <value>mandatory</value> ?? -->
	        <value>optional</value>
	      </choice>
	    </attribute>
	    <ref name="package-name"/>
	  </element>
        </zeroOrMore>
      </element>
    </optional>
    <optional>
      <element name="packagelist">
        <oneOrMore>
          <element name="packagereq">
	    <attribute name="type">
	      <choice>
	        <value>default</value>
	        <value>mandatory</value>
	        <value>optional</value>
	      </choice>
	    </attribute>
	    <optional>
	      <attribute name="requires">
	        <ref name="package-name"/>
	      </attribute>
	    </optional>
	    <ref name="package-name"/>
	  </element>
        </oneOrMore>
      </element>
    </optional>
  </element>
</define>

<define name="grouphierarchy">
  <element name="grouphierarchy">
    <oneOrMore>
      <ref name="category"/>
    </oneOrMore>
  </element>
</define>

<define name="category">
  <element name="category">
    <ref name="names"/>
    <optional>
      <element name="subcategories">
        <oneOrMore>
	  <element name="subcategory">
	    <ref name="package-name"/>
	  </element>
        </oneOrMore>
      </element>
    </optional>
  </element>
</define>

<define name="package">
  <element name="package">
    <element name="name">
      <ref name="package-name"/>
    </element>
    <element name="dependencylist">
      <zeroOrMore>
        <element name="dependency">
	  <ref name="package-name"/>
	</element>
      </zeroOrMore>
    </element>
  </element>
</define>

<define name="names">
  <element name="name">
    <ref name="description-text"/>
  </element>
  <zeroOrMore>
    <element name="name">
      <attribute name="xml:lang">
        <ref name="lang"/>
      </attribute>
      <ref name="description-text"/>
    </element>
  </zeroOrMore>
</define>

<define name="descriptions">
  <element name="description">
    <ref name="description-text"/>
  </element>
  <zeroOrMore>
    <element name="description">
      <attribute name="xml:lang">
        <ref name="lang"/>
      </attribute>
      <ref name="description-text"/>
    </element>
  </zeroOrMore>
</define>

</grammar>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>