Subject: | RelaxNG validation error messages |
Date: | Wed, 07 Mar 2007 17:37:06 +0000 |
To: | bug-XML-LibXML [...] rt.cpan.org |
From: | Karl Lloyd <karl.lloyd [...] bbc.co.uk> |
Distribution name and version: XML-LibXML-1.62
Perl version: v5.8.8
Operating System vendor and version: Linux 2.6.17-11-generic (Ubuntu)
Description:
Validation error case 'a': Expected sub-element is missing in
interleaved element.
Validation error case 'b': Unexpected sub-element found in interleaved
element.
Using XML::LibXML::RelaxNG::validate($xmlfoo) method, unless the extra
sub-element in case b is found AFTER all the expected elements, both
cases generate the same error message:
Element missing
Expecting an element rules, got nothing
Invalid sequence in interleave
Element foo failed to validate content
Obviously, this error message is correct for case a, but NOT for case b.
Please see attached example script and README.
(I think the error is somewhere around lines 9226-9246 of relaxng.c, in
particular, the if block 9242-9246 can never be executed, as ret is
always = 0. Perhaps the writer intended to set ret to something non-zero
before the break on line 9227, and issue a
VALID_ERR2(XML_RELAXNG_ERR_INTEREXTRA, cur->name) instead of
VALID_ERR(XML_RELAXNG_ERR_INTERSEQ) on line 9243 ???)
http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
Message body not shown because it is not plain text.