Created
November 1, 2012 14:31
-
-
Save anonymous/3993966 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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="/"> | |
<h1> | |
<xsl:value-of select="data/hello" /> | |
</h1> | |
<xsl:apply-templates select="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