RDF/XML, Node vs. Edge labeled graphs was: Re: Services-basedautomation
Thomas B. Passin wrote: > Jonathan Borden wrote - > > > > > The XML model defines a node labelled directed graph. In > this model, arcs or > > edges have the type "element" "attribute" "CDATA section" > "comment" etc. > > > > The RDF model defines an edge labelled directed graph, for > example arcs may > > be labelled "color", "type.of.cheese" "type.of.sauce" > "topping". > > Do the two models really represent anything different? Not > really. But if connections - a form of structure - are the > most important thing to you, edge-labeled models might seem > more attractive or "natural". Right, so a starter for RDF is that the edge labelled model (i.e. triples), layered on top of XMLs node labelled model (e.g. DOM,SAX,Infoset) , is a more 'natural' way to represent semantic information. But we can extract RDF from colloquial XML and serialize RDF as XML by defining a mapping between the two representations. I've written an XSLT RDF extractor for arbitrary XML http://www.openhealth.org/RDF/rdfExtractify.xsl which results in a series of rdf:Statement's i.e. a triple (predicate,subject,object). A predicate is a URI which names the edge (i.e. an xlink:arcrole), a subject is a URI which names the "from" node and the object is either a URI which names the "to" node or a string which is a value. This extractor implements the "Harvesting RDF Statements from XLink" note http://www.w3.org/TR/xlink2rdf/ . One of the properties of 'flattening' or reifying a piece of XML into triples is that a set of triples neatly fits into a relational table. R.V. Guha has written an RDF database which operates on such triples (http://web.guha.com/rdfdb/) and includes a SQL like query language. Jonathan Borden The Open Healthcare Group http://www.openhealth.org
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format