By Christian Palm, 6/24/2008

Rating

Description

The easy/best/fast way is just to use the xslt method string()

Download

Download item
Downloaded 4 time(s).

Snippet

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE xsl:Stylesheet [<!ENTITY nbsp "&#x00A0;">]> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:umbraco.library="urn:umbraco.library" exclude-result-prefixes="msxml umbraco.library"> <xsl:output method="xml" omit-xml-declaration="yes"/> <xsl:param name="currentPage"/> <xsl:template match="/"> <xsl:if test="string($currentPage/data[@alias = 'firstname'])"> Firstname: <xsl:value-of select="$currentPage/data[@alias = 'firstname']" /> </xsl:if> </xsl:template> </xsl:stylesheet>

Comments

Add a comment (requires log-in)



Brilliant umbraco hosting provided by FAB-IT