Skip to content

Instantly share code, notes, and snippets.

@greystate
Created April 28, 2011 19:15
Show Gist options
  • Select an option

  • Save greystate/947083 to your computer and use it in GitHub Desktop.

Select an option

Save greystate/947083 to your computer and use it in GitHub Desktop.
Code listings for some Behind The Scenes info
<xsl:template match="snippet//@*[name() = substring-after(../@hi:lite, '@')]">
<xsl:text> </xsl:text>
<span class="hilite attr">
<xsl:value-of select="concat(name(), '=&quot;', ., '&quot;')" />
</span>
</xsl:template>
<snippet language="XSLT">
<xsl:template match="movie">
<p class="odd" hi:lite="@class">
<hi:lite><xsl:if test="position() mod 2 = 0">
<xsl:attribute name="class">even</xsl:attribute>
</xsl:if></hi:lite>
<!-- do stuff -->
</p>
</xsl:template>
</snippet>
<xsl:template match="@hi:*" priority="2" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment