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

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
http://www.defined.net
XML Development and Developer Web Hosting

Received on Tuesday, 3 July 2001 05:27:48 UTC