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

Re: identity constraints and substitution groups

From: Bob Schloss <rschloss@us.ibm.com>
Date: Tue, 19 Mar 2002 17:28:35 -0500
To: Mark Thornton <mthornton@optrak.co.uk>, xmlschema-dev@w3.org
Message-ID: <OF2C57E895.29C42CE5-ON85256B81.007B2DE8@pok.ibm.com>

They have to match the actual name of an element.
Note that you can use | to create an XPath in <xs:selector> or <xs:field>
which is the OR of XPaths, so this may allow you to do what you want, at
the cost of explicitly considering all the substitutions in every
identity-definition constraint you write.

Bob Schloss
IBM T. J. Watson Research Center

Mark Thornton <mthornton@optrak.co.uk>@w3.org on 03/19/2002 11:08:39 AM

Sent by:    xmlschema-dev-request@w3.org

To:    "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Subject:    identity constraints and substitution groups

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.e.  suppose

<xs:element name='column'/>
<xs:element name='specialColumn' substitutionGroup='column'/>

<xs:key name='kColumn'>
    <xs:selector xpath='column'/>
    <!-- etc -->

Will the selector match 'specialColumn' elements as well as 'column'

Mark Thornton
Received on Tuesday, 19 March 2002 17:29:50 UTC

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