[w3photo] RDF and ID's

I've been working on hacking Fotonotes's code to read/write the RDF  
vocab Libby described on her very informative page,  
http://esw.w3.org/topic/W3PhotoVocabs .

I want to understand something about adding ID's to nodes.  The  
questions I have are at the bottom of this email at the end of the  
following background information:

According to the vocab, an image can contain parts:

* There MAY be image:width and image:height properties
* There MAY be image:hasPart properties
* If image:hasPart is present, image:points property MUST be present
* If image:hasPart is present, dc:description for that part MAY be  
present
* If image:hasPart is present, image:regionDepicts MAY be present
* If image:regionDepicts is present and depicts a foaf:Person or Agent,  
an identifying property MUST be present, one of foaf:mbox_sha1sum,  
foaf:homepage, foaf:weblog, foaf:page, or foaf:name (name is the worst  
case option)

Here's an example:

  <foaf:Image  
rdf:about='http://www94.web.cern.ch/WWW94/Images/ClosingPanel/ 
Closingpanel5.gif'>
   <image:width>535</image:width>
   <image:height>367</image:height>
   <image:hasPart>
    <image:Rectangle rdf:ID='p1'>
     <image:points>6,106 84,181</image:points>
     <dc:description>Joseph Hardin looking interested</dc:description>
     <image:regionDepicts>
      <foaf:Person>
        <foaf:name>Joseph Hardin</foaf:name>
         
<foaf:mbox_sha1sum>1af3d5e34a12435a835c5e51a687c93707114f0b</ 
foaf:mbox_sha1sum>
      </foaf:Person>
     </image:regionDepicts>
    </image:Rectangle>
   </image:hasPart>
  </foaf:Image>


The proposed above vocab puts and rdf:ID for a given image part one  
layer down:
  <image:hasPart>
    <image:Rectangle rdf:ID='p1'>
	<image:points>6,106 84,181</image:points>
   </image:Rectangle>

So now I get to my issue. Fotonotes has a simple hack of placing the  
"ID" as part of a single word <selection> tag:
<selection3>
	<selectionRectangle>
		315,90,112,206	
	</selectionRectangle>

I just wanted something that would work until I could interact with  
smart folks like you all to understand better formats. It seems to be  
that parsing the proposed RDF with the ID located inside a tag but one  
level inside involves more sophisticated code than parsing multiple  
<selection#> tags with the ID located as just part of the word at the  
initial level. And I'm hoping there is an easy way to make the  
transition.

My questions:
1) Is it okay if used the format of placing an ID also inside the  
<image:hasPart> tag, e.g., <image:hasPart rdf:ID='hp1'> instead of, or  
in addition to, being inside the <image:Rectangle rdf:ID='p1'> tag?  
Does that form break it for other people?
  <image:hasPart rdf:ID='hp1' >
    <image:Rectangle rdf:ID='p1'>

2) What is the philosophy of putting the ID one level down and *inside*  
the tag has a property? What's the principle advantage? I think I'm  
open to following that form, but it seems to force a level of  
complexity on the parsing code (and hence the developer). Can I gain  
some insight?

Thanks!

Greg Elin

Received on Sunday, 8 February 2004 13:07:43 UTC