Stylesheet Tips
Copy
Displaying a non-breaking white space
To display a non-breaking white space, use the <xsl:text> tag.
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>Or this:  Displaying the formatted text property
To display formatted text (the marked-up text) property value in XSLT, use the disable-output-escaping attribute with the <xsl:value-of> tag. The marked-up text for the formatted text property is a complete HTML document and only the content for the BODY tag is required.
<xsl:value-of disable-output-escaping="yes” select=".//BODY/*"/>Displaying nested tables for relationships
To display the relationship Items for nested tables, reduce the XPath to the relative path based on the context node for the <xsl:for-each> loop that the nested relationships table is in.
<xsl:for-each select="Relationships/Item"><xsl:for-each select="related_id/Item/Relationships/Item"></xsl:for-each></xsl:for-each>
Resizing the Report window
To resize the report window, add an onload callback function for the HTML page. Add the following code before the <body> tag:
<script>onload = function(){top.window.resizeTo(800,600);}</script>
Showing a different value based on the value for a property
To show a different value in the Report based on the actual value of the property. For example, the actual value of the property is the hex number for a color, but you want to show the name of the color in text.
<xsl:choose><xsl:when test="mgr_opinion='#FF0000'">Red</xsl:when><xsl:when test="mgr_opinion='#FFFF00'">Yellow</xsl:when><xsl:when test="mgr_opinion='#00FF00'">Green</xsl:when></xsl:choose>
Supporting European languages
To show the results in a European language:
Set the encoding attribute for the root xml tag:
<?xml version="1.0" encoding="iso-8859-1" ?>- Set the encoding attribute for the output tag:
<xsl:output encoding="iso-8859-1" method="html”omit-xml-declaration="yes” standalone="yes” indent="yes” />