Re: more on a new way of thinking about RDF and RDF Schema

[Peter F. Patel-Schneider]



> Edge-labelled models cannot handle things like
>
> <foo>
>   7
>   <bar>5</bar>
> </foo>
>
> which are allowed in XML.
>
You can make a perfectly good edge-labeled graph from arbitrary XML, even
with mixed content.  Just imagine that all continuous fragments of character
content are wrapped in imaginary <text> elements.  Each element name maps to
an edge label.  Child element order maps to clockwise (or counter-clockwise)
placement of the edges.  Node are unlabeled and have no content except for
leaves at the end of "text" branches, which contain the corresponding
character data.  Thus all nodes are anonymous.  A document starts with an
implied (anonymous) root node.

You may object that having all the nodes anonymous is pretty strange for
RDF.  I reply that for arbitrary XML, you do not know what the element names
and so forth "mean", so you can't very well apply RDF-like assignments to
them.

Now obviously you can start adding specialized rules if you want to map
certain structures differently.  For example, you could give special
treatment to xlink arcs and to elements in the rdf: namespace.  I'm just
pointing out that xml does map very nicely to edge-labeled graphs even
though it is never presented this way in books and courses.

The edge-labeled approach is a dual for the node-labeled (DOM) approach.
The node-labeled approach gives you unlabeled edges, the edge-labeled
approach gives you unlabeled nodes.  RDF gives you labels for both edges and
nodes, but only because of a set of conventions as to how to interpret
certain xml structures.

Cheers,

Tom P

Received on Tuesday, 16 October 2001 00:08:33 UTC