info.xmlのスキーマ 0
新しい物好きなので、スキーマ言語はRELAX NGにしてみる。
<?xml version="1.0"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
<start>
<element name="Package">
<interleave>
<element name="Name">
<text/>
</element>
<element name="Version">
<data type="double"/>
</element>
<optional>
<element name="Release">
<text/>
</element>
</optional>
<optional>
<oneOrMore>
<element name="Summary">
<attribute name="lang">
<text>
</attribute>
<text>
</element>
</oneOrMore>
</optional>
<optional>
<element name="Needs">
<zeroOrMore>
<ref name="Need"/>
</zeroOrMore>
</element>
</optional>
<optional>
<element name="Ports">
<zeroOrMore>
<ref name="Port"/>
</zeroOrMore>
</element>
</optional>
</interleave>
</element>
</start>
<define name="Need">
<element name="Need">
<optional>
<attribute name="type">
<choice>
<value>pac</value>
<value>cmd</value>
<value>lib</value>
<value>rpm</value>
</choice>
</attribute>
</optional>
<optional>
<attribute name="newer">
<data type="double"/>
</attribute>
</optional>
<optional>
<attribute name="older">
<data type="double"/>
</attribute>
</optional>
<text/>
</element>
</define>
<define name="Port">
<element name="Port">
<optional>
<attribute name="proto">
<choice>
<value>tcp</value>
<value>udp</value>
</choice>
</attribute>
</optional>
<data type="integer"/>
</element>
</define>
</grammar>ん〜、違うかも。
ルート要素直下の要素は、viverrc的(SAX)には順番はどうでも良いけど、順番を厳格に規定しておいた方が良いかもしれない。