Re: M&S/Parser question

Stefan Kokkelink wrote:
> <?xml version="1.0"?>
> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>      xmlns:DC="http://purl.org/metadata/dublin_core/">
>  <Bag ID="pages">
>    <li resource="http://foo.org/foo.html" />
>    <li resource="http://bar.org/bar.html" />
>  </Bag>
>  <Description about="URL1">
>    <DC:Prop>
>      <Description aboutEach="#pages">
>        <DC:Creator>Ora Lassila</DC:Creator>
>      </Description>
>    </DC:Prop>
>   </Description>
> </RDF>

>From the RDFMS section 3.3, "aboutEach":

    No explicit graph representation of distributive
    referents is defined. Instead, in terms of the
    statements made, distributive referents are expanded
    into the individual statements about the individual
    container members (internally, implementations are free
    to retain information about the distributive referents
    - in order to save space, for example - as long as any
    querying functions work as if all of the statements
    were made individually).

Everytime you see an aboutEach, you should rewrite it as individual
rdf:Description rdf:about nodes.  Thus,

     <Description aboutEach="#pages">
       <DC:Creator>Ora Lassila</DC:Creator>
     </Description>

Becomes

     <Description about="http://foo.org/foo.html">
	<DC:Creator>Ora Lassila</DC:Creator>
     </Description>

     <Description about="http://bar.org/bar.html">
	<DC:Creator>Ora Lassila</DC:Creator>
     </Description>


This would make DC:Prop be:

   <DC:Prop>
     <Description about="http://foo.org/foo.html">
	<DC:Creator>Ora Lassila</DC:Creator>
     </Description>

     <Description about="http://bar.org/bar.html">
	<DC:Creator>Ora Lassila</DC:Creator>
     </Description>
   </DC:Prop>

This is, of course, invalid RDF syntax.  QED, I believe that the example
aboutEach RDF you gave above is invalid RDF.

The implication of section 3.3 and 3.4 is that aboutEach and aboutEachPrefix
can only appear in "top-level" rdf:Description nodes, despite the more
lenient interpretation that the formal grammar suggests.

Perry

Received on Tuesday, 29 August 2000 16:01:45 UTC