relaxng: mark group <description>s as optional

Various groups used in comps-eln*.xml.in don't have descriptions.
I assume that this is on purpose because they are marked as
<uservisible>false</uservisible>.

An alternative would be to add <_description>s everywhere, but then
we'd also need to do translations.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-12-03 12:27:08 +01:00
parent b4f7e942b2
commit 8c64068fe2

View File

@ -228,16 +228,18 @@
<ref name="ID"/> <ref name="ID"/>
</element> </element>
<choice> <choice>
<!-- Either we have one _name and one _description (comps.xml.in) --> <!-- Either we have one _name and an optional _description (comps.xml.in) -->
<group> <group>
<element name="_name"> <element name="_name">
<ref name="string"/> <ref name="string"/>
</element> </element>
<element name="_description"> <optional>
<ref name="string"/> <element name="_description">
</element> <ref name="string"/>
</element>
</optional>
</group> </group>
<!-- Or we have one name, one description, and then zero-or-more <!-- Or we have one name, an optional description, and then zero-or-more
localized names and descriptions following that. --> localized names and descriptions following that. -->
<group> <group>
<element name="name"> <element name="name">
@ -251,17 +253,19 @@
<ref name="string"/> <ref name="string"/>
</element> </element>
</zeroOrMore> </zeroOrMore>
<element name="description"> <optional>
<ref name="string"/>
</element>
<zeroOrMore>
<element name="description"> <element name="description">
<attribute name="xml:lang">
<ref name="locale"/>
</attribute>
<ref name="string"/> <ref name="string"/>
</element> </element>
</zeroOrMore> <zeroOrMore>
<element name="description">
<attribute name="xml:lang">
<ref name="locale"/>
</attribute>
<ref name="string"/>
</element>
</zeroOrMore>
</optional>
</group> </group>
</choice> </choice>
</define> </define>