1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2019
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" messageBase="messages/portal.xml, messages/portalRL.xml" resolverBase="prompting" includeConfig="true" requiredCapability="canUseDataSourcesTool canUseSelfServicePackageWizard or">
- <!--
- ===============================================================================================
- 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"/>
- <!--
- ================================================================================
- encrypt the password
- ================================================================================
- -->
- <xts:block id="encrypt_password" path="/portal/encryptConnectionPasswords.xslt" dependency="formlogic_init" type="exec" mode="interpret" processor="XSLT" mandatory="false" condition=".[/root/env/param[@name='m_cube_password' or @name='test_cube_password' or @name='m_connection_password' or @name='test_password'] != '']"/>
- <!--
- ================================================================================
- If the wizard dialog number is not set then create one.
- ================================================================================
- -->
- <xts:block id="pre-process" dependency="encrypt_password" processor="XSLT" nodelist="" type="exec" condition=".[not(/root/env/param[@name='m_wizardDialogNumber'])]" mandatory="false">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/env">
- <param name="m_wizardDialogNumber">
- <xsl:value-of select="'0'"/>
- </param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ================================================================================
- Remove from ennvironment not needed parameters
- ================================================================================
- -->
- <xts:block id="cleanupEnv" dependency="pre-process" processor="XSLT" nodelist="" type="exec" condition=".[/root/env/param[starts-with(@name,'package_dialog_checkbox')]]" mandatory="false">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:delete select="/root/env/param[starts-with(@name,'package_dialog_checkbox_')]"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- get_content
- ===============================================================================================
- -->
- <xts:block id="getParameters" dependency="cleanupEnv" nodelist="env, system, header" processor="XSLT" type="exec" mode="interpret" mandatory="false">
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:variable name="level" select="key('env-param', 'm_wizardDialogNumber')"/>
- <xsl:variable name="path">
- <xsl:choose>
- <xsl:when test="string(/root/env/param[@name='so.searchPath'])!=''">
- <xsl:value-of select="/root/env/param[@name='so.searchPath']"/>
- </xsl:when>
- <!-- the package location can be passed by Transformer -->
- <xsl:when test="/root/env/param[@name='from_transf']!='' and string(/root/env/param[@name='m_package_dialog_0_location_packageLocation'])!=''">
- <xsl:value-of select="/root/env/param[@name='m_package_dialog_0_location_packageLocation']"/>
- </xsl:when>
- <xsl:when test="/root/env/param[@name='m_selfServicePackageLocation']!=''">
- <xsl:value-of select="/root/env/param[@name='m_selfServicePackageLocation']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'/content'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <xts:transform src="transforms/fm/fm-params.xslt" processor="XSLT">
- <send:request provider="metadataService" testBlock="testMetadataResponse" faultBlock="createFault">
- <md1:updateMetadata xmlns:md1="http://developer.cognos.com/schemas/metadataService/1">
- <request>
- <xts:transform name="XMLEncode">
- <mdprovider type="transientAction" action="execute" seq="1">
- <transaction saved="false" seq="1">
- <action seq="1" type="CmWizardPublishLwm">
- <inputparams>
- <param seq="1" type="cclnode">
- <value>
- <xts:transform name="XMLEncode">
- <parameters xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <value>
- <item>
- <name>datasource</name>
- <value>
- <item xsi:type="bus:simpleParmValueItem">
- <inclusive>true</inclusive>
- <use><xsl:value-of select="key('env-param', 'm_dataSourceName')"/></use>
- </item>
- </value>
- </item>
- <!-- Special process for packageName, packageDescription...
- because these parameters need to be ordered-->
- <!-- when level is 0 then it's the first time we hit the wizard. -->
- <xsl:if test="$level != '' and $level !='0'">
- <item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <name>packageName</name>
- <value>
- <item xsi:type="bus:simpleParmValueItem">
- <inclusive>true</inclusive>
- <use><xsl:value-of select="key('env-param', 'm_package_dialog_0_text_packageName')"/></use>
- </item>
- </value>
- </item>
- <item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <name>packageDescription</name>
- <value>
- <item xsi:type="bus:simpleParmValueItem">
- <inclusive>true</inclusive>
- <use><xsl:value-of select="key('env-param', 'm_package_dialog_0_textArea_packageDescription')"/></use>
- </item>
- </value>
- </item>
- <item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <name>packageScreenTip</name>
- <value>
- <item xsi:type="bus:simpleParmValueItem">
- <inclusive>true</inclusive>
- <use><xsl:value-of select="key('env-param', 'm_package_dialog_0_text_packageScreenTip')"/></use>
- </item>
- </value>
- </item>
- <item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <name>packageLocation</name>
- <value>
- <item xsi:type="bus:simpleParmValueItem">
- <inclusive>true</inclusive>
- <use><xsl:value-of select="key('env-param', 'm_package_dialog_0_location_packageLocation')"/></use>
- </item>
- </value>
- </item>
- <!-- Here process the trees and fields. -->
- <xsl:for-each select="/root/env/param[generate-id(.) = generate-id(key('env-param',@name)) and starts-with(@name, 'm_package_dialog_') and not(contains(@name, 'packageName') or contains(@name, 'packageDescription') or contains(@name, 'packageLocation') or contains(@name, 'packageScreenTip') or contains(@name, '_selected'))]">
- <xsl:sort select="@name"/>
- <xsl:variable name="levelParam" select="substring-before(substring-after(@name, 'm_package_dialog_'), '_')"/>
- <xsl:variable name="localParamName" select="@name"/>
- <xsl:variable name="paramSelected" select="concat(@name, '_selected')"/>
- <xsl:variable name="value" select="."/>
- <xsl:variable name="selectedValues" select="/root/env/param[@name=$localParamName]"/>
- <xsl:if test="$levelParam!='' and not(number($level) <= number($levelParam))">
- <xsl:choose>
- <xsl:when test="contains(@name, '_tree_')">
- <item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <name><xsl:value-of select="substring-after(@name, '_tree_')"/></name>
- <value>
- <item xsi:type="bus:simpleParmValueItem">
- <inclusive>true</inclusive>
- <use><xsl:value-of select="$value"/></use>
- </item>
- </value>
- </item>
- </xsl:when>
- <xsl:when test="contains(@name, '_list_')">
- <item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <name><xsl:value-of select="substring-after(@name, '_list_')"/></name>
- <xsl:choose>
- <!-- do not copy the value if it is empty and the selection is true (optional) -->
- <xsl:when test="not($selectedValues) and /root/env/param[@name= $paramSelected] and /root/env/param[@name= $paramSelected]='true'"/>
- <xsl:otherwise>
- <value>
- <xsl:for-each select="/root/env/param[@name=$localParamName]">
- <item xsi:type="bus:simpleParmValueItem">
- <inclusive>true</inclusive>
- <use><xsl:value-of select="."/></use>
- </item>
- </xsl:for-each>
- </value>
- </xsl:otherwise>
- </xsl:choose>
- </item>
- </xsl:when>
- <xsl:when test="contains(@name, '_text_') or contains(@name, '_textArea_') or contains(@name, '_radioGroup_') or contains(@name,'_checkbox_')">
- <xsl:variable name="paramName">
- <xsl:choose>
- <xsl:when test="contains(@name, '_text_')">
- <xsl:value-of select="substring-after(@name, '_text_')"/>
- </xsl:when>
- <xsl:when test="contains(@name, '_textArea_')">
- <xsl:value-of select="substring-after(@name, '_textArea_')"/>
- </xsl:when>
- <xsl:when test="contains(@name, '_radioGroup_')">
- <xsl:value-of select="substring-after(@name, '_radioGroup_')"/>
- </xsl:when>
- <xsl:when test="contains(@name, '_checkbox_')">
- <xsl:value-of select="substring-after(@name, '_checkbox_')"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <name><xsl:value-of select="$paramName"/></name>
- <value>
- <item xsi:type="bus:simpleParmValueItem">
- <inclusive>true</inclusive>
- <use><xsl:value-of select="$value"/></use>
- </item>
- </value>
- </item>
- </xsl:when>
- </xsl:choose>
- </xsl:if>
- </xsl:for-each>
- </xsl:if>
- </value>
- </parameters>
- </xts:transform>
- </value>
- </param>
- </inputparams>
- <domchanges/>
- <result success="t">
- <outputparams>
- <param seq="1" type="cclnode">
- <value/>
- </param>
- </outputparams>
- </result>
- </action>
- </transaction>
- </mdprovider>
- </xts:transform>
- </request>
- </md1:updateMetadata>
- </send:request>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- <xsl:if test="key('env-param', 'm_wizardDialogNumber')='0'">
- <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>
- <cm:search>
- <xsl:value-of select="$path"/>
- </cm:search>
- <cm:properties>
- <cm:property name="objectClass"/>
- <cm:property name="defaultName"/>
- <cm:property name="storeID"/>
- <cm:property name="ancestors"/>
- <cm:property name="permissions"/>
- </cm:properties>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- </xsl:if>
- <xts:sequence>
- <xts:delete select="/root/env/param[@name='package_rename']"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- getPackageInfo. This one returns the storeid of a package after being created.
- ===============================================================================================
- -->
- <xts:block id="getPackageInfo" dependency="getParameters" nodelist="env, system, header" condition=".[/root/env/param[@name='from_transf']!='' and /root/env/param[@name='m_package_dialog_0_text_packageName']!='' and count(/root/*[local-name() = 'theFMDataSource']/response/outputparams/param/*[local-name()='mdproviderResponse'])=0]" processor="XSLT" type="exec" mode="interpret" mandatory="false">
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:variable name="level" select="key('env-param', 'm_wizardDialogNumber')"/>
- <xsl:variable name="class-filter">
- <xsl:text>[@objectClass='package']</xsl:text>
- </xsl:variable>
- <xsl:variable name="path">
- <xsl:choose>
- <xsl:when test="string(/root/env/param[@name='so.searchPath'])!=''">
- <xsl:value-of select="/root/env/param[@name='so.searchPath']"/>
- </xsl:when>
- <!-- the package location can be passed by Transformer -->
- <xsl:when test="string(/root/env/param[@name='m_package_dialog_0_location_packageLocation'])!=''">
- <xsl:value-of select="/root/env/param[@name='m_package_dialog_0_location_packageLocation']"/>
- </xsl:when>
- <xsl:when test="/root/env/param[@name='m_selfServicePackageLocation']!=''">
- <xsl:value-of select="/root/env/param[@name='m_selfServicePackageLocation']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'/content'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/">
- <xsl:if test="key('env-param', 'm_package_dialog_0_text_packageName')!=''">
- <xts:sequence>
- <xts:append>
- <thePackage>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query>
- <cm:search>
- <xsl:value-of select="$path"/>/*<xsl:value-of select="concat($class-filter, /root/system/param[@name='visible'], '[@defaultName="',key('env-param', 'm_package_dialog_0_text_packageName'), '"]')"/>
- </cm:search>
- <cm:properties>
- <cm:property name="objectClass"/>
- <cm:property name="defaultName"/>
- <cm:property name="storeID"/>
- <cm:property name="searchPath"/>
- </cm:properties>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </thePackage>
- </xts:append>
- </xts:sequence>
- </xsl:if>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!-- Test block -->
- <xts:block id="testMetadataResponse" type="test">
- <md1:updateMetadataResponse xmlns:md1="http://developer.cognos.com/schemas/metadataService/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
- <metadata><response><status mode="ro" primary="true" success="true"/><outputparams><param seq="1" type="cclnode"><mdproviderResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="schema4.xsd">
- <url>/metadataUIService?pid=importWizard</url>
- </mdproviderResponse></param></outputparams></response></metadata>
- </md1:updateMetadataResponse>
- </xts:block>
- <!--
- ===============================================================================================
- getMyFolder - grab MyFolder info so don't have to rely on session
- ===============================================================================================
- -->
- <xts:block id="getMyFolder" processor="XSLT" type="exec" dependency="cleanupEnv">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <myfolder>
- <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>~/folder</cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="permissions"/>
- <cm:property name="storeID"/>
- <cm:property name="parent"/>
- </cm:properties>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </myfolder>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ==================================================================================================
- getSelfServicePackageInfo - DOMify the javascript and "cform" associated with the "Back" button when creating a self service package.
- ==================================================================================================
- -->
- <xts:block id="getSelfServicePackageInfo" condition=".[(/root/env/param[@name='m_selfServicePackageLocation']!='' or /root/env/param[@name='from_CC']='true') and /root/env/param[@name='m_wizardDialogNumber']='0']" processor="XSLT" type="exec" dependency="getParameters" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf" exclude-result-prefixes="xtsext cm cml pf xts">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <pf:variables/>
- <xsl:template match="/">
- <xsl:variable name="newPackageFromCC" select="/root/env/param[@name='from_CC']='true' and /root/env/param[@name='m_selfServicePackageLocation']=''"/>
- <xsl:variable name="path">
- <xsl:choose>
- <xsl:when test="string(/root/env/param[@name='so.searchPath'])!=''">
- <xsl:value-of select="/root/env/param[@name='so.searchPath']"/>
- </xsl:when>
- <!-- the package location can be passed by Transformer -->
- <xsl:when test="/root/env/param[@name='from_transf']!='' and string(/root/env/param[@name='m_package_dialog_0_location_packageLocation'])!=''">
- <xsl:value-of select="/root/env/param[@name='m_package_dialog_0_location_packageLocation']"/>
- </xsl:when>
- <xsl:when test="/root/env/param[@name='m_selfServicePackageLocation']!=''">
- <xsl:value-of select="/root/env/param[@name='m_selfServicePackageLocation']"/>
- </xsl:when>
- <xsl:when test="not($newPackageFromCC)">
- <xsl:value-of select="'/content'"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xts:sequence>
- <xts:append select="/root">
- <selfServicePackage>
- <theScript>
- <xsl:text>function processSelfServicePackageBackButton()
- {
- if (document.cform)
- {
- window.setTimeout( "document.cform.submit();" , 1 );
- }
- }</xsl:text>
- </theScript>
- <theForm>
- <form name="cform" action="{$gateway}" method="post">
- <input type="hidden" name="b_action" value="xts.run"/>
- <input type="hidden" name="so.select" value="selfServicePackage"/>
- <input type="hidden" name="so.backURL" value="{/root/env/param[@name='backURL']}"/>
- <input type="hidden" name="backURL" value="{/root/env/param[@name='backURL']}"/>
- <input type="hidden" name="so.return.m" value="{$app}/new_package.xts"/>
- <input type="hidden" name="so.defaultObject" value="{/root/env/param[@name='m_dataSourcePath']}"/>
- <input type="hidden" name="m_selfServicePackageLocation" value="{$path}"/>
- <input type="hidden" name="m_new_class" value="package"/>
- <input type="hidden" name="m" value="{$app}/select/select.xts"/>
- <input type="hidden" name="from_CC" value="{/root/env/param[@name='from_CC']}"/>
- </form>
- </theForm>
- </selfServicePackage>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- renderPage - render the page
- ===============================================================================================
- -->
- <xts:block id="render_wizard_page" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="getPackageInfo getMyFolder getSelfServicePackageInfo">
- <xts:logicsheet path="logicsheets/portal.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="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <xts:logicsheet path="logicsheets/validation.xslt"/>
- <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:dcx="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/connections/1/"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
- xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/" exclude-result-prefixes="xts xsl dcx cf cp pf df dp dt lyt cm cml utml xtsext">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- current file name -->
- <xsl:key name="session-param" match="/root/session/param" use="@name"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:variable name="mname" select="'new_package.xts'"/>
- <pf:variables/>
- <xsl:variable name="newPackageFromCC" select="/root/env/param[@name='from_CC']='true' and /root/env/param[@name='m_selfServicePackageLocation']=''"/>
- <xsl:variable name="path">
- <xsl:choose>
- <xsl:when test="string(/root/env/param[@name='so.searchPath'])!=''">
- <xsl:value-of select="/root/env/param[@name='so.searchPath']"/>
- </xsl:when>
- <!-- the package location can be passed by Transformer -->
- <xsl:when test="/root/env/param[@name='from_transf']!='' and string(/root/env/param[@name='m_package_dialog_0_location_packageLocation'])!=''">
- <xsl:value-of select="/root/env/param[@name='m_package_dialog_0_location_packageLocation']"/>
- </xsl:when>
- <xsl:when test="/root/env/param[@name='m_selfServicePackageLocation']!=''">
- <xsl:value-of select="/root/env/param[@name='m_selfServicePackageLocation']"/>
- </xsl:when>
- <xsl:when test="not($newPackageFromCC)">
- <xsl:value-of select="'/content'"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="storeId">
- <xsl:value-of select="/root/*[local-name()='thePackage']/*[local-name()='queryResponse']/*[local-name()='package']/*[local-name()='storeID']"/>
- </xsl:variable>
- <!-- Determine if path coming in is My Folders -->
- <xsl:variable name="pathId" select="string(/root/*[local-name()='queryResponse']/*/cm:storeID)"/>
- <xsl:variable name="myFldrId" select="string(/root/myfolder/*/*/cm:storeID)"/>
- <!-- Determine if the current path points to the personal folder space, but only when not doing New Package in CC -->
- <xsl:variable name="isPersonalPath" select="$myFldrId = $pathId and not($newPackageFromCC)"/>
- <!-- determine if current path is under personal folder -->
- <xsl:variable name="underMyFldr" select="boolean(/root/*[local-name()='queryResponse']/*/cm:ancestors/*/cm:storeID[ . =$myFldrId])"/>
- <xsl:variable name="accountPath" select="/root/myfolder/*/*/cm:parent/*/cm:searchPath"/>
- <xsl:variable name="searchPath">
- <xsl:value-of select="/root/*[local-name()='thePackage']/*[local-name()='queryResponse']/*[local-name()='package']/*[local-name()='searchPath']"/>
- </xsl:variable>
- <xsl:variable name="fromTransformer" select="key('env-param', 'from_transf')"/>
- <xsl:variable name="backURL" select="key('env-param','backURL')"/>
- <!-- connection templates for the controls -->
- <xsl:variable name="the-object" select="/root/*[local-name() = 'theFMDataSource']/response/outputparams/param/*[local-name()='mdproviderResponse']"/>
- <xsl:variable name="UIHint" select="/root/*[local-name() = 'theFMDataSource']/response/outputparams/param/*[local-name()='mdproviderResponse']/UIHint/message"/>
- <xsl:variable name="dialogTitle" select="/root/*[local-name() = 'theFMDataSource']/response/outputparams/param/*[local-name()='mdproviderResponse']/dialogTitle"/>
- <!-- Determine if we can write to the currently selected folder. -->
- <xsl:variable name="canWrite" select="contains(/root/cm:queryResponse/*/cm:permissions, 'write') and contains(/root/cm:queryResponse/*/cm:permissions, 'traverse')"/>
- <xsl:variable name="m_wizardDialogNumber" select="key('env-param', 'm_wizardDialogNumber')"/>
- <xsl:template match="/root">
- <xsl:choose>
- <xsl:when test="/root/copyFault">
- <xsl:variable name="browserTitle"><xts:string id="IDS_COGNOS_REPORTS"/></xsl:variable>
- <xsl:variable name="redirect-url"> <!-- Redirection URL which may be used for the No answer. -->
- <xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name = 'backURL']))"/>
- </xsl:variable>
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
- <dp:meta>
- <pf:meta/>
- <dp:script>
- <!-- Help system -->
- <pf:help context="HID_MODELS_PKGS"/>
- </dp:script>
- <!-- Standard meta tags -->
- </dp:meta>
- <!--pf:script/-->
- <script language="javascript" src="{$webcontent}/{$app}/js/utilities.js"></script>
- <script language="javascript">
- function closePage()
- {
- <xsl:choose>
- <xsl:when test="$fromTransformer">
- window.external.OnClose(1);
- </xsl:when>
- <xsl:otherwise>
- <!-- Clear the cookie value mfst -->
- clearSessionEntry('mfst');
- document.location.href = '<xsl:value-of select="$redirect-url"/>';
- </xsl:otherwise>
- </xsl:choose>
- }
- function validate()
- {
- var f = document.pform;
- if (trim(f.package_rename.value) == '')
- {
- alert('<xts:string id="IDS_DUPLICATE_ERROR_EMPTY_STRING" encode="javascript"/>');
- return false;
- }
- return true;
- }
- function performAction()
- {
- var fr = document.pform;
- if (!validate())
- { return; }
- fr.m.value = 'portal/new_package.xts';
- fr.m_package_dialog_0_text_packageName.value = fr.package_rename.value;
- document.pform.submit()
- }
- </script>
- <form name="pform" method="post" action="{$gateway}">
- <dp:header>
- <!-- header titles-->
- <dp:title showName="false">
- <xsl:value-of select="$browserTitle"/>
- </dp:title>
- <!-- header introduction -->
- <dp:close>
- <xsl:variable name="close"><xts:string id="IDS_CLOSE"/></xsl:variable>
- <a href="javascript:closePage();"><img height="16" width="16" class="dialogClose" vspace="2" border="0" src="{$skin_images}close.gif" alt="{$close}" onmouseover="this.className = 'dialogCloseOver'" onmouseout="this.className = 'dialogClose'"/></a>
- </dp:close>
- </dp:header>
- <xsl:call-template name="declareHiddenInputs"/>
- <lyt:layout style="1">
- <lyt:section>
- <dp:group>
- <dp:groupItem valign="top">
- <img height="32" width="32" border="0">
- <xsl:attribute name="src">
- <xsl:value-of select="$webcontent"/>/<xsl:value-of select="$app"/>
- <xsl:text/>/images/msg_warning.gif<xsl:text/>
- </xsl:attribute>
- </img>
- </dp:groupItem>
- <dp:groupItem>
- <!-- used for alignment -->
- <dp:text/><xsl:text> </xsl:text>
- </dp:groupItem>
- <dp:groupItem valign="top">
- <dp:text nospace="nospace" wrap="wrap">
- <xts:string id="IDS_DUPLICATE_ERROR_RENAME_ERROR"><xts:param name="entryName"><xsl:value-of select="/root/env/param[@name='m_package_dialog_0_text_packageName']"/></xts:param></xts:string>
- <br/><br/>
- <xts:string id="IDS_DUPLICATE_ERROR_RENAME_ENTRY_OPTION"/><br/>
- <input name="package_rename" type="text" maxlength="100" size="45" class="pInput"/>
- <br/><br/>
- <xts:string id="IDS_DUPLICATE_ERROR_CONTINUE"/>
- <br/>
- </dp:text>
- </dp:groupItem>
- </dp:group>
- </lyt:section>
- </lyt:layout>
- <dp:footer>
- <!-- Default. Use Ok/Cancel buttons -->
- <df:button df:id="IDS_DUPLICATE_ERROR_OK" df:style="href" df:href="javascript:performAction();"/>
- <df:button df:id="IDS_DUPLICATE_ERROR_CANCEL" df:style="href" df:href="javascript:closePage();"/>
- </dp:footer>
- </form>
- </dp:page>
- <xts:delete select="/root/copyFault"/>
- </xsl:when>
- <xsl:when test="$the-object and ($the-object/url !='')">
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text><dp:page>
- <form name="pform" method="post" action="{$gateway}">
- <script language="javascript" src="{$webcontent}/{$app}/js/cookie_jar.js"/>
- <script language="javascript">
- var sParamDelimiter = "<xsl:value-of select="xtsext:javascriptencode(string(key('system-param', 'delimiters')/@d1))"/>";
- var sNameValueDelimiter = "<xsl:value-of select="xtsext:javascriptencode(string(key('system-param', 'delimiters')/@d2))"/>";
- var sCookiePath = "<xsl:value-of select="xtsext:javascriptencode(string($cookie_path))"/>";
- var sCookieDomain = "<xsl:value-of select="xtsext:javascriptencode(string($cookie_domain))"/>";
- var sCookieSecure = "<xsl:value-of select="xtsext:javascriptencode(string($cookie_secure))"/>";
- function init() {
- <!-- Clear the cookie value mfst -->
- clearSessionEntry('mfst');
- }
- </script>
- </form>
- </dp:page>
-
- <xsl:variable name="mdsrv-target-url">
- <xsl:value-of select="concat($gateway, $the-object/url,'&backURL=', xtsext:urlencode(string($backURL)))"/>
- </xsl:variable>
- <xsl:call-template name="redirect">
- <xsl:with-param name="url" select="$mdsrv-target-url"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$the-object and count($the-object/*) > 1">
- <xsl:variable name="currentTitle">
- <xsl:choose>
- <xsl:when test="$dialogTitle=''"><xts:string id="IDS_COGNOS_REPORTS"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="$dialogTitle"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text><dp:page longTitle="$currentTitle">
- <dp:meta>
- <pf:meta/>
- <!-- Standard meta tags -->
- </dp:meta>
- <dp:script>
- <!-- Help system -->
- <pf:help context="HID_MODELS_PKGS"/>
- </dp:script>
- <link href="{$webRoot}/prompting/reportskin/prompting/promptCommon.css" type="text/css" rel="stylesheet"></link>
- <pf:script/>
- <script language="javascript" src="{$webRoot}/prompting/prompting.js">//</script>
- <script language="javascript" src="{$webRoot}/prompting/CTreeIE5NS6.js" type="text/javascript">//</script>
- <script type="text/javascript">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/prompting/res/promptingStrings_<xsl:value-of select="$productLocale"/>.js</xsl:attribute>
- <xsl:text/>//<xsl:text/>
- </script>
- <script language="javascript" src="{$webcontent}/{$app}/js/tree.js"/>
- <script language="javascript" src="{$webcontent}/{$app}/js/utilities.js"/>
- <script type="text/javascript">
- var currentLevel = <xsl:value-of select="xtsext:javascriptencode(key('env-param', 'm_wizardDialogNumber'))"/>;
- var numberOfCurrentParams = 0;
- var levelCounter = 0;
- var listOfParams = new Array();
- var listOfParamsType = new Array();
- var listOfParamsContraints = new Array();
- var listOfParamsOptional = new Array();
- <xsl:variable name="errmsgMany">
- <xts:string id="IDS_ERR_MANDATORY_LISTMANY" encode="javascript"/>
- </xsl:variable>
- <xsl:variable name="errmsgOne">
- <xts:string id="IDS_ERR_MANDATORY_LISTONE" encode="javascript"/>
- </xsl:variable>
- <xsl:variable name="errmsgLocation">
- <xts:string id="IDS_ERR_MANDATORY_LOCATION" encode="javascript"/>
- </xsl:variable>
- <xsl:variable name="errmsgTree">
- <xts:string id="IDS_ERR_MANDATORY_TREE" encode="javascript"/>
- </xsl:variable>
- <xsl:variable name="errmsgField">
- <xts:string id="IDS_ERR_MANDATORY" encode="javascript">
- <xts:param name="field">" + label + "</xts:param>
- </xts:string>
- </xsl:variable>
- function validate()
- {
- var f = document.pform;
- var passTest = true;
- <xsl:for-each select="$the-object/*[local-name() ='text' or local-name() = 'textArea']">
- <xsl:if test="./optional='false'">
- var paramField = document.getElementById('m_package_dialog_' + currentLevel + '_' + '<xsl:value-of select="xtsext:javascriptencode(local-name())"/>' + '_' + '<xsl:value-of select="xtsext:javascriptencode(./name)"/>');
- if (paramField)
- {
- passTest = validateInputField(paramField, '<xsl:value-of select="normalize-space(xtsext:javascriptencode(./UILabel))"/>');
- }
- if( !passTest ) return false;
- </xsl:if>
- </xsl:for-each>
- for (i = 0; i < numberOfCurrentParams; i++)
- {
- var param = document.getElementById('m_package_dialog_' + currentLevel + '_' + listOfParamsType[i] + '_' + listOfParams[i]);
- if(trim(param.value)=='' || trim(param.value) == 'undefined')
- {
- if(param.multiple == true && listOfParamsContraints[i] == 'many' && listOfParamsType[i] == 'list')
- {
- if (listOfParamsOptional[i] == 'true')
- {
- //Create a new hidden input in order it get passed when submitting.
- var id = 'm_package_dialog_' + currentLevel + '_' + listOfParamsType[i] + '_' + listOfParams[i];
- var elem = createHiddenInput (id, 'true');
- elem.value = '';
- //Create a new hidden input for the selection...
- elem = createHiddenInput (id + '_selected' , 'true');
- elem.value='false';
- }
- else {
- var errormsg = '<xsl:value-of select="normalize-space($errmsgMany)"/>';
- alert(errormsg);
- return false;
- }
- } else if (listOfParamsContraints[i] == 'one' && listOfParamsType[i] == 'list')
- {
- if (listOfParamsOptional[i] == 'true')
- {
- //Create a new hidden input in order it get passed when submitting.
- var id = 'm_package_dialog_' + currentLevel + '_' + listOfParamsType[i] + '_' + listOfParams[i];
- var elem = createHiddenInput (id, 'true');
- elem.value = '';
- //Create a new hidden input for the selection...
- elem = createHiddenInput (id + '_selected' , 'true');
- elem.value='false';
- }
- else {
- var errormsgOne = '<xsl:value-of select="normalize-space($errmsgOne)"/>';
- alert(errormsgOne);
- return false;
- }
- }
- else if (listOfParamsType[i] == 'location')
- {
- var errorMsg = '<xsl:value-of select="normalize-space($errmsgLocation)"/>';
- alert(errorMsg);
- return false;
- } else if (listOfParamsContraints[i] == 'one' && listOfParamsType[i] == 'tree')
- {
- var errormsg = '<xsl:value-of select="normalize-space($errmsgTree)"/>';
- alert(errormsg);
- return false;
- }
- }
- }
- return true;
- }
- function createHiddenInput(name, optional)
- {
- var elem = document.createElement('input');
- elem.setAttribute('type', 'hidden');
- elem.setAttribute("name", name);
- elem.setAttribute("id", name);
- document.pform.appendChild(elem);
- return elem;
- }
- function validateInputField(field, label)
- {
- field.value = trim(field.value);
- if (field.value == '')
- {
- alert("<xsl:value-of select="normalize-space($errmsgField)"/>");
- field.focus();
- return false;
- }
- return true;
- }
- function processNextButton()
- {
- var f = document.pform;
- for (i = 0 ; i < numberOfCurrentParams; i++)
- {
- //Get the current value from the tree.
- if (listOfParamsType[i] == 'tree')
- {
- var tvalue = document.getElementById('m_package_dialog_' + currentLevel + '_' + listOfParamsType[i] + '_' + listOfParams[i]);
- //Set the value.
- tvalue.value = getSelectedValue();
- var tname = document.getElementById('m_package_dialog_' + currentLevel + '_treeNodeName_' + listOfParams[i]);
- tname.value = getSelectedName();
- }
- }
- var val = currentLevel;
- val ++;
- f.m_wizardDialogNumber.value = val;
- if (!validate()) {
- return;
- }
- submitForm('', 'package', 'new_package.xts', '');
- }
- function processBackButton () {
- var val = currentLevel;
- val --;
- if (val < -1) {
- val = 0;
- }
- document.pform.m_wizardDialogNumber.value = val;
- submitForm('', 'package', 'new_package.xts', '');
- }
- function submitForm( cmname, cmclass, target, cmpath)
- {
- var form = document.pform;
- form.m.value = "<xsl:value-of select="$app"/>/" + target;
- <xsl:if test="$fromTransformer=''">
- form.backURL.value = "<xsl:value-of select="xtsext:javascriptencode(string($backURL))"/>";
- </xsl:if>
- document.pform.submit();
- }
- function getLocation()
- {
- submitForm('', 'package', 'select/select.xts', '');
- }
- function setParams() {
- <xsl:call-template name="setParams"/>
- }
- function setParameter(paramName, paramConstraint, paramType)
- {
- listOfParams[levelCounter] = paramName;
- listOfParamsContraints[levelCounter] = paramConstraint;
- listOfParamsType[levelCounter] = paramType;
- levelCounter++;
- }
- function setListParameter(paramName, paramConstraint, paramType, paramOpional)
- {
- listOfParams[levelCounter] = paramName;
- listOfParamsContraints[levelCounter] = paramConstraint;
- listOfParamsType[levelCounter] = paramType;
- listOfParamsOptional[levelCounter] = paramOpional;
- levelCounter++;
- }
- function init() {
- numberOfCurrentParams = <xsl:value-of select="count($the-object/*[local-name() = 'text' or local-name() = 'textArea' or local-name() = 'location' or local-name() = 'selectionControl'])"/>;
- listOfParams = new Array(numberOfCurrentParams);
- listOfParamsContraints = new Array(numberOfCurrentParams);
- listOfParamsType = new Array(numberOfCurrentParams);
- listOfParamsOptional = new Array(numberOfCurrentParams);
- setParams();
- if(treeMetadata)
- {
- if (treeMetadata.getHasBeenDrawn() == false)
- {
- treeMetadata.removeLoading(treeMetadata.getRootNode());
- treeMetadata.drawAll();
- treeMetadata.checkData();
- }
- }
- }
- <!-- functions for location -->
- function changeSelection(divName)
- {
- var pathdiv = document.getElementById('ng_path');
- var mfdiv = document.getElementById('ng_myfolder');
- var sMF = document.getElementById('showMyFldr');
- switch (divName)
- {
- case "ng_path":
- {
- mfdiv.style.display = "none";
- pathdiv.style.display = "";
- sMF.style.display = ""
- break;
- }
- case "ng_myfolder":
- {
- mfdiv.style.display = "";
- pathdiv.style.display = "none";
- sMF.style.display = "none";
- setMyFolder();
- break;
- }
- }
- }
- function setMyFolder()
- {
- setStateValue("mfst",1);
- var packageLocation = "<xsl:value-of select="xtsext:javascriptencode(key('session-param','e_hp'))"/>/folder";
- document.pform.m_package_dialog_0_location_packageLocation.value = document.pform.elements["so.defaultLocation"].value = packageLocation;
- if(document.pform.elements["m_selfServicePackageLocation"])
- document.pform.elements["m_selfServicePackageLocation"].value = packageLocation;
- if(document.cform && document.cform.elements["m_selfServicePackageLocation"])
- document.cform.elements["m_selfServicePackageLocation"].value = packageLocation;
- }
- <xsl:if test="$fromTransformer!=''">
- function doCancel()
- {
- window.external.OnClose(1);
- }
- </xsl:if>
- </script>
- <xsl:variable name="CVObject">oCV<xsl:value-of select="/root/env/param[@name='cv.id']"/></xsl:variable>
- <form name="pform" method="post" action="{$gateway}">
- <dp:header>
- <dp:title>
- <xsl:value-of select="$dialogTitle"/>
- </dp:title>
- <dp:close>
- <a href="{/root/env/param[@name = 'backURL']}">
- <xsl:attribute name="onClick">javascript:resetPageState()</xsl:attribute>
- <dp:closeMarker/>
- </a>
- </dp:close>
- </dp:header>
- <dp:description>
- <xsl:value-of select="$the-object/UIHint/message"/>
- </dp:description>
- <xsl:call-template name="declareHiddenInputs"/>
- <!-- wizard counter -->
- <table border="0" cellspacing="0" cellpadding="0" width="100%">
- <tr>
- <td width="50%" valign="top">
- <lyt:layout style="1" width="100%">
- <lyt:section>
- <dp:list>
- <dp:section>
- <xsl:for-each select="$the-object/*">
- <xsl:choose>
- <xsl:when test="local-name() = 'text'">
- <xsl:variable name="textName" select="concat('m_package_dialog_', $m_wizardDialogNumber, '_text_', ./name)"/>
- <xsl:variable name="transformerParam" select="concat('m_transformer_', ./name)"/>
- <dp:input>
- <dp:section1>
- <label for="{$textName}"><xsl:value-of select="./UILabel"/></label>
- </dp:section1>
- <dp:section2>
- <input type="text" maxlength="100" size="30" class="pInput" name="{$textName}" id="{$textName}">
- <xsl:attribute name="value">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name=$textName]">
- <xsl:value-of select="/root/env/param[@name=$textName]"/>
- </xsl:when>
- <xsl:when test="key('env-param', $transformerParam)">
- <xsl:value-of select="key('env-param', $transformerParam)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="./defaultValue"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- </input>
- </dp:section2>
- </dp:input>
- </xsl:when>
- <xsl:when test="local-name() = 'textArea'">
- <xsl:variable name="textAreaName" select="concat('m_package_dialog_', $m_wizardDialogNumber, '_textArea_', ./name)"/>
- <xsl:variable name="transformerParam" select="concat('m_transformer_', ./name)"/>
- <dp:input>
- <dp:section1>
- <label for="{$textAreaName}"><xsl:value-of select="./UILabel"/></label>
- </dp:section1>
- <dp:section2>
- <textArea class="pTextarea" rows="4" cols="30" name="{$textAreaName}" id="{$textAreaName}">
- <xsl:attribute name="value">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name=$textAreaName]">
- <xsl:value-of select="/root/env/param[@name=$textAreaName]"/>
- </xsl:when>
- <xsl:when test="key('env-param', $transformerParam)">
- <xsl:value-of select="key('env-param', $transformerParam)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="./defaultValue"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name=$textAreaName]">
- <xsl:value-of select="/root/env/param[@name=$textAreaName]"/>
- </xsl:when>
- <xsl:when test="key('env-param', $transformerParam)">
- <xsl:value-of select="key('env-param', $transformerParam)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="./defaultValue"/>
- </xsl:otherwise>
- </xsl:choose>
- </textArea>
- </dp:section2>
- </dp:input>
- </xsl:when>
- <xsl:when test="local-name() = 'location'">
- <xsl:variable name="the-path-object" select="/root/cm:queryResponse/*"/>
- <xsl:variable name="start-at-path">
- <xsl:choose>
- <xsl:when test="starts-with($the-path-object/cm:searchPath, key('session-param', 'e_hp')) or (starts-with($the-path-object/cm:searchPath, '~'))">
- <xsl:value-of select="concat(key('session-param', 'e_hp'),'/folder')"/>
- </xsl:when>
- <xsl:when test="starts-with($the-object/cm:searchPath,'/content')">
- <xsl:value-of select="$defaultContentRoot"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <input type="hidden" value="">
- <xsl:attribute name="name">
- <xsl:value-of select="concat('m_package_dialog_', $m_wizardDialogNumber, '_location_', ./name)"/>
- </xsl:attribute>
- <xsl:attribute name="id"><xsl:value-of select="concat('m_package_dialog_', $m_wizardDialogNumber, '_location_', ./name)"/></xsl:attribute>
- </input>
- <lyt:section>
- <dp:list width="100%">
- <xsl:choose>
- <xsl:when test="not(./updateLocation = 'true')">
- <!-- this will default on public folder -->
- <dp:section>
- <dp:label valign="top" width="15%">
- <xts:string id="IDS_PROP_LOCATION"/>
- </dp:label>
- <dp:text wrap="wrap" valign="top" width="40%">
- <cf:do-the-path-link>
- <cf:param name="familytree">$the-path-object/cm:ancestors</cf:param>
- <cf:param name="familymember">$the-path-object/cm:defaultName</cf:param>
- <cf:param name="home">
- <xsl:value-of select="$start-at-path"/>
- </cf:param>
- <cf:param name="onlyAncestors">false</cf:param>
- </cf:do-the-path-link>
- </dp:text>
- </dp:section>
- </xsl:when>
- <xsl:when test="./updateLocation = 'true'">
- <dp:section>
- <dp:label>
- <xts:string id="IDS_NEW_DESTINATION"/>
- </dp:label>
- </dp:section>
- <dp:section wrap="wrap">
- <div id="ng_path" style="padding:0px; display:none; ">
- <xsl:choose>
- <xsl:when test="$canWrite and $path!=''">
- <dp:text valign="top" wrap="wrap">
- <xsl:variable name="rootPath">
- <xsl:choose>
- <xsl:when test="starts-with($path, '/content')">
- <xsl:value-of select="$defaultContentRoot"/>
- </xsl:when>
- <xsl:when test="$isPersonalPath or $underMyFldr">
- <xsl:value-of select="concat($accountPath, '/folder')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$path"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <cf:do-the-path-link>
- <cf:param name="familytree">$the-path-object/cm:ancestors</cf:param>
- <cf:param name="familymember">$the-path-object/cm:defaultName</cf:param>
- <cf:param name="home">
- <xsl:value-of select="$rootPath"/>
- </cf:param>
- </cf:do-the-path-link>
- </dp:text>
- </xsl:when>
- <xsl:otherwise>
- <dp:inactiveText><i><xts:string id="IDS_NONE"/></i>  </dp:inactiveText>
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </dp:section>
- <dp:section wrap="wrap">
- <div id="ng_myfolder" style="padding:0px; display:none; ">
- <xsl:choose>
- <xsl:when test="key('session-param', 'e_mroot') != ''">
- <dp:text>
- <xsl:value-of select="key('session-param', 'e_mroot')"/>
- </dp:text>
- </xsl:when>
- <xsl:when test="$the-path-object/cm:defaultName">
- <xts:string id="IDS_PERSONAL"/>
- </xsl:when>
- <xsl:otherwise>
- <dp:inactiveText><i><xts:string id="IDS_NONE"/></i>  </dp:inactiveText>
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </dp:section>
- <dp:section>
- <dp:group>
- <dp:groupItem valign="top">
- <a href="#">
- <xsl:attribute name="onclick">javascript:resetPageState();javascript:getLocation();</xsl:attribute>
- <xsl:text/>
- <xts:string id="IDS_SELECT_ANOTHER_FOLDER"/>
- <xsl:text/>
- </a>
- </dp:groupItem>
- <dp:section wrap="wrap">
- <dp:groupItem valign="top">
- <div id="showMyFldr" style="padding:0px; display:none; ">
- <xsl:if test="$canWrite">
- <img height="1" width="10" border="0">
- <xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute>
- </img>
- <xsl:text/>
- <a href="#">
- <xsl:text/>
- <xsl:attribute name="onclick">javascript:changeSelection('ng_myfolder')</xsl:attribute>
- <xsl:text/>
- <xts:string id="IDS_SELECT_MY_FLDR_CM_NAME"><xts:param name="myfldr"><xsl:value-of select="string(/root/session/param[@name='e_mroot'])"/></xts:param></xts:string>
- <xsl:text/>
- </a>
- <xsl:text/>
- </xsl:if>
- </div>
- </dp:groupItem>
- </dp:section>
- </dp:group>
- </dp:section>
- </xsl:when>
- </xsl:choose>
- </dp:list>
- </lyt:section>
- </xsl:when>
- <xsl:when test="local-name() = 'selectionControl'">
- <xsl:choose>
- <xsl:when test="./controlType = 'list'">
- <xsl:variable name="listName" select="concat('m_package_dialog_', $m_wizardDialogNumber, '_list_', ./name)"/>
- <xsl:variable name="selectionType" select="./selectionType"/>
- <dp:list width="500">
- <dp:section width="100" height="100">
- <tr>
- <td nowrap="nowrap" colspan="2" class="formLabel">
- <label for="{$listName}"><xsl:value-of select="./caption"/></label>
- </td>
- </tr>
- <select align="left" size="15" name="{$listName}" id="{$listName}">
- <xsl:if test="$selectionType = 'many'">
- <xsl:attribute name="multiple"><xsl:value-of select="'multiple'"/></xsl:attribute>
- </xsl:if>
- <xsl:for-each select="./*[local-name() = 'item']">
- <option>
- <xsl:attribute name="value"><xsl:value-of select="./value"/></xsl:attribute>
- <xsl:if test="./value=key('env-param', $listName)">
- <xsl:attribute name="selected">selected</xsl:attribute>
- </xsl:if>
- <xsl:value-of select="./caption"/>
- </option>
- </xsl:for-each>
- </select>
- </dp:section>
- </dp:list>
- </xsl:when>
- <xsl:when test="./controlType = 'tree'">
- <xsl:variable name="treeName" select="concat('m_package_dialog_', $m_wizardDialogNumber, '_tree_', ./name)"/>
- <xsl:variable name="treeNodeName" select="concat('m_package_dialog_', $m_wizardDialogNumber, '_treeNodeName_', ./name)"/>
- <input type="hidden">
- <xsl:attribute name="name">
- <xsl:value-of select="$treeName"/>
- </xsl:attribute>
- <xsl:attribute name="id"><xsl:value-of select="$treeName"/></xsl:attribute>
- <xsl:attribute name="value"><xsl:value-of select="key('env-param', $treeName)"/></xsl:attribute>
- </input>
- <input type="hidden">
- <xsl:attribute name="name">
- <xsl:value-of select="$treeNodeName"/>
- </xsl:attribute>
- <xsl:attribute name="id"><xsl:value-of select="$treeNodeName"/></xsl:attribute>
- <xsl:attribute name="value"><xsl:value-of select="key('env-param', $treeNodeName)"/></xsl:attribute>
- </input>
- <dp:list width="500">
- <tr>
- <td nowrap="nowrap" colspan="2" class="formLabel">
- <xsl:value-of select="./UIHint"/>
- </td>
- </tr>
- </dp:list>
- <dp:section>
- <div name="LWMTreeOuterPane" id="LWMTreeOuterPane"/>
- <xsl:variable name="rootIcon">
- <xsl:value-of select="./rootIcon"/>
- </xsl:variable>
- <script type="text/javascript" language="javascript">
- function populate() {
- <xsl:call-template name="populate">
- <xsl:with-param name="path" select="./*"/>
- </xsl:call-template>
- }
- initTree('<xsl:value-of select="xtsext:javascriptencode(./name)"/>', '<xsl:value-of select="xtsext:javascriptencode(./caption)"/>', '<xsl:value-of select="xtsext:javascriptencode($rootIcon)"/>');
- populate();
- </script>
- </dp:section>
- </xsl:when>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="local-name() = 'radioGroup'">
- <xsl:variable name="groupName" select="concat('m_package_dialog_', $m_wizardDialogNumber, '_radioGroup_', ./name)"/>
- <xsl:variable name="selectedValue">
- <xsl:choose>
- <xsl:when test="key('env-param', $groupName) != ''">
- <xsl:value-of select="key('env-param', $groupName)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="./*[local-name()='defaultValue']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <dp:input>
- <dp:section1>
- <xsl:value-of select="./UILabel"/>
- </dp:section1>
- <dp:section2>
- <dp:choice>
- <xsl:for-each select="./*[local-name() = 'item']">
- <dp:section1>
- <input type="radio" name="{$groupName}" value="{./value}" id="ctrl_{$groupName}_{./value}">
- <xsl:if test="./value=$selectedValue">
- <xsl:attribute name="checked">checked</xsl:attribute>
- </xsl:if>
- </input>
- </dp:section1>
- <dp:section2 for="ctrl_{$groupName}_{./value}">
- <xsl:value-of select="./caption"/>
- </dp:section2>
- </xsl:for-each>
- </dp:choice>
- </dp:section2>
- </dp:input>
- </xsl:when>
- <xsl:when test="local-name() = 'checkBoxList'">
- <xsl:variable name="checkboxListName" select="concat('package_dialog_checkbox_', $m_wizardDialogNumber, '_checkbox_', ./checkBox/name)"/>
- <xsl:variable name="listName" select="concat('m_package_dialog_', $m_wizardDialogNumber, '_checkbox_', ./checkBox/name)"/>
- <xsl:variable name="transformerParam" select="concat('m_transformer_', ./checkBox/name)"/>
- <xsl:variable name="paramListName" select="./checkBox/name"/>
- <xsl:variable name="selectedValue">
- <xsl:choose>
- <xsl:when test="key('env-param', $listName) != ''">
- <xsl:value-of select="key('env-param', $listName)"/>
- </xsl:when>
- <xsl:when test="key('env-param', $transformerParam) != ''">
- <xsl:value-of select="key('env-param', $transformerParam)"/>
- </xsl:when>
- <xsl:when test="./checkBox/*[local-name()='value'] and ./checkBox/*[local-name()='value']!=''">
- <xsl:value-of select="./checkBox/*[local-name()='value']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="./checkBox/defaultValue"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <div style="margin-top:10px;">
- <dp:input>
- <dp:section1 wrap="true">
- <xsl:value-of select="./UILabel"/>
- </dp:section1>
- <dp:section2>
- <dp:section1>
- <input type="checkbox" style="margin-top=5px;" name="{$checkboxListName}" value="{$selectedValue}" id="ctrl_{$checkboxListName}_{$selectedValue}">
- <xsl:if test="$selectedValue = 'true'">
- <xsl:attribute name="checked">true</xsl:attribute>
- </xsl:if>
- <xsl:attribute name="onClick">javascript:checkboxToggle(this, '<xsl:value-of select="$paramListName"/>')</xsl:attribute>
- <xsl:attribute name="onchange">javascript:checkboxUpdate(this, '<xsl:value-of select="$listName"/>')</xsl:attribute>
- </input>
- <input type="hidden" name="{$listName}" id="{$listName}">
- <xsl:attribute name="value"><xsl:value-of select="$selectedValue"/></xsl:attribute>
- </input>
- </dp:section1>
- <dp:section2>
- <label for="ctrl_{$checkboxListName}_{$selectedValue}"><xsl:value-of select="./checkBox/caption"/></label>
- </dp:section2>
- </dp:section2>
- </dp:input>
- <dp:input>
- <dp:section1></dp:section1>
- <dp:section2>
- <div style="margin-left:10px;">
- <dp:choice>
- <xsl:for-each select="./*[local-name() = 'checkBoxItem']">
- <xsl:variable name="checkboxItemName" select="concat('package_dialog_checkbox_', $m_wizardDialogNumber, '_checkbox_', ./name)"/>
- <xsl:variable name="itemName" select="concat('m_package_dialog_', $m_wizardDialogNumber, '_checkbox_', ./name)"/>
- <xsl:variable name="transformerItemName" select="concat('m_transformer_', ./name)"/>
- <xsl:variable name="paramItemName" select="./name"/>
- <xsl:variable name="selectedItemValue">
- <xsl:choose>
- <xsl:when test="key('env-param', $itemName) != ''">
- <xsl:value-of select="key('env-param', $itemName)"/>
- </xsl:when>
- <xsl:when test="key('env-param', $transformerItemName) != ''">
- <xsl:value-of select="key('env-param', $transformerItemName)"/>
- </xsl:when>
- <xsl:when test="./*[local-name()='value'] and ./*[local-name()='value']!=''">
- <xsl:value-of select="./*[local-name()='value']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="./*[local-name()='defaultValue']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <dp:section1>
- <input type="checkbox" style="margin-top=2px;" name="{$checkboxItemName}" value="{$selectedItemValue}">
- <xsl:if test="$selectedItemValue = 'true'">
- <xsl:attribute name="checked">true</xsl:attribute>
- </xsl:if>
- <xsl:attribute name="id"><xsl:value-of select="concat('checkbox_', $paramListName,'_', $paramItemName)"/></xsl:attribute>
- <xsl:attribute name="onchange">javascript:checkboxUpdate(this, '<xsl:value-of select="$itemName"/>')</xsl:attribute>
- <xsl:if test="$selectedValue = 'false'">
- <xsl:attribute name="disabled">true</xsl:attribute>
- </xsl:if>
- </input>
- <input type="hidden" name="{$itemName}" id="{$itemName}">
- <xsl:attribute name="value"><xsl:value-of select="$selectedItemValue"/></xsl:attribute>
- </input>
- </dp:section1>
- <dp:section2 for="{concat('checkbox_', $paramListName,'_', $paramItemName)}">
- <xsl:value-of select="./caption"/>
- </dp:section2>
- </xsl:for-each>
- </dp:choice>
- </div>
- </dp:section2>
- </dp:input>
- <script type="text/javascript" language="javascript">
- function checkboxUpdate(object, name) {
- document.pform.elements[name].value = object.checked;
- }
- function checkboxToggle(object, name) {
- var frm = document.pform;
- for (var i=0 ; frm.length > i; i++) {
- var checkboxName = "checkbox_" + name + "_";
- if (frm.elements[i].id.indexOf(checkboxName) != -1)
- {
- if (object.checked) {
- frm.elements[i].disabled = false;
- }
- else {
- frm.elements[i].disabled = true;
- }
- }
- }
- }
- </script>
- </div>
- </xsl:when>
- </xsl:choose>
- </xsl:for-each>
- </dp:section>
- </dp:list>
- </lyt:section>
- </lyt:layout>
- </td>
- </tr>
- </table>
- <xsl:variable name="back-target">
- <xsl:value-of select="concat($app,'/new_package.xts')"/>
- </xsl:variable>
- <dp:footer>
- <xsl:choose>
- <xsl:when test="not($fromTransformer)">
- <df:button df:id="IDS_CANCEL" df:style="back-url" onClick="javascript:resetPageState();"/>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_CANCEL" df:style="href" df:href="#" onClick="javascript:doCancel();"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="(key('env-param','m_selfServicePackageLocation')!='' or $newPackageFromCC) and key('env-param','m_wizardDialogNumber')='0'">
- <df:button df:id="IDS_BACK" df:style="href" df:href="#" onClick="javascript:processSelfServicePackageBackButton();"/>
- </xsl:when>
- <xsl:when test="key('env-param', 'm_wizardDialogNumber') = '0'">
- <df:button df:id="IDS_BACK"/>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_BACK" df:style="href" df:href="#" onClick="javascript:processBackButton();"/>
- </xsl:otherwise>
- </xsl:choose>
- <!-- next -->
- <xsl:choose>
- <xsl:when test="$the-object/isCompleted and $the-object/isCompleted='false'">
- <df:button df:id="IDS_NEXT" df:style="href" df:href="#" onClick="javascript:processNextButton();"/>
- <df:button df:id="IDS_FINISH"/>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_NEXT"/>
- <df:button df:id="IDS_FINISH" df:style="href" df:href="#" onclick="javascript:processNextButton();"/>
- </xsl:otherwise>
- </xsl:choose>
- </dp:footer>
- <script language="javascript">
- var so_return = document.pform.elements['so.return.m'];
- if (so_return)
- {
- so_return.value = 'portal/new_package.xts';
- }
- var new_class = document.pform.elements['m_new_class'];
- if (new_class)
- {
- new_class.value = 'package';
- }
- var mf = getSessionValue("mfst");
- if ( mf !=null && mf != '' )
- {
- var ngp = document.getElementById('ng_path');
- var ngm = document.getElementById('ng_myfolder');
- var sMF = document.getElementById('showMyFldr');
- if (ngp != null && ngm != null)
- {
- if( mf == 1 ) {
- ngm.style.display = "";
- ngp.style.display = "none";
- sMF.style.display ="none";
- }
- else {
- ngp.style.display = "";
- ngm.style.display = "none";
- sMF.style.display = "";
- }
- if (ngp.style.display == "")
- {
- <xsl:if test="$canWrite and $path!=''">
- document.pform.m_package_dialog_0_location_packageLocation.value = '<xsl:value-of select="xtsext:javascriptencode($path)"/>';
- </xsl:if>
- } else {
- <xsl:if test="$canWrite and $path!=''">
- document.pform.m_package_dialog_0_location_packageLocation.value = "<xsl:value-of select="xtsext:javascriptencode(key('session-param','e_hp'))"/>/folder";
- </xsl:if>
- }
- }
- } else
- {
- var ngp = document.getElementById('ng_path');
- var ngm = document.getElementById('ng_myfolder');
- var sMF = document.getElementById('showMyFldr');
- if (ngp != null && ngm != null)
- {
- <!-- Determine which location link entries to display -->
- <xsl:choose>
- <xsl:when test="($path!='' and not($isPersonalPath)) or $newPackageFromCC">
- <!-- display the public group -->
- ngp.style.display = "";
- ngm.style.display = "none";
- sMF.style.display ="";
- setStateValue("mfst",0);
- </xsl:when>
- <xsl:otherwise>
- <!-- display the my folders (private) group -->
- ngm.style.display = "";
- ngp.style.display = "none";
- sMF.style.display ="none";
- setStateValue("mfst",1);
- </xsl:otherwise>
- </xsl:choose>
- if (ngp.style.display == "")
- {
- <xsl:if test="$canWrite and $path!=''">
- document.pform.m_package_dialog_0_location_packageLocation.value = '<xsl:value-of select="xtsext:javascriptencode($path)"/>';
- </xsl:if>
- } else {
- <xsl:if test="$canWrite and $path!=''">
- document.pform.m_package_dialog_0_location_packageLocation.value = "<xsl:value-of select="xtsext:javascriptencode(key('session-param','e_hp'))"/>/folder";
- </xsl:if>
- }
- }
- }
- </script>
- <script language="javascript">
- function resetPageState()
- {
- <!-- Clear the cookie value mfst -->
- clearSessionEntry('mfst');
- document.pform.m_wizardDialogNumber.value = 0;
- }
-
- <xsl:if test="/root/selfServicePackage/theScript">
- <xsl:value-of select="/root/selfServicePackage/theScript"/>
- </xsl:if>
- </script>
- </form>
- <xsl:if test="selfServicePackage/theForm">
- <!-- The following removes the namespace information that appears on the form -->
- <xsl:apply-templates select="selfServicePackage/theForm/*" mode="rmxmlns"/>
- </xsl:if>
- </dp:page>
- </xsl:when>
- <xsl:when test="$fromTransformer">
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text><dp:page>
- <form name="pform" method="post" action="{$gateway}">
- <script language="javascript">
- function init() {
- //Set back the package id for Transformer
- var storeid = '<xsl:value-of select="$storeId"/>';
- if(window.external && window.external.HasSetPackageStoreID )
- window.external.SetPackageStoreID( storeid );
- var searchPath = '<xsl:value-of select="xtsext:javascriptencode($searchPath)"/>';
- if(window.external && window.external.HasSetPackageSearchPath )
- window.external.SetPackageSearchPath( searchPath );
- window.external.OnClose(0);
- }
- </script>
- </form>
- </dp:page>
- </xsl:when>
- <xsl:when test="not(/root/fault)">
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text><dp:page>
- <form name="pform" method="post" action="{$gateway}">
- <script language="javascript" src="{$webcontent}/{$app}/js/cookie_jar.js"/>
- <script language="javascript">
- var sParamDelimiter = "<xsl:value-of select="xtsext:javascriptencode(string(key('system-param', 'delimiters')/@d1))"/>";
- var sNameValueDelimiter = "<xsl:value-of select="xtsext:javascriptencode(string(key('system-param', 'delimiters')/@d2))"/>";
- var sCookiePath = "<xsl:value-of select="xtsext:javascriptencode(string($cookie_path))"/>";
- var sCookieDomain = "<xsl:value-of select="xtsext:javascriptencode(string($cookie_domain))"/>";
- var sCookieSecure = "<xsl:value-of select="xtsext:javascriptencode(string($cookie_secure))"/>";
- function init() {
- <!-- Clear the cookie value mfst -->
- clearSessionEntry('mfst');
- }
- </script>
- </form>
- </dp:page>
- <xsl:call-template name="redirect">
- <xsl:with-param name="url" select="$backURL"/>
- </xsl:call-template>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="populate">
- <xsl:param name="path" select="''"/>
- <xsl:param name="level" select="'0'"/>
- <xsl:variable name="nameParam" select="concat('m_package_dialog_', $m_wizardDialogNumber, '_treeNodeName_', $the-object/*/name)"/>
- <xsl:variable name="valueParam" select="concat('m_package_dialog_', $m_wizardDialogNumber, '_tree_', $the-object/*/name)"/>
- <xsl:variable name="selectedName" select="key('env-param', $nameParam)"/>
- <xsl:variable name="selectedValue" select="key('env-param', $valueParam)"/>
- <xsl:for-each select="$path">
- <xsl:variable name="icon">
- <xsl:value-of select="./icon"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="local-name() = 'itemGroup'">
- <xsl:variable name="caption" select="xtsext:javascriptencode(string(./caption))"/>
- <xsl:variable name="name" select="xtsext:javascriptencode(string(./name))"/>
- <xsl:text/>addNode('itemGroup', '<xsl:value-of select="xtsext:javascriptencode($level)"/>', '<xsl:value-of select="xtsext:javascriptencode($caption)"/>', '<xsl:value-of select="xtsext:javascriptencode($name)"/>','<xsl:value-of select="xtsext:javascriptencode($icon)"/>', '<xsl:value-of select="xtsext:javascriptencode($selectedName)"/>', '<xsl:value-of select="xtsext:javascriptencode($selectedValue)"/>');<xsl:text/>
- </xsl:when>
- <xsl:when test="local-name() = 'item'">
- <xsl:variable name="value" select="xtsext:javascriptencode(string(./value))"/>
- <xsl:variable name="name" select="xtsext:javascriptencode(string(./caption))"/>
- <xsl:text/>addNode('item','<xsl:value-of select="xtsext:javascriptencode($level)"/>', '<xsl:value-of select="xtsext:javascriptencode($name)"/>', '<xsl:value-of select="xtsext:javascriptencode($value)"/>', '<xsl:value-of select="xtsext:javascriptencode($icon)"/>', '<xsl:value-of select="xtsext:javascriptencode(../name)"/>', '<xsl:value-of select="xtsext:javascriptencode(../caption)"/>', '<xsl:value-of select="xtsext:javascriptencode($selectedName)"/>', '<xsl:value-of select="xtsext:javascriptencode($selectedValue)"/>');<xsl:text/>
- </xsl:when>
- </xsl:choose>
- <xsl:if test="local-name() = 'itemGroup'">
- <xsl:call-template name="populate">
- <xsl:with-param name="path" select="./*"/>
- <xsl:with-param name="level" select="number(number($level) + 1)"/>
- </xsl:call-template>
- </xsl:if>
- </xsl:for-each>
- </xsl:template>
- <xsl:template name="setParams">
- <xsl:for-each select="$the-object/*[local-name() = 'text' or local-name() = 'textArea' or local-name() = 'location' or local-name() = 'selectionControl']">
- <xsl:choose>
- <xsl:when test="local-name() = 'text' or local-name() = 'textArea'">
- <xsl:text/>setParameter('<xsl:value-of select="xtsext:javascriptencode(./name)"/>', '<xsl:value-of select="xtsext:javascriptencode(./optional)"/>', '<xsl:value-of select="xtsext:javascriptencode(local-name())"/>');<xsl:text/>
- </xsl:when>
- <xsl:when test="local-name() = 'selectionControl'">
- <xsl:variable name="optional">
- <xsl:choose>
- <xsl:when test="./isOptional and ./isOptional='true'">
- <xsl:value-of select="./isOptional"/>
- </xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:text/>setListParameter('<xsl:value-of select="xtsext:javascriptencode(./name)"/>', '<xsl:value-of select="xtsext:javascriptencode(./selectionType)"/>', '<xsl:value-of select="xtsext:javascriptencode(./controlType)"/>', '<xsl:value-of select="xtsext:javascriptencode($optional)"/>');<xsl:text/>
- </xsl:when>
- <xsl:when test="local-name() = 'location'">
- <xsl:text/>setParameter('<xsl:value-of select="xtsext:javascriptencode(./name)"/>', '<xsl:value-of select="xtsext:javascriptencode(./updateLocation)"/>', '<xsl:value-of select="xtsext:javascriptencode(local-name())"/>');<xsl:text/>
- </xsl:when>
- </xsl:choose>
- </xsl:for-each>
- </xsl:template>
- <xsl:template name="redirect">
- <xsl:param name="url"/>
- <html>
- <head>
- <meta http-equiv="refresh">
- <xsl:attribute name="content">0; URL=<xsl:value-of select="$url"/></xsl:attribute>
- </meta>
- <title>
- <xts:string id="IDS_COGNOS_REPORTS"/>
- </title>
- </head>
- </html>
- </xsl:template>
- <xsl:template name="declareHiddenInputs">
- <xsl:variable name="fullTask">
- <xsl:value-of select="'package'"/>.container<xsl:text/>
- </xsl:variable>
- <input type="hidden" name="m_class" value="package"/>
- <input type="hidden" name="so.select">
- <xsl:attribute name="value">
- <xsl:value-of select="$fullTask"/>
- </xsl:attribute>
- </input>
- <input type="hidden" name="so.return.m">
- <xsl:attribute name="value">
- <xsl:value-of select="concat($app,'/', 'new_package.xts')"/>
- </xsl:attribute>
- </input>
- <input name="so.defaultLocation" type="hidden">
- <xsl:attribute name="value"><xsl:value-of select="$path"/></xsl:attribute>
- </input>
- <input name="m_p_defaultName" type="hidden">
- <xsl:attribute name="value">
- <xsl:choose>
- <xsl:when test="key('env-param', 'm_package_dialog_0_text_packageName') != ''">
- <xsl:value-of select="key('env-param', 'm_package_dialog_0_text_packageName')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="''"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- </input>
- <!-- This adds all env items except for those stated here...-->
- <xsl:for-each select="/root/env/param[not(starts-with(@name, 'm_package_dialog_') or starts-with(@name, 'parameter_value_counter') or contains(' m_p_defaultName so.defaultLocation so.select so.return.m m_class m_dataSourceName ', @name))]">
- <input type="hidden">
- <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
- <xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute>
- </input>
- </xsl:for-each>
- <input name="m_dataSourceName" type="hidden">
- <xsl:attribute name="value"><xsl:value-of select="key('env-param', 'm_dataSourceName')"/></xsl:attribute>
- </input>
- <input name="m" type="hidden">
- <xsl:attribute name="value"><xsl:value-of select="portal/new_package.xts"/></xsl:attribute>
- </input>
- <xsl:for-each select="/root/env/*[starts-with(@name, 'm_package_dialog_')]">
- <xsl:variable name="levelParam" select="substring-before(substring-after(@name, 'm_package_dialog_'), '_')"/>
- <xsl:if test="number($levelParam) < number($m_wizardDialogNumber)">
- <input type="hidden">
- <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
- <xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute>
- </input>
- </xsl:if>
- </xsl:for-each>
- <xsl:for-each select="/root/env/*[starts-with(@name, 'parameter_value_counter_')]">
- <xsl:variable name="levelParamCounter" select="substring-before(substring-after(@name, 'parameter_value_counter_'), '_')"/>
- <xsl:if test="number($levelParamCounter) < number($m_wizardDialogNumber)">
- <input type="hidden">
- <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
- <xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute>
- </input>
- </xsl:if>
- </xsl:for-each>
- </xsl:template>
- <!-- Remove namespace from cform info -->
- <xsl:template match="*" mode="rmxmlns">
- <xsl:element name="{local-name()}">
- <xsl:apply-templates select="@* | node()" mode="rmxmlns"/>
- </xsl:element>
- </xsl:template>
- <xsl:template match="@* | text() | comment() | processing-instruction()" mode="rmxmlns">
- <xsl:copy/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="createFault" type="fault" processor="XSLT">
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:output method="xml"/>
- <xsl:template match="/root/fault">
- <xsl:choose>
- <xsl:when test="./*[local-name() = 'exception']/*[local-name() = 'exceptionDetail']/*[local-name() = 'exception']/*[local-name()='errorCode'] = 'fmmdDuplicateName'">
- <copyFault>
- <xsl:copy-of select="."/>
- </copyFault>
- </xsl:when>
- <xsl:otherwise>
- <xsl:copy-of select="."/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="text()"/>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - display debug information
- ===============================================================================================
- -->
- <xts:block id="debug" dependency="render_wizard_page" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
- <!-- get the debug logic sheet -->
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|