Re: rdfa parsing problem

Hi Meri,

I don't know the inner workings of RDF Distiller, but I would guess
that the data is run through an HTML tidying routine, before the RDFa
parser sees it.

If that's the case, then the <span> would probably get moved out of
the table (since it's not valid between a row and the columns in the
row), and therefore change the position of the metadata.

Of course, as you rightly say, from an RDFa point of view, both of
these should give the same result. But the first is not valid HTML, so
I guess it's fair to say that in that case there are no guarantees.

(I would imagine that many JavaScript parsers would have the same
problem, since many browsers will 'tidy up' the DOM.)

Regards,

Mark

On Wed, May 20, 2009 at 10:37 AM, Meri Kovach <meri.kovach@gmail.com> wrote:
> Could you please explain to me why these two extracts, when parsed, do not
> produce the same statements:
>
>  <table>
>     <tr>
>     <span about="#2105555" typeof="foaf:Person">
>        <td>1</td>
>        <td><span property="foaf:firstName">Meri</span></td>
>        <td><span property="foaf:familyName">Kovac</span></td>
>    </span>
>    </tr>
>  </table>
>
> and
>
>  <table>
>     <tr about="#2105555" typeof="foaf:Person">
>        <td>1</td>
>        <td><span property="foaf:firstName">Meri</span></td>
>        <td><span property="foaf:familyName">Kovac</span></td>
>    </tr>
>  </table>
>
> The parsing result (using RDF distiller) is following:
>
>   <foaf:Person rdf:about="http://localhost:8080/rdfa.html#2105555"/>
>   <rdf:Description rdf:about="http://localhost:8080/rdfa.html">
>     <foaf:firstName>Meri</foaf:firstName>
>     <foaf:familyName>Kovac</foaf:familyName>
>   </rdf:Description>
>
> and
>   <foaf:Person rdf:about="http://localhost:8080/rdfa.html#2105555">
>     <foaf:firstName>Meri</foaf:firstName>
>     <foaf:familyName>Kovac</foaf:familyName>
>   </foaf:Person>
>
> The second one is the correct one. Why is the subject mixed up in the first
> one?
>
> Thnx,
> Meri



-- 
Mark Birbeck, webBackplane

mark.birbeck@webBackplane.com

http://webBackplane.com/mark-birbeck

webBackplane is a trading name of Backplane Ltd. (company number
05972288, registered office: 2nd Floor, 69/85 Tabernacle Street,
London, EC2A 4RR)

Received on Wednesday, 20 May 2009 10:01:09 UTC