123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2013
- 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).
- -->
- <!--
- ===============================================================================================
- Logic sheet for dealing with "special" properties stored in CM.
- ===============================================================================================
- -->
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cms="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cms/1/" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:out="dummy-uri" exclude-result-prefixes="cms xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
- <!-- Apply "special" decoding when saving certain CM poperties -->
- <xsl:template match="cms:prop-decode">
- <!-- Handle decoding the members property -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_members']" mode="decode">
- <xts:append>
- <!-- create /root/members/list node -->
- <members>
- <out:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap', string( . )), true() )" disable-output-escaping="yes"/>
- </members>
- </xts:append>
- <!-- Delete the member nodes that have the 'deleted' flag underneath them. -->
- <xts:delete select="/root/members/list/*[*[local-name() = 'deleted' and namespace-uri()='x']]"/>
- <!-- Delete all properties of the member nodes except for searchPath. -->
- <xts:delete select="/root/members/list/*/*[not(local-name()='searchPath' and namespace-uri()='http://developer.cognos.com/schemas/xts-cm/1/')]"/>
- </out:template>
- <!-- Handle decoding the consumers property -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_consumers']" mode="decode">
- <out:if test="not(../*[local-name() = 'param'][@name = 'changed_m_signon_consumers'] = '0')">
- <xts:append>
- <consumers>
- <out:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(.)), true())" disable-output-escaping="yes"/>
- </consumers>
- </xts:append>
- <!-- Delete any extra information not pertaining to consumers. -->
- <xts:delete select="/root/consumers/*[local-name()!='list']"/>
- <!-- Delete the consumer nodes that have the 'deleted' flag underneath them. -->
- <xts:delete select="/root/consumers/list/*[*[local-name()='deleted' and namespace-uri()='x']]"/>
- <!-- Delete all properties of the consumer nodes except for searchPath. -->
- <xts:delete select="/root/consumers/list/*/*[not(local-name()='searchPath' and namespace-uri()='http://developer.cognos.com/schemas/xts-cm/1/')]"/>
- </out:if>
- </out:template>
- <out:template match="*[local-name() = 'param'][@name = 'jobSteps']" mode="decode">
- <xts:append>
- <!-- create /root/steps node -->
- <out:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap', string( . )), true() )" disable-output-escaping="yes"/>
- </xts:append>
- </out:template>
- <out:template match="*[local-name() = 'param'][@name = 'jobOptions']" mode="decode">
- <xts:append>
- <!-- create /root/jobOptions node -->
- <out:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap', string( . )), true() )" disable-output-escaping="yes"/>
- </xts:append>
- </out:template>
- <out:template match="*[local-name() = 'param'][@name = 'emailToRunOptions']" mode="decode">
- <xts:append>
- <!-- create /root/emailToRunOptions node -->
- <out:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap', string( . )), true() )" disable-output-escaping="yes"/>
- </xts:append>
- </out:template>
- <out:template match="*[local-name() = 'param'][@name = 'm_rp_parameters']" mode="decode">
- <xts:append>
- <!-- create /root/parameters node -->
- <out:value-of select="xtsext:web64decode( string( . ), true() )" disable-output-escaping="yes"/>
- </xts:append>
- </out:template>
- <!-- Handle decoding the deploymentOptions property -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_deploymentOptions']" mode="decode">
- <xts:append>
- <!-- create /root/deploymentOptions node -->
- <out:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap', string( . )), true() )" disable-output-escaping="yes"/>
- </xts:append>
- </out:template>
- </xsl:template>
- <!-- Apply "special" processing when saving certain CM poperties -->
- <xsl:template match="cms:prop-save">
- <!-- Handle the members property -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_members']">
- <out:if test="../*[local-name() = 'param'][@name = 'changed_m_p_members'] != '0' or not( ../*[local-name() = 'param'][@name = 'changed_m_p_members'] )">
- <out:choose>
- <out:when test="../*[local-name() = 'param'][@name = 'm_class'] = 'tenant'">
- <tenantMembers xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
- <xts:queryNode select="/root/members/list/*"/>
- </tenantMembers>
- </out:when>
- <out:otherwise>
- <members xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
- <xts:queryNode select="/root/members/list/*"/>
- </members>
- </out:otherwise>
- </out:choose>
- </out:if>
- </out:template>
- <!-- Handle the consumers property -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_consumers']">
- <out:if test="not(../*[local-name() = 'param'][@name = 'changed_m_signon_consumers'] = '0')">
- <consumers xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
- <xts:queryNode select="/root/consumers/list/*"/>
- </consumers>
- </out:if>
- </out:template>
- <!-- Handle the deploymentOptions property -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_deploymentOptions']">
- <out:if test="not(../*[local-name() = 'param'][@name = 'read_only_page'])">
- <deploymentOptions xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
- <xts:queryNode select="/root/*[local-name()='deploymentOptions']/*"/>
- </deploymentOptions>
- </out:if>
- </out:template>
- <!-- Handle the format_pref property -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_format_pref']">
- <out:if test="../*[local-name() = 'param'][@name = 'changed_m_p_format_pref'] != '0' or not( ../*[local-name() = 'param'][@name = 'changed_m_p_format_pref'] )">
- <out:if test=". = 'user'">
- <formats/>
- </out:if>
- <out:if test=". = 'specify'"/>
- </out:if>
- </out:template>
- <!-- Handle the iso_pref property -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_iso_pref']">
- <out:if test="(../*[local-name() = 'param'][@name = 'changed_m_p_iso_pref'] != '0' or not( ../*[local-name() = 'param'][@name = 'changed_m_p_iso_pref'] )) and . = 'default'">
- <isolationLevel xmlns="http://developer.cognos.com/schemas/xts-cm/1/"/>
- </out:if>
- </out:template>
- <!-- Handle the base property - a reference to a report/query in a reportView. -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_base']">
- <cm:base>
- <cm:baseClass>
- <cm:searchPath><out:value-of select="."/></cm:searchPath>
- </cm:baseClass>
- </cm:base>
- </out:template>
- <!-- Target object for a metadataModelPackage -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_metadataModelPackage']">
- <cm:metadataModelPackage>
- <cm:baseClass>
- <cm:searchPath><out:value-of select="."/></cm:searchPath>
- </cm:baseClass>
- </cm:metadataModelPackage>
- </out:template>
- <!-- Target object for a metadataModel -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_metadataModel']">
- <cm:metadataModel>
- <out:if test=". != ''">
- <cm:baseClass>
- <cm:searchPath><out:value-of select="."/></cm:searchPath>
- </cm:baseClass>
- </out:if>
- </cm:metadataModel>
- </out:template>
- <!-- Target object for a shortcut -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_target']">
- <cm:target>
- <cm:baseClass>
- <cm:searchPath><out:value-of select="."/></cm:searchPath>
- </cm:baseClass>
- </cm:target>
- </out:template>
-
- <!-- Scope property for Drill through object -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_scope']">
- <cm:scope>
- <cm:scopeValues>
- <out:if test=". != ''">
- <cm:scopeValue><out:value-of select="."/></cm:scopeValue>
- </out:if>
- </cm:scopeValues>
- </cm:scope>
- </out:template>
- <!-- defaultAnalysis property for package configuration object -->
- <out:template match="*[local-name() = 'param'][@name = 'm_ppc_defaultAnalysis']">
- <out:choose>
- <out:when test=". != ''">
- <cm:defaultAnalysis>
- <cm:baseClass>
- <cm:searchPath><out:value-of select="."/></cm:searchPath>
- </cm:baseClass>
- </cm:defaultAnalysis>
- </out:when>
- <out:otherwise>
- <cm:defaultAnalysis/>
- </out:otherwise>
- </out:choose>
- </out:template>
- <!-- bookmarkItem property for Drill through object -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_bookmarkItem']">
- <cm:bookmarkItem>
- <out:value-of select="."/>
- </cm:bookmarkItem>
- </out:template>
-
- <!-- handle the contact for an object -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_contact']">
- <cm:contact>
- <out:if test=". != ''">
- <cm:baseClass>
- <cm:searchPath><out:value-of select="."/></cm:searchPath>
- </cm:baseClass>
- </out:if>
- </cm:contact>
- </out:template>
-
- <!-- handle the dataSourceAccessAccount for a rolapDataSource object -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_dataSourceAccessAccount']">
- <cm:dataSourceAccessAccount>
- <out:if test=". != ''">
- <cm:baseClass>
- <cm:searchPath><out:value-of select="."/></cm:searchPath>
- </cm:baseClass>
- </out:if>
- </cm:dataSourceAccessAccount>
- </out:template>
-
- <!-- handle the credentialNamespaces for a dataSourceConnection object -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_use_credentialNamespaces']">
- <out:choose>
- <out:when test="../*[local-name()='param'][@name = 'm_p_use_credentialNamespaces']='false'">
- <cm:credentialNamespaces/>
- </out:when>
- <out:when test="../*[local-name()='param'][@name='credentialNamespaces']">
- <cm:credentialNamespaces>
- <cm:namespace>
- <cm:searchPath><out:value-of select="../*[local-name()='param'][@name='credentialNamespaces']"/></cm:searchPath>
- </cm:namespace>
- </cm:credentialNamespaces>
- </out:when>
- </out:choose>
- </out:template>
- <!-- handle the credentialNamespaces for a dataSourceConnection object -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_credentialNamespaces']">
- <cm:credentialNamespaces>
- <out:if test=". != ''">
- <cm:namespace>
- <cm:searchPath><out:value-of select="../*[local-name()='param'][@name='m_p_credentialNamespaces']"/></cm:searchPath>
- </cm:namespace>
- </out:if>
- </cm:credentialNamespaces>
- </out:template>
-
- <!-- Handle the owner property - a reference to an Owner. -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_owner']">
- <out:if test="not(/root/env/*[local-name()='param'][@name='changed_m_p_owner']=0)">
- <cm:owner>
- <cm:baseClass>
- <cm:searchPath><out:value-of select="."/></cm:searchPath>
- </cm:baseClass>
- </cm:owner>
- </out:if>
- </out:template>
-
- <!-- Handle the contentLocale property - for contacts its called locale. -->
- <out:template match="*[local-name()='param'][@name='m_p_contentLocale']">
- <out:if test="not(../*[local-name()='param'][@name='changed_m_p_contentLocale']) or ../*[local-name()='param'][@name='changed_m_p_contentLocale']='1'">
- <out:choose>
- <out:when test="../*[local-name()='param'][@name='m_class']='contact'">
- <cm:locale>
- <out:value-of select="."/>
- </cm:locale>
- </out:when>
- <out:otherwise>
- <cm:contentLocale>
- <out:value-of select="."/>
- </cm:contentLocale>
- </out:otherwise>
- </out:choose>
- </out:if>
- </out:template>
-
- <!-- Handle the productLocale property - Needed for CM fix when changing a choosen language to the default browser language-->
- <out:template match="*[local-name()='param'][@name='m_p_productLocale']">
- <out:if test="not(../*[local-name()='param'][@name='changed_m_p_productLocale']) or ../*[local-name()='param'][@name='changed_m_p_productLocale']='1'">
- <cm:productLocale>
- <out:value-of select="."/>
- </cm:productLocale>
- </out:if>
- </out:template>
- <!-- Handle the productLocale property - Needed for CM fix when changing a choosen language to the default browser language-->
- <out:template match="*[local-name()='param'][@name='m_p_useAccessibilityFeatures']">
- <cm:useAccessibilityFeatures>
- <out:value-of select="."/>
- </cm:useAccessibilityFeatures>
- </out:template>
-
- <out:template match="*[local-name()='param'][@name='m_p_canCustomize']">
- <out:if test=". != ''">
- <cm:canCustomize>
- <out:value-of select="."/>
- </cm:canCustomize>
- </out:if>
- </out:template>
- <!-- Handle the command block properties on a dataSource or dataSourceConnection -->
- <out:template match="*[local-name()='param'][starts-with(@name,'m_cbp_')]">
- <out:variable name="propertyName" select="substring-after(@name, 'm_cbp_')"/>
- <out:variable name="changeName" select="concat('changed_m_cbp_',$propertyName)"/>
- <out:variable name="param" select="../*[local-name()='param']"/>
- <!-- Only save the property value if it has been changed or the user wants to delete the child entries -->
- <out:if test="$param[@name=$changeName]='1' or not($param[@name=$changeName]) or $param[@name=concat('m_cbd_',$propertyName)]='true'">
- <!-- create an element for each command block -->
- <out:element namespace="http://developer.cognos.com/schemas/xts-cm/1/">
- <xsl:attribute name="name"><xsl:value-of select="'{$propertyName}'"/></xsl:attribute>
- <!-- if the user has selected to delete the child entries for this property -->
- <out:if test="$param[@name=concat('m_cbd_',$propertyName)]='true'">
- <out:attribute name="updateAllDescendents">true</out:attribute>
- </out:if>
- <out:if test="$param[@name=concat('m_acquired_',$propertyName)]='false' or not($param[@name=concat('m_acquired_',$propertyName)])">
- <out:value-of select="xtsext:xmlencode(string(.))"/>
- </out:if>
- </out:element>
- </out:if>
- </out:template>
-
- <!-- Handle the tenantID property; we should only include this one if it is really being changed or a tenant object is being created. -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_tenantID']">
- <out:variable name="isCreateTenant" select="../*[local-name() = 'param'][@name = 'ifrmcmd']='create' and ../*[local-name() = 'param'][@name = 'm_new_class']='tenant'"/>
- <out:variable name="tenantIDHasChanged" select="../*[local-name() = 'param'][@name = 'changed_m_p_tenantID'] and ../*[local-name() = 'param'][@name = 'changed_m_p_tenantID'] != '0'"/>
- <out:if test="$isCreateTenant or $tenantIDHasChanged">
- <cm:tenantID>
- <out:value-of select="."/>
- </cm:tenantID>
- </out:if>
- </out:template>
- <!-- Handle the hidden property; we should only include this one if its value has been set. -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_hidden']">
- <out:if test="../*[local-name() = 'param'][@name = 'm_p_hidden'] != ''">
- <cm:hidden>
- <out:value-of select="."/>
- </cm:hidden>
- </out:if>
- </out:template>
-
- <!-- Handle unwritable properties -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_path']"/>
- <out:template match="*[local-name() = 'param'][@name = 'm_p_searchPath']"/>
- <!-- We completely ignore the username and password values because they are explicitely retrieved in the starts-with(@name, 'm_p_') template. -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_username']"/>
- <out:template match="*[local-name() = 'param'][@name = 'm_p_password']"/>
- <!-- Ignore the password2 field -->
- <out:template match="*[local-name() = 'param'][@name = 'm_p_password2']"/>
- <out:template name="build_contentTask_runTime_options">
- <xts:transform src="transforms/portal/options/buildOptions.xslt" processor="XSLT">
- <root>
- <xts:transform src="transforms/portal/options/buildOptionItems.xslt" processor="XSLT">
- <root>
- <out:copy-of select="/root/env"/>
- <xts:transform name="XML" src="portal/options.xml"/>
- <optionType>contentTaskOptions</optionType>
- </root>
- </xts:transform>
- </root>
- </xts:transform>
- </out:template>
-
- <out:template name="build_indexUpdateTask_runTime_options">
- <xts:transform src="transforms/portal/options/buildOptions.xslt" processor="XSLT">
- <root>
- <xts:transform src="transforms/portal/options/buildOptionItems.xslt" processor="XSLT">
- <root>
- <out:copy-of select="/root/env"/>
- <xts:transform name="XML" src="portal/options.xml"/>
- <optionType>indexOptions</optionType>
- </root>
- </xts:transform>
- </root>
- </xts:transform>
- </out:template>
-
- <out:template name="build_deployment_runTime_options">
- <xts:transform src="transforms/portal/options/buildOptions.xslt" processor="XSLT">
- <root>
- <xts:transform src="transforms/portal/options/buildOptionItems.xslt" processor="XSLT">
- <root>
- <xts:transform src="transforms/portal/options/cleanEnv.xslt" processor="XSLT">
- <root>
- <out:copy-of select="/root/env"/>
- </root>
- </xts:transform>
- <xts:transform name="XML" src="portal/options.xml"/>
- <optionType>deploymentOptions</optionType>
- </root>
- </xts:transform>
- </root>
- </xts:transform>
- </out:template>
-
- <!-- handle building the schedule object ** FOR NEW SCHEDULE DIALOG **-->
- <out:template name="build_jsm_schedule">
- <out:param name="env"/>
-
- <out:variable name="tenantID" select="string($env/form:param[@name = 'm_p_tenantID'])"/>
- <out:if test="$tenantID">
- <tenantID xsi:type="bus:stringProp">
- <value xsi:type="xsd:string">
- <out:value-of select="$tenantID"/>
- </value>
- </tenantID>
- </out:if>
-
- <active xsi:type="bus:booleanProp">
- <value xsi:type="xsd:boolean">
- <out:choose>
- <out:when test="$env/form:param[@name = 'm_sp_active']">false</out:when>
- <out:otherwise>true</out:otherwise>
- </out:choose>
- </value>
- </active>
-
- <!-- handle priority property -->
- <out:if test="$env/form:param[@name = 'm_sp_priority'] or $env/form:param[@name = 'm_sp_priority']=''">
- <priority xsi:type="bus:positiveIntegerProp">
- <value xsi:type="xsd:integer">
- <out:value-of select="$env/form:param[@name = 'm_sp_priority']"/>
- </value>
- </priority>
- </out:if>
-
- <out:variable name="dfIntra" select="string($env/form:param[@name = 'df_intra'])"/>
-
- <!-- If using the old or new style triggers, set the triggerName on the schedule object to m_sp_triggerName -->
- <triggerName xsi:type="bus:stringProp">
- <value xsi:type="xsd:string">
- <out:if test="$env/form:param[@name = 'm_sp_type'] = 'trigger'">
- <out:value-of select="$env/form:param[@name = 'm_sp_triggerName']"/>
- </out:if>
- </value>
- </triggerName>
- <out:if test="not($env/form:param[@name = 'm_triggerType']) or $env/form:param[@name = 'm_triggerType'] = 'schedule'">
- <startDate xsi:type="bus:dateTimeProp">
- <value xsi:type="xsd:dateTime">
- <out:variable name="xsl_start_date">
- <out:value-of select="concat(string($env/form:param[@name = 'p_sched_date1']), 'T', substring-before(string($env/form:param[@name = 'p_sched_time1']), '.'))"/>
- </out:variable>
- <out:variable name="xsl_UTC_start_date">
- <out:value-of select="xtsext:formatDateToUTC( string( $xsl_start_date ), string( $timeZone ) )"/>
- </out:variable>
- <out:value-of select="concat(substring($xsl_UTC_start_date, 1, 16), ':00')"/>
- </value>
- </startDate>
-
- <out:choose>
- <out:when test="$env/form:param[@name='m_sp_endType'] = 'onDate' and $env/form:param[@name = 'p_sched_date2'] and $env/form:param[@name = 'p_sched_time2']">
- <out:variable name="xsl_end_date">
- <out:value-of select="concat(string($env/form:param[@name = 'p_sched_date2']), 'T', substring-before(string($env/form:param[@name = 'p_sched_time2']), '.'))"/>
- </out:variable>
- <out:variable name="xsl_UTC_end_date">
- <out:value-of select="xtsext:formatDateToUTC( string( $xsl_end_date ), string( $timeZone ) )"/>
- </out:variable>
-
- <endDate xsi:type="bus:dateTimeProp">
- <value xsi:type="xsd:dateTime">
- <out:value-of select="concat(substring($xsl_UTC_end_date, 1, 16), ':00')"/>
- </value>
- </endDate>
- </out:when>
- </out:choose>
- <out:if test="not($env/form:param[@name = 'm_sp_type'] = 'trigger') and ($dfIntra = 'true')">
- <intradayRecurrenceInterval xsi:type="cm:durationProp">
- <value xsi:type="xsd:duration"><out:value-of select="concat('PT',$env/form:param[@name = 'm_sp_intradayRecurrenceIntervalNum'],$env/form:param[@name = 'm_sp_intradayRecurrenceIntervalUnit'])"/></value>
- </intradayRecurrenceInterval>
- <intradayRecurrenceStart xsi:type="cm:timeProp">
- <out:variable name="xsl_intradayRecurrenceStart">
- <out:value-of select="concat(string($env/form:param[@name = 'p_sched_date1']),'T',string($env/form:param[@name = 'p_intradayRecurrenceStart']))"/>
- </out:variable>
- <out:variable name="xsl_UTC_intradayRecurrenceStart">
- <out:value-of select="xtsext:formatDateToUTC( string( $xsl_intradayRecurrenceStart ), string( $timeZone ) )"/>
- </out:variable>
- <value xsi:type="xsd:time"><out:value-of select="substring-after($xsl_UTC_intradayRecurrenceStart,'T')"/></value>
- </intradayRecurrenceStart>
- <intradayRecurrenceEnd xsi:type="cm:timeProp">
- <out:variable name="xsl_intradayRecurrenceEnd">
- <out:value-of select="concat(string($env/form:param[@name = 'p_sched_date1']),'T',string($env/form:param[@name = 'p_intradayRecurrenceEnd']))"/>
- </out:variable>
- <out:variable name="xsl_UTC_intradayRecurrenceEnd">
- <out:value-of select="xtsext:formatDateToUTC( string( $xsl_intradayRecurrenceEnd ), string( $timeZone ) )"/>
- </out:variable>
- <value xsi:type="xsd:time"><out:value-of select="substring-after($xsl_UTC_intradayRecurrenceEnd,'T')"/></value>
- </intradayRecurrenceEnd>
- </out:if>
-
- <endType xsi:type="bus:nmtokenProp">
- <value xsi:type="xsd:string"><out:value-of select="$env/form:param[@name = 'm_sp_endType']"/></value>
- </endType>
- </out:if>
- <type xsi:type="bus:nmtokenProp">
- <value xsi:type="xsd:string">
- <out:choose>
- <out:when test="starts-with($env/form:param[@name = 'm_sp_type'],'monthly')">
- <out:choose>
- <out:when test="$env/form:param[@name = 'sub_type'] = 'relative'">
- <out:choose>
- <out:when test="$dfIntra = 'true'">monthlyRelativeWithIntradayRecurrence</out:when>
- <out:otherwise>monthlyRelative</out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>
- <out:choose>
- <out:when test="$dfIntra = 'true'">monthlyAbsoluteWithIntradayRecurrence</out:when>
- <out:otherwise>monthlyAbsolute</out:otherwise>
- </out:choose>
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:when test="starts-with($env/form:param[@name = 'm_sp_type'],'yearly')">
- <out:choose>
- <out:when test="$env/form:param[@name = 'sub_type'] = 'relative'">
- <out:choose>
- <out:when test="$dfIntra = 'true'">yearlyRelativeWithIntradayRecurrence</out:when>
- <out:otherwise>yearlyRelative</out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>
- <out:choose>
- <out:when test="$dfIntra = 'true'">yearlyAbsoluteWithIntradayRecurrence</out:when>
- <out:otherwise>yearlyAbsolute</out:otherwise>
- </out:choose>
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>
- <out:variable name="spType" select="$env/form:param[@name = 'm_sp_type']"/>
- <out:choose>
- <out:when test="($dfIntra='true') and not(contains($spType,'WithIntradayRecurrence'))">
- <out:value-of select="concat($spType,'WithIntradayRecurrence')"/>
- </out:when>
- <out:when test="not($dfIntra = 'true') and contains($spType,'WithIntradayRecurrence')">
- <out:value-of select="substring-before($spType,'WithIntradayRecurrence')"/>
- </out:when>
- <out:otherwise><out:value-of select="$spType"/></out:otherwise>
- </out:choose>
- </out:otherwise>
- </out:choose>
- </value>
- </type>
- <out:choose>
- <out:when test="starts-with($env/form:param[@name = 'm_sp_type'],'daily')">
- <dailyPeriod xsi:type="bus:nmtokenProp">
- <value xsi:type="xsd:string">
- <out:value-of select="$env/form:param[@name = 'm_sp_dailyPeriod']"/>
- </value>
- </dailyPeriod>
- <everyNPeriods xsi:type="bus:positiveIntegerProp">
- <value xsi:type="xsd:integer">
- <out:choose>
- <out:when test="$env/form:param[@name = 'm_sp_dailyPeriod'] = 'minute'">
- <out:value-of select="$env/form:param[@name = 'm_sp_everyNminutes']"/>
- </out:when>
- <out:when test="$env/form:param[@name = 'm_sp_dailyPeriod'] = 'hour'">
- <out:value-of select="$env/form:param[@name = 'm_sp_everyNhours']"/>
- </out:when>
- <out:when test="$env/form:param[@name = 'm_sp_dailyPeriod'] = 'day'">
- <out:value-of select="$env/form:param[@name = 'm_sp_everyNdays']"/>
- </out:when>
- </out:choose>
- </value>
- </everyNPeriods>
- </out:when>
- <out:when test="starts-with($env/form:param[@name = 'm_sp_type'],'weekly')">
- <everyNPeriods xsi:type="bus:positiveIntegerProp">
- <value xsi:type="xsd:integer">
- <out:value-of select="$env/form:param[@name = 'm_sp_everyNweeks']"/>
- </value>
- </everyNPeriods>
- <weeklySunday xsi:type="bus:booleanProp">
- <value xsi:type="xsd:boolean">
- <out:choose>
- <out:when test="$env/form:param[@name = 'm_sp_weeklySunday']='true'">true</out:when>
- <out:otherwise>false</out:otherwise>
- </out:choose>
- </value>
- </weeklySunday>
- <weeklyMonday xsi:type="bus:booleanProp">
- <value xsi:type="xsd:boolean">
- <out:choose>
- <out:when test="$env/form:param[@name = 'm_sp_weeklyMonday']='true'">true</out:when>
- <out:otherwise>false</out:otherwise>
- </out:choose>
- </value>
- </weeklyMonday>
- <weeklyTuesday xsi:type="bus:booleanProp">
- <value xsi:type="xsd:boolean">
- <out:choose>
- <out:when test="$env/form:param[@name = 'm_sp_weeklyTuesday']='true'">true</out:when>
- <out:otherwise>false</out:otherwise>
- </out:choose>
- </value>
- </weeklyTuesday>
- <weeklyWednesday xsi:type="bus:booleanProp">
- <value xsi:type="xsd:boolean">
- <out:choose>
- <out:when test="$env/form:param[@name = 'm_sp_weeklyWednesday']='true'">true</out:when>
- <out:otherwise>false</out:otherwise>
- </out:choose>
- </value>
- </weeklyWednesday>
- <weeklyThursday xsi:type="bus:booleanProp">
- <value xsi:type="xsd:boolean">
- <out:choose>
- <out:when test="$env/form:param[@name = 'm_sp_weeklyThursday']='true'">true</out:when>
- <out:otherwise>false</out:otherwise>
- </out:choose>
- </value>
- </weeklyThursday>
- <weeklyFriday xsi:type="bus:booleanProp">
- <value xsi:type="xsd:boolean">
- <out:choose>
- <out:when test="$env/form:param[@name = 'm_sp_weeklyFriday']='true'">true</out:when>
- <out:otherwise>false</out:otherwise>
- </out:choose>
- </value>
- </weeklyFriday>
- <weeklySaturday xsi:type="bus:booleanProp">
- <value xsi:type="xsd:boolean">
- <out:choose>
- <out:when test="$env/form:param[@name = 'm_sp_weeklySaturday']='true'">true</out:when>
- <out:otherwise>false</out:otherwise>
- </out:choose>
- </value>
- </weeklySaturday>
- </out:when>
- <out:when test="starts-with($env/form:param[@name = 'm_sp_type'],'monthly')">
- <out:choose>
- <out:when test="$env/form:param[@name = 'sub_type'] = 'relative'">
- <everyNPeriods xsi:type="bus:positiveIntegerProp">
- <value xsi:type="xsd:integer">
- <out:value-of select="$env/form:param[@name = 'm_sp_everyNmonthsRel']"/>
- </value>
- </everyNPeriods>
- <monthlyRelativeDay xsi:type="bus:nmtokenProp">
- <value xsi:type="xsd:string">
- <out:value-of select="$env/form:param[@name = 'm_sp_monthlyRelativeDay']"/>
- </value>
- </monthlyRelativeDay>
- <monthlyRelativeWeek xsi:type="bus:nmtokenProp">
- <value xsi:type="xsd:string">
- <out:value-of select="$env/form:param[@name = 'm_sp_monthlyRelativeWeek']"/>
- </value>
- </monthlyRelativeWeek>
- </out:when>
- <out:otherwise>
- <everyNPeriods xsi:type="bus:positiveIntegerProp">
- <value xsi:type="xsd:integer">
- <out:value-of select="$env/form:param[@name = 'm_sp_everyNmonthsAbs']"/>
- </value>
- </everyNPeriods>
- <monthlyAbsoluteDay xsi:type="bus:positiveIntegerProp">
- <value xsi:type="xsd:integer">
- <out:value-of select="$env/form:param[@name = 'm_sp_monthlyAbsoluteDay']"/>
- </value>
- </monthlyAbsoluteDay>
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:when test="starts-with($env/form:param[@name = 'm_sp_type'],'yearly')">
- <out:choose>
- <out:when test="$env/form:param[@name = 'sub_type'] = 'relative'">
- <yearlyRelativeMonth xsi:type="bus:nmtokenProp">
- <value xsi:type="xsd:string">
- <out:value-of select="$env/form:param[@name = 'm_sp_yearlyRelativeMonth']"/>
- </value>
- </yearlyRelativeMonth>
- <yearlyRelativeDay xsi:type="bus:positiveIntegerProp">
- <value xsi:type="xsd:integer">
- <out:value-of select="$env/form:param[@name = 'm_sp_yearlyRelativeDay']"/>
- </value>
- </yearlyRelativeDay>
- <yearlyRelativeWeek xsi:type="bus:nmtokenProp">
- <value xsi:type="xsd:string">
- <out:value-of select="$env/form:param[@name = 'm_sp_yearlyRelativeWeek']"/>
- </value>
- </yearlyRelativeWeek>
- </out:when>
- <out:otherwise>
- <yearlyAbsoluteMonth xsi:type="bus:nmtokenProp">
- <value xsi:type="xsd:string">
- <out:value-of select="$env/form:param[@name = 'm_sp_yearlyAbsoluteMonth']"/>
- </value>
- </yearlyAbsoluteMonth>
- <yearlyAbsoluteDay xsi:type="bus:positiveIntegerProp">
- <value xsi:type="xsd:integer">
- <out:value-of select="$env/form:param[@name = 'm_sp_yearlyAbsoluteDay']"/>
- </value>
- </yearlyAbsoluteDay>
- </out:otherwise>
- </out:choose>
- </out:when>
- </out:choose>
- <out:if test="key('env-param','m_schedule_owner_reset')='true'">
- <credential xsi:type="bus:baseClassArrayProp">
- <value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:credential[1]">
- <item xsi:type="bus:credential">
- <searchPath xsi:type="cm:stringProp">
- <value xsi:type="xsd:string">
- <out:choose>
- <out:when test="not($env/form:param[@name='m_sp_credential'])">
- <out:value-of select="/root/command/*/*[local-name()='credentialPath']"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="$env/form:param[@name='m_sp_credential']"/>
- </out:otherwise>
- </out:choose>
- </value>
- </searchPath>
- </item>
- </value>
- </credential>
- </out:if>
- <timeZoneID xsi:type="bus:stringProp">
- <value xsi:type="xsd:string"><out:value-of select="$timeZone"/></value>
- </timeZoneID>
- </out:template>
- </xsl:template>
- <xsl:template name="build_runOptionArray">
- <xsl:param name="class"/>
- <xsl:param name="type"/>
- <xsl:param name="name"/>
- <runOption xmlns="http://developer.cognos.com/schemas/xts-cm/1/" class="{$class}">
- <name><xsl:value-of select="$name"/></name>
- <items>
- <out:for-each select="$env/*[starts-with(@name,concat('m_ro_','{$name}'))]">
- <out:if test="(@name!='m_ro_outputFormat_HTML' or $env/*[@name='m_ro_outputF_HTML_Type']='true') and (@name!='m_ro_outputFormat_XLS2000' or $env/*[@name='m_ro_outputF_XLS2000_Type']='true') and . != ''">
- <item><out:value-of select="."/></item>
- </out:if>
- </out:for-each>
- </items>
- </runOption>
- </xsl:template>
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
|