topical media & game development

talk show tell print

basic-xml-13-v1.xsl / xsl



  <xsl:stylesheet version="1.0"  
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"  
      xmlns:xhtml="http://www.w3.org/1999/xhtml"
      xmlns:rss="http://purl.org/rss/1.0/"> 
  
  <xsl:output method="html"/>  
  
  <xsl:template match="/">
  <html>
  <head><title>Version Finder</title></head>
  <body>
      <xsl:apply-templates />
  </body>
  </html>  
  </xsl:template>
  
  <xsl:template match="/rss">
  RSS Version <xsl:value-of select="./@version" />
  
      <xsl:apply-templates select="channel/title" />
  </xsl:template>
  
  <xsl:template match="/rdf:RDF">
  RDF <xsl:value-of select="rss:channel/text()" />
      <xsl:apply-templates />
  </xsl:template>
  
  <xsl:template match="rss:channel">
  RSS 1.0 
      <xsl:apply-templates />
  </xsl:template>
  
  <xsl:template match="rss:title | title">
          <xsl:value-of select="text()" />
  </xsl:template>
  
  <xsl:template match="text()" />
  
  </xsl:stylesheet>


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.