1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ASV
- (C) Copyright IBM Corp. 2005, 2010
- 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:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:rdsad="http://developer.cognos.com/schemas/xts/rdsad/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xsl xtsext xts rdsad pf">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <!-- we're adding flag to say we've done this process once and for all -->
- <xts:append select="/root/env">
- <param name="m_subData_newsitem_options">true</param>
- </xts:append>
- <!-- have to check that we've got a newsItem headline -->
- <xsl:if test="not(/root/env/param[@name='m_subData_newsitem_headline'])">
- <xsl:variable name="reportName">
- <xsl:value-of select="/root/env/param[@name='m_subData_periodical_producer_defaultName']"/>
- </xsl:variable>
- <!-- -->
- <xsl:variable name="measureName">
- <xsl:value-of select="/root/env/param[@name='m_subData_measure_name']"/>
- </xsl:variable>
- <!-- -->
- <xsl:variable name="operator">
- <xsl:call-template name="conditionEnumShortValue">
- <xsl:with-param name="conditionEnum">
- <xsl:value-of select="/root/env/param[@name='m_sub_operation']"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <!-- -->
- <xsl:variable name="value1">
- <xsl:value-of select="/root/env/param[@name='m_sub_measure_value']"/>
- </xsl:variable>
- <!-- -->
- <xsl:variable name="value2">
- <xsl:value-of select="/root/env/param[@name='m_sub_measure_value1']"/>
- </xsl:variable>
- <xsl:variable name="newsItemHeadline">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='m_sub_type']='nonMetric' and /root/env/param[@name='m_sub_operation']='between' "><xts:string id="IDS_CUSTSUB_DEFAULT_SUBJECT2"><xts:param name="reportName"><xsl:value-of select="$reportName"/></xts:param><xts:param name="measureName"><xsl:value-of select="$measureName"/></xts:param><xts:param name="operator"><xsl:value-of select="$operator"/></xts:param><xts:param name="value1"><xsl:value-of select="$value1"/></xts:param><xts:param name="value2"><xsl:value-of select="$value2"/></xts:param></xts:string></xsl:when>
- <xsl:when test="/root/env/param[@name='m_sub_type']='nonMetric' and not(/root/env/param[@name='m_sub_operation']='between')"><xts:string id="IDS_CUSTSUB_DEFAULT_SUBJECT"><xts:param name="reportName"><xsl:value-of select="$reportName"/></xts:param><xts:param name="measureName"><xsl:value-of select="$measureName"/></xts:param><xts:param name="operator"><xsl:value-of select="$operator"/></xts:param><xts:param name="value1"><xsl:value-of select="$value1"/></xts:param></xts:string></xsl:when>
- <xsl:when test="/root/env/param[@name='m_sub_type']='metric' "><xts:string id="IDS_CUSTSUB_DEFAULT_SUBJECT_METRIC"><xts:param name="measureName"><xsl:value-of select="$measureName"/></xts:param></xts:string></xsl:when>
- </xsl:choose>
- </xsl:variable>
-
- <xts:append select="/root/env">
- <param name="m_subData_newsitem_headline">
- <xsl:value-of select="$newsItemHeadline"/>
- </param>
- <param name="m_subData_newsitem_taskName">
- <xsl:value-of select="$newsItemHeadline"/>
- </param>
- </xts:append>
- </xsl:if>
- <!-- have to check we've got a newsItem channel -->
- <xsl:if test="not(/root/env/param[@name='m_subData_newsitem_path']) or /root/env/param[@name='m_subData_newsitem_path']='' ">
- <!-- check to see if it's empty - perhaps the channel was deleted -->
- <xsl:if test="/root/env/param[@name='m_subData_newsitem_path']=''">
- <xts:delete select="/root/env/param[@name='m_subData_newsitem_path"/>
- </xsl:if>
- <xts:append select="/root/env">
- <param name="m_subData_newsitem_path">
- <xsl:choose>
- <!-- check to see if the periodical location is writeable - if so we put the newsitem there -->
- <xsl:when test="contains(/root/env/param[@name='m_subData_periodical_producer_parent_permissions'], 'write')">
- <!-- make it default to myfolders -->
- <xsl:value-of select="/root/env/param[@name='m_subData_periodical_producer_parent_searchPath']"/>
- </xsl:when>
- <!-- otherwise we put it in myfolders -->
- <xsl:otherwise>
- <!-- make it default to myfolders -->
- <xsl:value-of select="concat(/root/session/param[@name='e_hp'], '/folder')"/>
- </xsl:otherwise>
- </xsl:choose>
- </param>
- </xts:append>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- <rdsad:enumTemplates/>
- </xsl:stylesheet>
|