On Tue, Feb 28, 2012 at 6:00 AM, Daniel Veillard <veill...@redhat.com> wrote: > On Mon, Feb 27, 2012 at 12:17:43PM -0000, Pete Cordell wrote: >> I think it's fair to say that Daniel isn't a great fan is XML XSD >> Schema, so I imagine it won't be fixed too quickly. I think > > In general I'm slow at anything not extremely urgent, I tried to > clone() but I'm afraid that will be very vey slow and unlikely to > achieve the intended effect and actually detrimental to my current > efficiency :-) > > Well in that case it seems the underlying code is generating a > wrong automata so it should be a matter of running that minimal > test case under gdb with the breakpoint appropriately set to find out > what wrong transition got added ... > > BTW thanks for making a minimalist case it is clearly a bug !
Hi Daniel, Thanks for taking a look already. I'm afraid I won't be able to contribute much more than reporting the bug and providing the test case. Diving into the code myself is a bit out of scope for me at the moment (also, I'm on Windows, and I don't know how hard it is to build libxml2 from source on Windows --- in my experience that's often a lot harder than on *nix :-/ ). So it'd be great if you or anyone else can tackle this. If not, I won't hold it against you :-). I know time is limited for everyone. >> libxml2's support for Relax NG is better. It might be worth seeing >> if you can do what you want with that. I've never tried it, but by >> all accounts Trang should be able to give you a start at converting >> your XSD to Relax NG if your schema is non-trivial. > > Well libxml2 RNG algorithm works well in general except for the > error reporting which is simply bad, blame partly my algorithm, and > partly the flexibility of RNG making precise pinpointing of the > problem harder. RelaxNG is also not a good solution for us, because we want to use a single schema for validation of this XML in various different tools, and I'm not sure how well those other tools support RelaxNG: - XML Spy: validate against the schema in the editor. - SVN pre-commit hook: refuse commits that don't comply (here we use xmllint). - Post-commit: regularly our continuous-integration server also validates the xml files against the schema (together with some additional (semantic) checks). This is done with Xerces. Here we could maybe say that the schema validation is overkill, because invalid XML's won't be committed because of the pre-commit check (actually, the post-commit validation was there first, and we are only now adding the pre-commit validation, so that's why we now encountered the bug in libxml2). Cheers, -- Johan _______________________________________________ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml