1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?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).
- -->
- <!--
- This is used to determine the type of content task we're dealing with based on the task's options.
- -->
- <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="cm:queryReply/*/*[local-name()='options']/*[local-name()='value']/*[local-name()='item']/*[local-name()='value']" use="../*[local-name()='name']"/>
- <xsl:template match="*[local-name()='queryResponse']" priority="1">
- <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>
- <param name="contentTaskType"><xsl:value-of select="$contentTaskType"/></param>
- </xsl:template>
- </xsl:stylesheet>
|