RE: Identity Constraints

Hi Mark,

We did consider it - in fact, earlier drafts of the recommendation allowed
you to reference an ancestor (..), which would have met your needs in this
case.  In the end, it came down to defining a manageable subset of XPath
that could reasonably and unambiguously be implemented by schema processors
for Version 1, and the ancestor function was removed.  The working group is
aware that this is a limitation for multi-part keys, and is considering it
as a future requirement.

Thanks,
Priscilla

------------------------------------------------------------------
Priscilla Walmsley                          priscilla@walmsley.com
Vitria Technology                            http://www.vitria.com
Author, Definitive XML Schema                  (Prentice Hall PTR)
------------------------------------------------------------------

> -----Original Message-----
> From: xmlschema-dev-request@w3.org
> [mailto:xmlschema-dev-request@w3.org]On Behalf Of Mark Thornton
> Sent: Friday, March 08, 2002 9:20 AM
> To: 'priscilla@walmsley.com'; xmlschema-dev@w3.org
> Subject: RE: Identity Constraints
>
>
> Thanks,
> 	while I am glad that I had interpreted the standard
> correctly, I am
> also disappointed that the functionality I seek isn't available. As it
> happens this problem occurs with a processor I wrote myself so I have
> extended it to do what I want. As you might expect the column
> names aren't
> globally unique, and adding the table name as an attribute to
> each column
> then requires a check that all the columns in a particular
> table actually
> specify that table name and not some other name.
>
> Do you know if the schema standard authors considered this
> type of identity
> constraint and, if so, why it was rejected?
>
> -----Original Message-----
> From: Priscilla Walmsley [mailto:priscilla@walmsley.com]
> Sent: 08 March 2002 13:58
> To: 'Mark Thornton'; xmlschema-dev@w3.org
> Subject: RE: Identity Constraints
>
>
> Hi Mark,
>
> You're right - that's a known issue with the recommendation
> [1]. It will be
> listed in the errata.  I agree with Jeni that you are going to have
> difficulty expressing exactly what you want to express using
> XML Schema,
> unless the column's "name" attributes are unique across all
> table elements.
> You could replicate the table name as an attribute on the
> column name, e.g.
>
> <column tableName="addresses" name="street"/>
>
>
> Hope that helps,
> Priscilla
>
> [1] http://www.w3.org/2001/05/xmlschema-rec-comments#pfiPrimerIDConst
>
>
> ------------------------------------------------------------------
> Priscilla Walmsley                          priscilla@walmsley.com
> Vitria Technology                            http://www.vitria.com
> Author, Definitive XML Schema                  (Prentice Hall PTR)
> ------------------------------------------------------------------
>
>

Received on Friday, 8 March 2002 10:18:36 UTC