123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: EMF
- (C) Copyright IBM Corp. 2005, 2015
- 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:edp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/presentation/"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:out="dummy-uri"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" exclude-result-prefixes="xsl edp dp dt cp xtsext xts utml cm">
- <xsl:output method="xml" encoding="UTF-8" indent="no"/>
- <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
- <!--
-
- edp:evtpage
-
- -->
- <xsl:variable name="edp-namespace-uri"
- select="'http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/presentation/'"/>
- <!--
- dp:page - hold entire page from open body tag to close
- -->
- <xsl:template match="edp:evtpage">
-
- <html>
- <out:attribute name="lang">
- <out:choose>
- <out:when test="/root/session">
- <out:value-of select="/root/session/param[@name='productLocale']"/>
- </out:when>
- <out:when test="/root/http">
- <out:value-of select="/root/http/param[@name='HTTP_ACCEPT_LANGUAGE']"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="''"/>
- </out:otherwise>
- </out:choose>
- </out:attribute>
- <out:if test="$is-ui-rtl">
- <out:attribute name="class">rtl</out:attribute>
- </out:if>
- <head>
- <xsl:if test="dp:meta">
- <xsl:copy-of select="dp:meta/child::node()"/>
- </xsl:if>
- <!-- add caching prevention instructions as required -->
- <xsl:if test="@cache = 'false'">
- <meta http-equiv="expires" content="0"/>
- </xsl:if>
- <title>
- <xsl:if test="@title">
- <xts:string id="{@title}"/>
- </xsl:if>
- <xsl:if test="@longTitle">
- <out:value-of select="{@longTitle}"/>
- </xsl:if>
- </title>
- <link rel="stylesheet" type="text/css">
- <out:attribute name="href">
- <xsl:choose>
- <!-- a morphlet can specify its own stylesheet. @stylesheet must contain a full path to the desired stylesheet. -->
- <xsl:when test="@stylesheet">
- <out:value-of select="@stylesheet"/>
- </xsl:when>
- <xsl:otherwise>
- <out:value-of select="$skin_style"/>
- </xsl:otherwise>
- </xsl:choose>
- </out:attribute>
- </link>
- <link rel="stylesheet" type="text/css" href="{'{$skin_fonts}'}"/>
- <xsl:if test="dp:script">
- <xsl:copy-of select="dp:script/child::node()"/>
- </xsl:if>
- </head>
- <!-- temporary theme selector, this will go on all match thms to switch using a url parameter -->
- <!-- define a function to call other that init() if required -->
- <xsl:variable name="initFunction">
- <xsl:choose>
- <xsl:when test="@initFunction"><xsl:value-of select="@initFunction"/></xsl:when>
- <xsl:otherwise><xsl:text>init</xsl:text></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <out:variable name="headerTitle"><xsl:copy-of select=".//dp:header/dp:title/*"/></out:variable>
- <body onload="if (window.{$initFunction}) {$initFunction}();" >
- <xsl:attribute name="topmargin">3</xsl:attribute>
- <xsl:attribute name="bottommargin">0</xsl:attribute>
- <xsl:attribute name="marginheight">3</xsl:attribute>
- <xsl:attribute name="rightmargin">3</xsl:attribute>
- <xsl:attribute name="leftmargin">3</xsl:attribute>
- <xsl:attribute name="marginwidth">3</xsl:attribute>
- <!-- allows the template coder to explicitly specify the role -->
- <xsl:choose>
- <xsl:when test="@role">
- <xsl:attribute name="role"><xsl:value-of select="@role"/></xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="role">region</xsl:attribute>
- <out:if test="true()">
- <out:variable name="pageLabel"><xsl:copy-of select="dp:pageLabel/*"/></out:variable>
- <out:if test="($headerTitle != '' or '{@longTitle}' != '') and $pageLabel =''">
- <out:attribute name="aria-labelledby">dialogHeaderTitle</out:attribute>
- </out:if>
- </out:if>
- </xsl:otherwise>
- </xsl:choose>
- <out:if test="true()">
- <out:variable name="pageLabel"><xsl:copy-of select="dp:pageLabel/*"/></out:variable>
- <out:if test="$pageLabel !='' ">
- <out:attribute name="aria-labelledby">bodyRoleLabel</out:attribute>
- </out:if>
- </out:if>
- <out:if test="$browser = 'ie'">
- <out:attribute name="style">overflow:auto</out:attribute>
- </out:if>
- <out:attribute name="class">
- <xsl:if test="@class"><xsl:value-of select="concat(@class,' ')"/></xsl:if>
- <out:choose>
- <out:when test="/root/env/param[@name='md.callBack']">body_dialog_modal</out:when>
- <out:otherwise>dialogBody</out:otherwise>
- </out:choose>
- </out:attribute>
- <out:if test="$is-ui-rtl">
- <out:attribute name="dir">rtl</out:attribute>
- </out:if>
- <out:if test="true()">
- <out:variable name="pageLabel"><xsl:copy-of select="dp:pageLabel/*"/></out:variable>
- <out:if test="$pageLabel !=''">
- <span id="bodyRoleLabel" style="position: absolute;margin-left: -9999px; margin-top: -9999px; "><out:value-of select="$pageLabel"/></span>
- </out:if>
- </out:if>
- <!-- apply templates to whatever is in the page tag -->
- <a href="#maincontent" tabindex="0" class="showOnFocus"><xts:string id="IDS_SECTION508_JUMPTOMAIN"/></a>
- <xsl:if test=".//cp:tabset[@id='maintabs']">
- <a href="#maintabs" tabindex="0" class="showOnFocus"><xts:string id="IDS_SECTION508_JUMPTOTABS"/></a>
- </xsl:if>
-
- <xsl:apply-templates select="*[not(self::dp:meta) and not(self::dp:script) and not(self::dp:pageLabel)]"/>
- </body>
- </html>
- </xsl:template>
- <!-- the main engine -->
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
|