W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2004

Re: Unique element identifiers across attributes

From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Sat, 31 Jan 2004 11:21:47 +0000
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Cc: xmlschema-dev@w3.org
Message-ID: <f5b1xpg4b3o.fsf@erasmus.inf.ed.ac.uk>

I'm not sure from your examples exactly what you want, because it's
not clear what's accidental and what's essential.  Stipulate that
there's some scoping element 'scope', which is the domain within which
the key is unique.  Then I _think_ the following is the closest you
can get to what you want, but it doesn't quite work:

<xs:element name="scope">
 . . .
 <xs:unique name="tricky">
  <xs:select xpath="a|b"/>
  <xs:field xpath="@n|@m"/>

This fails because the field selects more than one key in the
<a n='x' m='x'/> case.

Sorry.  If you could say a bit more about the element structure of
your documents, it might turn out that there is a solution.

 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                     Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
            Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                   URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Saturday, 31 January 2004 06:22:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:17 UTC