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



Am 07.02.2013 17:56, schrieb Csaba Raduly:
On Thu, Feb 7, 2013 at 4:47 PM, Thomas Gamper  wrote:
Hi!

I ran into issues with libxml2 xml validation with schemas as soon as i
started using the xsi:nil attribute. Attached you find a reduced version of
the schema I am using (zenotrack-pilot.xsd + all the dependencies it needs)
and two test cases:

GetNextMessageResponse.xml which does not validate with with xmllint
(xmllint --schema zenotrack-pilot.xsd GetNextMessageResponse.xml)
GetMessagesResponse, which is extremely similar to the first testcase, but
does validate with xmllint (xmllint --schema zenotrack-pilot.xsd
GetMessagesResponse.xml)

I did try libxml2 2.7.7, 2.7.8 and 2.9.0. I did a debug build of libxml2
2.9.0 on Win64 and stepped with the debugger through the code, but it is
simply to complex for me to understand what is actually going on. All I saw
was that the nil attribute was recognized as such, but later one validation
failed for reasons I do not understand.

Probably I am not seeing the obvious, but still I would like to ask for help
if there is actually something wrong with libxml2 in this case.
It is almost certainly a bug in libxml2: I tried your files with a
validator based on Xerces-C and both passed.

Csaba
The validator integrated into Visual Studio seems to validate both files fine too.

Thanks,
TOM



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