123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840 |
- <?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">
- <!--
- ===============================================================================================
- formlogic_init
- ===============================================================================================
- -->
- <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
- <!--
- ===============================================================================================
- 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"
- nodelist="requestParams,env, http, session, credential, cookies, header, user"
- dependency="formlogic_init"
- processor="XSLT" type="exec"
- condition=".[ /root/env/param[@name='controller_state'] != '' ]"
- mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.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: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:template match="/">
- <xts:sequence>
- <dlgctrl:XTS2Request>
- <dlgctrl:target>/portal/addEntries/add_entries.xts</dlgctrl:target>
- <dlgctrl:stackName>addEntriesStack</dlgctrl:stackName>
- <req-params:param name="defaultTarget">/portal/properties_job.xts</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"><xsl:value-of select="/root/env/param[@name='m_path']"/></req-params:param>
- <req-params:param name="showUsers">false</req-params:param>
- <req-params:param name="typeDialog">false</req-params:param>
- <req-params:param name="addEntriesUI">runnables</req-params:param>
- <req-params:param name="returnProperties">
- <req-params:property name="permissions"/>
- <req-params:property name="canBurst"/>
- <req-params:property name="runAsOwner"/>
- <req-params:property name="runWithOwnerCapabilities"/>
- <req-params:property name="base"/>
- <req-params:property name="parent"/>
- <req-params:property name="executionFormat"/>
- <req-params:property name="executionLocale"/>
- <req-params:property name="executionPageDefinition"/>
- <req-params:property name="executionPageOrientation"/>
- <req-params:property name="routingServerGroup"/>
- <req-params:property name="options"/>
- </req-params:param>
- <req-params:param name="refProp">
- <req-params:refProp name="base"/>
- <req-params:refProp name="parent"/>
- </req-params:param>
- <req-params:param name="allowDuplicates">true</req-params:param>
- <req-params:param name="allowRootBrowsing">true</req-params:param>
- </dlgctrl:XTS2Request>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- processResponse - Process the response from the callMorphlet block and either displays
- the markup or processes the results
- ===============================================================================================
- -->
- <xts:block
- id="processResponse"
- nodelist="output,http,env,system,user,morphletResponse,credential,cookies"
- path="/portal/addEntries/logicsheets/process_added_entries.xslt"
- processor="XSLT"
- dependency="callMorphlet"
- 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"/>
- </xts:block>
-
- <!--
- ===============================================================================================
- Load object-specific property tabs map
- ===============================================================================================
- -->
- <xts:block id="getTabs" type="exec" mode="interpret" processor="XML" dependency="processResponse" path="/portal/uiobjects_tabs.xml" condition=".[not(/root/mode='addEntries')]" mandatory="false"/>
- <!--
- ===============================================================================================
- getObjects - get object class names
- ===============================================================================================
- -->
- <xts:block id="classNames" type="exec" mode="input" processor="XML" dependency="processResponse" path="/portal/uiExtensions.xml" condition=".[not(/root/mode='addEntries')]" mandatory="false">
- <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_names.xslt"/>
- </xts:block>
-
- <!--
- ===============================================================================================
- getContent
- ===============================================================================================
- -->
- <xts:block id="getContent" type="exec" mode="interpret" processor="XSLT" dependency="processResponse formlogic_init" condition=".[not(/root/mode='addEntries')]" mandatory="false">
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <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:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:variable name="query-values" select="/root/env/param"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <cml:object-predicates/>
- <xsl:template match="/">
- <!-- unpack some xml blobs -->
- <xts:sequence>
- <xts:append>
- <!-- Either unpack the list or retrieve the jobSteps -->
- <xsl:if test="key('env-param','jobSteps')">
- <xsl:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap', string( key('env-param','jobSteps') )), true() )" disable-output-escaping="yes"/>
- </xsl:if>
-
- <!-- Either unpack the job options -->
- <xsl:if test="key('env-param','jobOptions')">
- <xsl:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap', string( key('env-param','jobOptions') )), true() )" disable-output-escaping="yes"/>
- </xsl:if>
- </xts:append>
- </xts:sequence>
-
- <!-- content request -->
- <xts:sequence>
- <xts:append>
- <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>
- <!-- Page definitions -->
- <cm:query>
- <cm:search>
- <xsl:text>/configuration/pageDefinition</xsl:text>
- <xsl:value-of select="$visibility-predicate"/>
- </cm:search>
- <cm:properties>
- <cm:property name="displaySequence"/>
- <cm:property name="defaultName"/>
- <cm:property name="searchPath"/>
- </cm:properties>
- <cm:sortBy>
- <cm:sort name="displaySequence" order="descending"/>
- </cm:sortBy>
- </cm:query>
- <!-- Job information -->
- <cm:query>
- <cm:search>
- <!-- step options page changes m_obj so make sure to use the saved version-->
- <xsl:choose>
- <xsl:when test="/root/env/param[@name = 'step_options_visited'] = 'true'">
- <xsl:value-of select="/root/env/param[@name='m_job_obj']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/env/param[@name='m_obj']"/>
- </xsl:otherwise>
- </xsl:choose>
- </cm:search>
- <cm:properties>
- <cml:prop-job/>
- </cm:properties>
- <cm:options>
- <cm:refProps>
- <cm:refProp refPropName="parent">
- <cm:properties>
- <cm:property name="searchPath"/>
- </cm:properties>
- </cm:refProp>
- </cm:refProps>
- </cm:options>
- </cm:query>
- <!-- need to get all the archiveLocations -->
- <cm:query>
- <cm:search>
- <xsl:text>/configuration/archiveLocation</xsl:text>
- <xsl:value-of select="$visibility-predicate"/>
- </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>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xts:append>
-
- <xsl:if test="not(/root/env/param[@name='visited_job_properties'])">
- <!-- need to deal with an exception case for the continueOnError jobOptions. That option
- is set on the job property dialog and NOT in the job options dialog -->
- <xts:append select="/root/env">
- <xts:transform src="transforms/portal/options/generateParams.xslt" processor="XSLT">
- <root>
- <options>
- <value>
- <xts:queryNode select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*/*[local-name()='options']/*[local-name()='value']/*[local-name()='item' and ./*[local-name()='name']='continueOnError' or ./*[local-name()='name']='writeCompleteHistory']"/>
- </value>
- </options>
- </root>
- </xts:transform>
- <!-- check if we need to override output format -->
- <xsl:variable name="allowPDF"><xsl:if test="not(/root/session/param[@name='capabilities']/canGeneratePDFOutput)">false</xsl:if></xsl:variable>
- <xsl:variable name="allowXML"><xsl:if test="not(/root/session/param[@name='capabilities']/canGenerateXMLOutput)">false</xsl:if></xsl:variable>
- <xsl:variable name="allowCSV"><xsl:if test="not(/root/session/param[@name='capabilities']/canGenerateCSVOutput)">false</xsl:if></xsl:variable>
- <xsl:variable name="allowXLS"><xsl:if test="not(/root/session/param[@name='capabilities']/canGenerateXLSOutput)">false</xsl:if></xsl:variable>
- <xsl:if test="$allowPDF='false' or $allowXML='false' or $allowCSV='false' or $allowXLS='false'">
- <param name="override_outputFormat_option"><xsl:value-of select="'true'"/></param>
- </xsl:if>
- </xts:append>
- <xts:delete select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*/*[local-name()='options']/*[local-name()='value']/*[local-name()='item' and ./*[local-name()='name']='continueOnError']"/>
- <xts:delete select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*/*[local-name()='options']/*[local-name()='value']/*[local-name()='item' and ./*[local-name()='name']='writeCompleteHistory']"/>
- <xts:append>
- <steps>
- <xts:transform src="transforms/portal/jobDefinition/addStepGUIDs.xslt" processor="XSLT">
- <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:search><xsl:value-of select="concat(/root/env/param[@name = 'm_obj'],'/jobStepDefinition')"/></cm:search>
- <cm:properties>
- <cm:property name="searchPath"/>
- <cm:property name="storeID"/>
- <cm:property name="displaySequence"/>
- <cm:property name="stepObject"/>
- <cm:property name="options"/>
- <cm:property name="parameters"/>
- </cm:properties>
- <cm:options>
- <cm:refProps>
- <cm:refProp refPropName="stepObject">
- <cm:properties>
- <cml:prop-base/>
- <cm:property name="ancestors"/>
- <cm:property name="canBurst"/>
- <cm:property name="runAsOwner"/>
- <cm:property name="runWithOwnerCapabilities"/>
- <cm:property name="parent"/>
- <cm:property name="executionFormat"/>
- <cm:property name="executionLocale"/>
- <cm:property name="executionPageDefinition"/>
- <cm:property name="executionPageOrientation"/>
- <cm:property name="routingServerGroup"/>
- </cm:properties>
- </cm:refProp>
- </cm:refProps>
- </cm:options>
- <cm:sortBy>
- <cm:sort name="displaySequence" order="ascending"/>
- </cm:sortBy>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xts:transform>
- </steps>
-
- <jobOptions>
- <xts:queryNode select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*/*[local-name()='options']"/>
- </jobOptions>
- </xts:append>
- </xsl:if>
- <!-- removed any options from the env that aren't suppose to be there (i.e. dependent on checkboxes that aren't checked -->
- <xsl:if test="/root/env/param[@name = 'run_options_visited'] = 'true' or /root/env/param[@name = 'step_options_visited'] = 'true'">
- <xts:replace select="/root/env">
- <xts:transform src="transforms/portal/options/cleanEnv.xslt" processor="XSLT">
- <root>
- <xsl:copy-of select="/root/env"/>
- </root>
- </xts:transform>
- </xts:replace>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- upgradeJobOptions:
- Upgrade the job options (and step options) to to handle deprecated options. In particular, the deprecated 'savePromptCache' option has
- to be converted to the new 'promptCacheMode' option.
- This is applied for the job and job steps
- ===============================================================================================
- -->
- <xts:block id="upgradeJobOptions" dependency="getContent" type="exec" mode="interpret" processor="XSLT" condition=".[not(/root/env/param[@name='visited_job_properties']) and not(/root/mode='addEntries')]" mandatory="false">
- <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/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xsl xsi pf xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <pf:variables/>
-
- <xsl:template match="/">
- <xts:sequence>
- <!-- apply an upgrade transform to the job options-->
- <xts:replace select="/root/*[local-name()='jobOptions']/*[local-name()='options']">
- <xts:transform src="transforms/portal/jobDefinition/upgradeJobOptions.xslt" processor="XSLT">
- <xsl:copy-of select="/root/jobOptions/options"/>
- </xts:transform>
- </xts:replace>
-
- <!-- apply an upgrade transform to the job step's option-->
- <xts:replace select="/root/*[local-name()='steps']/*[local-name()='queryResponse']">
- <xts:transform src="transforms/portal/jobDefinition/upgradeJobStepOptions.xslt" processor="XSLT">
- <xsl:copy-of select="/root/steps/*"/>
- </xts:transform>
- </xts:replace>
-
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- generateUIHelpers:
- Use the information queries from CM about the delivery options to build summary strings
- for the job and steps to be used by the UI generation
- ===============================================================================================
- -->
- <xts:block id="generateUIHelpers" dependency="upgradeJobOptions" type="exec" mode="interpret" processor="XSLT" condition=".[not(/root/env/param[@name='visited_job_properties']) and not(/root/mode='addEntries')]" mandatory="false">
- <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/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- 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:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xtsext xsl cm dt pf cf cp send">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <pf:variables/>
-
- <xsl:template match="/">
- <xts:sequence>
- <xsl:call-template name="dt:generateUIHelpersFromOptions">
- <xsl:with-param name="queryReplyPath" select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*"/>
- <xsl:with-param name="appendPath" select="'/root/jobOptions'"/>
- </xsl:call-template>
- <xsl:if test="/root/steps/*">
- <xsl:call-template name="dt:generateUIHelpersFromOptions">
- <xsl:with-param name="queryReplyPath" select="/root/steps/*[local-name()='queryResponse']/*[local-name()='jobStepDefinition']"/>
- <xsl:with-param name="appendPath" select="'/root/steps/*[local-name()="queryResponse"]/*[local-name()="jobStepDefinition"]'"/>
- <xsl:with-param name="currentReply" select="'1'"/>
- <xsl:with-param name="steps" select="/root/steps/*[local-name()='queryResponse']/*[local-name()='jobStepDefinition']"/>
- </xsl:call-template>
- </xsl:if>
- <!-- special case for content task. We must keep track if the content task is a report upgrade or
- consistency check -->
- <xsl:for-each select="/root/steps/*[local-name()='queryResponse']/*[local-name()='jobStepDefinition']">
- <xsl:if test="*[local-name()='stepObject']/*/*[local-name()='objectClass']='contentTask'">
- <xsl:variable name="pos" select="position()"/>
- <xts:append select="/root/steps/*[local-name()='queryResponse']/*[local-name()='jobStepDefinition'][{$pos}]">
- <xts:transform src="transforms/portal/options/parseContentTaskOptions.xslt" processor="XSLT">
- <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><xsl:value-of select="*[local-name()='stepObject']/*/*[local-name()='searchPath']"/></cm:search>
- <cm:properties>
- <cm:property name="options"/>
- </cm:properties>
- </cm:query>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xts:transform>
- </xts:append>
- </xsl:if>
- </xsl:for-each>
- </xts:sequence>
- </xsl:template>
-
- <dt:generateUIHelpersFromOptions/>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- modify the sequences of the steps.
-
- NOTE: This block compiles with XSLTC but it doesn't work.
- ===============================================================================================
- -->
- <xts:block id="updateSequence" dependency="generateUIHelpers" type="exec" mode="interpret" processor="XSLT" condition=".[/root/env/param[@name='modifySequence'] and not(/root/mode='addEntries')]" mandatory="false">
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:x="x">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <dt:jobUpdateSequence/>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- preserveOptionPassword
- A block to preserve the pdf options passwod.
- ===============================================================================================
- -->
- <xts:block id="preserveOptionPassword" processor="XSLT" type="exec" dependency="getContent">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <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="/root">
- <xts:sequence>
- <xsl:choose>
- <xsl:when test="key('env-param','run_options_visited') = 'true'">
- <xsl:call-template name="generate-encrypted-params">
- <xsl:with-param name="options" select="/root/cm:queryResponse/cm:queryReply[2]/*/*[local-name()='options']/*[local-name()='value']"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="key('env-param','step_options_visited') = 'true'">
- <xsl:variable name="current-step" select="/root/env/param[@name='current_step']"/>
- <xsl:call-template name="generate-encrypted-params">
- <xsl:with-param name="options" select="/root/steps/*[local-name()='queryResponse']/*[local-name()='jobStepDefinition' and *[local-name() = 'displaySequence' and string()=$current-step]]/*[local-name()='options']/*[local-name()='value']"/>
- </xsl:call-template>
- </xsl:when>
- </xsl:choose>
- </xts:sequence>
- </xsl:template>
-
- <xsl:template name="generate-encrypted-params">
- <xsl:param name="options"/>
- <xsl:if test="key('env-param','preserve_pdf_userPwd')='true' or key('env-param','preserve_pdf_ownerPwd')='true'">
- <xts:append select="/root/env">
- <xsl:if test="key('env-param','preserve_pdf_userPwd')='true'">
- <param name="m_pdf_userPassword_runOption_Encrypted">
- <xsl:value-of select="$options/*[local-name()='item' and *[local-name()='name']='userPassword']/*[local-name()='value']"/>
- </param>
- </xsl:if>
- <xsl:if test="key('env-param','preserve_pdf_ownerPwd')='true'">
- <param name="m_pdf_ownerPassword_runOption_Encrypted">
- <xsl:value-of select="$options/*[local-name()='item' and *[local-name()='name']='ownerPassword']/*[local-name()='value']"/>
- </param>
- </xsl:if>
- </xts:append>
- </xsl:if>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ================================================================================
- create an encrypted credention for any option password
- ================================================================================
- -->
- <xts:block id="processOptionPassword" nodelist="env" path="/portal/genOptionCredentials.xslt" dependency="preserveOptionPassword" type="exec" mode="interpret" processor="XSLT" mandatory="false" condition=".[/root/env/param[contains(@name, 'Password_runOption')] != '']"/>
- <!--
- ===============================================================================================
- build the options with the params present in /env/param. Should only get executed when we've
- returned from the job options or step options dialog.
- ===============================================================================================
- -->
- <xts:block id="buildOptions" dependency="updateSequence processOptionPassword" type="exec" mode="interpret" processor="XSLT" condition=".[(/root/env/param[@name = 'run_options_visited'] = 'true' or /root/env/param[@name = 'step_options_visited'] = 'true') and not(/root/mode='addEntries')]" mandatory="false">
- <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:x="x"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- 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:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xtsext xsl x cm dt pf cf cp">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <pf:variables/>
- <dt:updateOptions/>
-
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- Execute the operation: delete, additems_
- Only execute if lisop isn't empty (i.e. we're performing and action) or we've returned from
- the add entries dialog.
- ===============================================================================================
- -->
- <xts:block id="executeCommand" dependency="buildOptions" type="exec" mode="interpret" processor="XSLT" condition=".[not(/root/mode='addEntries') and (/root/env/param[@name='listop'] != '' or /root/newEntries)]" mandatory="false">
- <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/cm-logic.xsl"/>
- <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: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:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:x="x"
- exclude-result-prefixes="pf cm dt cf xtsext x cp send">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <dt:jobExecuteCommand/>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- Update the displaySequence property to reflect the order of the steps
- ===============================================================================================
- -->
- <xts:block id="setSequence" dependency="executeCommand" type="exec" mode="interpret" processor="XSLT" condition=".[not(/root/mode='addEntries')]" mandatory="false">
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.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:x="x"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <dt:jobSetSequence/>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- Serialize the data (web64 encoded)
- ===============================================================================================
- -->
- <xts:block id="encodeList" dependency="setSequence" type="exec" mode="interpret" processor="XSLT" condition=".[not(/root/mode='addEntries')]" mandatory="false">
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.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:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <dt:jobEncodeList/>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- Render the HTML page
- ===============================================================================================
- -->
- <xts:block id="render_page" dependency=" encodeList formlogic_init getTabs classNames" mode="output" processor="XSLT" type="exec" mimeType="text/html" condition=".[not(/root/mode='addEntries')]" mandatory="false">
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.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"/>
- <!-- 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" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
- 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: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:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:x="x"
- exclude-result-prefixes="xsl lyt dp df cp cf cm bus utml xtsext xts">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="'properties_job.xts'"/>
- <xsl:variable name="m_class" select="/root/env/param[@name = 'm_class']"/>
- <xsl:variable name="back-url" select="key('env-param','backURL')"/>
- <!-- add any theme variables -->
- <pf:variables/>
- <!-- Need ability to display icons-->
- <pf:gen-icon/>
- <!-- start the output -->
- <xsl:variable name="the-object" select="/root/cm:queryResponse/cm:queryReply[2]/*"/>
- <xsl:variable name="has_write_permission" select="contains( $the-object/cm:permissions, 'write' )"/>
- <xsl:variable name="has_policy_permission" select="contains($the-object/cm:permissions, 'setPolicy')"/>
- <xsl:variable name="showOKCancel" select="$has_write_permission or $has_policy_permission"/>
-
- <xsl:template match="root">
- <!-- Page and title -->
- <xsl:variable name="browserTitle"><xts:string id="IDS_PROPERTIES_TITLE"><xts:param name="objectName">
- <span lang="{$contentLocale}"><xsl:value-of select="xtsext:enforceBTD(/root/env/param[@name = 'm_name'], $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></span>
- </xts:param></xts:string></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>
- <xsl:copy-of select="/root/promptScripts/*"/>
- <dp:script>
- <!-- Help system -->
- <pf:help/>
- <!-- Define selectall and deselectall functions.-->
- <dt:selectDeselectAll/>
- <script language="javascript" src="{$webcontent}/{$app}/js/runOptions.js"/>
- <script language="javascript">
- <!-- some behavior for when the page loads -->
- function init()
- {
- if (document.pform.controller_state)
- {
- document.pform.controller_state.value = '';
- }
-
- <!-- m can get clobbered when going to secondary dialogs, so make sure it has the right value -->
- document.pform.m.value = "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'm')))"/>";
- }
-
- function validate()
- {
- return true;
- }
- </script>
- </dp:script>
- <!-- TODO: Replace with real logic once prompting model has been defined. -->
- <xsl:variable name="has_prompts" select="false()"/>
- <utml:form name="pform" action="{$gateway}" method="post">
- <!-- Since the date control input variables are not utml input, they would be put into Hidden inputs whenever the page is refreshed and cause
- duplicate. So we exclude them from query values. -->
- <utml:exclusion-list>
- <xsl:value-of select="' override_default_options promptObject select_languages_visited txtDatedateFrom txtDatedateTo jobDefinitionNotify jobDefinitionBurst jobDefinitionFormat jobDefinitionLocale step_options_visited language formatSection deliverySection runAsSection p_sched_date1 p_sched_date2 p_sched_time1 p_intradayRecurrenceStart p_intradayRecurrenceEnd hourstimeTo hourstimeFrom minutestimeTo minutestimeFrom secondstimeFrom secondstimeTo AMPMtimeTo AMPMtimeFrom visited_schedule_properties dateTotxtDate dateFromtxtDate so.searchPath confirm_m_pdf_userPassword_runOption m_pdf_userPassword_runOption_Encrypted confirm_m_pdf_ownerPassword_runOption m_pdf_ownerPassword_runOption_Encrypted '"/>
- </utml:exclusion-list>
- <!-- Determine if this form is read-only. -->
- <utml:read-only>
- <xsl:choose>
- <xsl:when test="$has_write_permission = true()">
- <xsl:text>false</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>true</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </utml:read-only>
- <!-- this defines the form command operation to be performed when all the collected properties are submitted. -->
- <utml:input type="hidden" name="ifrmcmd" utml:update="false">
- <utml:value>
- <xsl:text>save</xsl:text>
- </utml:value>
- </utml:input>
- <utml:input type="hidden" name="m_class" utml:update="false">
- <utml:value>
- <xsl:value-of select="$m_class"/>
- </utml:value>
- </utml:input>
- <utml:input type="hidden" name="page_is_read_only" utml:update="false">
- <utml:value>
- <xsl:choose>
- <xsl:when test="$has_write_permission">
- <xsl:text>false</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>true</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </utml:value>
- </utml:input>
-
- <!-- set flag to indicate initial state -->
- <xsl:if test="not(/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*/*[local-name()='options']/*[local-name()='value']/*[local-name()='item']/*[local-name()='name']='outputFormat') and not(key('env-param', 'no_initial_job_properties'))">
- <utml:input name="no_initial_job_properties" type="hidden" value="true"/>
- </xsl:if>
- <!--
- Only keep track that we've visited this dialog if the user has write permission.
- We can't keep track of the steps and options since we'd try to save them when the user hits the
- OK button, so we must always query CM for the steps and options.
- -->
- <xsl:if test="$has_write_permission">
- <utml:input name="visited_job_properties" type="hidden" value="true"/>
- </xsl:if>
- <utml:input name="ps_nav_op" type="hidden" value=""/>
- <utml:input name="m" type="hidden" value=""/>
-
- <!-- prompt run options must always be set to false for a job -->
- <utml:input type="hidden" name="m_ro_prompt" utml:update="false" value="false"/>
- <utml:input type="hidden" name="m_path" utml:update="false">
- <utml:value>
- <xsl:value-of select="/root/*[local-name() = 'queryResponse']/*[local-name()='queryReply'][2]/*[local-name()='jobDefinition']/*[local-name()='parent']/*/*[local-name()='searchPath']"/>
- </utml:value>
- </utml:input>
-
- <!-- Dialog header -->
- <dp:header useBackURL="not($showOKCancel)">
- <dp:title><xsl:copy-of select="$browserTitle"/></dp:title>
- </dp:header>
- <!-- Property tabs -->
- <df:propertiesTabs select="job">
- <df:hasSetPolicy><xsl:value-of select="$has_policy_permission"/></df:hasSetPolicy>
- </df:propertiesTabs>
- <!-- Tab description -->
- <dp:description>
- <xts:string id="IDS_PROP_JOB_INTRO"/>
- </dp:description>
-
- <ut:jobUI/>
- <dp:footer>
- <xsl:choose>
- <xsl:when test="$showOKCancel">
- <df:button df:id="IDS_OK" utml:validate="true" df:style="submit" onclick="if(document.pform.h_CAM_action)document.pform.h_CAM_action.value='generateTC';"/>
- <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>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_CLOSE" df:style="back-url"/>
- </xsl:otherwise>
- </xsl:choose>
- </dp:footer>
- <xsl:if test="$has_write_permission and not(key('env-param','visited_job_properties')) and /root/*[local-name()='steps']/*[local-name()='queryResponse']/*[local-name()='jobStepDefinition']/*[local-name()='stepObject' and @nil='true']">
- <script language="javascript">
- if (window.confirm("<xts:string id="IDS_PROP_JOB_MISSING_STEP_ALERT" encode="javascript"/>"))
- {
- document.pform.listop.value = 'removeNilSteps';
- document.pform.ps_nav_op.value = 'maintain';
- document.pform.m.value = 'portal/<xsl:value-of select="$mname"/>';
-
- window.setTimeout('document.pform.submit();', 1 );
- }
- </script>
- </xsl:if>
- </utml:form>
- </dp:page>
- </xsl:template>
-
- <ut:jobUITemplate showTitle="true" showBorder="true"/>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - display debug information
- ===============================================================================================
- -->
- <xts:block id="debug" dependency="processResponse 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" omit-xml-declaration="yes"/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|