Re: [xml] Question about error reporting when using key / keyref constraints in Schema
- From: GUY Fabrice <fabrice guy gmail com>
- To: xml gnome org
- Subject: Re: [xml] Question about error reporting when using key / keyref constraints in Schema
- Date: Wed, 14 Sep 2005 14:47:44 +0200
Hi,
On 9/13/05, Kasimier Buchcik <kbuchcik 4commerce de> wrote:
Hi,
On Thu, 2005-08-18 at 18:58 +0200, GUY Fabrice wrote:
> > kbu librax:/data/home/kbuchcik/gnomecvs/tests$ xmllint --noout --schema
> > keyref.xsd keyref.xml
> > keyref.xml:6: Schemas validity error : Element 'element2': No match
> > found for key-sequence ['test'] of key reference 'keyref'.
> > keyref.xml fails to validate
> >
> > Is the output OK for you?
>
> I tested the CVS head and the output for my files using keyref are OK
> (thanks for your great work)
>
> But I noticed that for key and unique constraints, there is no more
> indication about the name of the constraint that failed to validate.
> For example the following xml file :
>
> <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
> <ELEMENTS>
> <element>test1</element><element>test1</element>
> </ELEMENTS>
>
> - with libxml2 version 2.6.19 (using the same schema as above) xmllint outputs :
> test-key.xml:3: element element: Schemas validity error : Element
> 'element' [key 'key']: Duplicate key-sequence found.
> test-key.xml fails to validate
>
> - and with libxml2 version 2.6.20
> test-key.xml:3: element element: Schemas validity error : Element
> 'element': Duplicate key-sequence ['test1'].
>
test-key.xml fails to validate
- and with libxml2 version 2.6.22 :
test-key.xml:3: element element: Schemas validity error : Element
'element': Duplicate key-sequence ['test1'] in key identity-constraint
'key'.
test-key.xml fails to validate
The output is OK for me : thanks a lot for your modifications !
A good reminder to use bugzilla instead of trusting
my memory :-)
Ok I'll do this next time,
Regards,
Fabrice
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]