Re: [xsl] Transform RDF to CSV files

Subject: Re: [xsl] Transform RDF to CSV files
From: "oknam park" <ponda7777@xxxxxxxxxxx>
Date: Mon, 19 Mar 2007 21:24:14 +0000
It makes much sense.

Thanks for your wonderful tips and fast response.

From: Abel Braaksma <>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Transform RDF to CSV files
Date: Mon, 19 Mar 2007 22:20:36 +0100

oknam park wrote:

I have experienced transforming XML files to CSV by XSLT. But, have no ideas how to transform RDF to CSV.

Well, in short, RDF is XML, so you can use your experience with XML to transform it to CSV.

Of course, there is no such thing as RDF to CSV, because RDF is a layered hierarchical format, and CSV is flat non-hierarchical, not even relational. So, just replying "do xyz to transform RDF to CSV" won't get you there.

Here's a small example of an RDF file from

<rdf:RDF xmlns:rdf="";
<rdf:Description rdf:about="";>
<ex:tv_show rdf:about=""; />
<rdf:Description rdf:about="";>
<ex:similar_plot_as rdf:resource=""; />

Now, to get the rdf:Description node, you can write something like this:

<xsl:template match="rdf:Description">
  <xsl:sequence select="@rdf:about">

But that is only one column. You will have to find out for yourself what data for what requirements goes into what column. Then we can help you to sort out what kind of XPaths you can use to process the RDF feeds or documents into those CSV fields.

-- Abel Braaksma

i'm making a difference. Make every IM count for the cause of your choice. Join Now.

Current Thread