Re: identity constraints and substitution groups

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>
cc:
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 -->
</xs:key>

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

Regards,
Mark Thornton

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