It makes much sense.
Thanks for your wonderful tips and fast response.
-Oknam
From: Abel Braaksma <abel(_dot_)online(_at_)xs4all(_dot_)nl>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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 xml.com:
http://www.xml.com/pub/a/2001/01/24/rdf.html
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ex="http://www.example.org/">
<rdf:Description rdf:about="http://www.example.org/vincent_donofrio">
<ex:starred_in>
<ex:tv_show rdf:about="http://www.example.org/law_and_order_ci"
/>
</ex:starred_in>
</rdf:Description>
<rdf:Description
rdf:about="http://www.example.org/the_thirteenth_floor">
<ex:similar_plot_as
rdf:resource="http://www.example.org/the_matrix" />
</rdf:Description>
</rdf:RDF>
Now, to get the rdf:Description node, you can write something like this:
<xsl:template match="rdf:Description">
<xsl:sequence select="@rdf:about">
<xsl:text>,</xsl:text>
</xsl:template>
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.
Cheers,
-- Abel Braaksma
http://www.nuntia.nl
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
_________________________________________________________________
i'm making a difference. Make every IM count for the cause of your choice.
Join Now.
http://clk.atdmt.com/MSN/go/msnnkwme0080000001msn/direct/01/?href=http://im.live.com/messenger/im/home/?source=hmtagline
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--