DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

XSLT General

05.01.2006
| 225 views |
  • submit to reddit
        // Selecteer nodes, attributes (met OR), sort

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes'/>

<xsl:template match="/">
      <xsl:for-each select="tv/programme[category='film' or category='tvfilm']">
	  <xsl:sort select="@channel"/>
      <tr>
        <td><xsl:value-of select="title"/></td>
		<td><xsl:value-of select="star-rating/value"/></td>
		<td><xsl:value-of select="@stop"/></td>
      </tr>
      </xsl:for-each>
</xsl:template>
</xsl:stylesheet>