Library configuration validation: Enhance relaxng file (arg elements) (#1698)

Make sure that the elements of function->arg contain no duplicates.
Except for 'minsize' which can be specified zero to many times.
This commit is contained in:
Sebastian 2019-02-26 14:00:54 +01:00 committed by GitHub
parent 61f911d39a
commit d7e219043a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 4 deletions

View File

@ -163,18 +163,31 @@
<text/> <text/>
</attribute> </attribute>
</optional> </optional>
<zeroOrMore>
<choice> <interleave>
<optional>
<element name="formatstr"><empty/></element> <element name="formatstr"><empty/></element>
</optional>
<optional>
<element name="strz"><empty/></element> <element name="strz"><empty/></element>
</optional>
<optional>
<element name="not-bool"><empty/></element> <element name="not-bool"><empty/></element>
</optional>
<optional>
<element name="not-null"><empty/></element> <element name="not-null"><empty/></element>
</optional>
<optional>
<element name="not-uninit"><empty/></element> <element name="not-uninit"><empty/></element>
</optional>
<optional>
<element name="valid"> <element name="valid">
<data type="string"> <data type="string">
<param name="pattern">(-?[0-9]*(\.[0-9]+)?[,:])*([-]?[0-9]+(\.[0-9]+)?)?</param> <param name="pattern">(-?[0-9]*(\.[0-9]+)?[,:])*([-]?[0-9]+(\.[0-9]+)?)?</param>
</data> </data>
</element> </element>
</optional>
<zeroOrMore>
<element name="minsize"> <element name="minsize">
<attribute name="type"> <attribute name="type">
<choice> <choice>
@ -193,6 +206,8 @@
</attribute> </attribute>
</optional> </optional>
</element> </element>
</zeroOrMore>
<optional>
<element name="iterator"> <element name="iterator">
<attribute name="container"> <attribute name="container">
<data type="positiveInteger"/> <data type="positiveInteger"/>
@ -205,8 +220,8 @@
</choice> </choice>
</attribute> </attribute>
</element> </element>
</choice> </optional>
</zeroOrMore> </interleave>
</element> </element>
</zeroOrMore> </zeroOrMore>
</interleave> </interleave>