2010/1/22 Daniel Veillard <[email protected]>:
> On Wed, Jan 20, 2010 at 08:33:34PM +0100, Elvis Stansvik wrote:
>> 2010/1/19 Daniel Veillard <[email protected]>:
>> > On Fri, Jan 15, 2010 at 05:12:18PM +0100, Elvis Stansvik wrote:
>> >> It validates if I remove the entire <optional> from the <list>.
>> >>
>> >> Any ideas? The code at relaxng.c:8948 indicates that this is a TODO.
>> >> Is that true or is this a real bug and the validator has been put into
>> >> an inconsistent state?
>> >
>> >  Hum, yes I guess it's a bug in libvirt as the given define type seems
>> > not supported there, that construct seems very unusual, since nobody
>> > stepped on it ... until now !
>>
>> libvirt? I guess you meant libxml2 ;)
>
>  Hum, yes, that other project keeps me really busy and I guess I
>  fingers get used to this name now :-)

Figured as much ;)

>
>> Yes, the construct may be unusual. I bumped into it though when trying
>> to validate an OpenDocument document in strict mode using the RelaxNG
>> schemas from OASIS.
>>
>> http://www.oasis-open.org/committees/download.php/12569/OpenDocument-schema-v1.0-os.rng
>> (On line 13737)
>>
>> (Note that you have to validate using
>> http://www.oasis-open.org/committees/download.php/12569/OpenDocument-strict-schema-v1.0-os.rng,
>> which includes the aforementioned file and sets it up for strict
>> validation, for that line to kick in.)
>>
>> What do you say, do you think it's a hard thing to fix?
>
>  I don't know, I need to reimmerse myself in the RNG validation code
> and running it under gdb. It shouldn't be too hard because it's
> attribute value validation though...

Yea, it seems like a pretty self-contained thing.

FYI, when I (just for the heck of it) made a case for
XML_RELAXNG_OPTIONAL identical to the one for XML_RELAXNG_GROUP, it
kind of got me half-way there. It correctly accepted e.g. "1% 2%" and
complained about "1%blah 2%" and "1% 2%blah", so the validation
against the datatype worked for both values if they were present,
however it would no longer accept just "%1"... so only half-way ;)

>
>> This guy (Jos) in the KOffice project is working on an automated test
>> harness for our conversion of other office formats to OpenDocument
>> where he first converts to OpenDocument and then run a validation on
>> the resulting document. This is how the problem was found.
>>
>> It would be nice if the OpenDocument schemas were supported by libxml2
>> since libxml2 is so much more widely available (and leaner!) than
>> Jing.
>
>  Yeah, but I don't think I will have time for a new release very soon,
> even if I fix the problem, so don't hold your breath but I will keep
> your mail as unread to not loose track of the problem,

Great. No hurry at all, we can use Jing until then. Just thought I'd
bring it up since in the long run it would be nice if libxml2 were
capable of validation against the OpenDocument schemas, since it's a
widespread format.

Thanks for your time!

Elvis

>
> Daniel
>
> --
> Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
> [email protected]  | Rpmfind RPM search engine http://rpmfind.net/
> http://veillard.com/ | virtualization library  http://libvirt.org/
>
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to