123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2013
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <!--
- NOTE: The logic to determine the order of the queries MUST match the logic found in dt:generateInitialUIHelpers
- if checkUIHelpers is true, then only build the CM query if the associated UIHelper is empty.
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:set="http://exslt.org/sets"
- exclude-result-prefixes="xsl cm set">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:key name="option-value" match="/root/*[local-name()='options']/*[local-name()='value']/*[local-name()='item']/*[local-name()='value']" use="../*[local-name()='name']"/>
- <xsl:template match="*[local-name()='root']" priority="1">
- <xsl:variable name="contextSearchPaths" select="set:distinct(/root/*[local-name()='options']/*[local-name()='value']/*[local-name()='item' and (./*[local-name()='name']='upgradeClassesContext' or ./*[local-name()='name']='upgradeClassesReferenceContext' or ./*[local-name()='name']='cleanupContentContext')]/*[local-name()='value']/*[local-name()='item'])"/>
- <xsl:variable name="isCleanupContentVarient" select="key('option-value','cleanupContent')='true'"/>
- <xsl:variable name="willNotWriteToRepository" select="key('option-value','cleanupContentDoNotWriteToRepository')='true'"/>
- <xsl:variable name="willUpdateContextObjects" select="key('option-value','cleanupContentUpdateContextObjects') = 'true'"/>
- <xsl:variable name="isConsistencyCheck" select="key('option-value','checkSecurityReferences') = 'true' or key('option-value','repairSecurityReferences') = 'true' or key('option-value','checkInternalInconsistencies') = 'true' or key('option-value','repairInternalInconsistencies') = 'true'"/>
- <xsl:variable name="contentTaskType">
- <xsl:choose>
- <xsl:when test="$isConsistencyCheck">consistency</xsl:when>
- <xsl:when test="key('option-value', 'upgradeClasses')">reportUpgrade</xsl:when>
- <xsl:when test="$isCleanupContentVarient and $willUpdateContextObjects and $willNotWriteToRepository">retentionRuleUpdate</xsl:when>
- <xsl:when test="$isCleanupContentVarient and not($willNotWriteToRepository) and not($willUpdateContextObjects)">contentArchival</xsl:when>
- <xsl:when test="$isCleanupContentVarient and $willNotWriteToRepository and not($willUpdateContextObjects)">contentRemoval</xsl:when>
- <xsl:when test="key('option-value','createContentStoreUtilizationInfo')!=''">createContentUtilizationInfo</xsl:when>
- <xsl:otherwise>unknown</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:choose>
- <!-- reportUpgrade -->
- <xsl:when test="$contentTaskType='reportUpgrade'">
- <env>
- <param name="contentTaskType">reportUpgrade</param>
- <!-- upgradeClassesContext -->
- <xsl:for-each select="key('option-value','upgradeClassesContext')/*[local-name()='item']">
- <param name="ctro_checkbox_upgradeClassesContext">
- <xsl:value-of select="."/>
- </param>
- </xsl:for-each>
- <!-- upgradeClassesReferenceContext -->
- <xsl:for-each select="key('option-value', 'upgradeClassesReferenceContext')/*[local-name()='item']">
- <param name="ctro_checkbox_upgradeClassesReferenceContext">
- <xsl:value-of select="."/>
- </param>
- </xsl:for-each>
- </env>
- </xsl:when>
- <xsl:otherwise>
- <env>
- <param name="contentTaskType"><xsl:value-of select="$contentTaskType"/></param>
- </env>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:for-each select="$contextSearchPaths">
- <cm:query>
- <cm:search><xsl:value-of select="."/></cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="searchPath"/>
- <cm:property name="searchPathForURL"/>
- <cm:property name="storeID"/>
- <cm:property name="userInterfaces"/>
- <cm:property name="ancestors"/>
- <cm:property name="hidden"/>
- </cm:properties>
- </cm:query>
- </xsl:for-each>
- <xsl:if test="$contentTaskType='createContentUtilizationInfo'">
- <cm:query>
- <cm:search>/directory/tenants[@name='Tenants']/*</cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="tenantID"/>
- </cm:properties>
- </cm:query>
- </xsl:if>
- </xsl:template>
-
- <xsl:template match="text()" priority="0"/>
- </xsl:stylesheet>
|