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

Thanks Josh,

I like your answers to Ian's questions :-)

On 13 Jan 2005, at 16:11, Josh Sled wrote:
> [trimming CC's]

I have added the CCs back in, after translating the N3 notation into
more intuitive arrow notation for the other groups (I just
hope that the ascii diagrams don't get lost on the wire)

On 13 Jan 2005, at 16:11, Josh Sled wrote:
>> 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:
>
> Yes, I was thinking the parser would implement a heursitic along these
> lines, with the notable exception of mixed-content.  Modulo markup,
> there's not a lot of mixed content.  And if the tools borked on
> encountering it, I believe people would be willing to accept it as 
> being
> a bit weird.

I don't think any heuristics are needed. Just an ontology for the
tags and attributes plus a systematic way to map xml into graph space
which I have described in this thread.

> A translation...


>> <feed>
>
> [ a :Feed;

_x ----:feed----> _f

>
>>    <entry>
>>     <extension>some content</extension>
>>    </entry>
>
>  :entry [ :extension "some content" ];

       _f --:entry--> _e1
                      |-:extension-> "some content"

(note that I don't arrive directly at the above graph, but
only if the ontology for the default namespace tells me
that the object of :extension is of type String.)

>
>>    <entry>
>>     <extension>some <term>mixed</term> content</extension>
>>    </entry>
>
> # error, as per above.

ok, or perhaps one can just get the following

   _f --:entry--> _e2
                 |--:extension-> _ext2
                                |-xxx:string----------------+
                       "some <term>mixed</term> content" <--|
>
>>    <entry>
>>     <extension><term>mixed</term></extension>
>>    </entry>
>
>  :entry [ :extension [ :term "mixed" ] ];

   _f --:entry--> _e2
                 |--extension--> _ext3
                                 |---:term--> "mixed"

same note as above. I only reach the above graph, after
finding an ontology that tells me that the object of :term
is a String. (After all it could be uri, a Date or another
Literal)

>
>>    <entry>
>>     <extension />
>>    </entry>
>
> # ooh ...
>
>  :entry [ :extension [] ];

   _f --:entry--> _e4
                  |---:extension--> _e5

ok :-)

>
> # or maybe...
>
>  :entry [ :extension rdf:nil ];

   _f --:entry--> _e4
                  |---:extension--> rdf:nil

yes, good question.


> # ?
>
>> </feed>
>
> ].
>
>> I think the only way is to use an annotated schema to provide the
>> transformation hints.
>
> Perhaps, though hopefully only to make certain hard things possible.  I
> believe that 80% of the common uses of XML for describing data formats
> can be done with schema-agnostic rules or simple in-band data.
>
> ...jsled
>
> -- 
> http://asynchronous.org/ - `a=jsled; b=asynchronous.org; echo 
> ${a}@${b}`
>

Received on Friday, 14 January 2005 12:51:08 UTC