123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cpscrn
- (C) Copyright IBM Corp. 2005, 2019
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xts xtsext">
- <xsl:import href="common.xslt"/>
- <xsl:import href="layout.xslt"/>
- <xsl:import href="menus.xslt"/>
- <xsl:import href="presentation.xslt"/>
- <xsl:variable name="doctype-public">
- <xsl:choose>
- <xsl:when test="string(/root/settings/doctype)='standards'">-//W3C//DTD HTML 4.01//EN</xsl:when>
- <xsl:otherwise>-//W3C//DTD HTML 3.2 Final//EN</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"
- doctype-system=""
- doctype-public=""/>
- <xsl:template match="/">
- <xsl:call-template name="render-page"/>
- </xsl:template>
- <xsl:template name="fragment-globals">
- <script type="text/javascript">
- // get javascript config for caf.js
- <xsl:value-of select="xtsext:cafaction( 'get_jsconfig','' )"/>
- _F_Config = new Object();
- _F_Config.init = function(){
- var appGateway="<xsl:value-of select="xtsext:javascriptencode($applicationGateway)"/>";
- this.gateway = "<xsl:value-of select="xtsext:javascriptencode($gateway)"/>";
- this.application = appGateway.substring(appGateway.lastIndexOf("/"));
- this.webContent = "<xsl:value-of select="xtsext:javascriptencode($contextPath)"/>";
- this.productLocale = "<xsl:value-of select="xtsext:javascriptencode($productLocale)"/>";
- this.skin = "<xsl:value-of select="xtsext:javascriptencode($skin)"/>";
- this.responsePattern = "<xsl:value-of select="xtsext:javascriptencode($responsePattern)"/>";
- this.cookieSecure = "<xsl:value-of select="xtsext:javascriptencode($cookieSecure)"/>";
- };
- _F_Config.init();
- _F_Config.help = {
- path: "<xsl:value-of select="xtsext:javascriptencode($helpPath)"/>",
- langs: " <xsl:value-of select="xtsext:javascriptencode($helpSupportedLangs)"/> ",
- book: "<xsl:value-of select="xtsext:javascriptencode($helpDefaultBook)"/>"
- };
- </script>
- </xsl:template>
- <!-- overriden extensions -->
- <xsl:template name="html-globals">
- <xsl:if test="'true' = $debug and '' != $debugFile">
- <script type="text/javascript">
- if (navigator.userAgent.indexOf("Firefox")== -1 && '' != '<xsl:value-of select="xtsext:javascriptencode($debugIELiteFile)"/>') {
- var head = document.getElementsByTagName('HEAD').item(0);
- var node = document.createElement("SCRIPT");
- node.type = 'text/javascript';
- node.src = '<xsl:value-of select="xtsext:javascriptencode($contextPath)"/><xsl:value-of select="xtsext:javascriptencode($debugIELiteFile)"/>';
- head.appendChild(node);
- }
- </script>
- <script type="text/javascript">
- <xsl:attribute name="src"><xsl:value-of select="$contextPath"/><xsl:value-of select="$debugFile"/></xsl:attribute>
- </script>
- <script type="text/javascript">
- _F_Debug.enabled = <xsl:value-of select="$debug"/>;
- _F_Debug.IELiteLevel = <xsl:value-of select="$debugIELiteLevel"/>;
- <xsl:for-each select="$debugObjects/debugObject">
- _F_Debug.settings["<xsl:value-of select="xtsext:javascriptencode(@name)"/>"] = <xsl:value-of select="xtsext:javascriptencode(@setting)"/>;
- </xsl:for-each>
- </script>
- </xsl:if>
- <script type="text/javascript">
- <xsl:variable name="rootPath">
- <xsl:value-of select="/root/path"/>
- </xsl:variable>
- var <xsl:value-of select="/root/id"/>=_F_attach({path: "<xsl:value-of select="xtsext:javascriptencode($rootPath)"/>", id: "<xsl:value-of select="/root/id"/>", page: true});
- <xsl:if test="/root/transientGlobal != ''">
- fragment.prototype.transientGlobal = <xsl:value-of select="/root/transientGlobal"/>;
- </xsl:if>
- <xsl:value-of select="/root/id"/>.setOnloadHandler(ui_init);
- ui_error.prototype.template =
- '<div role="alert" id="_THIS_errormsg"></div>' +
- '<div>' +
- '<a id="_THIS_error_showdetails"><xts:string id="IDS_GEN_DETAILS" encode="javascript"/></a> | ' +
- '<a id="_THIS_error_retry"><xts:string id="IDS_GEN_RETRY" encode="javascript"/></a> | ' +
- '<a id="_THIS_error_hide"><xts:string id="IDS_GEN_HIDE" encode="javascript"/></a>' +
- '</div>';
- </script>
- </xsl:template>
- <xsl:template name="html-pre-page">
- <xsl:if test="/root/fragment/info/display = 'fixed'">
- <xsl:attribute name="scroll">no</xsl:attribute>
- </xsl:if>
- </xsl:template>
- <xsl:template name="html-body">
- <xsl:apply-templates select="/root/layout" >
- <xsl:with-param name="pageType">page</xsl:with-param>
- </xsl:apply-templates>
- </xsl:template>
- </xsl:stylesheet>
|