comps.rng 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  2. <start>
  3. <ref name="comps"/>
  4. </start>
  5. <define name="package-name">
  6. <text/>
  7. </define>
  8. <define name="group-name">
  9. <text/>
  10. </define>
  11. <define name="lang">
  12. <text/>
  13. </define>
  14. <define name="description-text">
  15. <text/>
  16. </define>
  17. <define name="comps">
  18. <element name="comps">
  19. <oneOrMore>
  20. <ref name="group"/>
  21. </oneOrMore>
  22. <ref name="grouphierarchy"/>
  23. <oneOrMore>
  24. <ref name="package"/>
  25. </oneOrMore>
  26. </element>
  27. </define>
  28. <define name="group">
  29. <element name="group">
  30. <element name="id">
  31. <ref name="group-name"/>
  32. </element>
  33. <interleave>
  34. <ref name="names"/>
  35. <optional>
  36. <element name="default">
  37. <choice>
  38. <value>true</value>
  39. <value>false</value>
  40. </choice>
  41. </element>
  42. </optional>
  43. <optional>
  44. <ref name="descriptions"/>
  45. </optional>
  46. <optional>
  47. <element name="uservisible">
  48. <choice>
  49. <value>true</value>
  50. <value>false</value>
  51. </choice>
  52. </element>
  53. </optional>
  54. <optional>
  55. <element name="langonly">
  56. <ref name="lang"/>
  57. </element>
  58. </optional>
  59. </interleave>
  60. <optional>
  61. <element name="grouplist">
  62. <zeroOrMore>
  63. <element name="groupreq">
  64. <ref name="group-name"/>
  65. </element>
  66. </zeroOrMore>
  67. <zeroOrMore>
  68. <element name="metapkg">
  69. <attribute name="type">
  70. <choice>
  71. <value>default</value>
  72. <!-- <value>mandatory</value> ?? -->
  73. <value>optional</value>
  74. </choice>
  75. </attribute>
  76. <ref name="package-name"/>
  77. </element>
  78. </zeroOrMore>
  79. </element>
  80. </optional>
  81. <optional>
  82. <element name="packagelist">
  83. <oneOrMore>
  84. <element name="packagereq">
  85. <attribute name="type">
  86. <choice>
  87. <value>default</value>
  88. <value>mandatory</value>
  89. <value>optional</value>
  90. </choice>
  91. </attribute>
  92. <optional>
  93. <attribute name="requires">
  94. <ref name="package-name"/>
  95. </attribute>
  96. </optional>
  97. <ref name="package-name"/>
  98. </element>
  99. </oneOrMore>
  100. </element>
  101. </optional>
  102. </element>
  103. </define>
  104. <define name="grouphierarchy">
  105. <element name="grouphierarchy">
  106. <oneOrMore>
  107. <ref name="category"/>
  108. </oneOrMore>
  109. </element>
  110. </define>
  111. <define name="category">
  112. <element name="category">
  113. <ref name="names"/>
  114. <optional>
  115. <element name="subcategories">
  116. <oneOrMore>
  117. <element name="subcategory">
  118. <ref name="package-name"/>
  119. </element>
  120. </oneOrMore>
  121. </element>
  122. </optional>
  123. </element>
  124. </define>
  125. <define name="package">
  126. <element name="package">
  127. <element name="name">
  128. <ref name="package-name"/>
  129. </element>
  130. <element name="dependencylist">
  131. <zeroOrMore>
  132. <element name="dependency">
  133. <ref name="package-name"/>
  134. </element>
  135. </zeroOrMore>
  136. </element>
  137. </element>
  138. </define>
  139. <define name="names">
  140. <element name="name">
  141. <ref name="description-text"/>
  142. </element>
  143. <zeroOrMore>
  144. <element name="name">
  145. <attribute name="xml:lang">
  146. <ref name="lang"/>
  147. </attribute>
  148. <ref name="description-text"/>
  149. </element>
  150. </zeroOrMore>
  151. </define>
  152. <define name="descriptions">
  153. <element name="description">
  154. <ref name="description-text"/>
  155. </element>
  156. <zeroOrMore>
  157. <element name="description">
  158. <attribute name="xml:lang">
  159. <ref name="lang"/>
  160. </attribute>
  161. <ref name="description-text"/>
  162. </element>
  163. </zeroOrMore>
  164. </define>
  165. </grammar>