Difference in treatment of elements with XML content

Hi All,

I see a difference in the way Ivan's RDFa Distiller and Fabien's XSLT 
treat the following case:

<p about="#i" instanceof="foaf:Person">
Mitt navn er <span property="foaf:name" content="Steinar Skagemo"><span
property="foaf:givenName">Steinar</span> <span
property="foaf:familyName">Skagemo</span></span>.
Min hjemmeside er <a rel="foaf:homepage" href="http://www.skagemo.no/">Steinar
Skagemo - kort oppsummering</a>.
 </p>

In the case of the RDFa Distiller the result is:

 <rdf:Description rdf:about="http://www.skagemo.no/page/steinar.html#i">
        <foaf:givenName>Steinar</foaf:givenName>
        <foaf:familyName>Skagemo</foaf:familyName>
        <foaf:name>Steinar Skagemo</foaf:name>
	...
  </rdf:Description>

In the case of Fabien's XSLT, the result is:

   <rdf:Description rdf:about="#i">
      <foaf:name xmlns:foaf="http://xmlns.com/foaf/0.1/"
                 rdf:datatype="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"
                 rdf:parseType="Literal">
         <span xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
               xmlns:dc="http://purl.org/dc/elements/1.1/"
               property="foaf:givenName">Steinar</span> 
         <span xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
               xmlns:dc="http://purl.org/dc/elements/1.1/"
               property="foaf:familyName">Skagemo</span>
      </foaf:name>
   </rdf:Description>
   <rdf:Description rdf:about="#i">
      <foaf:givenName xmlns:foaf="http://xmlns.com/foaf/0.1/">Steinar</foaf:givenName>
   </rdf:Description>
   <rdf:Description rdf:about="#i">
      <foaf:familyName xmlns:foaf="http://xmlns.com/foaf/0.1/">Skagemo</foaf:familyName>
   </rdf:Description>
   ...

As differences in output usually point to differences in interpretation of the spec, I looked at the relevant Section 5.5, Step 10.
Indeed, it is not very clear on the precedence (if there is) on whether to see this as a Plain Literal or XML Literal.

Thanks,
Peter

Received on Wednesday, 23 April 2008 12:02:33 UTC