Re: More RDF ambiguities

> <?xml version="1.0" encoding="UTF-8"?>
> 
> <ImageDataset>
>   <ImageClass>
>     <ImageClass>                <!--1-->
>       <Image name="foo"/>
>     </ImageClass>
>     <ImageClass>                <!--2-->
>       <Image name="bar"/>
>     </ImageClass>
>   </ImageClass>
> </ImageDataset>

I agree that this is not well-formed.  Production [6.17] says "obj", not
"obj*".

> <ImageDataset>
>   <ImageClass>
>     <ImageClass>                <!--1-->
>       <Image name="foo"/>
>     </ImageClass>
>   </ImageClass>
> </ImageDataset>
> 
> Now the parser agrees, producing:
> 
> {'Description__1', rdf:type,     'ImageDataset'}
> {'Description__1', 'ImageClass', 'Description__2'}
> {'Description__2', rdf:type,     'ImageClass'}
> {'Description__2', 'Image',      'Description__3'}
> {'Description__3', name,         literal(foo)}

I believe this is correct.  When in doubt, I rewrite typed nodes as their
basic non-abbreviated syntax equivalents:

<rdf:Description rdf:type="ImageDataset">
 <ImageClass>
  <rdf:Description rdf:type="ImageClass">
   <Image>
    <rdf:Description>
     <name>foo</name>
    </rdf:Description>
   </Image>
  </rdf:Description>
 </ImageClass>
</rdf:Description>

Your parser should produce the same triples (apart from anonymous ID
generation) for both serializations.  Actually, I like your {type}_N
convention for anonymous ids, so in your case, the triples should be exactly
identical.

Perry

Received on Wednesday, 3 May 2000 12:54:08 UTC