Re: rdfa parsing problem

Meri,

I gave some more thoughts while flying back home...

Is it possible that the enclosing XHTML file, that included the example
you quoted in the mail, was not XML valid? Then the system would
automatically try with HTML5 in the default setup, and this would
explain what you experienced... (provided the HTML5 parser really
removes that <span> element, which I would expect it does)

Ivan

Ivan Herman wrote:
> Meri,
> 
> I am sorry if I cannot give you a very detailed response at this moment,
> because I am on a trip right now. I have, nevertheless, tested the first
> code on my own machine and it did produce the same RDF as for the second
> one.
> 
> One quick thought, though. The way the distiller works is that if hits
> an XML (not XHTML!) error, it then switches (if allowed in the command
> arguments) to an HTML5 parser and attempts to run the code through that
> one, too. I guess (but I do not know) that the HTML5 parser attempts to
>   make some sense in the erroneous code and I would presume it will
> simply remove the <span> element from the DOM tree it produces. Because
> the rest of the distiller works on the DOM tree, I presume that is what
> produces the difference (your quoted RDF for the first version is
> consistent with a DOM tree with the span entirely removed). Again, I
> will have to look at that when I am back home (in a few days).
> 
> In the meantime: can you tell me which parameters you used when running
> the distiller? Were they all the default ones?
> 
> Thanks
> 
> Ivan
> 
> 
> Meri Kovach 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"/
>> <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
> 

-- 

Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Friday, 22 May 2009 08:19:17 UTC