- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 20 Jun 2001 14:59:21 +0100
- To: "Uwe Zeise" <uwezeise@yahoo.de>
- Cc: <www-xml-schema-comments@w3.org>
"Uwe Zeise" <uwezeise@yahoo.de> writes: > Hi folks, > > How can I achieve via "unique" that the element "id" is unique within the whole document ? > > <root> > > <postition> > <id>100</id> > </postition> > <postion> > <id>101</id> > </postion> > > <anotherpostion> > <dummy> > <id>102</id> > </dummy> > </anotherposition> > > </root> > > XML-Schema: > > <element name="root"> <snip/> > <unique name="idMustBeUnique"> > <selector xpath=".//id"/> <------------- Is that one correct ? > <field xpath="."/> > </unique> > </element> Looks right to me. ht -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh W3C Fellow 1999--2001, part-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk URL: http://www.ltg.ed.ac.uk/~ht/
Received on Wednesday, 20 June 2001 09:59:20 UTC