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

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
node:
<quote>
{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.
</quote>
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
-------------------------------------------------------
George Cristian Bina mailto:george@oxygenxml.com
<oXygen/> XML Editor and XSLT Editor/Debugger
http://www.oxygenxml.com/


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