wzab / agwb

Support for automatic address map generation and address decoding logic for Wishbone connected hierachical systems
12 stars 6 forks source link

Certain problems with RelaxNG syntax validation #62

Closed wzab closed 3 years ago

wzab commented 3 years ago

When working on support for "external blocks with fixed internal structure" ( https://github.com/wzab/agwb/issues/61 ), I have found certain problems with RelaxNG validation:

Trying to spot the issue, I have found that even in the master branch, when I modify the line: https://github.com/wzab/agwb/blob/cb8304c5548d74e2cdba873e9d62d181c005a378/tests/test/block1.xml#L1 replacing <block name="SYS1"> with <block nafme="SYS1">, I get the following error message:

wzab@WZabHP:/tmp/agwb/tests/test$ ./generate.sh
<string>:6:0:ERROR:RELAXNGV:RELAXNG_ERR_NOELEM: Expecting an element sreg, got nothing
<string>:0:0:ERROR:RELAXNGV:RELAXNG_ERR_INTEREXTRA: Extra element block in interleave
<string>:6:0:ERROR:RELAXNGV:RELAXNG_ERR_CONTENTVALID: Element sysdef failed to validate content
<block nafme="SYS1">
|
The erroneous line was produced from the following sources:
file: block1.xml, line:1

which is not related to the real cause of the problem. The problem is the incorrect attribute of the "block" element. There is no "sreg" expected!

wzab commented 3 years ago

The problem has been reported in Debian https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=986342 Switching to DTD validation works the problem around.