Skip to content

Instantly share code, notes, and snippets.

@andrewminton
Forked from anonymous/master.xml
Created November 1, 2012 14:31
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 andrewminton/3993969 to your computer and use it in GitHub Desktop.
Save andrewminton/3993969 to your computer and use it in GitHub Desktop.
<data>
<entry id="1">
<name>Woop woop</name>
</entry>
<entry id="2">
<name>Woop woop2</name>
</entry>
<entry id="3">
<name>Woop woop3</name>
</entry>
<entry id="4">
<name>Woop woop4</name>
</entry>
</data>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes" />
<xsl:variable name="currentid" select="'2'"/>
<xsl:template match="/">
<xsl:apply-templates select="data/entry[not(@id = $currentid)]"/>
</xsl:template>
<xsl:template match="entry">
<p><xsl:text>Poop!</xsl:text> <xsl:value-of select="name"/> </p>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment