www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit eaa50ca9fc49883cd3bf9f3942f78a36714efe2e
parent b0923f64a34b94275d2291c6266ca8af882b7cae
Author: aurimasv <aurimas.dev@gmail.com>
Date:   Fri, 27 Apr 2012 00:23:29 -0500

Simon: patches to RDF support

Diffstat:
Mchrome/content/zotero/xpcom/rdf/serialize.js | 13+++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/chrome/content/zotero/xpcom/rdf/serialize.js b/chrome/content/zotero/xpcom/rdf/serialize.js @@ -697,9 +697,14 @@ __Serializer.prototype.statementsToXML = function(sts) { t = qname(st.predicate); switch (st.object.termType) { case 'bnode': - results = results.concat(['<'+ t +'>', - subjectXMLTree(st.object, stats), - '</'+ t +'>']); + if(sz.incoming[st.object].length == 1) { + results = results.concat(['<'+ t +'>', + subjectXMLTree(st.object, stats), + '</'+ t +'>']); + } else { + results = results.concat(['<'+ t +' rdf:nodeID="' + +st.object.toNT().slice(2)+'"/>']); + } break; case 'symbol': results = results.concat(['<'+ t +' rdf:resource="' @@ -728,7 +733,7 @@ __Serializer.prototype.statementsToXML = function(sts) { var attrs = ''; if (subject.termType == 'bnode') { if(sz.incoming[subject].length != 1) { // not an anonymous bnode - attrs = ' rdf:ID="'+subject.toNT().slice(2)+'"'; + attrs = ' rdf:nodeID="'+subject.toNT().slice(2)+'"'; } } else { attrs = ' rdf:about="'+ relURI(subject)+'"';