LiveSite XSL Reference

2 July 2008
by Gavin Colborne

The idea with this page is to capture all the useful LiveSite XSL syntax for use in the Appearance XSL of a component. This way you can be lazy 🙂

Select Values

Select a basic datum:
<xsl:value-of select=”/Properties/Data/Datum[@Name=’Message’]”/>

Admin Switch

This is used in the component to determine if it is being viewed from within TeamSite or the LiveSite runtime.
When “Admin=true” the component is being viewed in TeamSite.
<xsl:when test=”/Properties[@Admin=’true’]”>
<h1>Hello I am being viewed in TeamSite</h1>
<h1> Hello I am being viewed on the Runtime server</h1>

Create a Variable

<xsl:variable name=”branchName” select=”/Properties/Data/External/branch”/>

Reference a variable

<xsl:value-of select=”$branchName”/>

Write a Comment

<xsl:comment>Start SSI</xsl:comment>


<xsl:text disable-output-escaping = “yes”>my text</xsl:text>

CDATA – can never remember this 🙂

<![CDATA[ ]]>

Write Include Tag

<xsl:text disable-output-escaping = “yes”>
<jsp:include page=”ShowDCR.jsp”></jsp:include>

Create a Hyperlink

<xsl:attribute name=”href”>
<xsl:value-of select=”/Properties/Data/Datum[@Name=’Link Target’]”/>
<xsl:value-of select=”/Properties/Data/Datum[@Name=’Link Title’]”/>

Our Latest News