123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cogadmin
- (C) Copyright IBM Corp. 2005, 2012
- 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).
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" resolverBase="cogadmin">
- <xts:block id="frag_init" nodelist="env, credential" type="exec" mode="interpret" processor="XSLT" path="cogadmin/logicsheets/fragment_init.xslt" condition=".[not(/root/env/param[@name='frag-directive']='meta-only')]" mandatory="true"/>
- <xts:block id="getMeta" type="exec" mode="interpret" nodelist="env" processor="XSLT">
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:meta="http://developer.cognos.com/schemas/xts/cogadmin/logicsheet/meta"
- exclude-result-prefixes="xsl xts xos xtsext meta">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/output">
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-Type">text/xml; charset=utf-8</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <fragment>
- <meta:threshold/>
- </fragment>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="renderMarkup" dependency="frag_init getMeta" type="exec" processor="XSLT" mandatory="false" condition=".[ not(/root/env/param[@name = 'processRequest']) or (/root/env/param[@name = 'processRequest'] != 'true') ]">
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:ui="http://developer.cognos.com/schemas/ui/presentation/markup/"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- exclude-result-prefixes="xsl ui xos xtsext SOAP-ENV bus wsrf-rp">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/output/*[local-name()='part']/*[local-name()='entityBody']/fragment">
- <library type="text/javascript" href="$WEB$/ccl/helpDocs.js"/>
- <xts:append>
- <xsl:variable name="thresholdPropertyName" select="/root/env/param[@name = 'thresholdPropertyName']"/>
- <xsl:variable name="thresholdResourceID" select="/root/env/param[@name = 'thresholdResourceID']"/>
- <xsl:variable name="processRequest" select="/root/env/param[@name = '_THIS__processRequest']"/>
- <thresholds>
- <xts:request protocol="ReadThresholds">
- <SOAP-ENV:Envelope
- xmlns:nemo="http://developer.cognos.com/nemo"
- xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <SOAP-ENV:Header>
- <xsl:copy-of select="/root/header/bus:biBusHeader"/>
- <cogadminHeader>
- <ResourceIdentifier><xsl:value-of select="$thresholdResourceID"/></ResourceIdentifier>
- </cogadminHeader>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <resource-prop:ReadThresholds xmlns:resource-prop="http://developer.cognos.com/admin/properties">
- <resource-prop:ResourceProperty><xsl:value-of select="$thresholdPropertyName"/></resource-prop:ResourceProperty>
- </resource-prop:ReadThresholds>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </thresholds>
- </xts:append>
- <markup>
- <mimeType>text/html</mimeType>
- <markupXml>
- <!-- render the HTML -->
- <xts:transform src="/cogadmin/transforms/presentation/renderFragment.xslt" processor="XSLT">
- <xts:param name="messageBase">/messages/cogadminuimsgs.xml</xts:param>
- <xts:param name="logicsheet">/cogadmin/logicsheets/admin.xslt</xts:param>
- <root>
- <!-- Generate UI markup -->
- <xts:transform src="/cogadmin/controls/transforms/gen-ui-markup/threshold.xslt" processor="XSLT">
- <xts:param name="messageBase">/messages/cogadminuimsgs.xml</xts:param>
- <xts:param name="logicsheet">/cogadmin/logicsheets/presentation/common.xslt</xts:param>
- <xts:param name="logicsheet">/cogadmin/logicsheets/admin.xslt</xts:param>
- <root>
- <xts:queryNode select="/root/thresholds | /root/env | /root/metadata | /root/system | /root/user"/>
- <contentLocale>
- <xsl:value-of select="/root/user/param[@name='contentLocale']"/>
- </contentLocale>
- </root>
- </xts:transform>
- <xts:queryNode select="/root/thresholds | /root/system | /root/session | root/user"/>
- </root>
- </xts:transform>
- </markupXml>
- </markup>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="processRequest" dependency="frag_init" type="exec" processor="XSLT" mandatory="false" condition=".[ /root/env/param[@name = 'processRequest'] = 'true' ]">
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:ui="http://developer.cognos.com/schemas/ui/presentation/markup/"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- exclude-result-prefixes="xsl ui xos xtsext SOAP-ENV bus wsrf-rp">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/output/*[local-name()='part']/*[local-name()='entityBody']/fragment">
- <markup>
- <mimeType>text/html</mimeType>
- <markupXml>
- <root>
- <xsl:variable name="deleteThreshold" select="key('env-param', 'deleteThreshold')"/>
- <xsl:variable name="thresholdPropertyName" select="/root/env/param[@name = 'thresholdPropertyName']"/>
- <xsl:variable name="thresholdResourceID" select="/root/env/param[@name = 'thresholdResourceID']"/>
- <xsl:variable name="upperSidePoor" select="key('env-param', 'UpperSidePoor')"/>
- <xsl:variable name="upperSideAverage" select="key('env-param', 'UpperSideAverage')"/>
- <xsl:variable name="lowerSidePoor" select="key('env-param', 'LowerSidePoor')"/>
- <xsl:variable name="lowerSideAverage" select="key('env-param', 'LowerSideAverage')"/>
- <xsl:variable name="upperPoorExclusive" select="key('env-param', 'UpperPoorEx') = 'true'"/>
- <xsl:variable name="upperAverageExclusive" select="key('env-param', 'UpperAverageEx') = 'true'"/>
- <xsl:variable name="lowerPoorExclusive" select="key('env-param', 'LowerPoorEx') = 'true'"/>
- <xsl:variable name="lowerAverageExclusive" select="key('env-param', 'LowerAverageEx') = 'true'"/>
- <xsl:choose>
- <xsl:when test="$deleteThreshold = 'true'">
- <xsl:call-template name="clearThresholds">
- <xsl:with-param name="resourceID" select="$thresholdResourceID"/>
- <xsl:with-param name="propertyName" select="$thresholdPropertyName"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$deleteThreshold = '' or $deleteThreshold != 'true'">
- <xsl:call-template name="writeThresholds">
- <xsl:with-param name="resourceID" select="$thresholdResourceID"/>
- <xsl:with-param name="propertyName" select="$thresholdPropertyName"/>
- <xsl:with-param name="upperSidePoor" select="$upperSidePoor"/>
- <xsl:with-param name="upperSideAverage" select="$upperSideAverage"/>
- <xsl:with-param name="lowerSidePoor" select="$lowerSidePoor"/>
- <xsl:with-param name="lowerSideAverage" select="$lowerSideAverage"/>
- <xsl:with-param name="upperSidePoorExclusive" select="$upperPoorExclusive"/>
- <xsl:with-param name="upperSideAverageExclusive" select="$upperAverageExclusive"/>
- <xsl:with-param name="lowerSidePoorExclusive" select="$lowerPoorExclusive"/>
- <xsl:with-param name="lowerSideAverageExclusive" select="$lowerAverageExclusive"/>
- </xsl:call-template>
- </xsl:when>
- </xsl:choose>
- <xts:queryNode select="/root/env | /root/metadata | /root/system "/>
- <contentLocale>
- <xsl:value-of select="/root/user/param[@name='contentLocale']"/>
- </contentLocale>
- </root>
- </markupXml>
- </markup>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <xsl:template name="writeThresholds">
- <xsl:param name="resourceID" select="''"/>
- <xsl:param name="propertyName" select="''"/>
- <xsl:param name="upperSidePoor" select="''"/>
- <xsl:param name="upperSideAverage" select="''"/>
- <xsl:param name="lowerSidePoor" select="''"/>
- <xsl:param name="lowerSideAverage" select="''"/>
- <xsl:param name="upperSidePoorExclusive" select="'false'"/>
- <xsl:param name="upperSideAverageExclusive" select="'false'"/>
- <xsl:param name="lowerSidePoorExclusive" select="'false'"/>
- <xsl:param name="lowerSideAverageExclusive" select="'false'"/>
- <xts:request protocol="WriteThresholds">
- <SOAP-ENV:Envelope
- xmlns:nemo="http://developer.cognos.com/nemo"
- xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <SOAP-ENV:Header>
- <xsl:copy-of select="/root/header/bus:biBusHeader"/>
- <cogadminHeader xmlns="http://developer.cognos.com/nemo">
- <ResourceIdentifier><xsl:value-of select="$resourceID"/></ResourceIdentifier>
- </cogadminHeader>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <resource-prop:WriteThresholds xmlns:resource-prop="http://developer.cognos.com/admin/properties">
- <resource-prop:ResourceProperty><xsl:value-of select="$propertyName"/></resource-prop:ResourceProperty>
- <resource-prop:UpperSidePoor exclusive="{$upperSidePoorExclusive}"><xsl:value-of select="$upperSidePoor"/></resource-prop:UpperSidePoor>
- <resource-prop:UpperSideAverage exclusive="{$upperSideAverageExclusive}"><xsl:value-of select="$upperSideAverage"/></resource-prop:UpperSideAverage>
- <resource-prop:LowerSideAverage exclusive="{$lowerSideAverageExclusive}"><xsl:value-of select="$lowerSideAverage"/></resource-prop:LowerSideAverage>
- <resource-prop:LowerSidePoor exclusive="{$lowerSidePoorExclusive}"><xsl:value-of select="$lowerSidePoor"/></resource-prop:LowerSidePoor>
- </resource-prop:WriteThresholds>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </xsl:template>
- <xsl:template name="clearThresholds">
- <xsl:param name="resourceID" select="''"/>
- <xsl:param name="propertyName" select="''"/>
- <xts:request protocol="ClearThresholds">
- <SOAP-ENV:Envelope
- xmlns:nemo="http://developer.cognos.com/nemo"
- xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <SOAP-ENV:Header>
- <xsl:copy-of select="/root/header/bus:biBusHeader"/>
- <cogadminHeader xmlns="http://developer.cognos.com/nemo">
- <ResourceIdentifier><xsl:value-of select="$resourceID"/></ResourceIdentifier>
- </cogadminHeader>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <resource-prop:ClearThresholds xmlns:resource-prop="http://developer.cognos.com/admin/properties">
- <resource-prop:ResourceProperty><xsl:value-of select="$propertyName"/></resource-prop:ResourceProperty>
- </resource-prop:ClearThresholds>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|