| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101 | <?xml version="1.0" encoding="UTF-8"?><!--    Licensed Materials - Property of IBM    IBM Cognos Products: ps    (C) Copyright IBM Corp. 2005, 2015    US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.--><!--   Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.   Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).--><xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" messageBase="messages/portal.xml, messages/portalRL.xml" requiredCapability="canUseDataSourcesTool">	<!--	===============================================================================================	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='m_connection_proxy_password' or @name='proxyPasswordEncrypted' or @name='test_password'] != '']" nodelist="env"/>		<!--	===============================================================================================	getContent	===============================================================================================	-->			<xts:block id="getContent" dependency="formlogic_init" processor="XSLT" type="exec" nodelist="env,session,system,header">		<xts:logicsheet path="logicsheets/buslogic.xslt"/>		<xsl:stylesheet version="1.0"			xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  			xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"			xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" 						xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"			exclude-result-prefixes="xsl send xtsext cm">			<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>			<xsl:key name="env-param" match="/root/env/param" use="@name"/>			<xsl:variable name="connectionObject" select="key('env-param','m_obj')"/>			<xsl:variable name="fromWizard" select="key('env-param','m_new_class') and key('env-param','m_new_class')!=''"/>						<xsl:template match="/">				<xts:sequence>					<xts:append>						<content>							<xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">													<send:request provider="cm">									<xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">										<cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">											<cm:requests>												<cm:query> 													<cm:search><xsl:value-of select="$connectionObject"/>/dataSourceSignon[permission('read') and permission('execute')]</cm:search>															<cm:properties>																					<cm:property name="searchPath"/>														<cm:property name="defaultName"/>														<cm:property name="credentials"/>													</cm:properties>												</cm:query>												<cm:query>													<cm:search>/configuration//*[@objectClass='metadataService' or @objectClass='queryService']/parent::*</cm:search>													<cm:properties>														<cm:property name="defaultName"/>														<cm:property name="ancestors"/>														<cm:property name="searchPath"/>														<cm:property name="dispatcherID"/>														<cm:property name="iconURI"/>														<cm:property name="runningState"/>													</cm:properties>													<cm:sortBy>														<cm:sort name="defaultName" order="ascending"/>													</cm:sortBy>													</cm:query>												<xsl:if test="not($fromWizard)">													<!--  query required information from the connection object -->													<cm:query xmlns="http://developer.cognos.com/schemas/xts-cm/1/">														<cm:search><xsl:value-of select="$connectionObject"/></cm:search>																<cm:properties>																						<cm:property name="connectionString"/>															<cm:property name="credentialNamespaces"/>														</cm:properties>													</cm:query>												</xsl:if>												<query xmlns="http://developer.cognos.com/schemas/xts-cm/1/">													<search><xsl:value-of select="$connectionObject"/>/credential[@name='proxy']</search>													<properties>														<cm:property name="defaultName"/>														<cm:property name="objectClass"/>														<cm:property name="dataSourceConnectionName"/>														<cm:property name="credentials"/>													</properties>												</query>											</cm:requests>										</cm:query>									</xts:transform>								</send:request>							</xts:transform>						</content>						<namespaces>							<xts:transform src="transforms/portal/dataSource/stripnamespace.xslt" processor="XSLT">								<xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">									<send:request provider="cm">										<xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">											<query xmlns="http://developer.cognos.com/schemas/xts-cm/1/">												<search>/directory/namespace<xsl:value-of select="/root/system/param[@name='namespace_filter']"/></search>												<properties>													<cm:property name="defaultName"/>													<cm:property name="searchPath"/>													<cm:property name="active"/>												</properties>											</query>										</xts:transform>									</send:request>								</xts:transform>							</xts:transform>						</namespaces>					</xts:append>					<xsl:variable name="firstVisitToPage" select="not(key('env-param','m_p_connectionString')) and not($fromWizard)"/>					<xsl:if test="$firstVisitToPage">						<xts:append select="/root/env">							<param name="m_p_connectionString">								<xts:transform name="XMLEncode"><xts:queryValue select="/root/content/*[local-name()='queryResponse']/*[local-name()='queryReply'][3]/*[local-name()='dataSourceConnection']/*[local-name()='connectionString']"/></xts:transform>							</param>							<param name="m_p_credentialNamespaces">								<xts:transform name="XMLEncode"><xts:queryValue select="/root/content/*[local-name()='queryResponse']/*[local-name()='queryReply'][3]/*[local-name()='dataSourceConnection']/*[local-name()='credentialNamespaces']/*/*[local-name()='searchPath']"/></xts:transform>							</param>						</xts:append>										</xsl:if>					<xts:delete select="/root/env/param[contains(' pagerfrom pagerto pagerfrom_d pagerto_d ', concat(' ',@name,' '))]"/>				</xts:sequence>			</xsl:template>		</xsl:stylesheet>	</xts:block>		<!--	====================================================================================================================	generateProxyInformation - generate proxy host credentials if they do not exists (coming from new connection wizard)	====================================================================================================================	-->	<xts:block id="generateProxyInformation" mode="interpret" type="exec" processor="XSLT" dependency="getContent" nodelist="env, content" mandatory="false" condition=".[(contains(/root/env/param[@name='m_p_connectionString'], 'ERP-SFDC'))]">		<xts:logicsheet path="logicsheets/presentation/dialog/connections.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/">			<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>			<xsl:key name="env-param" match="/root/env/param" use="@name"/>			<xsl:template match="/">				<xts:sequence>				<dcx:savePasswordVars/>				<xsl:if test="(not(key('env-param','m_proxy_credentials') or  key('env-param','m_proxy_credentials'='')) and not(/root/content/cm:queryResponse/cm:queryReply/cm:credential/cm:credentials))"> 						<xts:delete select="/root/env/param[@name='m_proxy_credentials']"/>					<xts:append select="/root/env">						<param name="m_proxy_credentials">							<xsl:text><credential><encryptedValue></xsl:text>							<xsl:call-template name="dcx:genCredentials">								<xsl:with-param name="username" select="key('env-param', 'm_connection_proxy_user')"/>								<xsl:with-param name="password" select="key('env-param', 'proxyPasswordEncrypted')"/>								<xsl:with-param name="passwordEncrypted" select="true()"/>								<xsl:with-param name="cubePassword" select="$cubePassword"/>								<xsl:with-param name="cubePasswordEncrypted" select="$cubePasswordEncrypted"/>							</xsl:call-template>							<xsl:text></encryptedValue></credential></xsl:text>						</param>					</xts:append>								</xsl:if>				</xts:sequence>			</xsl:template>			<dcx:genCredentialTemplate/>		</xsl:stylesheet>	</xts:block>					<!--	===========================================================================================================	appendProxyInformation - append proxy host information to connectionnString for salesforce.com datasources 	===========================================================================================================	-->	<xts:block id="appendProxyInformation" mode="interpret" type="exec" processor="XSLT" dependency="getContent generateProxyInformation" nodelist="env, content" mandatory="false" condition=".[(contains(/root/env/param[@name='m_p_connectionString'], 'ERP-SFDC'))]">		<xts:logicsheet path="logicsheets/buslogic.xslt"/>		<xsl:stylesheet version="1.0"			xmlns:xsl="http://www.w3.org/1999/XSL/Transform"			xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/">			<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>			<xsl:key name="env-param" match="/root/env/param" use="@name"/>			<xsl:template match="/">				<xts:sequence>					<xsl:variable name="proxyCredentials">						<xsl:choose>							<xsl:when test="key('env-param','m_proxy_credentials')!=''">								<xsl:value-of select="key('env-param','m_proxy_credentials')"/>							</xsl:when>							<xsl:otherwise>								<xsl:value-of select="/root/content/cm:queryResponse/cm:queryReply/cm:credential/cm:credentials"/>							</xsl:otherwise>						</xsl:choose>					</xsl:variable>										<!--  check if env-param of m_p_connectionString already contains <credential><encryptedValue> -->					<xsl:variable name="proxyEnabled" select="contains(key('env-param','m_p_connectionString'), 'PROXY_ENABLED=true')"/>					<xsl:variable name="proxyAlreadyAppended" select="contains(/root/env/param[@name='m_p_connectionString'],'<credential><encryptedValue>')"/>					<xsl:if test="$proxyEnabled and not($proxyAlreadyAppended)">						<xts:replace select="/root/env/param[@name='m_p_connectionString']">							<param name="m_p_connectionString">								<xsl:value-of select="key('env-param','m_p_connectionString')"/>;PROXYCREDENTIAL=<xsl:value-of select="$proxyCredentials"/>							</param>						</xts:replace>					</xsl:if>				</xts:sequence>			</xsl:template>		</xsl:stylesheet>	</xts:block>	<!--	===============================================================================================	trimAncestors - remove /configuration from the ancestors element	===============================================================================================	-->	<xts:block id="trimAncestors" dependency="getContent" type="exec" mode="interpret" processor="XSLT" nodelist="">		<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" 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:delete select="/root/content/*[local-name() = 'queryResponse']/*[local-name() = 'queryReply'][2]/*[local-name() = 'dispatcher']/*[local-name() = 'ancestors']/*[local-name() = 'ancestorInfo'][1]"/>				</xts:sequence>			</xsl:template>		</xsl:stylesheet>	</xts:block>		    <!--    ===============================================================================================    classNames - get object class names    ===============================================================================================    -->    <xts:block id="classNames" type="exec" mode="input"  processor="XML" path="/portal/uiExtensions.xml">        <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_names.xslt"/>    </xts:block>	<!--	===============================================================================================	renderPage - render the page	===============================================================================================	-->	<xts:block id="render_page" dependency="encrypt_password trimAncestors appendProxyInformation getContent classNames" mode="output" processor="XSLT" type="exec" mimeType="text/html">		<xts:logicsheet path="logicsheets/portal.xsl"/>		<xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>		<xts:logicsheet path="logicsheets/presentation/layout.xsl"/>		<xts:logicsheet path="logicsheets/presentation/dialog/connections.xslt"/>		<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:dcx="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/connections/1/" 			xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 			xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" 			xmlns:pf="http://developer.cognos.com/schemas/xts/pf" 			xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" 			xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/" 			xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/" 			xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/" 			xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/" 			xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/" 			xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/" 			exclude-result-prefixes="xsl cm pf xtsext lyt dp df cf cp utml">			<xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>			<xsl:variable name="mname" select="'test_connection.xts'"/>			<pf:variables/>			<pf:gen-icon/>			<xsl:variable name="title">				<xsl:choose>					<xsl:when test="key('env-param','m_new_class')!=''">						<xsl:choose>							<xsl:when test="key('env-param','m_new_class')='dataSource'">								<xts:string id="IDS_NEW_DATA_SOURCE_TITLE"/>							</xsl:when>							<xsl:otherwise>								<xts:string id="IDS_NEW_CONNECTION_TITLE"/>							</xsl:otherwise>						</xsl:choose>					</xsl:when>					<xsl:otherwise>						<xsl:value-of select="key('env-param','m_name')"/>					</xsl:otherwise>				</xsl:choose>			</xsl:variable>			<xsl:variable name="browserTitle">				<xsl:text/>				<xts:string id="IDS_TEST_TITLE">					<xts:param name="title"><xsl:value-of select="$title"/></xts:param>				</xts:string><xsl:text/>			</xsl:variable>			<xsl:variable name="isPowerCube" select="contains(key('env-param','m_p_connectionString'),';LOCAL;PC;')"/>			<xsl:variable name="dispatchers" select="/root/content/cm:queryResponse/cm:queryReply[2]/cm:dispatcher[cm:runningState='running' or cm:runningState='']"/>														<!-- global application variables -->			<xsl:template match="/root">				<xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">					<dp:meta>						<pf:meta/>						<!-- Standard meta tags -->					</dp:meta>					<dp:script>						<pf:help context="HID_DATA_SOURCES"/>						<!-- Help system -->					</dp:script>					<script language="JavaScript" src="{$webcontent}/{$app}/js/utilities.js"/>					<script language="javascript">						<dcx:checkReservedChar/>											function doCancel()						{							<xsl:choose>								<xsl:when test="key('env-param','from_bmt')!=''">									<!-- Called only when canceling back to BMT environment. -->									window.external.OnClose(1);								</xsl:when>								<xsl:otherwise>									<xsl:choose>										<xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">																			document.pform.ps_nav_op.value = 'pop';														<xsl:variable name="nav-stack-delimiter" select="'*'"/>											<xsl:variable name="target">												<xsl:choose>													<xsl:when test="contains(key('env-param','ps_nav_stack'), $nav-stack-delimiter)">														<xsl:value-of select="substring-before( key('env-param','ps_nav_stack'), $nav-stack-delimiter )"/>													</xsl:when>																		<xsl:otherwise>														<xsl:value-of select="key('env-param','ps_nav_stack')"/>													</xsl:otherwise>												</xsl:choose>											</xsl:variable>											document.pform.m.value = '<xsl:value-of select="xtsext:javascriptencode(string($target))"/>';											document.pform.submit();										</xsl:when>										<xsl:otherwise>											location.href = '<xsl:value-of select="xtsext:javascriptencode(string(key('env-param','backURL')))"/>';										</xsl:otherwise>									</xsl:choose>								</xsl:otherwise>							</xsl:choose>						}						function init()						{							updateTest();						}						function validate()						{							var frm = document.pform;														<xsl:if test="$dispatchers/*">								<!-- make sure at least one dispatcher is selected -->								if (frm.dispatcher  && frm.dispatcher[0])								{									for (var i = frm.dispatcher.length-1; i >= 0; i--) 									{										if (frm.dispatcher[i].selected == true)										{											return true;										}									}										alert("<xts:string id="IDS_TEST_CONNECTION_NO_SELECTION" encode="javascript"/>");									return false;								}																			</xsl:if>														<xsl:choose>								<xsl:when test="$isPowerCube">									if (frm.test_using && frm.test_using[0].checked)									{												if (!checkReservedChar(frm.test_cube_password, '<xts:string id="IDS_PROP_CONN_CUBE_PASSWORD_FIELD" encode="javascript"/>'))										{											return false;										}											}																</xsl:when>								<xsl:otherwise>									if (frm.test_using && frm.test_using[0].checked)									{												if (!checkReservedChar(frm.m_connection_userid, '<xts:string id="IDS_USERID" encode="javascript"/>'))										{											return false;										}												if (frm.test_password && !checkReservedChar(frm.test_password, '<xts:string id="IDS_PASSWORD" encode="javascript"/>'))										{											return false;										}									}								</xsl:otherwise>							</xsl:choose>														return true;						}						function updateTest()						{							var f = document.pform;							if (f.test_using)							{								if (f.test_using[0].checked)								{									<xsl:choose>										<xsl:when test="$isPowerCube">											if (f.test_cube_password)											{												f.test_cube_password.disabled = false;											}										</xsl:when>										<xsl:otherwise>											f.m_connection_userid.disabled = false;											if (f.test_password)											{												f.test_password.disabled = false;											}										</xsl:otherwise>									</xsl:choose>									if (f.pageitem && f.pageitem[0])									{										for (i=0; f.pageitem[i];i++)										{											f.pageitem[i].disabled = true;										}																	}									else if (f.pageitem)									{										f.pageitem.disabled = true;									}								}								else								{									<xsl:choose>										<xsl:when test="$isPowerCube">											if (f.test_cube_password)											{												f.test_cube_password.disabled = true;											}										</xsl:when>										<xsl:otherwise>											f.m_connection_userid.disabled = true;											if (f.test_password)											{												f.test_password.disabled = true;											}										</xsl:otherwise>									</xsl:choose>																	if (f.pageitem && f.pageitem[0])									{										for (i=0; f.pageitem[i];i++)										{											f.pageitem[i].disabled = false;										}																	}									else if (f.pageitem)									{										f.pageitem.disabled = false;									}								}							}																<xsl:if test="$isPowerCube">								toggleUserPassword();							</xsl:if>						}												<xsl:if test="$isPowerCube">						function toggleUserPassword() {							var f = document.pform;							if (f.m_p_test_credentialNamespaces)							{								if (f.m_p_test_credentialNamespaces.options[f.m_p_test_credentialNamespaces.selectedIndex].value=='none')								{									if (f.m_connection_userid && f.test_password)									{										f.m_connection_userid.disabled=true;										f.m_connection_userid.value='';										f.test_password.disabled=true;										f.test_password.value='';									}								}								else if (f.m_p_test_credentialNamespaces.options[f.m_p_test_credentialNamespaces.selectedIndex].value!='none')								{									if (f.m_connection_userid)									{										f.m_connection_userid.disabled=false;									}									if (f.test_password)									{										f.test_password.disabled=false;									}								}							}						}						</xsl:if>						function clearEncryptedPassword()						{							if (document.pform.passwordEncrypted)								document.pform.passwordEncrypted.value = '';						}						function clearCubePassword()						{							if (document.pform.cubePasswordEncrypted)								document.pform.cubePasswordEncrypted.value = '';						}															function selectAll()						{							var frm = document.pform;							if (frm.dispatcher)							{								for (var i = frm.dispatcher.length-1; i >= 0; i--) {									frm.dispatcher[i].selected = true;																}							}						}												function deselectAll()						{							var frm = document.pform;							if (frm.dispatcher)							{								for (var i = frm.dispatcher.length-1; i >= 0; i--) {									frm.dispatcher[i].selected = false;								}							}						}					</script>					<utml:form name="pform" method="post" action="{$gateway}">						<xsl:variable name="test_description">							<xsl:choose>								<xsl:when test="contains(key('env-param','m_p_connectionString'),';LOCAL;RP-CMIS-FILENET;')">									<xts:string id="IDS_TEST_DESCRIPTION_REPOSITORY"/>								</xsl:when>								<xsl:otherwise>									<xts:string id="IDS_TEST_DESCRIPTION"/>								</xsl:otherwise>							</xsl:choose>						</xsl:variable>						<dp:header>							<!-- header titles-->							<dp:title><xsl:value-of select="normalize-space($browserTitle)"/></dp:title>							<dp:description><xsl:value-of select="$test_description"/></dp:description>							<dp:close>								<a href="javascript:doCancel()">									<dp:closeMarker/>								</a>							</dp:close>											</dp:header>																<xsl:variable name="test_using">							<xsl:choose>								<xsl:when test="key('env-param','test_using')">									<xsl:value-of select="key('env-param','test_using')"/>								</xsl:when>								<xsl:when test="/root/content/cm:queryResponse/cm:queryReply[1]/cm:dataSourceSignon/*">signon</xsl:when>								<xsl:otherwise>userid_password</xsl:otherwise>							</xsl:choose>						</xsl:variable>						<lyt:layout style="1">							<lyt:section>								<table cellspacing="0" border="0" cellpadding="1" role="presentation">									<tr>										<td nowrap="nowrap" class="formLabel">											<xts:string id="IDS_PROP_CONN_CONNECT"/>										</td>									</tr>									<tr>										<td class="formText">											<xsl:value-of select="key('env-param','m_p_connectionString')"/>										</td>									</tr>									<tr>										<td nowrap="nowrap"><img height="5" width="10" src="{$webcontent}/images/space.gif"/></td>									</tr>																			<tr>										<td>											<table border="0" cellpadding="1" cellspacing="0" role="presentation">												<tr>													<df:button df:id="IDS_PROP_CONN_TEST_BUTTON" id="btn_test_connection" utml:validate="true" df:style="stack-up">														<df:target><xsl:value-of select="$app"/>/test_connection_results.xts</df:target>													</df:button>																									</tr>											</table>										</td>									</tr>									<tr>										<td nowrap="nowrap"> </td>									</tr>																	</table>								<!-- Don't show the dispatcher section if the user doesn't have access to them -->								<xsl:if test="$dispatchers/*">									<table cellspacing="0" border="0" cellpadding="1" role="presentation">										<tr>											<td nowrap="nowrap" class="formLabel">												<span id="lbl_dispatcher"><xts:string id="IDS_TEST_CONNECTION_DISPATCHER"/></span>											</td>										</tr>										<xsl:choose>											<!-- where there is only 1 dispatcher then don't put it in a select -->											<xsl:when test="count($dispatchers) = 1">												<tr>													<td class="formText">														<utml:input type="hidden" name="dispatcher">															<utml:value>																<xsl:value-of select="$dispatchers/cm:dispatcherID"/>															</utml:value>														</utml:input>														<xsl:value-of select="$dispatchers/cm:defaultName"/>														<xsl:call-template name="ancestorsString">															<xsl:with-param name="path" select="$dispatchers"/>														</xsl:call-template>													</td>												</tr>											</xsl:when>											<xsl:otherwise>												<tr>													<td>														<utml:select size="4" name="dispatcher" aria-labelledby="lbl_dispatcher" multiple="true">															<xsl:for-each select="$dispatchers">																<xsl:sort select="cm:defaultName"/>																				<option value="{cm:dispatcherID}">																	<xsl:if test="key('env-param','dispatcher')=cm:dispatcherID">																		<xsl:attribute name="selected">true</xsl:attribute>																	</xsl:if>																	<xsl:value-of select="cm:defaultName"/>																	<xsl:call-template name="ancestorsString">																		<xsl:with-param name="path" select="."/>																	</xsl:call-template>																</option>															</xsl:for-each>															<option value="deleteme">																<xsl:text/>         <xsl:text/>																<xsl:text/>         <xsl:text/>																<xsl:text/>         <xsl:text/>																<xsl:text/>         <xsl:text/>																<xsl:text/>         <xsl:text/>																<xsl:text/>         <xsl:text/>																<xsl:text/>         <xsl:text/>															</option>														</utml:select>													</td>												</tr>												<tr>													<td align="right" class="tabletext">														<a href="#" onclick="javascript:selectAll();">															<xts:string id="IDS_SELECT_PAGE"/>														</a>														<img height="1" width="10" src="{$webcontent}/images/space.gif"/>														<a href="#" onclick="javascript:deselectAll();">															<xts:string id="IDS_DESELECT_ALL"/>														</a>																</td>												</tr>											</xsl:otherwise>										</xsl:choose>										<tr>											<td nowrap="nowrap"> </td>										</tr>																		</table>								</xsl:if>								<xsl:choose>									<!-- the UI is different if we're dealing with a powercube -->									<xsl:when test="$isPowerCube">										<xsl:variable name="needCubePassword" select="contains(key('env-param','m_p_connectionString'),'^?Password:;')"/>										<xsl:variable name="available_namespace" select="/root/*[local-name()='namespaces']/*[local-name()='queryResponse']/*[local-name()='namespace']/*[local-name()='active']='true'"/>										<!-- does the user have to make choice with what to test with? -->										<xsl:if test="key('env-param','m_p_credentialNamespaces')!='' or $needCubePassword='true' or $available_namespace">											<dp:list>												<dp:section>													<dp:label for="ctrl_m_p_test_credentialNamespaces">														<xts:string id="IDS_TEST_CONNECTION_USING"/>													</dp:label>												</dp:section>												<xsl:choose>													<xsl:when test="$available_namespace and string(key('env-param','m_p_credentialNamespaces'))=''">													<dp:choice>														<dp:section>															<dp:hint>																<xts:string id="IDS_PROP_CONN_POWERCUBE_NAMESPACES"/>															</dp:hint>														</dp:section>														<dp:section>																<xsl:call-template name="externalNamespace">																<xsl:with-param name="form-read-only" select="'false'"/>																<xsl:with-param name="utml-form-name" select="'pform'"/>															</xsl:call-template>														</dp:section>															<dp:section>																									<xsl:call-template name="userIDPassword"/>														</dp:section>													</dp:choice>													</xsl:when>													<xsl:when test="key('env-param','m_p_credentialNamespaces')!=''">														<!-- userID and Password used to authenticate against a namespace -->														<dp:section>																									<xsl:call-template name="userIDPassword"/>														</dp:section>													</xsl:when>												</xsl:choose>																								<!-- Cube password -->												<xsl:if test="$needCubePassword='true'">													<xsl:choose>														<!-- if we're in a wizard, then don't show the signons -->														<xsl:when test="key('env-param','m_new_class')!=''">															<dp:section>																<dp:label for="ctrl_test_cube_password">																	<xts:string id="IDS_PROP_CONN_CUBE_PASSWORD_FIELD"/>																</dp:label>															</dp:section>															<dp:section>																<utml:input type="password" name="test_cube_password" size="53" utml:update="false" onchange="clearCubePassword()" id="ctrl_test_cube_password">																	<xsl:attribute name="value">																		<xsl:choose>																			<xsl:when test="key('env-param','cubePasswordEncrypted')!=''">********</xsl:when>																			<xsl:otherwise></xsl:otherwise>																		</xsl:choose>																	</xsl:attribute>																</utml:input>															</dp:section>														</xsl:when>														<xsl:otherwise>															<dp:section>																<dp:hint>																	<xts:string id="IDS_TEST_CONNECTION_USING_CUBE_PASS"/>																</dp:hint>															</dp:section>															<dp:section>																<dp:choice>																	<utml:radio-group name="test_using">																		<utml:default-value>																			<xsl:value-of select="$test_using"/>																		</utml:default-value>																		<dp:section1>																			<utml:input type="radio" name="test_using" value="userid_password" onclick="updateTest();" aria-labelledby="ctrl_test_using_userid_password"/>																		</dp:section1>																		<dp:section2 id="ctrl_test_using_userid_password">																			<xts:string id="IDS_PROP_CONN_CUBE_PASSWORD"/>																		</dp:section2>																		<dp:section3>																			<utml:input type="password" name="test_cube_password" size="53" utml:update="false" onchange="clearCubePassword()" aria-labelledby="ctrl_test_using_userid_password">																				<xsl:attribute name="value">																					<xsl:choose>																						<xsl:when test="key('env-param','cubePasswordEncrypted')!=''">********</xsl:when>																						<xsl:otherwise></xsl:otherwise>																					</xsl:choose>																				</xsl:attribute>																			</utml:input>																																					</dp:section3>																																				<dp:section1>																			<utml:input type="radio" name="test_using" value="signon" onclick="updateTest();" id="ctrl_test_using_signon">																				<xsl:if test="not(/root/content/cm:queryResponse/cm:queryReply[1]/cm:dataSourceSignon/*)">																					<xsl:attribute name="disabled">true</xsl:attribute>																				</xsl:if>																			</utml:input>																		</dp:section1>																		<dp:section2 for="ctrl_test_using_signon">																			<xts:string id="IDS_TEST_CONNECTION_USING_SIGNON"/>																		</dp:section2>																	</utml:radio-group>																											<dp:section3>																		<xsl:call-template name="genSignonList">																			<xsl:with-param name="test_using" select="$test_using"/>																		</xsl:call-template>																	</dp:section3>																</dp:choice>															</dp:section>														</xsl:otherwise>													</xsl:choose>												</xsl:if>												</dp:list>										</xsl:if>									</xsl:when>									<xsl:otherwise>										<xsl:variable name="needPassword" select="contains(key('env-param','m_p_connectionString'),'^?Password:;') or contains(key('env-param','m_p_connectionString'),';PWD=%s')"/>										<xsl:variable name="needUserID" select="contains(key('env-param','m_p_connectionString'),'^User ID:') or contains(key('env-param','m_p_connectionString'),';UID=%s')"/>										<!-- don't show the username/password section if the connection doesn't need a username -->										<!-- don't show the signons of the radio buttons if we're in the wizard -->										<xsl:if test="$needUserID='true'">											<xsl:choose>												<xsl:when test="key('env-param','m_new_class')!=''">													<dp:input>														<dp:section1><xts:string id="IDS_TEST_CONNECTION_USING"/></dp:section1>														<dp:section2>															<xsl:call-template name="userIDPassword">																<xsl:with-param name="needPassword" select="$needPassword='true'"/>															</xsl:call-template>														</dp:section2>													</dp:input>												</xsl:when>												<xsl:otherwise>													<dp:list>														<dp:section>															<dp:label>																<xts:string id="IDS_TEST_CONNECTION_USING"/>															</dp:label>														</dp:section>														<dp:section>															<dp:hint>																<xsl:choose>																	<xsl:when test="$needPassword='true'">																		<xts:string id="IDS_TEST_CONNECTION_USING_USER_PASS"/>																	</xsl:when>																	<xsl:otherwise>																		<xts:string id="IDS_TEST_CONNECTION_USING_USER"/>																	</xsl:otherwise>																</xsl:choose>															</dp:hint>														</dp:section>														<dp:section>															<dp:choice>																<utml:radio-group name="test_using">																	<utml:default-value>																		<xsl:value-of select="$test_using"/>																	</utml:default-value>																	<dp:section1>																		<utml:input type="radio" name="test_using" value="userid_password" onclick="updateTest();" id="ctrl_test_using_userid_password"/>																	</dp:section1>																	<dp:section2 for="ctrl_test_using_userid_password">																		<xsl:choose>																			<xsl:when test="$needPassword='true'">																				<xts:string id="IDS_TEST_CONNECTION_USING_USERID"/>																			</xsl:when>																			<xsl:otherwise>																				<xts:string id="IDS_TEST_CONNECTION_USING_USER_ONLY"/>																			</xsl:otherwise>																		</xsl:choose>																	</dp:section2>																	<dp:section3>																		<dp:input>																			<dp:section1 id="lbl_m_connection_userid">																				<xts:string id="IDS_SELECT_CONNECT_USERID"/>																			</dp:section1>																			<dp:section2>																				<utml:input type="text" name="m_connection_userid" size="53" aria-labelledby="lbl_m_connection_userid">																					<xsl:if test="$test_using='signon'">																						<xsl:attribute name="disabled">true</xsl:attribute>																					</xsl:if>																				</utml:input>																			</dp:section2>																		</dp:input>																		<xsl:if test="$needPassword='true'">																			<dp:input>																				<dp:section1 id="lbl_test_password">																					<xts:string id="IDS_SELECT_CONNECT_PASSWORD"/>																				</dp:section1>																				<dp:section2>																					<utml:input type="password" name="test_password" size="53" utml:update="false" onchange="clearEncryptedPassword()" aria-labelledby="lbl_test_password">																						<xsl:if test="$test_using='signon'">																							<xsl:attribute name="disabled">true</xsl:attribute>																						</xsl:if>																						<xsl:attribute name="value">																							<xsl:choose>																								<xsl:when test="key('env-param','passwordEncrypted')!=''">********</xsl:when>																								<xsl:otherwise></xsl:otherwise>																							</xsl:choose>																						</xsl:attribute>																					</utml:input>																				</dp:section2>																			</dp:input>																		</xsl:if>																	</dp:section3>																																		<dp:section1>																		<utml:input type="radio" name="test_using" value="signon" onclick="updateTest();" id="ctrl_test_using_signon">																			<xsl:if test="not(/root/content/cm:queryResponse/cm:queryReply[1]/cm:dataSourceSignon/*)">																				<xsl:attribute name="disabled">true</xsl:attribute>																			</xsl:if>																		</utml:input>																	</dp:section1>																	<dp:section2 for="ctrl_test_using_signon">																		<xts:string id="IDS_TEST_CONNECTION_USING_SIGNON"/>																	</dp:section2>																</utml:radio-group>																						<dp:section3>																	<xsl:call-template name="genSignonList">																		<xsl:with-param name="test_using" select="$test_using"/>																	</xsl:call-template>																</dp:section3>															</dp:choice>														</dp:section>													</dp:list>												</xsl:otherwise>											</xsl:choose>										</xsl:if>									</xsl:otherwise>								</xsl:choose>							</lyt:section>						</lyt:layout>																	<!-- ===================		F o o t e r		===================== -->						<dp:footer>										<xsl:choose>								<xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">									<df:button df:id="IDS_CLOSE" df:style="stack-down"/>								</xsl:when>								<xsl:otherwise>									<df:button df:id="IDS_CLOSE" df:style="back-url"/>								</xsl:otherwise>							</xsl:choose>													</dp:footer>						<!-- delete the blank option from the dispatcher list and select the first dispatcher -->						<script language="javascript">							<xsl:if test="count($dispatchers) > 1">								//delete the blank options								if (document.pform.dispatcher[(document.pform.dispatcher.length - 1)].value == 'deleteme') {									document.pform.dispatcher[(document.pform.dispatcher.length - 1)] = null;								}								</xsl:if>							<xsl:if test="not(key('env-param','dispatcher'))">								if (document.pform.dispatcher && document.pform.dispatcher[0])								{									document.pform.dispatcher[0].selected = true;								}							</xsl:if>						</script>					</utml:form>				</dp:page>			</xsl:template>						<xsl:template match="*[local-name()='message']">					<xsl:value-of select="xtsext:javascriptencode(string(.))"/><xsl:if test="string-length(normalize-space(.)) > 0">\n</xsl:if>			</xsl:template>												<xsl:template name="ancestorsString">				<xsl:param name="path"/>					<xsl:variable name="ancestors">						<xsl:if test="$path/cm:ancestors/*">							<cf:do-the-path-link>								<cf:param name="familytree">$path/cm:ancestors</cf:param>								<cf:param name="familymember">$path/cm:defaultName</cf:param>								<cf:param name="onlyAncestors">true</cf:param>							</cf:do-the-path-link>						</xsl:if>					</xsl:variable>										<xsl:if test="$path/cm:ancestors/*">						<xsl:text> (</xsl:text>						<xsl:choose>							<xsl:when test="(string-length($ancestors) + string-length($path/cm:defaultName)) > 100">								<xsl:value-of select="$path/cm:ancestors/cm:ancestorInfo[1]/cm:title"/>								<xsl:text> > ... > </xsl:text>								<xsl:value-of select="$path/cm:ancestors/cm:ancestorInfo[position() = last()]/cm:title"/>							</xsl:when>							<xsl:otherwise>								<xsl:value-of select="$ancestors"/>							</xsl:otherwise>						</xsl:choose>						<xsl:text>)</xsl:text>					</xsl:if>			</xsl:template>					<xsl:template name="userIDPassword">				<xsl:param name="needPassword" select="true()"/>				<xsl:param name="form-read-only" select="false()"/>								<dp:input>					<dp:section1 id="lbl_m_connection_userid">						<xts:string id="IDS_SELECT_CONNECT_USERID"/>					</dp:section1>					<dp:section2>						<utml:input type="text" name="m_connection_userid" size="53" aria-labelledby="lbl_m_connection_userid"/>					</dp:section2>				</dp:input>				<xsl:if test="$needPassword='true'">					<dp:input>						<dp:section1 id="lbl_test_password">							<xts:string id="IDS_SELECT_CONNECT_PASSWORD"/>						</dp:section1>						<dp:section2>							<utml:input type="password" name="test_password" size="53" utml:update="false" onchange="clearEncryptedPassword()" aria-labelledby="lbl_test_password">								<xsl:attribute name="value">									<xsl:choose>										<xsl:when test="key('env-param','passwordEncrypted')!=''">********</xsl:when>										<xsl:otherwise></xsl:otherwise>									</xsl:choose>								</xsl:attribute>							</utml:input>						</dp:section2>					</dp:input>				</xsl:if>			</xsl:template>						<xsl:template name="genSignonList">				<xsl:param name="test_using"/>				<xsl:param name="form-read-only" select="false()"/>								<utml:radio-group name="pageitem">					<utml:default-value>						<xsl:value-of select="/root/content/cm:queryResponse/cm:queryReply[1]/cm:dataSourceSignon[1]/cm:searchPath"/>					</utml:default-value>					<cf:main-pager-section form="pform" width="500">						<cf:param name="item-path">/root/content/cm:queryResponse/cm:queryReply[1]/cm:dataSourceSignon</cf:param>						<cf:param name="target">concat(concat($app,'/'),$mname)</cf:param>						<cf:param name="lines-per-page">							<xsl:value-of select="key('session-param', 'linesPerPage')"/>						</cf:param>                        <cf:param name="pagerSummary"><xts:string id="IDS_TEST_CONNECTION_SIGNON_SUMMARY"/></cf:param>						<cf:param name="rows">							<cp:tableHeader>								<cp:columnHeader width="16"/>								<cp:columnHeader width="20"/>																				<cp:columnHeader width="100%"><xts:string id="IDS_NAME"/></cp:columnHeader>							</cp:tableHeader>							<cp:tableContent>								<cp:columnContent>									<utml:input type="radio" name="pageitem">										<xsl:if test="$test_using='userid_password'">											<xsl:attribute name="disabled">true</xsl:attribute>										</xsl:if>                                        <xsl:attribute name="aria-label"><xts:string id="IDS_SELECTION_FOR_PAGER_ITEM"><xts:param name="pagerItemName"><xsl:value-of select="cm:defaultName"/></xts:param></xts:string></xsl:attribute>										<utml:value>											<xsl:value-of select="cm:searchPath"/>										</utml:value>									</utml:input>								</cp:columnContent>																					<cp:columnContent>									<xsl:call-template name="gen-icon"/>								</cp:columnContent>										<cp:columnContent>									<xsl:value-of select="cm:defaultName"/>								</cp:columnContent>																				</cp:tableContent>																	</cf:param>					</cf:main-pager-section>				</utml:radio-group>			</xsl:template>						<!--			Template that generates the namespace dropdown list			-->			<xsl:template name="externalNamespace">				<xsl:param name="form-read-only"/>				<xsl:param name="utml-form-name"/>				<utml:select name="m_p_test_credentialNamespaces" utml:track="true" onchange="javascript:toggleUserPassword()" id="ctrl_m_p_test_credentialNamespaces">					<utml:option>						<utml:value>							<xsl:value-of select="'none'"/>						</utml:value>						<xts:string id="IDS_SELECT_CONNECT_NO_AUTHENTICATION"/>					</utml:option>					<xsl:for-each select="/root/*[local-name()='namespaces']/*[local-name()='queryResponse']/*[local-name()='namespace']">						<xsl:if test="cm:active='true'">							<xsl:variable name="aNamespace">								<xsl:text/>								<xts:string id="IDS_DIRECTORY_NAMESPACE_ACTIVE">									<xts:param name="namespaceDefaultName"><xsl:value-of select="cm:defaultName"/></xts:param>								</xts:string>								<xsl:text/>							</xsl:variable>							<utml:option>								<utml:value>									<xsl:value-of select="cm:searchPath"/>								</utml:value>								<xsl:value-of select="$aNamespace"/>							</utml:option>						</xsl:if>					</xsl:for-each>				</utml:select>				</xsl:template>		</xsl:stylesheet>	</xts:block>	<!--	===============================================================================================	debug - display debug information	===============================================================================================	-->	<xts:block id="debug" dependency="render_page" condition=".[ /root/session/param[@name='debug'] = '1'  ]" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">		<xts:logicsheet path="logicsheets/debuglogic.xslt"/>		<!--  debug logic sheet -->		<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">			<xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>			<xsl:template match="/">				<dbg:dumpxml select="/root"/>			</xsl:template>		</xsl:stylesheet>	</xts:block>	</xts:morphlet>
 |