divzeroweb

2f30.org website
git clone git://git.2f30.org/divzeroweb.git
Log | Files | Refs | README | LICENSE

index.xsl (734B)


      1 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      2 <xsl:output method="text"/>
      3 
      4 <xsl:template match="/icestats">
      5 <!-- only show the first source -->
      6 <xsl:apply-templates select="source[1]"/>
      7 </xsl:template>
      8 
      9 <xsl:template match="source">
     10 <!-- dummy text nodes to force zero newlines -->
     11 <xsl:text />[<xsl:value-of select="server_name" />] <xsl:text />
     12 <xsl:text />[<xsl:value-of select="listeners" />] <xsl:text />
     13 <xsl:choose>
     14 <xsl:when test="title or artist">
     15 <xsl:if test="artist"><xsl:value-of select="artist" /> - </xsl:if>
     16 <xsl:value-of select="title" />
     17 </xsl:when>
     18 <xsl:otherwise>SIGFPE</xsl:otherwise>
     19 </xsl:choose>
     20 <xsl:text>
     21 http://radio.2f30.org:8000/live.mp3
     22 </xsl:text>
     23 </xsl:template>
     24 
     25 </xsl:stylesheet>