Skip to content

Instantly share code, notes, and snippets.

@bauhouse
Created November 6, 2012 01:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bauhouse/4021748 to your computer and use it in GitHub Desktop.
Save bauhouse/4021748 to your computer and use it in GitHub Desktop.
<data>
<object id="week_35">Week 35</object>
<object id="blah_1">Blah 1</object>
<object id="week_64">Week 64</object>
</data>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes" />
<xsl:template match="/">
<xsl:apply-templates select="data/object[substring(@id, 1, 5) = 'week_']" />
</xsl:template>
<xsl:template match="object">
<p id="{@id}"><xsl:value-of select="." /></p>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment