XSLT Translator example

The following example XSLT translator translates extracts title and description items from RSS format files.

<?xml version=”1.0″?>
<xsl:stylesheet
xmlns=”http://purl.org/rss/1.0/”  version=”1.0″>
<xsl:output method=”xml”/>
<xsl:template match=”/”>
<textfile>
<body>
<xsl:for-each select=”//rss//channel/item”>
<lineitem>
<columnitem name=”Title”>
<xsl:value-of select=”title)”/>
</columnitem>
<columnitem name=”Desc”>
<xsl:value-of select=”description”/>
</columnitem>
</lineitem>
</xsl:for-each>
</body>
</textfile>
</xsl:template>
</xsl:stylesheet>

There are many tutorials and examples of XSLT translators available on the Internet. Rascular can assist you by developing custom translators for your application if required.