123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cpscrn
- (C) Copyright IBM Corp. 2005, 2011
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:java="java:com.cognos.portal.utils.CCLLocaleUtils" exclude-result-prefixes="java xts">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <!-- Set up the locale to use, either the CCL determined locale or the server locale -->
- <xsl:variable name="setUseLangAsDefault">
- <xsl:choose>
- <xsl:when test="root/customs/param[@name='HTMLMarkup']/value">
- <xsl:variable name="langs">
- <xsl:for-each select="/root/customs/param[@name='HTMLMarkup']/value">
- <xsl:value-of select="@xml:lang"/>
- <xsl:if test="not(position() = last())">,</xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:value-of select="java:getBestFitLocale(string(/root/preferences/param[@name='contentLocale']),string($langs))"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/">
- <!-- Display the matched locale markup if there is one but if no match is found then use the first entry otherwise display the default edit to customize message -->
- <xsl:choose>
- <xsl:when test="string(root/customs/param[@name='HTMLMarkup']/value[@xml:lang=$setUseLangAsDefault])!=''">
- <div width="100%">
- <xsl:value-of select="/root/customs/param[@name='HTMLMarkup']/value[@xml:lang=$setUseLangAsDefault]" disable-output-escaping="yes"/>
- </div>
- </xsl:when>
- <xsl:when test="string(/root/customs/param[@name='HTMLMarkup']/value[1])!=''">
- <div width="100%">
- <xsl:value-of select="/root/customs/param[@name='HTMLMarkup']/value[1]" disable-output-escaping="yes"/>
- </div>
- </xsl:when>
- <xsl:otherwise>
- <table border="0" cellspacing="0" cellpadding="0" width="100%">
- <tr>
- <td class="portlet-font" align="center" valign="middle" height="100"><xts:string id="IDS_VEW_EDIT_TO_CUSTOMIZE"/></td>
- </tr>
- </table>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- </xsl:stylesheet>
|