W3C home > Mailing lists > Public > semantic-web@w3.org > April 2013

Re: Mapping XML to RDF

From: Tim Berners-Lee <timbl@w3.org>
Date: Sat, 13 Apr 2013 05:48:17 -0400
Message-Id: <90B001E4-A5D4-455D-98BC-B227867B1FA1@w3.org>
Cc: "semantic-web@w3.org" <semantic-web@w3.org>
To: Anastasia Dimou <natadimou@gmail.com>
Well Rdb and CSV are fundamentally tables and XML is a tree. In fact the job of mapping XML is equivalent to the job if mapping JSON.  Look at using JSON LD -- it provides a way of notating how each JSON element should be mapped to RDF, recursively.  Suppose you syntactically convert your XML into JSON and then make a @context definition for it. See whether it provides what you need.  Or write a JSON LD processor which takes XML.

 JSON is the new XML :-)

Tim 

Sent from my portable device. 

On Apr 12, 2013, at 3:39, Anastasia Dimou <natadimou@gmail.com> wrote:

> Thank you all for your replies regarding different tools.
> Correct me if I am wrong, but those tools do not use R2RML in order to map XML to RDF.
> So, let me put it in a different way: since R2RML can be used to map RDB to RDF and it can also fit the CSV to RDF conversion needs, then why not extending R2RML to fit XML (and, in the long term, different file formats) to RDF mappings, too? I do not ignore that there are standards for XML transformations, but I wonder if extending R2RML to map XML to RDF was considered.
> 
> Best regards,
> Anastasia
> 
> 
> 
> On Wed, Apr 10, 2013 at 6:32 PM, Silvio Peroni <essepuntato@cs.unibo.it> wrote:
>> Dear Anastasia,
>> 
>>> currently I investigate a way to convert XML files to RDF.
>>> Using XSLT, XPath and Xqueries seems to be the straightforward solution. But I was wondering if there is already an implementation that uses R2RML (adjust/extended to XML needs) to convert XML to RDF.
>> 
>> I developed a tool called XML2EARMARK [1] that translates XML sources into OWL ontologies conform with the EARMARK ontology [2].
>> 
>> EARMARK [3] is "a meta-syntax for non-embedded markup that can be used for stand-off annotations of textual content with fully W3C-compliant technologies. EARMARK is based on an ontologically precise definition of markup that instantiates the markup of a text document as an independent OWL document outside of the text strings it annotates, and through appropriate OWL and SWRL characterizations it can define structures such as trees or graphs and can be used to generate validity constraints (including co-constraints currently unavailable in most validation languages)."
>> 
>> You can use it directly within Java application by means of the EARMARK API [4]. For more information, please visit [5].
>> 
>> Please don't hesitate to contact me for any additional question/information/doubt.
>> 
>> Have a nice day :-)
>> 
>> S.
>> 
>> 
>> 
>> ### References ###
>> [1] - XML2EARMARK: http://www.essepuntato.it/xml2earmark
>> [2] - EARMARK ontology: http://www.essepuntato.it/2008/12/earmark
>> [3] - Di Iorio, A., Peroni, S., Vitali, F. (2011). A Semantic Web Approach To Everyday Overlapping Markup. In Journal of the American Society for Information Science and Technology, 62 (9): 1696-1716. Hoboken, New Jersey, USA: John Wiley & Sons, Inc. DOI: 10.1002/asi.21591
>> http://speroni.web.cs.unibo.it/publications/di-iorio-2011-semantic-approach-everyday.pdf
>> [4] - EARMARK API: http://earmark.sourceforge.net/
>> [5] - EARMARK information page: http://palindrom.es/phd/research/earmark/
>> 
>> 
>> 
>> 
>> ----------------------------------------------------------------------------
>> Silvio Peroni, Ph.D.
>> Department of Computer Science and Engineering
>> University of Bologna, Bologna (Italy)
>> Tel: +39 051 2094871
>> E-mail: essepuntato@cs.unibo.it
>> Web: http://www.essepuntato.it
>> Blog: http://palindrom.es/phd
>> Twitter: essepuntato
> 
> 
> 
> -- 
> Anastasia Dimou
Received on Saturday, 13 April 2013 09:56:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 07:42:41 UTC