Re: [xml] Possible bug with schema validation in combination with xsi:nil

On Thu, Feb 28, 2013 at 01:43:47PM +0100, Thomas Gamper wrote:
Am 28.02.2013 12:07, schrieb Daniel Veillard:
On Fri, Feb 08, 2013 at 02:04:34PM +0100, Thomas Gamper wrote:
So, attached you find a patch diffed against git master which fixes
the issue. There is no point doing a regexp validation of further
content if there actually *IS* no further content because the
element is nil. I also checked that validation of an element which
has xsi:nil="true" but contains child elements still fails as it
  Hi TOM,

 thanks for checking the issue.
I don't know XSD very well but that seems to make sense.
However running the regression tests, "make check" now reports:
## Schemas regression tests
Result for ./test/schemas/bug323510_0.xml on
./test/schemas/bug323510_1.xsd failed
File ./test/schemas/bug323510_1.xsd generated an error
Result for ./test/schemas/choice_4.xml on ./test/schemas/choice_0.xsd
File ./test/schemas/choice_0.xsd generated an error

  if I apply the patch.
So my guess is that there is a side effect to your patch. Probably
about the removale of the second test part where (ret == 0).

So I rewrote it to minimize change to existing code paths and
that smaller patch seems to work with your test case and pass
make check. The specific testsuite run is also unmodified.

So I pushed that:

  can you double check it works for your full use case ?

   thanks !


It's working fine. Thank you very much!

  great, thanks for the fast feedback !


Daniel Veillard      | Open Source and Standards, Red Hat
veillard redhat com  | libxml Gnome XML XSLT toolkit | virtualization library

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]