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