Re: [xml] Question about error reporting when using key / keyref constraints in Schema
- From: Kasimier Buchcik <kbuchcik 4commerce de>
- To: GUY Fabrice <fabrice guy gmail com>
- Cc: "xml gnome org" <xml gnome org>
- Subject: Re: [xml] Question about error reporting when using key / keyref constraints in Schema
- Date: Tue, 13 Sep 2005 19:57:34 +0200
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
Would it be possible to have the name of the constraint in the output message ?
It's in Libxml2 2.6.22 now. Sorry for the delay; I actually forgot
about this issue. A good reminder to use bugzilla instead of trusting
my memory :-)
Regards,
Kasimier
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]