W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2001

More key/keyref (was: Re: key/keyref problem and Re: keyRef scope and Xerces Parser !?)

From: Jeff Rafter <jeffrafter@definedweb.com>
Date: Tue, 3 Jul 2001 02:27:20 -0700
Message-ID: <00e201c103a2$5c7e2240$f181fea9@lazarus>
To: <vdv@dyomedea.com>, "Henry S. Thompson" <ht@cogsci.ed.ac.uk>, <priscilla@walmsley.com>
Cc: <xmlschema-dev@w3.org>
Hi all,

I have been following the key/keyref discussion from a distance and am left
with a couple more wrap-up questions:

How do the recent discussions between Priscilla and Eric reflect upon the
earlier questions (6/27) about Xerces and scope between Eric and Henry
Thompson?  My main confusion/question appears in Henry's example:

> <company>
>  <division>
>    <section>
>       <employee role='r1'>...</employee>
>       <employee role='r2'>...</employee>
>       <employee role='r3'>...</employee>
>       <employee role='r4'>...</employee>
>    </section>
>    <section>
>       <employee role='r1'>...</employee>
>       <employee role='r2'>...</employee>
>       <employee role='r4'>...</employee>
>       <employee role='r6'>...</employee>
>    </section>
>    <section>
>       <employee role='r5'>...</employee>
>       <employee role='r2'>...</employee>
>       <employee role='r7'>...</employee>
>       <employee role='r6'>...</employee>
>    </section>
>    . . .
>    <committees>
>      <committee>
>       <member ref='r3'/>
>       . . .
>      </committee>
>      . . .
>     </committees>
>   </division>
>   . . .
> </company>

[schema at end of mail]

If the member element had chosen to refer to "r2" would this example become
invalid (or is it that it is already invalid)? This thinking progresses from
Eric's example and Priscilla's response :

> The instance is not valid because, as you point out,
> the keyref does not reference a single key sequence. If your instance had
> contained <keyref ref="1"/> it _would_ be valid.

I am troubled by the notion that the reference changes the usage of the key
as Eric understands it and I am just trying to fill it out more completely.
Is this what Henry means by:

> The difference between the simple case where the two share scope and
> this case is that in the first a failure always means a missing key,
> and the latter it may mean a missing key, _or_ multiple occurrences of
> a key.

Would this be more accurate if it read "_or_ a reference to a key with
multiple occurences" or is it better as it was written.  Also is this a
point that conforming parsers may give alternate treatments?This stuff
definitely belongs in the Schema FAQ.

Thanks for the info...
Jeff Rafter
Defined Systems
XML Development and Developer Web Hosting
Received on Tuesday, 3 July 2001 05:27:48 UTC

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