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

Re: Unique element identifiers across attributes

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sat, 31 Jan 2004 18:50:39 +0100
To: ht@inf.ed.ac.uk (Henry S. Thompson)
Cc: xmlschema-dev@w3.org
Message-ID: <4031e751.531775142@smtp.bjoern.hoehrmann.de>

* Henry S. Thompson wrote:
>I'm not sure from your examples exactly what you want, because it's
>not clear what's accidental and what's essential.

There should be nothing anything accidental in my examples.

><xs:element name="scope">
> . . .
> <xs:unique name="tricky">
>  <xs:select xpath="a|b"/>
>  <xs:field xpath="@n|@m"/>
> </xs:unique>
></xs:element>
>
>This fails because the field selects more than one key in the
><a n='x' m='x'/> case.

That is my problem.

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

HTML has a similar constraint,

  <a name = 'x' id = 'x'>...</a>

is valid, while the fragments

  <p id = 'x'><a name = 'x'>...</a></p>
  <p id = 'x'><a   id = 'x'>...</a></p>
  ...

are all invalid. The last example is already invalid due to IDness, I
want to make the middle example invalid while keeping the first example
valid.
Received on Saturday, 31 January 2004 12:51:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:41 GMT