Generating an XSLT stylesheet for a Dynarex document

require 'dynarex'

s =<<EOF
<?dynarex schema="entries/item(title,desc)" delimiter=" # " ?>
fun # 123 456
more fun # 121212
fussball # 030303
EOF

dynarex = Dynarex.new
dynarex.import s

dynarex.xslt_schema = 'channel/item(title:title,link:desc)'
puts dynarex.to_xslt


output:

<?xml version='1.0' encoding='UTF-8'?>
<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
  <xsl:output method='xml' indent='yes'></xsl:output>
  <xsl:template match='entries'>
    <channel>
      <xsl:apply-templates select='summary'></xsl:apply-templates>
      <xsl:apply-templates select='records/item'></xsl:apply-templates>
    </channel>
  </xsl:template>
  <xsl:template match='entries/summary'></xsl:template>
  <xsl:template match='records/item'>
    <item>
      <title>
        <xsl:value-of select='title'></xsl:value-of>
      </title>
      <link>
        <xsl:value-of select='desc'></xsl:value-of>
      </link>
    </item>
  </xsl:template>
</xsl:stylesheet>
Tags:
Source:
1859hrs.txt
Published:
31-10-2013 18:59