123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2012, 2013
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:dpl="http://developer.cognos.com/schemas/xts/logicsheets/deployment/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- exclude-result-prefixes="xsl dpl pf cf cm xts xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no" />
- <xsl:variable name="the-object" select="/root/cm:queryResponse/cm:queryReply[1]/*" />
- <pf:variables/>
- <xsl:variable name="normalized-content-locale" select="translate( $contentLocale, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz' )" />
- <xsl:key name="archive-details" match="/root/*[local-name()='archiveOptions']/*[local-name()='getDeploymentOptionsResponse']/*[local-name()='deploymentOptions']/*[local-name()='deploymentOption' and @name='package']/*[local-name()='packageDeploymentInfo']" use="*[local-name()='archiveSearchPath']" />
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <deploymentOptionsSummary>
- <xsl:variable name="includesTenants" select="count($the-object/cm:deploymentOptions/*[@name = 'tenants']/*) > 0"/>
- <xsl:variable name="isImportDeployment" select="$the-object/cm:objectClass='importDeployment'"/>
- <xsl:variable name="isDataSourceSelect" select="$the-object/cm:deploymentOptions/*[@name='dataSourceSelect']='true'"/>
- <xsl:variable name="isNamespaceSelect" select="$the-object/cm:deploymentOptions/*[@name='namespaceSelect']='true'"/>
- <xsl:variable name="isRecipientsSelect" select="$the-object/cm:deploymentOptions/*[@name='recipientsSelect']='true'"/>
- <xsl:variable name="isPersonalDataSelect" select="$the-object/cm:deploymentOptions/*[@name='personalDataSelect']='true'"/>
-
- <xsl:choose>
- <xsl:when test="$the-object/cm:deploymentOptions/*[@name = 'entireContentStoreSelect'] = 'true' and not($includesTenants)">
- <optionSummaryItem name="entireContentStoreSelect">
- <xts:string id="IDS_DEPLOYMENT_SHORT_OPTIONS_SUMMARY_CONTENT_STORE" />
- </optionSummaryItem>
- <xsl:if test="$isPersonalDataSelect">
- <optionSummaryItem name="personalDataSelect" dent="1">
- <xts:string id="IDS_DEPLOYMENT_SHORT_OPTIONS_SUMMARY_USER_ACCOUNT" />
- </optionSummaryItem>
- </xsl:if>
- <optionSummaryItem name="configuration" dent="1">
- <xts:string id="IDS_DEPLOYMENT_SHORT_OPTIONS_SUMMARY_CONFIGURATION" />
- </optionSummaryItem>
- <optionSummaryItem name="directory" dent="1">
- <xts:string id="IDS_DEPLOYMENT_SHORT_OPTIONS_SUMMARY_DIRECTORY" />
- </optionSummaryItem>
- <optionSummaryItem name="publicFolders" dent="1">
- <xts:string id="IDS_ALL_FILES" />
- </optionSummaryItem>
- <optionSummaryItem name="catalog" dent="1">
- <xts:string id="IDS_DEPLOYMENT_SHORT_OPTIONS_SUMMARY_CATALOG" />
- </optionSummaryItem>
- </xsl:when>
- <xsl:when test="$includesTenants">
- <optionSummaryItem name="entireContentStoreSelect">
- <xts:string id="IDS_DEPLOYMENT_SHORT_OPTIONS_SUMMARY_CONTENT_STORE" />
- </optionSummaryItem>
- <xsl:if test="$the-object/cm:deploymentOptions/*[@name = 'tenants']/*[.='']">
- <optionSummaryItem name="publicContent" dent="1">
- <xts:string id="IDS_DEPLOYMENT_SHORT_OPTIONS_SUMMARY_PUBLIC_CONTENT" />
- </optionSummaryItem>
- </xsl:if>
- <xsl:if test="$isPersonalDataSelect">
- <optionSummaryItem name="personalDataSelect" dent="1">
- <xts:string id="IDS_DEPLOYMENT_SHORT_OPTIONS_SUMMARY_USER_ACCOUNT" />
- </optionSummaryItem>
- </xsl:if>
- <xsl:variable name="includedTenants" select="$the-object/cm:deploymentOptions/*[@name = 'tenants']/*[.!='']"/>
- <xsl:if test="count($includedTenants) > 0" >
- <optionSummaryItem name="tenantContent" dent="1">
- <xts:string id="IDS_DEPLOYMENT_SHORT_OPTIONS_SUMMARY_TENANTS" />
- </optionSummaryItem>
- <xsl:for-each select="$includedTenants">
- <optionSummaryItem name="selectedTenant" dent="2">
- <xsl:value-of select="."/>
- </optionSummaryItem>
- </xsl:for-each>
- </xsl:if>
- </xsl:when>
- <xsl:when test="$isNamespaceSelect or $isDataSourceSelect or $isRecipientsSelect or $the-object/cm:deploymentOptions/*[@name='package']/*">
- <optionSummaryItem name="entireContentStoreSelect">
- <xts:string id="IDS_DEPLOYMENT_SHORT_OPTIONS_SUMMARY_CONTENT_STORE" />
- </optionSummaryItem>
- <xsl:if test="($isDataSourceSelect or $isNamespaceSelect or $isRecipientsSelect)">
- <optionSummaryItem name="directory" dent="1">
- <xts:string id="IDS_DEPLOYMENT_SHORT_OPTIONS_SUMMARY_DIRECTORY" />
- </optionSummaryItem>
- <optionSummaryItem name="namespaceSelect" dent="2">
- <xts:string id="IDS_DEPLOYMENT_SHORT_OPTIONS_SUMMARY_COGNOS_NAMESPACE" />
- </optionSummaryItem>
- </xsl:if>
- <xsl:if test="$the-object/cm:deploymentOptions/*[@name = 'package']/*">
- <xsl:if test="not($isImportDeployment)">
- <xsl:if test="not($isDataSourceSelect or $isNamespaceSelect or $isRecipientsSelect)">
- <optionSummaryItem name="directory" dent="1">
- <xts:string id="IDS_DEPLOYMENT_SHORT_OPTIONS_SUMMARY_DIRECTORY" />
- </optionSummaryItem>
- </xsl:if>
- <xsl:for-each select="/root/exportPackages/cm:queryResponse/cm:queryReply">
- <xsl:if test="*/cm:objectClass='account' or */cm:objectClass='namespace' or */cm:objectClass='namespaceFolder'">
- <xsl:call-template name="optionsSummary"/>
- </xsl:if>
- </xsl:for-each>
- <optionSummaryItem name="publicFolders" dent="1">
- <xts:string id="IDS_ALL_FILES" />
- </optionSummaryItem>
- </xsl:if>
- <xsl:for-each select="/root/exportPackages/cm:queryResponse/cm:queryReply">
- <xsl:if test="not(*/cm:objectClass='account' or */cm:objectClass='namespace' or */cm:objectClass='namespaceFolder')">
- <xsl:call-template name="optionsSummary"/>
- </xsl:if>
- </xsl:for-each>
- <xsl:if test="/root/cm:queryResponse/cm:queryReply[1]/*[local-name()='importDeployment']">
- <xsl:for-each select="$the-object/*[local-name()='deploymentOptions']/*[local-name()='deploymentOption' and @name='package']/*[local-name()='packageDeploymentInfo']">
- <xsl:variable name="deploymentNode" select="*[local-name()='archiveSearchPath']" />
- <optionSummaryItem name="selectedContainerItem" dent="2" lang="{$contentLocale}">
- <xsl:choose>
- <xsl:when test="*">
- <img height="16" width="20" align="absmiddle" src="{$skin_images}path.gif">
- <xsl:attribute name="alt">
- <cf:do-the-path-link>
- <cf:param name="familytree">key('archive-details',$deploymentNode)/*[local-name()='sourceAncestorsInfo']</cf:param>
- <cf:param name="familymember">key('archive-details',$deploymentNode)/*[local-name()='sourceName']</cf:param>
- <cf:param name="onlyAncestors">true</cf:param>
- </cf:do-the-path-link>
- </xsl:attribute>
- </img>
- <xsl:text> </xsl:text>
- <xsl:value-of select="key('archive-details',$deploymentNode)/*[local-name()='defaultName']" />
- <xsl:text>  </xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_PROP_ENTRY_NOT_FOUND" />
- </xsl:otherwise>
- </xsl:choose>
- </optionSummaryItem>
- </xsl:for-each>
- </xsl:if>
- </xsl:if>
- </xsl:when>
- </xsl:choose>
- </deploymentOptionsSummary>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <xsl:template name="optionsSummary">
- <optionSummaryItem name="selectedContainerItem" dent="2" lang="{$contentLocale}">
- <xsl:choose>
- <xsl:when test="*">
- <img height="16" width="20" align="absmiddle" src="{$skin_images}path.gif">
- <xsl:attribute name="alt">
- <cf:do-the-path-link>
- <cf:param name="familytree">*/*[local-name()='ancestors']</cf:param>
- <cf:param name="familymember">*/cm:defaultName</cf:param>
- <cf:param name="onlyAncestors">true</cf:param>
- </cf:do-the-path-link>
- </xsl:attribute>
- </img>
- <xsl:text> </xsl:text>
- <xsl:value-of select="*/cm:defaultName" />
- <xsl:text>  </xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_PROP_ENTRY_NOT_FOUND" />
- </xsl:otherwise>
- </xsl:choose>
- </optionSummaryItem>
- </xsl:template>
- <dpl:getDefaultPackageName />
- </xsl:stylesheet>
|