123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2014
- 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/" messageBase="messages/portal.xml, messages/portalRL.xml" resolverBase="prompting" includeConfig="true" requiredCapability="canUseCognosViewerRunWithOptions">
- <!--
- ===============================================================================================
- formlogic_init - standard form logic initialization
- ===============================================================================================
- -->
- <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
- <!--
- ===============================================================================================
- checkParam - change m_name, m_class, m_obj when dealing with shortcut.
- ===============================================================================================
- -->
- <xts:block id="checkParam" path="/portal/ref2target.xml" dependency="formlogic_init" type="exec" mode="interpret" processor="XSLT" condition=".[/root/env/param[starts-with(@name,'sc_target')]!='']" mandatory="false"/>
-
- <!--
- ===============================================================================================
- cleanEnv - if it's the first time we hit the page then remove all the empty runOptions from the previous page
- ===============================================================================================
- -->
- <xts:block id="cleanEnv" processor="XSLT" type="exec" dependency="processMobileEntries processResponse checkParam callMorphlet" condition=".[not(/root/env/param[@name = 'visited_run_with_options_advanced'])]" mandatory="false">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <!-- remove all the empty env params -->
- <xts:delete select="/root/env/*[.='']"/>
-
- <!-- append the mobileDescription the first time we hit the page -->
- <xts:delete select="/root/env/param[@name='mobileDescription']"/>
- <xts:append select="/root/env">
- <param name="mobileDescription"><xts:string id="IDS_OTHERRUN_MOBILE_NO_RECIPIENTS"/></param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- callMorphlet - Calls the appropriate morphlet using the passed in params which will return
- markup to be displayed or the expected results
- ===============================================================================================
- -->
- <xts:block id="callMorphlet" processor="XSLT" dependency="formlogic_init" type="exec" condition=".[ /root/env/param[@name='controller_state'] != '' ]" mandatory="false">
- <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
-
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:dlgctrl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/controller-templates/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:req-params="http://developer.cognos.com/schemas/request/params"
- exclude-result-prefixes="xsl dlgctrl xtsext req-params">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:key name="request-param" match="/root/*[local-name()='requestParams']/*[local-name()='param']" use="@name"/>
- <pf:variables/>
-
- <xsl:template match="/">
- <xts:sequence>
- <xsl:choose>
- <!-- call email options morphlet for email options -->
- <xsl:when test="starts-with(/root/env/param[@name='controller_state'],'email')">
- <dlgctrl:XTS2Request>
- <dlgctrl:target>/portal/emailOptions/email_options.xts</dlgctrl:target>
- <dlgctrl:stackName>other_run_options_advanced</dlgctrl:stackName>
- <req-params:param name="options"><xsl:value-of select="key('env-param','deliveryOptions')"/></req-params:param>
- <req-params:param name="titlePrefix"><xts:string id="IDS_EMAIL_OPTIONS_TITLE_PREFIX"/></req-params:param>
- <req-params:param name="titlePostfix">
- <xsl:value-of select="xtsext:enforceBTD(key('env-param','m_name'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </req-params:param>
- <req-params:param name="defaultTarget"><xsl:value-of select="key('env-param','m')"/></req-params:param>
- <req-params:param name="burst"><xsl:value-of select="key('env-param','m_ro_burst')"/></req-params:param>
- <req-params:param name="usePowerPlay8Options"><xsl:value-of select="contains(' powerPlay8Report powerPlay8ReportView ', concat(' ', key('env-param', 'm_class'),' '))"/></req-params:param>
- </dlgctrl:XTS2Request>1
- </xsl:when>
- <!-- call add entries morphlet for mobile recipients -->
- <xsl:otherwise>
- <dlgctrl:XTS2Request>
- <dlgctrl:target>/portal/addEntries/add_entries.xts</dlgctrl:target>
- <dlgctrl:stackName>other_run_options_advanced</dlgctrl:stackName>
- <req-params:param name="defaultTarget"><xsl:value-of select="key('env-param','m')"/></req-params:param>
- <req-params:param name="titlePostfix"><xsl:value-of select="key('env-param','m_name')"/></req-params:param>
- <req-params:param name="defaultSearchPath">/directory</req-params:param>
- <req-params:param name="showUsers">true</req-params:param>
- <req-params:param name="withCC">false</req-params:param>
- <req-params:param name="addEntriesUI"><xsl:value-of select="'recipients'"/></req-params:param>
- <req-params:param name="returnProperties">
- <req-params:property name="userName"/>
- </req-params:param>
- </dlgctrl:XTS2Request>
- </xsl:otherwise>
- </xsl:choose>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- processReponse - Process the response from the callMorphlet block and either displays
- the markup or processes the results
- ===============================================================================================
- -->
- <xts:block id="processResponse" path="/portal/emailOptions/logicsheets/process_email_options.xslt" processor="XSLT" dependency="callMorphlet" type="exec" condition=".[starts-with(/root/env/param[@name='controller_state'],'email')]" mandatory="false">
- <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
-
- <!--
- ===============================================================================================
- getAddEntriesReponse - Get the response from the addEntries callMorphlet block
- ===============================================================================================
- -->
- <xts:block id="getAddEntriesResponse" path="/portal/mobileOptions/logicsheets/get_add_entries_response.xslt" processor="XSLT" dependency="callMorphlet" type="exec" condition=".[starts-with(/root/env/param[@name='controller_state'],'mobile')]" mandatory="false">
- <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
-
- <!--
- ===============================================================================================
- processMobileEntries - Process the response from the addEntries callMorphlet block and processes the results
- ===============================================================================================
- -->
- <xts:block id="processMobileEntries" path="/portal/mobileOptions/logicsheets/process_mobile_entries.xslt" processor="XSLT" dependency="getAddEntriesResponse" type="exec" mandatory="false">
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
- <!--
- ===============================================================================================
- Main content request
- ===============================================================================================
- -->
- <xts:block id="getContent" processor="XSLT" type="exec" dependency="cleanEnv processResponse processMobileEntries" condition=".[ not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='' ]" mandatory="false">
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xts:logicsheet path="portal/runWithOptions/logicsheets/request.xslt"/>
- <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:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- xmlns:rdr="http://developer.cognos.com/schemas/xts/rdr/"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- exclude-result-prefixes="xsl rdr send xtsext cm cml dt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
-
- <cml:object-predicates/>
- <xsl:template match="/">
- <xsl:variable name="runOnce" select="not(key('env-param','visited_run_with_options_advanced')) and not(key('env-param','visited_run_with_options'))"/>
-
- <xts:sequence>
- <rdr:Requests>
- <rdr:Request type="pageDefinition"/>
- <rdr:Request type="runnable" mode="reportAdvanced">
- <rdr:searchPath>
- <xsl:value-of select="key('env-param', 'm_obj')"/>
- </rdr:searchPath>
- </rdr:Request>
- <rdr:Request type="credential"/>
- <rdr:Request type="burstCapability"/>
- <xsl:if test="key('env-param','m_ro_saveAsPath')!='' and (key('env-param','visited_save_as')='true' or not(/root/env/param[@name='visited_run_with_options_advanced']))">
- <cm:query>
- <cm:search><xsl:value-of select="key('env-param','m_ro_saveAsPath')"/></cm:search>
- <cm:properties>
- <cm:property name="ancestors"/>
- <cm:property name="defaultName"/>
- </cm:properties>
- </cm:query>
- </xsl:if>
- <!-- only query for the schedule if we're doing a run once. If we didn't visit the basic run with options dialog then we must have come from the tool -->
- <xsl:if test="$runOnce">
- <rdr:Request type="accountOptions"/>
- <rdr:Request type="schedule" mode="reportAdvanced">
- <rdr:searchPath>
- <xsl:value-of select="concat(key('env-param','m_obj'),'/schedule[permission("read")]')"/>
- </rdr:searchPath>
- </rdr:Request>
- </xsl:if>
- <!-- need to get all the archiveLocations -->
- <cm:query>
- <cm:search>
- <xsl:text>/configuration/archiveLocation[permission("execute")]</xsl:text>
- </cm:search>
- <cm:properties>
- <cm:property name="searchPath"/>
- <cm:property name="defaultName"/>
- </cm:properties>
- <cm:sortBy>
- <cm:sort name="defaultName" order="ascending"/>
- </cm:sortBy>
- </cm:query>
- </rdr:Requests>
-
- <!-- if we're doing a run once and it's the first time we hit the page, then prepare cm queries to get the delivery options information -->
- <xsl:if test="$runOnce">
- <xts:append>
- <deliveryOptionsQueries>
- <xts:transform src="transforms/portal/options/generateCMQueriesForDeliveryInfo.xslt" processor="XSLT">
- <root>
- <xts:queryNode select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply' and position()='6']"/>
- </root>
- </xts:transform>
- </deliveryOptionsQueries>
- </xts:append>
-
- <!-- if we don't have a parameterDescription, then separate the connection/signon prompts from other prompts. -->
- <xsl:if test="not(/root/env/param[@name='parameterDescription'])">
- <dt:splitParameters queryNode="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']"/>
- <!-- prepare the parameters off the runnable in case there aren't any on the schedule -->
- <dt:splitRunnableParameters queryNode="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*"/>
- </xsl:if>
- </xsl:if>
- </xts:sequence>
-
- <!-- get a list of installed components -->
- <xts:sequence>
- <xts:append>
- <installedComponents>
- <xts:function name="getConfiguration">
- <xts:param name="installedComponents"/>
- </xts:function>
- </installedComponents>
- <xts:function name="getConfiguration">
- <xts:param name="serviceDefaultOptions"/>
- <xts:param name="overrideOptions"/>
- </xts:function>
- </xts:append>
- </xts:sequence>
- <!-- if we have a language blob, then unpack it -->
- <xsl:if test="key('env-param','selected_languages')">
- <xts:sequence>
- <xts:append>
- <xsl:value-of select="xtsext:xmldecode( string( /root/env/param[@name = 'selected_languages'] ) )" disable-output-escaping="yes"/>
- </xts:append>
- </xts:sequence>
- </xsl:if>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- queryDataSourcePrompts - Get the parameter data source connection/signon information from CM
- ===============================================================================================
- -->
- <xts:block id="queryDataSourcePrompts"
- nodeList="credentialParameters,runnableParameters"
- path="/portal/iPrompting/logicsheets/query-datasource.xslt"
- processor="XSLT"
- type="exec"
- dependency="getContent"
- condition=".[/root/credentialParameters or /root/runnableParameters/credentialParameters]"
- mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
- <!--
- ===============================================================================================
- queryReportBaseMetadata:
- Query CM the metadataModelPackage information for the base report. This block only runs for reportViews.
- ===============================================================================================
- -->
- <xts:block id="queryReportBaseMetadata" dependency="getContent" type="exec" mode="interpret" processor="XSLT" condition=".[ (not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='') and contains(' reportView powerPlay8ReportView ', concat(' ', /root/env/param[@name='m_class'], ' '))]" mandatory="false">
- <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:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <reportBaseMetadata>
- <xsl:variable name="packageSearchPath" select="/root/cm:queryResponse/cm:queryReply[2]/*/cm:base/*/cm:metadataModelPackage/cm:package/cm:searchPath"/>
- <xsl:if test="$packageSearchPath != ''">
- <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 xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:requests>
- <cm:query>
- <cm:search>
- <!-- metadataModelPackage for the base report -->
- <xsl:value-of select="$packageSearchPath"/>
- </cm:search>
- <cm:properties>
- <cm:property name="effectiveUserCapabilities"/>
- </cm:properties>
- </cm:query>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xsl:if>
- </reportBaseMetadata>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- queryDeliveryOptionsInfo:
- Query CM for the necessary information to build the delivery options summaries
- ===============================================================================================
- -->
- <xts:block id="queryDeliveryOptionsInfo" dependency="getContent" type="exec" mode="interpret" processor="XSLT" condition=".[not(/root/env/param[@name='visited_run_with_options']) and not(/root/env/param[@name='visited_run_with_options_advanced']) and (not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='')]" mandatory="false">
- <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:xtsext="xalan://com.cognos.xts.ext.XTSExt">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <deliveryOptionsInfo>
- <xsl:if test="/root/deliveryOptionsQueries/*[local-name()='query']">
- <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 xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:requests>
- <xsl:copy-of select="/root/deliveryOptionsQueries/*[local-name()='query']"/>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xsl:if>
- </deliveryOptionsInfo>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- generateDefaults
- ===============================================================================================
- -->
- <xts:block id="generateDefaults" dependency="queryDataSourcePrompts queryDeliveryOptionsInfo queryReportBaseMetadata getContent" type="exec" mode="interpret" processor="XSLT" condition=".[not(/root/env/param[@name='p_runTime']) and (not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='')]" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- 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:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:set="http://exslt.org/sets"
- exclude-result-prefixes="cf xtsext xts cm cp pf dt send xsi set">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
-
- <xsl:template match="/">
- <xts:sequence>
- <!-- doing a run once -->
- <xsl:choose>
- <xsl:when test="not(/root/env/param[@name='visited_run_with_options'])">
- <xsl:if test="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']/*[local-name()='options']">
- <xts:append>
- <extractedOptions>
- <xts:transform src="transforms/portal/options/extractEmailOptions.xslt" processor="XSLT">
- <xsl:copy-of select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']/*[local-name()='options']"/>
- </xts:transform>
- </extractedOptions>
- </xts:append>
- <!-- Delete the old emailAsAttachment and emailAsURL to avoid duplicates in /root/env.-->
- <xts:delete select="/root/env/param[@name='emailAsAttachment' or @name='emailAsURL']"/>
- <!-- we need these values later -->
- <xts:append select="/root/env">
- <param name="m_ro_emailAsAttachment">
- <xsl:value-of select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']/*[local-name()='options']/*[local-name()='value']/*[local-name()='item'][name='emailAsAttachment']/*[local-name()='value']"/>
- </param>
- <param name="m_ro_emailAsURL">
- <xsl:value-of select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']/*[local-name()='options']/*[local-name()='value']/*[local-name()='item'][name='emailAsURL']/*[local-name()='value']"/>
- </param>
- </xts:append>
-
- <!-- Delete the old mobileDescription and mobileSummary to avoid duplicates in /root/env. generateUIHelpersFromOptions will always generate the correct entries -->
- <xts:delete select="/root/env/param[@name='mobileDescription' or @name='mobileSummary']"/>
- <xts:append select="/root/env">
- <!-- web64encode the email options so they can be passed to the email options dialog -->
- <xts:transform src="portal/controls/create_web64_param.xslt" processor="XSLT">
- <param name="deliveryOptions">
- <passport><xsl:value-of select="$passport"/></passport>
- <markup>
- <xts:transform name="XMLEncode">
- <xts:transform src="transforms/portal/options/buildOptions.xslt" processor="XSLT">
- <root>
- <xts:queryNode select="/root/extractedOptions/emailOptions/*"/>
- </root>
- </xts:transform>
- </xts:transform>
- </markup>
- </param>
- </xts:transform>
- <!-- mobile options -->
- <xts:transform src="portal/controls/create_web64_param.xslt" processor="XSLT">
- <param name="mobileOptions">
- <passport><xsl:value-of select="$passport"/></passport>
- <markup>
- <xts:transform name="XMLEncode">
- <xts:transform src="transforms/portal/options/buildOptions.xslt" processor="XSLT">
- <root>
- <xts:queryNode select="/root/extractedOptions/mobileOptions/*"/>
- </root>
- </xts:transform>
- </xts:transform>
- </markup>
- </param>
- </xts:transform>
-
- <!-- generate the report options params -->
- <xts:transform src="transforms/portal/options/generateParams.xslt" processor="XSLT">
- <xts:param name="messageBase">/messages/portal.xml</xts:param>
- <root>
- <xts:transform src="transforms/portal/options/buildOptions.xslt" processor="XSLT">
- <root>
- <xts:queryNode select="/root/extractedOptions/notEmailOptions/*"/>
- </root>
- </xts:transform>
- <reportOptions>
- <xts:transform src="transforms/portal/options/mergeReportOptions.xslt" processor="XSLT">
- <root>
- <xts:queryNode select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*"/>
- </root>
- </xts:transform>
- </reportOptions>
- <deliverySection>true</deliverySection>
- <defaultOptions>true</defaultOptions>
- <obj>
- <xsl:copy-of select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*"/>
- </obj>
- <preferences>
- <xsl:copy-of select="/root/header/*[local-name() = 'biBusHeader']/*[local-name() = 'userPreferenceVars']/*"/>
- </preferences>
- <serviceDefaults>
- <xsl:copy-of select="/root/configuration/property[@name='serviceDefaultOptions']/*/value"/>
- </serviceDefaults>
-
- <xsl:if test="not(contains(concat(' ', /root/cm:queryResponse/cm:queryReply[2]/*/cm:permissions, ' '), ' write '))">
- <save_how>new_entry</save_how>
- </xsl:if>
- <defaultArchiveLocation>
- <!-- the first archive in the cm response is the default -->
- <xsl:copy-of select="/root/cm:queryResponse/cm:queryReply/cm:archiveLocation[1]"/>
- </defaultArchiveLocation>
- </root>
- </xts:transform>
-
- <xsl:call-template name="dt:generateUIHelpersFromOptions">
- <xsl:with-param name="queryReplyPath" select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][6]/*"/>
- <xsl:with-param name="saveAsPath" select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*"/>
- <xsl:with-param name="deliveryInfo" select="/root/deliveryOptionsInfo/*[local-name()='queryResponse']"/>
- <xsl:with-param name="appendPath" select="'/root/env'"/>
- <xsl:with-param name="genParams" select="true()"/>
- </xsl:call-template>
- </xts:append>
-
- <!-- this sequence converts the list of mobile recipients from the schedule options found in the bus:mobileOptionSearchPathMultipleObjectArray
- into a format that the add_entries morphlet requires - a <selectedEntries> node. CM is queried to get the required information such as
- userName, class etc...
- -->
- <xts:delete select="/root/selectedEntries"/>
- <xts:append select="/root">
- <xsl:variable name="unique-search-paths" select="set:distinct(/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']/*[local-name()='options']/*[local-name()='value']/*[local-name()='item'][@xsi:type='bus:mobileOptionSearchPathMultipleObjectArray']/*[local-name()='value']/*[local-name()='item'])"/>
- <selectedEntries>
-
- <!-- transform the CM result into the same structure that the add entries returns. -->
- <xsl:if test="count($unique-search-paths) > 0">
- <xts:transform src="portal/mobileOptions/transforms/gen-standard-list.xslt" processor="XSLT">
- <root>
- <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 xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <cm:requests>
- <xsl:for-each select="$unique-search-paths">
- <xsl:if test=". != ''">
- <cm:query>
- <cm:search>
- <xsl:value-of select="."/>
- </cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="searchPath"/>
- <cm:property name="userName"/>
- <cm:property name="objectClass"/>
- <cm:property name="ancestors"/>
- <cm:property name="hidden"/>
- </cm:properties>
- </cm:query>
- </xsl:if>
- </xsl:for-each>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- <action>recipients</action>
- </root>
- </xts:transform>
- </xsl:if>
- </selectedEntries>
- </xts:append>
- </xsl:if>
-
- <dt:generateScheduleParams schedule="/root/cm:queryResponse/cm:queryReply/cm:schedule"/>
-
- <!-- generate the prompt description -->
- <xsl:choose>
- <!-- If there are parameters on the runnable (doing a run with options) or on the schedule
- (doing a run once) -->
- <xsl:when test="/root/parameters/* or /root/credentialParameters/*">
- <dt:promptDescription/>
- </xsl:when>
- <!-- if we're doing a run once and there are parameters on the runnable -->
- <xsl:otherwise>
- <dt:promptDescription checkRunnableParameters="true"/>
- </xsl:otherwise>
- </xsl:choose>
-
- <xts:append select="/root/env">
- <xsl:choose>
- <!-- if we're doing a run once and there are parameters on the schedule, then those parameters
- need to be passed in the execute request -->
- <xsl:when test="/root/cm:queryResponse/cm:queryReply/cm:schedule/cm:parameters/*">
- <!-- encode the parameters -->
- <xsl:variable name="parameters-markup">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="/root/cm:queryResponse/cm:queryReply/cm:schedule/cm:parameters"/>
- </xsl:call-template>
- </xsl:variable>
- <param name="m_rp_parameters">
- <xsl:value-of select="xtsext:web64encode(string($parameters-markup), true())"/>
- </param>
- </xsl:when>
- <!-- if we're doing a run once and there are parameters on the report -->
- <xsl:when test="not(key('env-param','visited_run_with_options')) and /root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*/cm:parameters">
- <!-- encode the parameters -->
- <xsl:variable name="parameters-markup">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*/cm:parameters"/>
- </xsl:call-template>
- </xsl:variable>
- <param name="m_rp_parameters">
- <xsl:value-of select="xtsext:web64encode(string($parameters-markup), true())"/>
- </param>
- </xsl:when>
- </xsl:choose>
-
- <!-- do we show the summary page? -->
- <param name="showSummary">
- <xsl:choose>
- <xsl:when test="/root/cm:queryResponse/cm:queryReply[5]/*/options/value/item[name='showOptionSummary']/value">
- <xsl:choose>
- <xsl:when test="/root/cm:queryResponse/cm:queryReply[5]/*/options/value/item[name='showOptionSummary']/value='true'">
- <xsl:value-of select="'y'"/>
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="'n'"/></xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/system/param[@name = 'defaultPortalPreferences']/pref[@name='runoptions']"/>
- </xsl:otherwise>
- </xsl:choose>
- </param>
- </xts:append>
- </xsl:when>
- <!-- just came from the basic run with options dialog, so add all the 'advanced' run options -->
- <xsl:otherwise>
- <xts:append select="/root/env">
- <xts:transform src="transforms/portal/options/generateParams.xslt" processor="XSLT">
- <xts:param name="messageBase">/messages/portal.xml</xts:param>
- <root>
- <xts:transform src="transforms/portal/options/mergeReportOptions.xslt" processor="XSLT">
- <root>
- <xts:queryNode select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*"/>
- </root>
- </xts:transform>
- <defaultOptions>false</defaultOptions>
- <preferences>
- <xsl:copy-of select="/root/header/*[local-name() = 'biBusHeader']/*[local-name() = 'userPreferenceVars']/*"/>
- </preferences>
- <serviceDefaults>
- <xsl:copy-of select="/root/configuration/property[@name='serviceDefaultOptions']/*/value"/>
- </serviceDefaults>
- <!-- if the user doesn't have write to the parent, then default the save as path to the users my folders -->
- <xsl:if test="not(contains(concat(' ', /root/cm:queryResponse/cm:queryReply[2]/*/cm:parent/*/cm:permissions, ' '), ' write '))">
- <saveAsPath>
- <xsl:value-of select="concat(/root/session/param[@name='e_hp'], '/folder')"/>
- </saveAsPath>
- </xsl:if>
- <xsl:if test="not(contains(concat(' ', /root/cm:queryResponse/cm:queryReply[2]/*/cm:permissions, ' '), ' write ')) or not(contains(concat(' ', /root/cm:queryResponse/cm:queryReply[2]/*/cm:parent/*/cm:permissions, ' '), ' traverse '))">
- <save_how>new_entry</save_how>
- </xsl:if>
- <obj>
- <xsl:copy-of select="/root/cm:queryResponse/cm:queryReply[2]/*"/>
- </obj>
- <deliverySection>true</deliverySection>
- <basicOptions>false</basicOptions>
- <!-- this list of options needs to match the list in the report.xts morphlet -->
- <optionList include="false">
- <item>outputFormat</item>
- <item>outputLocale</item>
- <item>prompt</item>
- <item>http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures</item>
- </optionList>
- <defaultArchiveLocation>
- <!-- the first archive in the cm response is the default -->
- <xsl:copy-of select="/root/cm:queryResponse/cm:queryReply/cm:archiveLocation[1]"/>
- </defaultArchiveLocation>
- </root>
- </xts:transform>
- </xts:append>
-
- </xsl:otherwise>
- </xsl:choose>
-
- <xts:append select="/root/env">
- <!-- append the default start time and date -->
- <xsl:variable name="xsl_UTC_timeformat" select="'yyyy-MM-dd HH:mm:00'"/>
- <xsl:variable name="xsl_start_date" select="xtsext:getCurrentDateTime(string($timeZone))"/>
- <xsl:variable name="fromDate">
- <xsl:choose>
- <xsl:when test="key('env-param','p_runDate') and key('env-param','p_runDate') != ''">
- <xsl:value-of select="key('env-param','p_runDate')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="substring(string($xsl_start_date), 1, 10)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="fromTime">
- <xsl:choose>
- <xsl:when test="key('env-param','p_runTime') and key('env-param','p_runTime') != ''">
- <xsl:value-of select="key('env-param','p_runTime')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat(substring(string($xsl_start_date), 12, 19), '.000')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <param name="p_runTime">
- <xsl:value-of select="$fromTime"/>
- </param>
- <param name="p_runDate">
- <xsl:value-of select="$fromDate"/>
- </param>
-
- <xsl:if test="not(key('env-param','runType'))">
- <param name="runType">
- <xsl:choose>
- <xsl:when test="key('env-param','delivery') = 'view'">view</xsl:when>
- <xsl:otherwise>background</xsl:otherwise>
- </xsl:choose>
- </param>
- </xsl:if>
- </xts:append>
-
- </xts:sequence>
- </xsl:template>
- <dt:hierarchicalParmValueItem/>
- <dt:generateUIHelpersFromOptions/>
- <pf:serialize-xml/>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- encodeSelectedEntries - web64encode the <selectedEntries> node
- ===============================================================================================
- -->
- <xts:block id="encodeSelectedEntries" path="/portal/mobileOptions/logicsheets/encode_selected_entries.xslt" processor="XSLT" dependency="generateDefaults" type="exec" condition=".[(not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='') and /root/selectedEntries/*]" mandatory="false">
- <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
- <!--
- ===============================================================================================
- updateSaveAsText
- if we've visited the save as dialog or this is the first time we hit the page and we've come
- from the basic run with options, then we have to update the summary text
- ===============================================================================================
- -->
- <xts:block id="updateSaveAsText" processor="XSLT" type="exec" dependency="generateDefaults" condition=".[(/root/env/param[@name='visited_save_as']='true' or (/root/env/param[@name = 'visited_run_with_options']='true' and not(/root/env/param[@name = 'visited_run_with_options_advanced']))) 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:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- 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:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="dt cf cp xsl cm xtsext pf">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <xsl:template match="/">
- <dt:updateSaveAsPathText defaultName="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*/*[local-name()='defaultName']" ancestors="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*/*[local-name()='ancestors']"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- generateDefaultEmailOptions - If no delivery options where save on the object and it's the
- first time we hit this page then generate defaults
- ===============================================================================================
- -->
- <xts:block id="generateDefaultEmailOptions" path="/portal/emailOptions/logicsheets/generate_defaults.xslt" processor="XSLT" dependency="generateDefaults" type="exec" condition=".[not(/root/env/param[@name='visited_run_with_options']) and not(/root/env/param[@name='visited_run_with_options_advanced']) and not(/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']/*[local-name()='options']/*[local-name()='value']/*[local-name()='item' and *[local-name()='name']='email']/*[local-name()='value']='true') and (not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='')]" mandatory="false">
- <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
- </xts:block>
-
- <!--
- ===============================================================================================
- processDefaultEmailOptions - If no delivery options where save on the object and it's the
- first time we hit then process the default delivery options.
- ===============================================================================================
- -->
- <xts:block id="processDefaultEmailOptions" path="/portal/emailOptions/logicsheets/process_email_options.xslt" processor="XSLT" dependency="generateDefaultEmailOptions" type="exec" condition=".[not(/root/env/param[@name='visited_run_with_options']) and not(/root/env/param[@name='visited_run_with_options_advanced']) and not(/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']/*[local-name()='options']/*[local-name()='value']/*[local-name()='item' and *[local-name()='name']='email']/*[local-name()='value']='true') and (not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='')]" mandatory="false">
- <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
- <!--
- ================================================================================
- Performs option actions (i.e. clear PDF options)
- ================================================================================
- -->
- <xts:block id="perform_action" nodelist="env" path="/transforms/portal/options/perform_action.xslt" processor="XSLT" type="exec" dependency="" condition=".[/root/env/param[@name='option_op'] != '']" mandatory="false"/>
-
- <!--
- ===============================================================================================
- HTML output
- ===============================================================================================
- -->
- <xts:block id="format" mode="output" processor="XSLT" type="exec" dependency=" perform_action updateSaveAsText processDefaultEmailOptions generateDefaults encodeSelectedEntries formlogic_init getContent" condition=".[not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='']" mandatory="false" mimeType="text/html">
- <!-- logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/dialog/recurrenceUI.xslt"/>
- <xts:logicsheet path="portal/runWithOptions/logicsheets/response.xslt"/>
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <!-- Dialog specific logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/dialog/ui-templates.xsl"/>
- <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="portal/schedule/logicsheets/scheduleVars.xsl"/>
- <!-- Generic logicsheets -->
- <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" exclude-result-prefixes="rui xts xsl cm pf xtsext lyt dp df cf cp rdb"
- xmlns:rdb="http://developer.cognos.com/schemas/xts/rdb/"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
- 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:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:ut="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/ui-templates/"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:rui="http://developer.cognos.com/schemas/xts/logicsheet/xslt/presentation/dialog/recurrenceUI/">
-
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
-
- <!-- Global template variables -->
- <pf:variables/>
- <rui:variables/>
-
- <xsl:variable name="the-object" select="/root/cm:queryResponse/cm:queryReply[2]/*"/>
- <xsl:variable name="the-credential" select="/root/cm:queryResponse/cm:queryReply[3]/cm:credential"/>
- <xsl:variable name="isBurstReport" select="
- (/root/cm:queryResponse/cm:queryReply[2]/*/cm:canBurst = 'true') or
- (/root/cm:queryResponse/cm:queryReply[2]/*/cm:base/*/cm:canBurst = 'true')
- "/>
-
- <xsl:variable name="canBurst" select="
- $isBurstReport and
- (/root/cm:queryResponse/cm:queryReply[2]/*/cm:metadataModelPackage/*/cm:effectiveUserCapabilities/cm:canUseBursting or
- /root/reportBaseMetadata/cm:queryResponse/cm:queryReply/*/cm:effectiveUserCapabilities/cm:canUseBursting or
- /root/cm:queryResponse/cm:queryReply[2]/*/cm:runAsOwner = 'true' or
- /root/cm:queryResponse/cm:queryReply[2]/*/cm:runWithOwnerCapabilities = 'true')
- "/>
- <xsl:variable name="defaultFormat">
- <xsl:choose>
- <!-- check the old execution format -->
- <xsl:when test="/root/cm:queryResponse/cm:queryReply[2]/*/cm:executionFormat!=''">
- <xsl:value-of select="/root/cm:queryResponse/cm:queryReply[2]/*/cm:executionFormat"/>
- </xsl:when>
- <!-- check the options property -->
- <xsl:when test="/root/*[local-name() = 'queryResponse']/*[local-name() = 'queryReply'][2]/*/*[local-name() = 'options']/*[local-name() = 'value']/*[local-name() = 'item' and ./*[local-name() = 'name' and . = 'outputFormat']]/*[local-name() = 'value']/*[local-name() = 'item'][1] != ''">
- <xsl:value-of select="/root/*[local-name() = 'queryResponse']/*[local-name() = 'queryReply'][2]/*/*[local-name() = 'options']/*[local-name() = 'value']/*[local-name() = 'item' and ./*[local-name() = 'name' and . = 'outputFormat']]/*[local-name() = 'value']/*[local-name() = 'item'][1]"/>
- </xsl:when>
- <xsl:when test="/root/header/*[local-name() = 'biBusHeader']/*[local-name() = 'userPreferenceVars']/*[local-name()='item']/*[local-name()='name' and .='format']/../*[local-name()='value'] != ''">
- <xsl:value-of select="/root/header/*[local-name() = 'biBusHeader']/*[local-name() = 'userPreferenceVars']/*[local-name()='item']/*[local-name()='name' and .='format']/../*[local-name()='value']"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
-
- <!-- include date control stylesheet and declare any vairables needed -->
- <rui:promptControls form="pform"/>
-
- <!-- time varibales needed for the calendar control -->
- <xsl:variable name="mname" select="'runWithOptions/report_advanced.xts'"/>
-
- <!-- references to the various objects queried from CM -->
- <xsl:variable name="has_execute_permission" select="contains(concat(' ', /root/cm:queryResponse/cm:queryReply[2]/*/cm:permissions, ' '), ' execute ')"/>
- <!-- start the output -->
- <xsl:template match="/root">
- <xsl:variable name="browserTitle">
- <rdb:pageTitle mode="advanced"/>
- </xsl:variable>
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
- <dp:meta>
- <pf:meta/> <!-- Standard meta tags -->
- </dp:meta>
- <!-- get the JavaScript needed for the prompt controls -->
- <rui:promptControlsScript/>
- <dp:script>
- <pf:help context="HID_ADVANCED_RUNOPTIONS"/> <!-- Help system -->
- <script language="javascript" src="{$webcontent}/{$app}/js/runOptions.js"/>
- <script language="javascript" src="{$webcontent}/{$app}/js/runWithOptions.js"/>
- <script language="javascript" src="{$webcontent}/../cognoslaunch.js"/>
- <script language="javascript">
- <!-- include the javascript need to run the report -->
- <rdb:interactiveJavaScript advanced="true"/>
-
- <!-- include the javascript needed to validate the runOptions -->
- <dt:runOptionValidation/>
-
- <!-- some behavior for when the page loads -->
- function init()
- {
- var frm = document.pform;
-
- <!-- make sure the run type controls are initialized -->
- updateRunType();
- <!-- make sure the selection based features checkbox is defaulted -->
- if (document.getElementById('view_selectionBasedFeatures') && document.getElementById('background_selectionBasedFeatures')) {
- document.getElementById('view_selectionBasedFeatures').checked = document.getElementById('background_selectionBasedFeatures').checked;
- }
-
- <!-- if run and view is selected -->
- if (frm.runType && frm.runType[0].checked) {
- updateSubOptions();
- }
- else {
- <!-- update the selection based checkbox (enable/disable, checked/unchecked) -->
- updateInteractiveCheckbox();
- <!-- update the verticalElements select -->
- updateVerticalElementsSelect();
-
- <!-- special handling if we've just come from the basic run with options dialog -->
- <xsl:if test="not(key('env-param','visited_run_with_options_advanced')) and key('env-param','visited_run_with_options')">
- <!-- HTML probably got checked by default, uncheck it -->
- if (document.pform.m_ro_outputF_HTML_Type) {
- document.pform.m_ro_outputF_HTML_Type.checked = false;
- }
-
- switchToBackgroundOptions();
- </xsl:if>
-
- <!--
- need to make sure the output locale drop down in the run and view is disabled.
- It's the only control that has the same name as hidden inputs used in the run and save dialog
- -->
- if (document.getElementById('outputLocaleDropDown')) {
- document.getElementById('outputLocaleDropDown').disabled = true;
- }
- }
-
- initRunOptions();
- if (frm.controller_state) {
- frm.controller_state.value = '';
- }
- }
-
- function validate()
- {
- var frm = document.pform;
- if ((!frm.runType || (frm.runType && frm.runType[1].checked))) {
- if (!validateRunOptions()) {
- return false;
- }
- }
- <!-- make sure the user doesn't send two run requests -->
- if (!onClickOK('<xts:string id="IDS_OTHERRUN_REQUEST_SUBMITTED" encode="javascript"><xts:param name="objName"><xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'm_name')))"/></xts:param></xts:string>')) {
- return false;
- }
-
- return true;
- }
- </script>
- </dp:script>
- <utml:form name="pform" method="post" action="{$gateway}">
- <utml:exclusion-list><xsl:value-of select="' m_ro_outputFormat m_ro_outputLocale delivery hourstimeFrom minutestimeFrom txtDatedateFrom p_runDate p_runTime AMPMtimeFrom select_languages_visited selected_languages m_pdf_userPassword_runOption_Encrypted confirm_m_pdf_userPassword_runOption m_pdf_ownerPassword_runOption_Encrypted confirm_m_pdf_ownerPassword_runOption '"/></utml:exclusion-list>
- <utml:read-only>false</utml:read-only>
- <utml:input type="hidden" name="ifrmcmd" value='execute' utml:update="false"/>
- <utml:input type="hidden" name="ps_nav_op" value="" utml:update="false"/>
- <utml:input name="visited_run_with_options_advanced" type="hidden" value="true"/>
- <utml:input type="hidden" name="controller_state" value="" utml:update="false"/>
- <utml:input type="hidden" name="so.searchPath" value=""/>
- <utml:input type="hidden" name="preserve_pdf_userPwd">
- <xsl:attribute name="value">
- <xsl:choose>
- <xsl:when test="key('env-param','preserve_pdf_userPwd') !=''"><xsl:value-of select="key('env-param','preserve_pdf_userPwd')"/></xsl:when>
- <xsl:when test="key('env-param','m_pdf_userPassword_runOption_Encrypted')!=''">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- </utml:input>
- <utml:input type="hidden" name="preserve_pdf_ownerPwd">
- <xsl:attribute name="value">
- <xsl:choose>
- <xsl:when test="key('env-param','preserve_pdf_ownerPwd') !=''"><xsl:value-of select="key('env-param','preserve_pdf_ownerPwd')"/></xsl:when>
- <xsl:when test="key('env-param','m_pdf_ownerPassword_runOption_Encrypted')!=''">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- </utml:input>
- <!-- if the user doesn't have a credentail then add the h_CAM_action to create one -->
- <rdb:checkCredential/>
-
- <!-- header -->
- <dp:header>
- <dp:title>
- <xsl:copy-of select="$browserTitle"/>
- </dp:title>
- <dp:description>
- <xsl:choose>
- <xsl:when test="not(/root/env/param[@name='visited_run_with_options'])">
- <xts:string id="IDS_OTHERRUN_ONCE_INTRO"><xts:param name="objectName"><xsl:value-of select="key('env-param', 'm_name')"/></xts:param></xts:string>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='m_class']='powerPlay8Report'">
- <xts:string id="IDS_OTHERRUN_ADVANCE_POWERPLAY8_INTRO"><xts:param name="objectName"><xsl:value-of select="key('env-param', 'm_name')"/></xts:param></xts:string>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_OTHERRUN_ADVANCE_INTRO"><xts:param name="objectName"><xsl:value-of select="key('env-param', 'm_name')"/></xts:param></xts:string>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </dp:description>
- </dp:header>
-
- <!-- body -->
- <lyt:layout style="1">
- <lyt:section>
- <label for="txtDatedateFrom" style="position: absolute;margin-left: -9999px; margin-top: -9999px; "><xts:string id="IDS_PERIOD_FROM" encode="html" /></label>
- <label for="timeFrom_prmtTime_HOURS" style="position: absolute;margin-left: -9999px; margin-top: -9999px; "><xts:string id="IDS_PROP_SCHED_FREQ_RELATIVE_INTERVAL_START_HOURS" encode="html"/></label>
- <label for="timeFrom_prmtTime_MINUTES" style="position: absolute;margin-left: -9999px; margin-top: -9999px; "><xts:string id="IDS_PROP_SCHED_FREQ_RELATIVE_INTERVAL_START_MINUTES" encode="html"/></label>
- <label for="timeFrom_prmtTime_AMPM" style="position: absolute;margin-left: -9999px; margin-top: -9999px; "><xts:string id="IDS_PROP_SCHED_FREQ_RELATIVE_INTERVAL_START_AMPM" encode="html"/></label>
- <label for="myYeardateFrom" style="position: absolute;margin-left: -9999px; margin-top: -9999px; "><xts:string id="IDS_PROP_SCHED_FREQ_RELATIVE_INTERVAL_START_DATE_YEAR" encode="html"/></label>
-
- <xsl:choose>
- <!-- for a run once, we don't give the user the option to view the report -->
- <xsl:when test="not(/root/env/param[@name='visited_run_with_options'])">
- <rdb:nowOrLater/>
- </xsl:when>
- <xsl:otherwise>
- <rdb:viewOrBackground/>
- </xsl:otherwise>
- </xsl:choose>
- </lyt:section>
- </lyt:layout>
- <!-- background run options -->
- <cf:dynamicDiv name="backgroundRunOption" runTimeVisibleCheck="not(key('env-param','runType')) or key('env-param','runType') = 'background'">
- <lyt:layout style="2" title="IDS_PROP_SCHED_OPTIONS" border="yes">
- <!-- 1st column-->
- <lyt:section>
- <!-- format -->
- <ut:format/>
- <br/>
- <!-- language -->
- <ut:language/>
-
- <!-- burst -->
- <xsl:if test="$canBurst = 'true'">
- <br/>
- <ut:burst/>
- </xsl:if>
- </lyt:section>
-
- <!-- 2nd column-->
- <lyt:section>
- <!-- delivery -->
- <dp:list title="IDS_OTHERRUN_DELIVERY" title-id="lbl_deliveryGroup">
- <dp:section>
- <dp:hint wrap="wrap">
- <xts:string id="IDS_OTHERRUN_DELIVERY_DESCRIPTION_REPORT"/>
- </dp:hint>
- </dp:section>
- <dp:section>
- <ut:delivery/>
- </dp:section>
- </dp:list>
-
- <xsl:choose>
- <xsl:when test="/root/system/param[@name = 'enable-report-execution-recording'] = 'true'">
- <div id="recordingEnabledRunOption">
- <table border="0" cellspacing="0" cellpadding="1">
- <tr>
- <td nowrap="nowrap" colspan="2" class="formLabel"><xts:string id="IDS_OTHERRUN_REPORT_EXECUTION"/></td>
- </tr>
- </table>
- </div>
- <table border="0" cellspacing="0" cellpadding="1">
- <tr>
- <td nowrap="nowrap" class="formText">
- <tr>
- <td nowrap="nowrap" class="formText">
- <utml:input type="checkbox" name="m_ro_recordingEnabled" value="true"/>
- </td>
- <td nowrap="nowrap" class="formText" colspan="3"><xts:string id="IDS_OTHERRUN_RECORD_REPORT_EXECUTION"/></td>
- </tr>
- </td>
- </tr>
- <tr>
- <td nowrap="nowrap">
- <img height="5" width="1" src="{$webcontent}/images/space.gif"/>
- </td>
- </tr>
- </table>
- </xsl:when>
- <xsl:otherwise>
- <utml:input type="hidden" name="m_ro_recordingEnabled" value="false"/>
- </xsl:otherwise>
- </xsl:choose>
- </lyt:section>
- </lyt:layout>
- </cf:dynamicDiv>
-
- <!-- run and view run options -->
- <cf:dynamicDiv name="viewReportOptions" runTimeVisibleCheck="key('env-param','runType') != 'background'">
- <lyt:layout style="1" title="IDS_PROP_REPORT_OPTIONS" border="yes">
- <!-- 1st column-->
- <lyt:section>
- <!-- format -->
- <ut:formatSelectList addFormatSubOptions="true"/>
- <br/>
-
- <!-- language -->
- <ut:localeSelectList/>
- <br/>
- </lyt:section>
- </lyt:layout>
- </cf:dynamicDiv>
- <lyt:layout style="1">
- <lyt:section>
- <!-- a11y -->
- <ut:a11yOption/>
- </lyt:section>
- </lyt:layout>
-
- <lyt:layout style="1" title="IDS_PROP_SCHED_PROMPT_VALUES" border="yes">
- <lyt:section>
- <!-- prompts -->
- <ut:prompt/>
- </lyt:section>
- </lyt:layout>
-
- <!-- footer -->
- <dp:footer>
- <df:button df:id="IDS_OTHERRUN_RUN" df:style="href" df:href="javascript:runReport();"/>
- <xsl:choose>
- <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
- <df:button df:id="IDS_CANCEL" df:style="stack-down"/>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_CANCEL" df:style="back-url"/>
- </xsl:otherwise>
- </xsl:choose>
- </dp:footer>
- </utml:form>
- </dp:page>
- </xsl:template>
- <ut:formatRunOptions/>
- <ut:formatLanguage/>
- <ut:promptTemplate showLinks="false" showTitle="false"/>
- <ut:burstTemplate addBehavior="true" showCheckbox="false"/>
- <ut:deliveryRunOptions newEmailOptions="true" border="false" showTitle="false" addBehavior="true" isReportView="contains(' reportView powerPlay8ReportView powerPlay8Report ', concat(' ', /root/env/param[@name='m_class'],' '))" canSave="contains(concat(' ', /root/cm:queryResponse/cm:queryReply[2]/*/cm:permissions, ' '), ' write ') and contains(concat(' ', /root/cm:queryResponse/cm:queryReply[2]/*/cm:permissions, ' '), ' traverse ')" noGroup="true"/>
- <cp:tabControl/>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- debug - display debug information
- ===============================================================================================
- -->
- <xts:block id="debug" dependency="format processResponse processMobileEntries" 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" omit-xml-declaration="yes"/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|