Exported RDF/XML is invalid
Hi,
I'm parsing Zotero's export file with Jena. The problematic bit looks like this:
The problem is that
https://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax-property-attributes
Jena throws a parser error:
Could you please change the property to something else? I think it should be the inverse of
https://www.dublincore.org/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/elements/1.1/source
Martynas
atomgraph.com
I'm parsing Zotero's export file with Jena. The problematic bit looks like this:
<z:Attachment rdf:about="#item_4">
<rdf:resource rdf:resource="smth.pdf"/>
</z:Attachment>
The problem is that
rdf:resource
is used as a property but it is a reserved term (attribute) in the RDF/XML syntax. It's an example of "Use inappropriate reserved names as properties":https://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax-property-attributes
Jena throws a parser error:
org.apache.jena.riot.RiotException: [line: 83, col: 121] {E205} rdf:resource is not allowed as an element tag here.
Could you please change the property to something else? I think it should be the inverse of
dcterms:source
but can't find any right now:https://www.dublincore.org/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/elements/1.1/source
Martynas
atomgraph.com
prov:alternateOf
then:https://www.w3.org/TR/prov-o/#alternateOf
file://
scheme, URL-encoded and probably absolute?So instead of
rdf:resource="files/4/Jusevičius - 2016 - Linked Data Templates Ontology-driven approach to.pdf">
I think it should berdf:resource="file:///C:/Users/pumba/WebRoot/AtomGraph/Zotero%20Library/files/4/Jusevi%C4%8Dius%20-%202016%20-%20Linked%20Data%20Templates%20Ontology-driven%20approach%20to.pdf">
. This link will open the document in the browser (that's where I copied it from).http://www.zotero.org/namespaces/export#
namespace, because the resource it belongs to is of type<z:Attachment>
.