W3C home > Mailing lists > Public > www-rdf-interest@w3.org > May 2000

Re: More RDF ambiguities

From: Perry A. Caro <caro@Adobe.COM>
Date: Wed, 03 May 2000 09:52:43 -0700
Message-ID: <3910595B.AA16F8AF@adobe.com>
To: www-rdf-interest@w3.org
> <?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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:43 GMT