1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: AGS
- (C) Copyright IBM Corp. 2005, 2008
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Transform to create a string that contains global user capabilities specific to Event Studio. Each capability is delimited by a semi-colon
- Usage :
- <root>
- <effectiveCapabilities>
- <item>canUseContentStoreTool</item>
- </effectiveCapabilities>
- <globalCapabilities>
- <item>...</item>
- </globalCapabilities>
- </root>
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- exclude-result-prefixes="xsl xts">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/root">
- <capabilities>
- <xsl:call-template name="buildEffectiveCapString">
- <xsl:with-param name="items" select="./effectiveCapabilities/item"/>
- </xsl:call-template>
- <xsl:for-each select="./globalCapabilities/item">
- <!-- only copy if it's in the cache -->
- <xsl:variable name="cap"><xsl:value-of select="."/></xsl:variable>
- <!-- test this cap with what's in the users cache -->
- <xsl:if test="/root/*[local-name()='userCapabilities']/item[.=$cap]">
- <xsl:value-of select="$cap"/><xsl:text>;</xsl:text>
- </xsl:if>
- </xsl:for-each>
- </capabilities>
- </xsl:template>
- <xsl:template name="buildEffectiveCapString">
- <xsl:param name="items"/>
- <xsl:for-each select="$items">
- <xsl:value-of select="."/><xsl:text>;</xsl:text>
- </xsl:for-each>
- </xsl:template>
- </xsl:stylesheet>
|