123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- *****************************************************************
- ** Licensed Materials - Property of IBM
- **
- ** IBM Cognos Products: drill
- **
- ** (C) Copyright IBM Corp. 2001, 2015
- **
- ** 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).
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" messageBase="messages/drill.xml,messages/portal.xml, messages/portalRL.xml">
- <!--
- ===============================================================================================
- BLOCK: getRoutingServerContent
- PURPOSE: Get the TARGET routing server information from CM
- OUTPUT: routingServerGroupTarget
- This is used by getParameterRequest in execute-method block
- ===============================================================================================
- -->
- <xts:block id="getRoutingServerContent"
- processor="XSLT" type="exec" mandatory="false"
- condition=".[/root/env/param[@name='m_obj']]" nodelist="env, header">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- exclude-result-prefixes="xsl send xts cm">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
-
- <xsl:template match="/">
- <xsl:variable name="useTarget">
- <xsl:choose>
- <xsl:when test="string(/root/env/param[@name='m_p_target'])!=''">
- <xsl:value-of select="/root/env/param[@name='m_p_target']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/*[local-name()='queryResponse']/*[local-name()='drillPath']/*[local-name()='target']/*[local-name()='report' or local-name()='query' or local-name()='analysis']/*[local-name()='searchPath']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xts:sequence>
- <xts:append>
- <routing>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query>
- <cm:search><xsl:value-of select="$useTarget"/></cm:search>
- <cm:properties>
- <cm:property name="searchPath"/>
- <cm:property name="routingServerGroup"/>
- </cm:properties>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </routing>
- </xts:append>
- <xts:append select="/root/env">
- <param name="routingServerGroupTarget"><xts:queryValue select="/root/routing/*[local-name()='queryResponse']/*/*[local-name()='routingServerGroup']"/></param>
- </xts:append>
- <xts:delete select="/root/routing"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- BLOCK: getSourcePackageRoutingServerContent
- PURPOSE: Get the SOURCE package routing server information from CM
- OUTPUT: routingServerGroup
- This is only executed when routingServerGroup is not already passed to this page.
- If user set the scope first and then get to this page we get the routingServerGroup for the source package
- This is used for addDrillPath Request.
- ===============================================================================================
- -->
- <xts:block id="getSourcePackageRoutingServerContent"
- processor="XSLT" type="exec" mandatory="false"
- condition=".[/root/env/param[@name='m_path'] and not(/root/env/param[@name='routingServerGroup'])]" nodelist="env, header">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- exclude-result-prefixes="xsl send xts cm">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/">
- <xsl:variable name="sourcePackage">
- <xsl:value-of select="/root/env/param[@name='m_path']"/>
- </xsl:variable>
- <xts:sequence>
- <xts:append>
- <sourceRouting>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query>
- <cm:search><xsl:value-of select="$sourcePackage"/></cm:search>
- <cm:properties>
- <cm:property name="searchPath"/>
- <cm:property name="routingServerGroup"/>
- </cm:properties>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </sourceRouting>
- </xts:append>
- <xts:append select="/root/env">
- <param name="routingServerGroup"><xts:queryValue select="/root/sourceRouting/*[local-name()='queryResponse']/*/*[local-name()='routingServerGroup']"/></param>
- </xts:append>
- <xts:delete select="/root/sourceRouting"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- execute-method -
- ===============================================================================================
- -->
- <xts:block id="execute-method" processor="XSLT" dependency="getRoutingServerContent getSourcePackageRoutingServerContent" condition=".[ (not(/root/env/param[@name='promptRequest']) or /root/env/param[@name='promptRequest']='') and ((/root/env/param[@name='m_p_target'] != '' or /root/*[local-name()='queryResponse']/*[local-name()='drillPath']/*[local-name()='target']/*/*[local-name()='searchPath']!='') and not(root/env/param[@name='method']) or /root/env/param[@name='method']='forward' or /root/env/param[@name='method']='cancel' or /root/env/param[@name='method']='wait' or /root/env/param[@name='method']='finish' or /root/env/param[@name='method']='back' or /root/env/param[@name='method']='edit' or /root/env/param[@name='method']='')]" type="exec" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
-
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:prompt="http://developer.cognos.com/schemas/xts/portal/iPrompting/1/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <pf:variables/>
-
- <xsl:template match="/">
- <xts:sequence>
- <xsl:if test="not(/root/env/param[@name='method'])">
- <xts:append select="/root/env">
- <param name="method"><xsl:value-of select="'edit'"/></param>
- </xts:append>
- </xsl:if>
- <xsl:variable name="useTarget">
- <xsl:choose>
- <xsl:when test="string(/root/env/param[@name='m_p_target'])!=''">
- <xsl:value-of select="/root/env/param[@name='m_p_target']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/*[local-name()='queryResponse']/*[local-name()='drillPath']/*[local-name()='target']/*[local-name()='report' or local-name()='query' or local-name()='analysis']/*[local-name()='searchPath']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="returnTo">
- <xsl:choose>
- <xsl:when test="string(/root/env/param[@name='ps_nav_stack'])!=''">
- <xsl:value-of select="/root/env/param[@name='ps_nav_stack']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($app, '/new_drillthru_def2.xts')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="returnOp">
- <xsl:choose>
- <xsl:when test="string(/root/env/param[@name='ps_nav_stack'])!=''">pop</xsl:when>
- <xsl:otherwise>maintain</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!--
- targetClass is passed from new_drillthru_def2.xts to this page
- we don't send parameter request when we have abacab targets
- -->
- <xsl:if test="string(/root/env/param[@name='targetClass'])!='powerPlay8Report' and string(/root/env/param[@name='targetClass'])!='package' and string(/root/env/param[@name='targetClass'])!='powerPlay8ReportView'">
- <xts:append>
- <promptRequest>
- <send:request provider="xts" option="xml-multipart">
- <xsl:choose>
- <xsl:when test="not(/root/env/param[@name='method']) or /root/env/param[@name='method'] = 'edit' ">
- <prompt:collect>
- <getParametersRequest>true</getParametersRequest>
- <returnMorphlet><xsl:value-of select="$returnTo"/></returnMorphlet>
- <ps_nav_op><xsl:value-of select="$returnOp"/></ps_nav_op>
- <runAsync>true</runAsync>
- <promptObject><xsl:value-of select="$useTarget"/></promptObject>
- <routingServerGroup><xsl:value-of select="key('env-param','routingServerGroupTarget')"/></routingServerGroup>
- <showNoPromptsWarning>false</showNoPromptsWarning>
- <addToPromptingEnv>
- <param name="so.select"><xsl:value-of select="string(/root/env/param[@name='so.select'])"/></param>
- <param name="m_p_target"><xsl:value-of select="$useTarget"/></param>
- </addToPromptingEnv>
- </prompt:collect>
- </xsl:when>
- <xsl:otherwise>
- <xsl:element name="{/root/env/param[@name='method']}" namespace="http://developer.cognos.com/schemas/xts/portal/iPrompting/1/">
- <getParametersRequest>true</getParametersRequest>
- <returnMorphlet><xsl:value-of select="$returnTo"/></returnMorphlet>
- <ps_nav_op>maintain</ps_nav_op>
- <promptObject><xsl:value-of select="$useTarget"/></promptObject>
- <showNoPromptsWarning>false</showNoPromptsWarning>
- <callFinish>true</callFinish>
- <addToPromptingEnv>
- <param name="so.select"><xsl:value-of select="string(/root/env/param[@name='so.select'])"/></param>
- <param name="m_p_target"><xsl:value-of select="$useTarget"/></param>
- </addToPromptingEnv>
- </xsl:element>
- </xsl:otherwise>
- </xsl:choose>
- </send:request>
- </promptRequest>
- </xts:append>
- </xsl:if>
-
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <xts:block id="check-state" path="/portal/iPrompting/logicsheets/check-state.xslt" processor="XSLT" type="exec" dependency="execute-method getRoutingServerContent" condition=".[ (not(/root/env/param[@name='promptRequest']) or /root/env/param[@name='promptRequest']='') and not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='']" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- </xts:block>
- <!--
- ===============================================================================================
- formlogic_init - standard form logic initialization
- ===============================================================================================
- -->
- <xts:block id="formlogic_init" type="exec" mode="interpret" dependency="execute-method check-state getRoutingServerContent" condition=".[/root/*[local-name()='view']='properties' or /root/env/param[@name='promptRequest']!='']" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http" mandatory="false"/>
-
- <xts:block id="addPosition" type="exec" mode="interpret" dependency="execute-method check-state formlogic_init" processor="XSLT" condition=".[(/root/*[local-name()='view']='properties' or /root/env/param[@name='promptRequest']!='')]" mandatory="false">
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:pm="http://developer.cognos.com/schemas/xts/pm"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xsl xtsext pf bus cm pm xts">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:template match="root">
- <xsl:if test="not(/root/*[local-name()='promptRequest']/*/*[local-name()='parameters']/*[local-name()='item']/*[local-name()='position'])">
- <xts:sequence>
- <xts:replace select="/root/*[local-name()='promptRequest']">
- <xts:transform processor="XSLT" src="portal/drillthru/common/transforms/contentLogic.xslt" mimeType="text/xml">
- <xts:param name="logicsheet">logicsheets/portal.xsl</xts:param>
- <xts:param name="logicsheet">logicsheets/permissions.xsl</xts:param>
- <xts:param name="logicsheet">logicsheets/cm-logic.xsl</xts:param>
- <xts:param name="logicsheet">logicsheets/buslogic.xslt</xts:param>
- <root>
- <xts:queryNode select="/root/http | /root/session | /root/env | /root/system | root/*[local-name()='promptRequest'] "/>
- </root>
- </xts:transform>
- </xts:replace>
- </xts:sequence>
- </xsl:if>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!-- Set up the environment after prompt processing complete-->
- <xts:block id="cleandrill" type="exec" mode="interpret" dependency="execute-method check-state formlogic_init addPosition" processor="XSLT" path="/portal/drillthru/common/response/cleandrill.xslt" condition=".[(/root/*[local-name()='view']='properties' or /root/env/param[@name='promptRequest']!='') and (/root/env/param[@name='dp_path'] or /root/env/param[@name='selected_path'] or /root/env/param[@name='selected_scope'] or /root/env/param[@name='selected_query'])]" mandatory="false">
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
-
- <xts:block id="cleanpager" processor="XSLT" type="exec" dependency="execute-method check-state formlogic_init cleandrill addPosition" condition=".[/root/*[local-name()='view']='properties' or /root/env/param[@name='promptRequest']!='']" mandatory="false">
- <!-- <xts:block id="cleanpager" processor="XSLT" type="exec" dependency="formlogic_init cleandrill" mandatory="false"> -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:delete select="/root/env/param[starts-with(string(@name),'pager')]"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- renderPage - render the page
- ===============================================================================================
- -->
- <xts:block id="render_page" mode="output" processor="XSLT" type="exec" mimeType="text/html" condition=".[/root/*[local-name()='view']='properties' or /root/env/param[@name='promptRequest']!='']" dependency="execute-method check-state formlogic_init cleandrill cleanpager addPosition getRoutingServerContent" mandatory="false">
- <!-- <xts:block id="render_page" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="formlogic_init cleandrill cleanpager"> -->
- <!-- get the presentation theme -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="portal/drillthru/common/response/target.xslt"/>
- <xts:logicsheet path="logicsheets/permissions.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/connections.xslt"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <!-- apply the form logic -->
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <xts:logicsheet path="logicsheets/validation.xslt"/> <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:dcx="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/connections/1/"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
- xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:pm="http://developer.cognos.com/schemas/xts/pm"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
- xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:rdb="http://developer.cognos.com/schemas/xts/rdb"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- exclude-result-prefixes="xsl dcx cf cp pf pm df dp dt mf lyt utml">
-
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
-
- <!-- current file name -->
- <xsl:variable name="mname" select="'new_drillthru_def3.xts'"/>
- <!-- add any theme variables -->
- <pf:variables/>
- <pm:permissions origin="/root/target/cm:queryResponse/*/"/>
- <!-- add target template utils -->
- <rdb:utils/>
- <mf:variables stateParams="m_listpagersection m_pagerfromlistpager m_pagertolistpager"/>
- <!-- start the output -->
- <xsl:template match="/root">
- <xsl:variable name="hasTargetPermissions">
- <xsl:choose>
- <xsl:when test="/root/target"><xsl:value-of select="contains(string(/root/target/cm:queryResponse/*/cm:permissions),'read') or contains(string(/root/target/cm:queryResponse/*/cm:permissions),'execute')"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="false()"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="backURL" select="key('env-param','backURL')"/>
- <!-- get passed in parameters -->
- <xsl:variable name="wizardTitle">
- <xts:string id="IDS_NEW_DRILLPATH_TITLE"/>
- </xsl:variable>
- <xsl:variable name="canModify" select="$canWrite or $canSetPolicy"/>
- <xsl:variable name="browserTitle">
- <xsl:text/><xts:string id="IDS_NEW_TITLE_DRILLPATH_TARGET">
- <xts:param name="wizardTitle"><xsl:value-of select="$wizardTitle"/></xts:param>
- </xts:string><xsl:text/>
- </xsl:variable>
- <xsl:variable name="pageDescription">
- <xsl:text/><xts:string id="WIZ_NEW_INTRO_DRILLPATH_TARGET"/><xsl:text/>
- </xsl:variable>
- <!--Get the routingServerGroup from the environment and define a variable -->
- <!--This variable is used later on to setup to G_BusServer.F_SetRoutingServerGroup() to pass the request to the appropriate server-->
- <xsl:variable name="routingServerGroup">
- <xsl:choose>
- <xsl:when test="string(/root/env/param[@name='routingServerGroup'])!=''">
- <xsl:value-of select="/root/env/param[@name='routingServerGroup']"/>
- </xsl:when>
- <xsl:otherwise></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!--Get the target class to generate the target ICON -->
- <xsl:variable name="targetClassforICON">
- <xsl:choose>
- <xsl:when test="/root/target">
- <xsl:value-of select="string(/root/target/cm:queryResponse/*/cm:objectClass)"/>
- </xsl:when>
- <xsl:otherwise></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="targetBaseClassforICON">
- <xsl:choose>
- <xsl:when test="/root/target">
- <xsl:value-of select="string(/root/target/cm:queryResponse/*/cm:base/*/cm:objectClass)"/>
- </xsl:when>
- <xsl:otherwise></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text>
- <dp:page longTitle="$browserTitle">
- <dp:meta>
- <!-- Standard meta tags -->
- <pf:meta/>
- </dp:meta>
- <dp:script>
-
- <!-- Help system -->
- <pf:help context="HID_DRILL_THROUGH_ACTIONS"/>
-
- <script language="javascript" src="{$webcontent}/{$app}/js/connections.js"/>
- <script language="javascript" src="{$webcontent}/{$app}/js/utilities.js"/>
- <script language="javascript">
- <dt:checkMandatoryScript/>
- <dcx:checkReservedChar/>
- <xsl:if test="key('env-param','from_bmt')!=''">
- <!-- Called only when canceling back to BMT environment. -->
- function doCancel()
- {
- window.external.OnClose(1);
- }
- </xsl:if>
- //When click on cancel button we call this function to clear the state. This prevents keeping selected action around.
- function doCancelBack()
- {
- if (window.resetPageState)
- {
- resetPageState();
- }
- document.location.href = "<xsl:value-of select="/root/env/param[@name='backURL']"/>";
- return;
- }
- <!-- Start of HAL resources and CDrillPath related files -->
- //HAL Options: are used to specify the path that HAL libraries are loaded from
- G_HALOptions = { "isApplication" : false, "path" : "<xsl:value-of select="$webRoot"/>/" };
- G_CCHLOptions = { "path" : "<xsl:value-of select="$webRoot"/>/" };
- </script>
- <!-- Libraries that are used by HAL to handle the SOAP request, error message, and CAF -->
- <script language="javascript" src="{$webRoot}/hal/hal.js"/>
- <script language="javascript" src="{$webRoot}/cchl/cchl.js"/>
- <link type="text/css" rel="stylesheet" href="{$skin_root}/hal/hal_skin.css"/>
- <link type="text/css" rel="stylesheet" href="{$skin_root}/hal/hal_portal_skin.css"/>
- <script src="{$webRoot}/camcrypto/base64.js"></script>
- <script src="{$webRoot}/camcrypto/camcryptoutil.js"></script>
- <script src="{$webRoot}/camcrypto/sha1.js"></script>
- <script src="{$webRoot}/camcrypto/authtoken1.js"></script>
- <script>
- G_CCHL.M_sProductLocale ='<xsl:value-of select="$productLocale"/>';
- G_CCHL.M_sContentLocale ='<xsl:value-of select="$contentLocale"/>';
- G_CCHL.M_sGatewayURL ='<xsl:value-of select="$gateway"/>';
- G_HAL.F_Include("hal/C_WebRequest.js");
- G_HAL.F_Include("cchl/C_BusRequest.js");
- G_HAL.F_Include("hal/D_Progress.js");
- G_HAL.F_Include( "hal/C_Dialog.js" );
- G_HAL.F_Include( "cchl/dialogs/D_DetailedMsgBox.js" );
- G_HAL.F_Include( "hal/G_ResManager.js" );
- G_HAL.F_Include( "hal/C_Error.js" );
- var webRoot = '<xsl:value-of select="$webRoot"/>';
- G_HAL.F_EnableAccessibility(true);
- // Used to disable the form controls
- // This is used as a part of work around for
- // showing the controls behind the rename replace dialog blocker
- F_selectBlocker = function()
- {
- //This is specific to drill through wizard
- //We should hide the select due to a browser bug
- //otherwise the won't stay underneath the dialogBlocker
- if (document.pform.m_action)
- {
- document.pform.m_action.style.backgroundColor = 'LightGrey';
- document.pform.m_action.disabled = true;
- }
- if (document.pform.tg_fmtselect)
- {
- document.pform.tg_fmtselect.style.backgroundColor = 'LightGrey';
- document.pform.tg_fmtselect.disabled = true;
-
- }
- if (document.pform.m_prompt)
- {
- document.pform.m_prompt.style.backgroundColor = 'LightGrey';
- document.pform.m_prompt.disabled = true;
- }
- }
- F_selectUnblocker = function()
- {
- // This is specific to drill through wizard
- // it is used to visible the controls we hide
- // in the onBeforeVisible method
- if (document.pform.m_action)
- {
- document.pform.m_action.disabled = false;
- document.pform.m_action.style.backgroundColor = 'white';
- }
- if (document.pform.tg_fmtselect)
- {
- document.pform.tg_fmtselect.disabled = false;
- document.pform.tg_fmtselect.style.backgroundColor = 'white';
- }
- if (document.pform.m_prompt)
- {
- document.pform.m_prompt.disabled = false;
- document.pform.m_prompt.style.backgroundColor = 'white';
- }
- }
- </script>
- <!--These style are used for Dialog Blockers-->
- <style>
- DIV.clsDialogBlocker
- {
- background-color: Gray;
- filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50);
- -moz-opacity:0.5;
- opacity:0.5;
- }
- blockedSelect
- {
- background-color: Gray;
- filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50);
- -moz-opacity:0.5;
- opacity:0.5;
- }
- iframe
- {
- display:none;
- display/**/:block;
- position:absolute;
- top:0;
- left:0;
- z-index:-1;
- filter:mask();
- width:500px;
- height:235px;
- }
- </style>
- <script language="javascript" src="{$webRoot}/drill/CDrillPath.js"/>
- <script language="javascript" src="{$webRoot}/drill/Dialogs/D_RenameReplace.js"/>
- <!-- End of HAL resources and CDrillPath related files -->
- <script language="javascript" src="{$webcontent}/{$app}/js/utilities.js"/>
- <rdb:scripts/>
- </dp:script>
- <utml:form name="pform" method="post" action="{$gateway}">
- <!-- added to prevent form automatically regenerate the format inputs that
- we already have in the form. this has caused bug# 581771 -->
- <utml:exclude-prefix>m_ro_outputFormat_</utml:exclude-prefix>
- <dp:header>
- <!-- header titles-->
- <dp:title><xsl:value-of select="normalize-space($browserTitle)"/></dp:title>
- <dp:description>
- <xsl:value-of select="$pageDescription"/>
- </dp:description>
- <dp:close>
- <xsl:choose>
- <xsl:when test="key('env-param','from_bmt')">
- <a href="javascript:doCancel()">
- <dp:closeMarker/>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <a href="{$backURL}">
- <dp:closeMarker/>
- </a>
- </xsl:otherwise>
- </xsl:choose>
- </dp:close>
- </dp:header>
-
- <!-- Body -->
- <!--Show the selected target-->
- <lyt:layout style="2">
- <lyt:section width="50%">
- <dp:list>
- <dp:section>
- <dp:label>
- <xts:string id="IDS_PROP_DRILLPATH_DEF_TARGET"/>
- </dp:label>
- </dp:section>
- <xsl:choose>
- <xsl:when test="string($hasTargetPermissions)='false'">
- <dp:section >
- <dp:text nospace="nospace" >
- <xts:string id="IDS_PROP_DRILLPATH_NOTARGET"/>
- </dp:text>
- </dp:section>
- </xsl:when>
- <xsl:when test="/root/target">
- <xsl:variable name="object-start-at-path">
- <xsl:choose>
- <!-- Do not provide a path for contact otherwise invalid path displayed for logged on user -->
- <xsl:when test="starts-with(/root/target/cm:queryResponse/*/cm:searchPath, '~') or starts-with(/root/target/cm:queryResponse/*/cm:searchPath,key('session-param', 'e_hp'))">
- <xsl:value-of select="concat(key('session-param', 'e_hp'), '/folder')"/>
- </xsl:when>
- <xsl:when test="starts-with(/root/target/cm:queryResponse/*/cm:target/*/cm:searchPath,'/content')">
- <xsl:value-of select="$defaultContentRoot"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <dp:section>
- <div>
- <table role="presentation"><tr><td>
- <xsl:call-template name="gen-icon">
- <xsl:with-param name="class" select="$targetClassforICON"/>
- <xsl:with-param name="baseClass" select="$targetBaseClassforICON"/>
- </xsl:call-template>
- </td>
- <td valign="middle" class="tableText" lang="{$contentLocale}">
- <cf:do-the-path-link>
- <cf:param name="familytree">/root/target/cm:queryResponse/*/cm:ancestors</cf:param>
- <cf:param name="familymember">/root/target/cm:queryResponse/*/cm:defaultName</cf:param>
- <cf:param name="home">
- <xsl:value-of select="$object-start-at-path"/>
- </cf:param>
- </cf:do-the-path-link>
- </td></tr></table>
- </div>
- </dp:section>
- </xsl:when>
- <xsl:otherwise>
- <dp:section>
- <dp:text nospace="nospace">
- <xts:string id="IDS_PROP_DRILLPATH_TARGETNOTSPECIFIED"/>
- </dp:text>
- </dp:section>
- </xsl:otherwise>
- </xsl:choose>
- </dp:list>
- </lyt:section>
- </lyt:layout>
- <!--END of Show the selected target-->
-
- <!-- The code for this part is in target.xslt -->
- <rdb:target mode="wizard" origin="/root/target/cm:queryResponse/*" targetOrigin="/root/*[local-name()='promptRequest']/*/*[local-name()='parameters']/*" targetPermissions="$hasTargetPermissions" canModifyParams="'true'"/>
-
- <dp:footer>
- <!-- Cancel button -->
- <xsl:choose>
- <xsl:when test="key('env-param','from_bmt')!=''">
- <df:button df:id="IDS_CANCEL" df:style="href" df:href="javascript:doCancel()"/>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_CANCEL" df:style="href" df:href="javascript:doCancelBack()"/>
- </xsl:otherwise>
- </xsl:choose>
- <!-- Back button -->
- <df:button df:id="IDS_BACK" df:label="IDS_BACK_LABEL" df:style="maintain" onclick="javascript:setBookMarks();resetPageState();">
- <df:target>
- <xsl:value-of select="concat($app, '/new_drillthru_def2.xts')"/>
- </df:target>
- </df:button>
- <!-- Next button -->
- <df:button df:id="IDS_NEXT"/>
- <script language="javascript">
- function validate()
-
- {
- var frm = document.pform;
- frm.m_return.value = "";
- <!--set the prompt run option in the drillpath -->
- <!-- There are following 3 options we can set for display prompt page:
- 1. Only when required parameter values are missing (missingReq)
- 2. Always (always)
- 3. Based on the default prompt settings of the target report (useTarget)-->
- // a gard to prevent error when m_prompt does not exist
- if (frm.m_prompt){
- if ( frm.m_prompt.value == 'always')
- frm.m_ro_prompt.value= 'true';
- else if (frm.m_prompt.value == 'missingReq')
- frm.m_ro_prompt.value = 'false';
- else <!-- if it is set to "useTarget', remove the prompt from drillpath -->
- frm.m_ro_prompt.value='';
- }
-
- <!--If the selected target is pp8, only set m_ro_drillTragetPath (runOption for promptFormat), otherwise, set both
- m_ro_drillTragetPath and m_p_target. -->
-
- if (frm.m_p_target)
- {
- frm.m_ro_drillTragetPath.value = frm.m_p_target.value;
- }
-
- if(frm.m_action)
- frm.m_p_action.value = frm.m_action.value;
-
- <!-- Set or update useEditSpecification in Drillpath-->
-
- frm.m_dt_useEditSpecification.value ='false';
-
- if (frm.m_p_action.value == "runDyn")
- {
- frm.m_p_action.value = "run";
- frm.m_dt_useEditSpecification.value ='true';
- }
-
- if(frm.m_p_action.value!="viewOutput")
- {
- if( frm.m_p_action.value == "editWPS" || frm.m_p_action.value == "editWPP8")
- frm.m_p_action.value = "edit";
- setBookMarks();
- resetPageState();
- // instead of returning true we call addDrillPath this function returns true or false
- return addDrillPath();
- }
- if(checkForParams())
- {
- setBookMarks();
- resetPageState();
- // instead of returning true we call addDrillPath this function returns true or false
- return addDrillPath();
- }
- return false;
- }
- /**
- * calls G_DrillPath.addDrillPath()
- * get the form object, sets cafContextID, and get the targetClass
- */
- function addDrillPath(){
- <!-- This condition used to return true without calling the new adddrillpath method when we don't have targets that uses drill spec.
- This is should be removed as soon as we make sure we have covered all the possible targets in our library-->
- <xsl:if test="$targetClass !='report' and $targetClass !='reportView' and $targetClass !='query' and $targetClass !='analysis' and $targetClass !='package' and $targetClass != 'powerPlay8Report' and $targetClass != 'powerPlay8ReportView'">
- return true;
- </xsl:if>
- // this is defined so CAF let the request get into the server
- G_BusServer.F_SetCafContextId(cafContextId);
-
- <xsl:if test="$routingServerGroup!=''">
- // Set the routing Server Group
- // This is used to send the requests to the appropriate server based on routing Server Group settings
- var routingServerGroup = '<xsl:value-of select="$routingServerGroup"/>';
- G_BusServer.F_SetRoutingServerGroup(routingServerGroup) ;
- </xsl:if>
-
- // Gets all the variables that are required to save the drill path
- var targetClass = '<xsl:value-of select="$targetClass"/>';
- var frm = document.pform;
- var useEditSpecification = frm.m_dt_useEditSpecification.value;
- /*calls F_addDrillPath with the form object that contains the required information
- *always returns false. prevents the page to be submited
- *the page is submited by G_DrillPath.F_Request_OnComplete if the response does not have any error (e.g. when drill path exist)
- */
- return G_DrillPath.F_addDrillPath(frm,targetClass);
- }
- </script>
- <!-- This condition used to show the old button if we don't have abacab targets
- TODO: this should be removed when we use add,query, and update methods for all targetClasses-->
- <xsl:if test="$targetClass !='package' and $targetClass != 'powerPlay8Report'">
- <df:button df:id="IDS_FINISH" df:style="submit" utml:validate="true"/>
- </xsl:if>
- <xsl:if test="$targetClass='package' or $targetClass= 'powerPlay8Report'">
- <df:button df:id="IDS_FINISH" df:style="maintain" utml:validate="true">
- <df:target>
- <xsl:value-of select="concat($app, '/cc_drillthrough.xts')"/>
- </df:target>
- </df:button>
- </xsl:if>
- <utml:input type="hidden" name="promptRequest">
- <utml:value>
- <xsl:choose>
- <xsl:when test="not(/root/env/param[@name='promptRequest'])">
- <xsl:variable name="parameters-markup">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="/root/*[local-name()='promptRequest']"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($parameters-markup), true()))"/>
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="/root/env/param[@name='promptRequest']"/></xsl:otherwise>
- </xsl:choose>
- </utml:value>
- </utml:input>
- </dp:footer>
- <!--This is used by HAL to write the required HTML elements on the page-->
- <script>
- G_HAL.F_WriteHtml();
- </script>
- <!--Used for Debuging: enable this text area and the request is dumped into it-->
- <!--textarea id="requestDump" rows="30" cols="150"></textarea-->
- </utml:form>
- </dp:page>
- </xsl:template>
- <xsl:template match="*[local-name()='messageString']">
- <xsl:value-of select="xtsext:javascriptencode(string(.))"/><xsl:if test="string-length(normalize-space(.)) > 0">\n</xsl:if>
- </xsl:template>
- <pf:serialize-xml/>
- <pf:gen-icon/>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - display debug information
- ===============================================================================================
- -->
- <xts:block id="debug" dependency="render_page" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
- <!-- get the debug logic sheet -->
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|