Closed igoralmeida closed 6 years ago
The two rdf/xml docs contain the same graph. I.e. an RDF aware processor will treat them the same. There is no way to force rdflib to serialize the first type.
If Zotero does not accept the RDF/XML RDFLib produces, you either have to get them to fix it. Or make your own XML serializer that does exactly what Zotero expects.
Hi all,
I'm trying to create an RDF file that Zotero accepts, but I am struggling with getting
rdf:resource
properties (?) to show up.Basically I'm trying to reference an item from a Zotero collection (this probably does not relate to what RDFLib calls "collection"). Collections in Zotero RDF look like this:
And items such as attachments look like this:
So when trying something like
mygraph.add((mycollection, DCTERMS.hasPart, myattachment))
the attachment is instead placed inside the collection (understandably), like so:I am definitely missing some concepts here but I am not sure what else to search for. Is there a way to get that
<dcterms:hasPart rdf:resource="#item_426"/>
part correctly? Note that, besides collections, attachments also have a similar child<rdf:resource rdf:resource="files/426/filename.pdf"/>
that I would like to have as well.Any help is greatly appreciated.