| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392 | <?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="canUseAdministrationPortal">	<!--	===============================================================================================	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"/>	<!--	================================================================================	Load object-specific property tabs map	================================================================================	-->	<xts:block id="getTabs" type="exec" mode="interpret" processor="XML" path="/portal/uiobjects_tabs.xml"/>	<!--	================================================================================	get_content	================================================================================	-->	<xts:block id="get_content" processor="XSLT" type="exec" mode="interpret" dependency="formlogic_init">		<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:template match="/">				<xts:sequence>					<xts:append>						<dataSource>							<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>												<xsl:value-of select="key('env-param','m_obj')"/>												<xsl:text>[permission("read")]</xsl:text>											</search>											<properties>												<property name="openConnectionCommands"/>												<property name="openSessionCommands"/>												<property name="closeConnectionCommands"/>												<property name="closeSessionCommands"/>												<property name="permissions"/>												<property name="capabilities"/>											</properties>											<options schemaInfo="true"/>										</query>									</xts:transform>								</send:request>							</xts:transform>						</dataSource>					</xts:append>					<!-- check the LWM packages -->					<xts:append>						<xts:transform src="transforms/fm/fm-params.xslt" processor="XSLT">							<send:request provider="metadataService" faultBlock="handleMetadataLWMRequestError">								<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="IsLWM">														<inputparams>															<param seq="1" type="i18nstring">																<value><xsl:value-of select="key('env-param','m_name')"/></value>															</param>														</inputparams>														<domchanges/>														<result success="t">															<outputparams/>														</result>													</action>												</transaction>											</mdprovider>										</xts:transform>									</request>								</md1:updateMetadata>							</send:request>						</xts:transform>					</xts:append>										<!-- get a connection so that we can determine the connection type -->					<xts:append>						<connection>							<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>												<xsl:value-of select="key('env-param','m_obj')"/>												<xsl:text>/dataSourceConnection</xsl:text>											</search>											<properties>												<property name="connectionString"/>											</properties>											<options schemaInfo="true"/>										</query>									</xts:transform>								</send:request>							</xts:transform>						</connection>					</xts:append>										<xts:delete select="/root/env/param[@name='pagerfromlistpager']"/>					<xts:delete select="/root/env/param[@name='pagertolistpager']"/>					<xts:delete select="/root/env/param[@name='pagerfrom_dlistpager']"/>					<xts:delete select="/root/env/param[@name='pagerto_dlistpager']"/>				</xts:sequence>			</xsl:template>		</xsl:stylesheet>	</xts:block>        <!--    ===============================================================================================    handleMetadataLWMRequestError - handle the error occurring when requesting LWM to metadata service    Do nothing for now    ===============================================================================================    -->    <xts:block id="handleMetadataLWMRequestError" type="fault">        <ignoreError/>    </xts:block>	<!--	===============================================================================================	getConfig - retrieve the configuration UI settings	===============================================================================================	-->	<xts:block id="process_command_blocks" dependency="get_content" type="exec" mode="interpret" processor="XSLT" path="portal/command_blocks.xml"/>	<!--	================================================================================	render_page	Render the HTML page.	================================================================================	-->	<xts:block id="render_page" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="process_command_blocks getTabs">		<!-- portal specific information -->		<xts:logicsheet path="logicsheets/portal.xsl"/>		<!-- get the presentation theme -->		<xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>		<xts:logicsheet path="logicsheets/presentation/dialog/connections.xslt"/>		<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/dialog/templates.xsl"/>		<xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>		<xts:logicsheet path="logicsheets/presentation/dialog/confirm.xslt"/>		<!-- apply the form logic -->		<xts:logicsheet path="logicsheets/formlogic.xslt"/>		<xts:logicsheet path="logicsheets/validation.xslt"/>		<xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>		<xsl:stylesheet version="1.0"			xmlns:xsl="http://www.w3.org/1999/XSL/Transform"			xmlns:dcx="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/connections/1/"			xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"			xmlns:pf="http://developer.cognos.com/schemas/xts/pf"			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:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"			xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"			xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"			xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"			xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"			xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"			exclude-result-prefixes="xsl cm cf cp pf df dp dc lyt dt utml xtsext">			<xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>			<!-- current file name -->			<xsl:variable name="mname" select="'properties_datasource.xts'"/>			<!-- add any theme variables -->			<pf:variables/>			<xsl:variable name="back-url" select="key('env-param','backURL')"/>			<xsl:variable name="object" select="/root/dataSource/cm:queryResponse/cm:dataSource"/>			<dcx:commandTemplate/>			<!-- start the output -->			<xsl:template match="/root">				<!-- get passed in parameters -->				<xsl:variable name="canWrite" select="contains($object/cm:permissions,'write')"/>				<xsl:variable name="canSetPolicy" select="contains($object/cm:permissions,'setPolicy')"/>				<xsl:variable name="showOKCancel" select="$canWrite or $canSetPolicy"/>				<xsl:variable name="dataSourceCapabilities" select="$object/cm:dataSourceCapabilities"/>				<xsl:variable name="allowsReporting" select="$dataSourceCapabilities/cm:capability[contains(., '#reporting')] != ''"/>				<xsl:variable name="allowsPersonalPackages" select="$dataSourceCapabilities/cm:capability[contains(., '#personalPackages')] != ''"/>				<xsl:variable name="allowsWebBasedModeling" select="$dataSourceCapabilities/cm:capability[contains(., '#webBasedModeling')] != ''"/>				<xsl:variable name="allowsPersonalData" select="$dataSourceCapabilities/cm:capability[contains(., '#lobData')] != ''"/>				<xsl:variable name="allowsRepository" select="$dataSourceCapabilities/cm:capability[contains(., '#repository')] != ''"/>				<xsl:variable name="allowsAtomContent" select="$dataSourceCapabilities/cm:capability[contains(., '#atomContentProvider')] != ''"/>				<xsl:variable name="isLWM" select="/root/theFMDataSource/*[local-name()='response']/*[local-name() = 'outputparams']/*[local-name() = 'param']/."/>				<xsl:variable name="connectionString" select="/root/*[local-name()='connection']/*[local-name()='queryResponse']/*[local-name() = 'dataSourceConnection']/*[local-name() = 'connectionString']/."/>				<xsl:variable name="browserTitle">					<xts:string id="IDS_PROPERTIES_TITLE">						<xts:param name="objectName"><span lang="{$contentLocale}"><xsl:value-of select="/root/env/param[@name='m_name']"/></span></xts:param>					</xts:string>				</xsl:variable>				<xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">				<dp:meta>					<!-- Standard meta tags -->					<pf:meta/>				</dp:meta>					<dp:script>						<!-- Help system -->						<pf:help context="HID_DATA_SOURCES"/>						<dt:selectDeselectAll/>						<xsl:if test="$canWrite">							<dc:confirm-cancel/>							<script language="javascript" src="{$webcontent}/{$app}/js/utilities.js"/>						</xsl:if>					</dp:script>						<utml:form name="pform" method="post" action="{$gateway}">						<utml:read-only>							<xsl:choose>								<xsl:when test="$canWrite">false</xsl:when>								<xsl:otherwise>true</xsl:otherwise>							</xsl:choose>						</utml:read-only>						<!--							this defines the form command operation to be performed when all the collected properties are submitted.							-->						<utml:input type="hidden" name="ifrmcmd" value="save" utml:update="false"/>						<xsl:if test="$allowsReporting">							<utml:input type="hidden" name="m_dscap" value="reporting"/>						</xsl:if>						<!-- dialog header -->						<dp:header useBackURL="not($showOKCancel)">							<!-- header titles-->							<dp:title><xsl:copy-of select="$browserTitle"/></dp:title>						</dp:header>						<!-- property tabs -->						<df:propertiesTabs select="connection">							<df:hasSetPolicy><xsl:value-of select="$canSetPolicy"/></df:hasSetPolicy>						</df:propertiesTabs>						<!-- description tabs -->						<dp:description>							<xts:string id="IDS_PROP_DATASOURCE_DESCRIPTION"/>						</dp:description>						<!-- command blocks section -->						<xsl:call-template name="dcx-commandTemplate">							<xsl:with-param name="form-read-only" select="$form-read-only"/>							<xsl:with-param name="utml-form-name" select="$utml-form-name"/>							<xsl:with-param name="canWrite" select="$canWrite"/>							<xsl:with-param name="dataSourceConnection" select="false()"/>							<xsl:with-param name="inWizard" select="false()"/>						</xsl:call-template>						<lyt:layout style="1" title="IDS_PROP_DATASOURCE_CAPABILITIES">							<lyt:section>								<dp:list>									<xsl:if test="$allowsRepository">										<dp:section dp:kbA11y="true">											<dp:text wrap="wrap" valign="top">												<xts:string id="IDS_PROP_REPOSITORY_CAPABILITY"/>											</dp:text>										</dp:section>									</xsl:if>									<xsl:if test="$allowsAtomContent">										<dp:section>											<dp:text wrap="wrap" valign="top">												<xts:string id="IDS_PROP_ATOM_CONTENT_CAPABILITY"/>											</dp:text>										</dp:section>									</xsl:if>									<xsl:if test="$allowsReporting or (not($allowsReporting) and not($allowsPersonalPackages) and not($allowsRepository) and not($allowsAtomContent))">										<dp:section dp:kbA11y="true">											<dp:text wrap="wrap" valign="top">												<xts:string id="IDS_PROP_REPORTING_CAPABILITY"/>											</dp:text>										</dp:section>									</xsl:if>									<xsl:if test="$allowsPersonalData">										<dp:section dp:kbA11y="true">											<dp:text wrap="wrap" valign="top">												<xts:string id="IDS_PROP_PERSONAL_DATA_CAPABILITY"/>											</dp:text>										</dp:section>									</xsl:if>								</dp:list>									<!-- personal packages capability --> 									<xsl:choose>									<xsl:when test="$isLWM = '1'">										<dp:choice width="100%">											<dp:section1>												<utml:input type="checkbox" name="m_dscap" value="personalPackages" utml:track="true" utml:default-condition="$allowsPersonalPackages"/>											</dp:section1>											<dp:section2>												<xts:string id="IDS_PROP_PERSONAL_PACKAGES_CAPABILITY"/>											</dp:section2>										</dp:choice>									</xsl:when>									<xsl:when test="$allowsPersonalPackages">										<dp:list width="100%">											<dp:section dp:kbA11y="true">												<dp:text wrap="wrap" valign="top">													<xts:string id="IDS_PROP_PERSONAL_PACKAGES_CAPABILITY"/>												</dp:text>											</dp:section>										</dp:list>										</xsl:when>								</xsl:choose>																<!-- check if connection string is for jdbc connections only -->								<xsl:variable name="supportsWebBasedModeling" select="/root/*[local-name()='connection']/*[local-name()='queryResponse']/*[local-name() = 'dataSourceConnection']/*[local-name() = 'connectionString'][contains(.,'jdbc:') or contains(.,';LOCAL;TMR;') or contains(.,';LOCAL;X8;') 									or contains(.,';LOCAL;M12;') or contains(.,';LOCAL;M14;') or contains(.,';LOCAL;M16;') or contains(.,';LOCAL;M17;')]"/>								<!-- web modeling capability-->								<xsl:choose>									<xsl:when test="count($supportsWebBasedModeling) > 0">										<dp:section1>											<utml:input type="checkbox" name="m_dscap" value="webBasedModeling" utml:track="true" utml:default-condition="$allowsWebBasedModeling"/>										</dp:section1>										<dp:section2>											<xts:string id="IDS_PROP_PERSONAL_WEB_BASED_MODELING_CAPABILITY"/>										</dp:section2>									</xsl:when>									<xsl:otherwise>										<dp:section1>											<xts:string id="IDS_PROP_PERSONAL_WEB_BASED_MODELING_INCAPABILE"/>										</dp:section1>									</xsl:otherwise>									</xsl:choose> 																							</lyt:section>						</lyt:layout>						<dp:footer>							<xsl:choose>								<xsl:when test="$showOKCancel">									<df:button df:id="IDS_OK" utml:validate="true" df:style="submit"/>									<xsl:choose>										<xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">											<df:button df:id="IDS_CANCEL" df:style="stack-down" onclick="{$dc-confirm-cancel}"/>										</xsl:when>										<xsl:otherwise>											<df:button df:id="IDS_CANCEL" df:style="back-url" onclick="{$dc-confirm-cancel}"/>										</xsl:otherwise>									</xsl:choose>								</xsl:when>								<xsl:otherwise>									<df:button df:id="IDS_CLOSE" df:style="back-url"/>								</xsl:otherwise>							</xsl:choose>						</dp:footer>					</utml:form>				</dp:page>			</xsl:template>			<xsl:template match="*[local-name()='messageString']">					<xsl:value-of select="xtsext:javascriptencode(string(.))"/><xsl:if test="string-length(normalize-space(.)) > 0">\n</xsl:if>			</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">		<!-- get the debug logic sheet -->		<xts:logicsheet path="logicsheets/debuglogic.xslt"/>		<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">			<xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>			<xsl:template match="/">				<dbg:dumpxml select="/root"/>			</xsl:template>		</xsl:stylesheet>	</xts:block></xts:morphlet>
 |