W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2002

Re: identity constraints and substitution groups

From: Jeni Tennison <jeni@jenitennison.com>
Date: Tue, 19 Mar 2002 16:40:01 +0000
Message-ID: <197192950508.20020319164001@jenitennison.com>
To: Mark Thornton <mthornton@optrak.co.uk>
CC: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Hi Mark,

> Do the xpath expressions in an identity constraint have to match the
> actual name of an element or is it sufficient to match a
> substitution group?

I'm afraid that they have to match the actual name of the element.
This is one of the examples of how XPath and XML Schema don't really

> I.e.  suppose
> <xs:element name='column'/>
> <xs:element name='specialColumn' substitutionGroup='column'/>
> <xs:key name='kColumn'>
>     <xs:selector xpath='column'/>
>     <!-- etc -->
> </xs:key>

Here, you have to do:

  <xs:key name="kColumn">
    <xs:selector xpath="column | specialColumn" />

and remember to add prefixes if these elements have a target



Jeni Tennison
Received on Tuesday, 19 March 2002 11:40:08 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:55 UTC