Re: xml without rdf, but with an ontology [0]

On 13/01/2005 13:37, Henry Story wrote:
> I am not sure how to model xml fragments correctly. But there may be 
> transformations one can make
> if one knew how to do that correctly. I think there will have to be a 
> list of string and nodes in it.
> There must be some solution to this...

I'm not convinced that there is a general solution (to the problem of 
converting arbitrary XML to useful triples).

There are various approaches, all of which appear to have problems. I've 
thought in the past about heuristics such as "if the the tag contains 
any character data then the object of the triple is a Literal or 
XMLLiteral, otherwise it's a blank node". However, all of the following 
need to be handled consistently and my heuristic fails:

<feed>

   <entry>
    <extension>some content</extension>
   </entry>

   <entry>
    <extension>some <term>mixed</term> content</extension>
   </entry>

   <entry>
    <extension><term>mixed</term></extension>
   </entry>

   <entry>
    <extension />
   </entry>

</feed>

I think the only way is to use an annotated schema to provide the 
transformation hints.

Ian

Received on Thursday, 13 January 2005 14:37:29 UTC