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

RE: Identity Constraints

From: Priscilla Walmsley <priscilla@walmsley.com>
Date: Fri, 8 Mar 2002 08:57:47 -0500
To: "'Mark Thornton'" <mthornton@optrak.co.uk>, <xmlschema-dev@w3.org>
Message-ID: <001101c1c6a9$5b3f43d0$592a6420@vitria.ad.vitriacorp.com>
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,

[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)

> -----Original Message-----
> From: xmlschema-dev-request@w3.org
> [mailto:xmlschema-dev-request@w3.org]On Behalf Of Mark Thornton
> Sent: Thursday, March 07, 2002 12:08 PM
> To: 'xmlschema-dev@w3.org'
> Subject: Identity Constraints
> I am rather confused by some types of multi field identity
> constraints. The
> example in the schema primer: (at
> http://www.w3.org/TR/xmlschema-0/#specifyingUniqueness)
> <unique name="dummy1">
>   <selector xpath="r:regions/r:zip"/>
>   <field    xpath="@code"/>
>   <field    xpath="r:part/@number"/>
>  </unique>
> seems to be what I want, BUT I can't reconcile this with the
> validation
> rules in the standard (3.11.4):
> "3 For each node in the Ětarget node setĚ all of the
> {fields}, with that
> node as the context node, evaluate to either an empty
> node-set or a node-set
> with exactly one member, which must have a simple type."
> Specifically the second field would appear to have multiple
> values for a
> single node in the target set (a 'zip' element).
> Is there a good explanation anywhere of the use of identity
> constraints
> where the fields are not all at the same depth?
> Thanks for any help,
> Mark Thornton
Received on Friday, 8 March 2002 08:55:59 UTC

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