{"id":609,"date":"2010-12-21T18:36:11","date_gmt":"2010-12-21T18:36:11","guid":{"rendered":"http:\/\/blog.soton.ac.uk\/webteam\/?p=609"},"modified":"2010-12-21T18:36:11","modified_gmt":"2010-12-21T18:36:11","slug":"publishing-csv-to-rdf-part-2","status":"publish","type":"post","link":"https:\/\/blog.soton.ac.uk\/webteam\/2010\/12\/21\/publishing-csv-to-rdf-part-2\/","title":{"rendered":"Publishing CSV to RDF part 2"},"content":{"rendered":"<p>OK. Having realised I was dangerously on path to writing my own language, I&#8217;ve revised my plan. My current thinking is that I&#8217;ll make it a two step process.<\/p>\n<p>Step one converts the CSV\/Excel\/Whatever into an XML file, with optional extras included to allow local values to be set.<\/p>\n<p>Then this will be processed using an XSLT file, which is already well supported. I&#8217;m not a huge fan of XSLT but you need to think carefully before embarking on inventing an arbitrary new language. The goal of this system is to make it easier to maintain for non-research organisations (like our central IT) so using an established technology makes it easier to ensure you can find someone to maintain the system.<\/p>\n<p>That said, I&#8217;m not sure what to make the XSLT output. It really needs to be XML (although I *think* you can do other stuff, it&#8217;s more fiddly. So assuming the XML restriction my options are:<\/p>\n<ul>\n<li>Any RDF\/XML<\/li>\n<li>Subset of RDF\/XML<\/li>\n<li>XML format I&#8217;ve not yet heard of<\/li>\n<li>XML format of my own invention<\/li>\n<\/ul>\n<p>This last one had me tempted for a while.. something like:<\/p>\n<pre> &lt;triple&gt;\r\n   &lt;subject&gt;http:\/\/....&lt;\/subject&gt;\r\n  \u00a0&lt;predicate&gt;http:\/\/....&lt;\/predicate&gt;\r\n  \u00a0&lt;object&gt;http:\/\/....&lt;\/object&gt;\r\n  \u00a0&lt;datatype&gt;http:\/\/....&lt;\/datatype&gt;\r\n &lt;\/triple&gt;\r\n<\/pre>\n<p>&#8230; but I think I&#8217;m suffering from an attack of over-engineering. So what it should output is valid RDF+XML, which my tool can then validate &amp; process into the triple-serialisation of your choice.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OK. Having realised I was dangerously on path to writing my own language, I&#8217;ve revised my plan. My current thinking is that I&#8217;ll make it a two step process. Step one converts the CSV\/Excel\/Whatever into an XML file, with optional extras included to allow local values to be set. Then this will be processed using [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[352,136],"tags":[],"class_list":["post-609","post","type-post","status-publish","format-standard","hentry","category-data","category-rdf"],"_links":{"self":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/609","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/comments?post=609"}],"version-history":[{"count":2,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/609\/revisions"}],"predecessor-version":[{"id":611,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/609\/revisions\/611"}],"wp:attachment":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/media?parent=609"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/categories?post=609"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/tags?post=609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}