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: Thu, 18 Aug 2005 18:58:48 +0200
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 ?
Regards,
Fabrice
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]