Correct invalid RNG schemas

The 'trang' utility, which is able to transform '.rng' files into
'.rnc' files, reported some errors in our schemas that weren't caught
by the tools we use in the build.  I haven't added a test for this,
but the validity can be checked by the following command:

trang -I rng -O rnc domain.rng domain.rnc

There were unescaped minuses in regular expressions and we were
constraining int (which is by default in the range of [-2^31;2^31-1]
to maximum of 2^32.  But what we wanted was exactly an unsignedInt.
This commit is contained in:
Martin Kletzander 2013-03-19 12:26:02 +01:00
parent 03122d7baf
commit 28933c5574
2 changed files with 9 additions and 12 deletions

View File

@ -3929,7 +3929,7 @@
</define>
<define name='aliasName'>
<data type="string">
<param name="pattern">[a-zA-Z0-9_-]+</param>
<param name="pattern">[a-zA-Z0-9_\-]+</param>
</data>
</define>
<define name='alias'>

View File

@ -308,25 +308,25 @@
<choice>
<value>root</value>
<data type="string">
<param name="pattern">mac[a-zA-Z0-9_\.:-]{0,9}</param>
<param name="pattern">mac[a-zA-Z0-9_\.:\-]{0,9}</param>
</data>
<data type="string">
<param name="pattern">stp[a-zA-Z0-9_\.:-]{0,9}</param>
<param name="pattern">stp[a-zA-Z0-9_\.:\-]{0,9}</param>
</data>
<data type="string">
<param name="pattern">vlan[a-zA-Z0-9_\.:-]{0,8}</param>
<param name="pattern">vlan[a-zA-Z0-9_\.:\-]{0,8}</param>
</data>
<data type="string">
<param name="pattern">arp[a-zA-Z0-9_\.:-]{0,9}</param>
<param name="pattern">arp[a-zA-Z0-9_\.:\-]{0,9}</param>
</data>
<data type="string">
<param name="pattern">rarp[a-zA-Z0-9_\.:-]{0,8}</param>
<param name="pattern">rarp[a-zA-Z0-9_\.:\-]{0,8}</param>
</data>
<data type="string">
<param name="pattern">ipv4[a-zA-Z0-9_\.:-]{0,8}</param>
<param name="pattern">ipv4[a-zA-Z0-9_\.:\-]{0,8}</param>
</data>
<data type="string">
<param name="pattern">ipv6[a-zA-Z0-9_\.:-]{0,8}</param>
<param name="pattern">ipv6[a-zA-Z0-9_\.:\-]{0,8}</param>
</data>
</choice>
</attribute>
@ -950,10 +950,7 @@
<param name="pattern">0x[0-9a-fA-F]{1,8}</param>
</data>
<data type="int">
<param name="minInclusive">0</param>
<param name="maxInclusive">4294967295</param>
</data>
<data type="unsignedInt"/>
</choice>
</define>