This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Jeni reminds me.....
- From: "McKeever, Marty" <marty dot mckeever at bankofamerica dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 19 Nov 2001 09:21:35 -0500
- Subject: RE: [xsl] Jeni reminds me.....
- Reply-to: xsl-list at lists dot mulberrytech dot com
> It seems you want to launch an obfuscated XSLT contest... ;-)
>
> http://www.dpawson.co.uk/xsl/sect2/N3773.html
>
> Any more ;-)
>
I can't remember where i found this one, but it's kinda fun:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes"/>
<xsl:variable
name="abc">ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz</xsl:variabl
e>
<xsl:variable
name="rot13">NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm</xsl:varia
ble>
<xsl:template match="*">
<xsl:element name="{translate(name(),$abc,$rot13)}">
<xsl:for-each select="@*">
<xsl:attribute name="{translate(name(),$abc,$rot13)}">
<xsl:value-of select="translate(.,$abc,$rot13)"/>
</xsl:attribute>
</xsl:for-each>
<xsl:for-each select="text()">
<xsl:value-of select="translate(.,$abc,$rot13)"/>
</xsl:for-each>
<xsl:apply-templates select="*"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list