1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cogadmin
- (C) Copyright IBM Corp. 2005, 2010
- 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 transform is no longer used by cogadmin, and will be removed in the next major release. We are leaving it in place now just in case any other components are making use of it.
- The replacement is 'templates/ps/cogadmin/logicsheets/uiobjects/uiobjects_runnables.xslt'.
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:nox="http://developer.cognos.com/schemas/navomx/1/"
- exclude-result-prefixes="xsl nox">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
- <xsl:key name="uiExtensions-class" match="/root/uiExtensions/nox:uiMetadata/nox:classes/nox:class" use="nox:name"/>
- <xsl:template match="/root">
- <runnables>
- <xsl:apply-templates select="runnables"/>
- </runnables>
- </xsl:template>
-
- <xsl:template match="class">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:copy-of select="*"/>
-
- <xsl:variable name="objectClass" select="@name"/>
- <xsl:variable name="baseIcon">
- <xsl:choose>
- <!--
- TODO: Fix this once we figure out how to get the baseClass for all our API's
- -->
- <xsl:when test="$objectClass = 'reportView'"><xsl:value-of select="key('uiExtensions-class', 'report')/nox:imgTool/nox:param[nox:name='icon']/nox:value"/></xsl:when>
- <xsl:when test="$objectClass = 'dataMovementTaskAlias'"><xsl:value-of select="key('uiExtensions-class', 'dataMovementTask')/nox:icon"/></xsl:when>
- <xsl:when test="$objectClass = 'powerPlay8ReportView'"><xsl:value-of select="key('uiExtensions-class', 'powerPlay8Report')/nox:imgTool/nox:param[nox:name='icon']/nox:value"/></xsl:when>
- <xsl:when test="$objectClass = 'agentDefinitionView'"><xsl:value-of select="key('uiExtensions-class', 'agentDefinition')/nox:imgTool/nox:param[nox:name='icon']/nox:value"/></xsl:when>
- <xsl:when test="key('uiExtensions-class', string($objectClass))/nox:icon != ''"><xsl:value-of select="key('uiExtensions-class', string($objectClass))/nox:icon"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="key('uiExtensions-class', string($objectClass))/nox:imgTool/nox:param[nox:name='icon']/nox:value"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="suffix">
- <xsl:value-of select="key('uiExtensions-class', string($objectClass))/nox:imgTool/nox:param[nox:name='suffix']/nox:value"/>
- </xsl:variable>
- <icon>
- <xsl:value-of select="concat('icon_',$baseIcon, $suffix,'.gif')"/>
- </icon>
- <root>
- <xsl:value-of select="key('uiExtensions-class', string($objectClass))/nox:root/nox:path"/>
- </root>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
|