Combine two RDF datasets
Mark <[email protected]> Thu, 29 Jan 2009 20:46:05 -0800 (PST)
| Newsgroups | gmane.comp.mozilla.devel.rdf |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <c4dede9d-fe08-44a4-bfdc-a0f0f91e4265@p20g2000yqi.googlegroups.com> |
Hi,
Is there any way to combine two RDF datasets? I have one XML-file
dataset which I load at startup. I want to add additional triples
during runtime. The easiest way for me to create these triples is
using a string, e.g.,
==================================
var strRDFData1 = '\
<?xml version="1.0" encoding="utf-8"?>\
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\
xmlns:email="abc://my/car#"\
xmlns:attachment="abc://my/part#">\
<rdf:Description>\
<car:model>Chevy</car:model>\
<car:parts>\
<rdf:Bag>\
<rdf:li>\
<rdf:Description>\
<part:name>Some part name</part:name >\
<part:size>12</part:size>\
</rdf:Description>\
</rdf:li>\
</rdf:Bag>\
</car:parts>\
</rdf:Description>\
</rdf:RDF>';
==================================
Then parse the string into a in memory data set. However, I see no
way how to combine such in memory DS with the XML-file data set (which
is composed of triples like the above).
If I try to use the current XML-file data set as the destination of
the parser, the current data in the XML-file data set is __erased__
before the data in the in-memory dataset is appended. I do not want
such a thing. Could someone please help?
Thanks