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

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

From: Priscilla Walmsley <priscilla@walmsley.com>
Date: Tue, 3 Jul 2001 09:25:41 -0400
To: "'Jeff Rafter'" <jeffrafter@definedweb.com>, <vdv@dyomedea.com>, "'Henry S. Thompson'" <ht@cogsci.ed.ac.uk>
Cc: <xmlschema-dev@w3.org>
Message-ID: <004701c103c3$b0ebe440$3182ce0a@xmls>
Hi Jeff,

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

It is not already invalid, and yes, it would become invalid if it referenced
"r2".

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

When Henry said "failure", I believe he was talking specifically about a
failure of the key reference to find an appropriate key, not a general
validity problem.  But yes, it is the _reference_ that is invalid, not the
fact that there are two occurrences of "r2".

>
> Thanks for the info...
> Jeff Rafter
> Defined Systems
> http://www.defined.net
> XML Development and Developer Web Hosting
>
>
Priscilla Walmsley
Vitria Technology
Received on Tuesday, 3 July 2001 09:25:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:22 GMT