- From: odwl <odwl@mac.com>
- Date: Tue, 10 Sep 2002 09:02:04 -0400 (EDT)
- To: xmlschema-dev@w3.org
- Cc: Olivier De Wolf <olivier.dewolf@n-side.be>
Here is an XML document : <?xml version="1.0" encoding="ISO-8859-1"?> <Site xmlns="http://n-side/site/ssShema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://n-side/site/ssShema ../schema/ssSchema.xsd"> <Home name="CorHome"> <Topic name="Your_Needs"> <View name="Choice_1"/> <View name="CorHome"/> <View name="Your_Needs2"/> </Topic> <Topic name="Your_Needs2"> <View name="Choice_3"/> <View name="Choice_4"/> <View name="Choice_3"/> </Topic> <Topic name="Your_Needs"/> </Home> </Site> I would like to have a schema that enforces the uniqueness of all the "name" attributes (for Home, Topic and View elements). The above document is thus not valid (at all). I inserted the following XML Schema fragment within the Site element definition: <unique name="idName"> <selector xpath=".//*"/> <field xpath="@name"/> </unique> But it is not working : there is no validation error for the above document. Note that with the following fragment, it's OK, I have an error because of "Choice_3" appearing twice. <unique name="idName"> <selector xpath=".//View"/> <field xpath="@name"/> </unique> and I have the uniqueness of the name in all the View pages Do I miss something, Thanks in advance Olivier
Received on Tuesday, 10 September 2002 17:22:03 UTC