W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2004

Re: Understanding Dawns! But 1 More Question About Keys/Refs...

From: George Cristian Bina <george@sync.ro>
Date: Mon, 2 Aug 2004 22:32:31 +0300
Message-ID: <00aa01c478c7$7e741ba0$30a14d52@notebook>
To: "Jim Stanley" <JimS@Media-Services.Com>, <xmlschema-dev@w3.org>

Hi Jim,

You can look at
http://www.w3.org/TR/xmlschema-1/#Identity-constraint_Definition_details for
more details about the identity constraints.
If you have only one activityRef inside a dayBucket then your representation
will be equivalent with the variant I proposed.
As you can see following the link above the field must identify a single
{fields} specifies XPath expressions relative to each element selected by a
{selector}. This must identify a single node (element or attribute) whose
content or value, which must be of a simple type, is used in the constraint.
It is possible to specify an ordered list of {fields}s, to cater to
multi-field keys, keyrefs, and uniqueness constraints.
but in your case there were more activityRef elements inside a dayBucket.
Moving the activityRef in the selector and selecting the current element
selects all the activityRef elements but also satisfies the condition that
the field selects only one element.

Best Regards,
George Cristian Bina mailto:george@oxygenxml.com
<oXygen/> XML Editor and XSLT Editor/Debugger

----- Original Message -----
From: "Jim Stanley" <JimS@Media-Services.Com>
To: <xmlschema-dev@w3.org>
Sent: Monday, August 02, 2004 7:42 PM
Subject: Re: Understanding Dawns! But 1 More Question About Keys/Refs...

> George,
> Thanks so much!  It worked like a shot.
> Can you explain *why* it works?  If I try and think it through, the
> xpath selector now points explicitly to the field I want to compare, and
> the '.' field just reinforces that.  But why should that work when the
> previous version doesn't?
> Jim Stanley
> Media Services Inc.
Received on Monday, 2 August 2004 15:34:50 UTC

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