123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- BI and PM: qs
- (C) Copyright IBM Corp. 2001, 2017
- 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 resolverBase="prompting" xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/QSRVUITextPL.xml,messages/portal.xml,messages/portalRL.xml">
- <xts:block id="getMembers" mode="interpret" processor="XSLT" type="exec" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
- <xsl:variable name="authoringLocale">
- <xsl:choose>
- <xsl:when test="string(/root/env/param[@name='el'])!='' and string(/root/env/param[@name='el'])!='null'">
- <xsl:value-of select="/root/env/param[@name='el']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/env/param[@name='cl']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <xts:request asText="true" href="bus://dispatcher" protocol="BUS" soapAction="http://www.ibm.com/xmlns/prod/cognos/reportService/201404/.session" faultBlock="faultHandler" responseEnvelope="false" outputHeader="true">
- <SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <SOAP-ENV:Header>
- <bus:biBusHeader xsi:type="bus:biBusHeader" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <!-- We don't want to copy the tracking info in this case because we want a separate conversation for the metadata -->
- <xsl:apply-templates select="/root/header/bus:biBusHeader/*[local-name()!='tracking']"/>
- </bus:biBusHeader>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <runSpecification xmlns="http://developer.cognos.com/schemas/reportService/1">
- <bus:specification xsi:type="bus:reportServiceMetadataSpecification" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <bus:value xsi:type="bus:specification"><metadataRequest connection="<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='model']))"/>">
- <Metadata authoringLocale="<xsl:value-of select="$authoringLocale"/>" xml:lang="<xsl:value-of select="/root/env/param[@name='pl']"/>" start_at="<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='start_at']))"/>" Depth="<xsl:value-of select="/root/env/param[@name='depth']"/>" ResultStart="0" ResultCount="51">
- <Properties>
- <Property name="./folder"/>
- <Property name="./dimension"/>
- <Property name="./hierarchy"/>
- <Property name="./level"/>
- <Property name="./member"/>
- <Property name="./@_RootMembers"/>
- <Property name="*/@name"/>
- <Property name="*/@_path"/>
- <Property name="*/@_ref"/>
- <Property name="*/@memberUniqueName"/>
- <Property name="*/@memberCaption"/>
- <Property name="*/@parentCaption"/>
- <Property name="*/@levelUniqueName"/>
- <Property name="*/@hierarchyUniqueName"/>
- <Property name="*/@levelNumber"/>
- <Property name="*/@levelLabel"/>
- <Property name="*/@parentUniqueName"/>
- <Property name="*/@currencyCode"/>
- <Property name="*/@_IntrinsicPropertiesOff"/>
- <Property name="*/@parentChild"/></Properties>
- </Metadata>
- </metadataRequest>
- </bus:value>
- </bus:specification>
- <bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"/>
- <bus:options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <item xsi:type="bus:runOptionString">
- <bus:name xsi:type="bus:runOptionEnum">promptFormat</bus:name>
- <bus:value xsi:type="xsd:string">HTML</bus:value>
- </item>
- <item xsi:type="bus:runOptionBoolean">
- <bus:name xsi:type="bus:runOptionEnum">prompt</bus:name>
- <bus:value xsi:type="xsd:boolean">false</bus:value>
- </item>
- <item xsi:type="bus:asynchOptionInt">
- <bus:name xsi:type="bus:asynchOptionEnum">primaryWaitThreshold</bus:name>
- <bus:value xsi:type="xsd:int">0</bus:value>
- </item>
- </bus:options>
- </runSpecification>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <!-- used to copy the bus header stuff - see "apply-templates" above. -->
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="appendResponse" mode="interpret" processor="XSLT" type="exec" dependency="getMembers" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cm="http://developer.cognos.com/schemas/cm/1/" xmlns:SOAP-ENV="http://www.w3.org/2001/09/soap-envelope" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xos="http://developer.cognos.com/schemas/xts/output/">
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:append select="/root">
- <dimensions>
- <xsl:choose>
- <xsl:when test="contains(./*[local-name() = 'runSpecificationResponse']/bus:result/bus:details/item/bus:metadata, '<?xml')">
- <xsl:value-of select="substring-after(./*[local-name() = 'runSpecificationResponse']/bus:result/bus:details/item/bus:metadata, '?>')" disable-output-escaping="yes"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="./*[local-name() = 'runSpecificationResponse']/bus:result/bus:details/item/bus:metadata" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </dimensions>
- </xts:append>
- <xts:append select="/root">
- <RootMemberResponse/>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="getParent" dependency="appendResponse" condition=".[/*[local-name()='root']/*[local-name()='dimensions']/ResponseRoot/member and /*[local-name()='root']/*[local-name()='dimensions']/ResponseRoot/member/@parentUniqueName!='Null']" mode="interpret" processor="XSLT" type="exec" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
- <xsl:variable name="authoringLocale">
- <xsl:choose>
- <xsl:when test="string(/root/env/param[@name='el'])!='' and string(/root/env/param[@name='el'])!='null'">
- <xsl:value-of select="/root/env/param[@name='el']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/env/param[@name='cl']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <parentInfo>
- <xts:request asText="true" href="bus://dispatcher" protocol="BUS" soapAction="http://www.ibm.com/xmlns/prod/cognos/reportService/201404/.session" faultBlock="faultHandler" responseEnvelope="false" outputHeader="true">
- <SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <SOAP-ENV:Header>
- <bus:biBusHeader xsi:type="bus:biBusHeader" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <!-- We don't want to copy the tracking info in this case because we want a separate conversation for the metadata -->
- <xsl:apply-templates select="/root/header/bus:biBusHeader/*[local-name()!='tracking']"/>
- </bus:biBusHeader>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <runSpecification xmlns="http://developer.cognos.com/schemas/reportService/1">
- <bus:specification xsi:type="bus:reportServiceMetadataSpecification" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <bus:value xsi:type="bus:specification"><metadataRequest connection="<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='model']))"/>">
- <Metadata authoringLocale="<xsl:value-of select="$authoringLocale"/>" xml:lang="<xsl:value-of select="/root/env/param[@name='pl']"/>" start_at="<xsl:value-of select="xtsext:xmlencode(string(/*[local-name()='root']/*[local-name()='dimensions']/ResponseRoot/member/@parentUniqueName))"/>" Depth="<xsl:value-of select="/root/env/param[@name='depth']"/>" ResultStart="0" ResultCount="1">
- <Properties>
- <Property name="./folder"/>
- <Property name="./dimension"/>
- <Property name="./hierarchy"/>
- <Property name="./level"/>
- <Property name="./member"/>
- <Property name="./@_RootMembers"/>
- <Property name="*/@name"/>
- <Property name="*/@_path"/>
- <Property name="*/@_ref"/>
- <Property name="*/@memberUniqueName"/>
- <Property name="*/@memberCaption"/>
- <Property name="*/@parentCaption"/>
- <Property name="*/@levelUniqueName"/>
- <Property name="*/@hierarchyUniqueName"/>
- <Property name="*/@levelNumber"/>
- <Property name="*/@levelLabel"/>
- <Property name="*/@parentUniqueName"/>
- <Property name="*/@currencyCode"/>
- <Property name="*/@_IntrinsicPropertiesOff"/>
- <Property name="*/@parentChild"/></Properties>
- </Metadata>
- </metadataRequest>
- </bus:value>
- </bus:specification>
- <bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"/>
- <bus:options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <item xsi:type="bus:runOptionString">
- <bus:name xsi:type="bus:runOptionEnum">promptFormat</bus:name>
- <bus:value xsi:type="xsd:string">HTML</bus:value>
- </item>
- <item xsi:type="bus:runOptionBoolean">
- <bus:name xsi:type="bus:runOptionEnum">prompt</bus:name>
- <bus:value xsi:type="xsd:boolean">false</bus:value>
- </item>
- <item xsi:type="bus:asynchOptionInt">
- <bus:name xsi:type="bus:asynchOptionEnum">primaryWaitThreshold</bus:name>
- <bus:value xsi:type="xsd:int">0</bus:value>
- </item>
- </bus:options>
- </runSpecification>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </parentInfo>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <!-- used to copy the bus header stuff - see "apply-templates" above. -->
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="appendParent" condition=".[/root/*[local-name()='parentInfo']]" mode="interpret" processor="XSLT" type="exec" dependency="getParent" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cm="http://developer.cognos.com/schemas/cm/1/" xmlns:SOAP-ENV="http://www.w3.org/2001/09/soap-envelope" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xos="http://developer.cognos.com/schemas/xts/output/">
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:append select="/root">
- <parentMember>
- <xsl:choose>
- <xsl:when test="contains(./*[local-name()='parentInfo']/*[local-name() = 'runSpecificationResponse']/bus:result/bus:details/item/bus:metadata, '<?xml')">
- <xsl:value-of select="substring-after(./*[local-name()='parentInfo']/*[local-name() = 'runSpecificationResponse']/bus:result/bus:details/item/bus:metadata, '?>')" disable-output-escaping="yes"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="./*[local-name()='parentInfo']/*[local-name() = 'runSpecificationResponse']/bus:result/bus:details/item/bus:metadata" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </parentMember>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="format" type="exec" mode="output" processor="XSLT" mimeType="application/x-javascript" dependency="appendParent">
- <!-- get the debug logic sheet -->
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- apply the form logic -->
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" exclude-result-prefixes="xsl xts dbg xtsext bus pf">
- <xsl:output method="text" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <!-- start the output -->
- <xsl:template match="/root">
- var menuItemId = '<xsl:value-of select="/root/env/param[@name='menuItemId']"/>';
- var htmlMenuItem = document.getElementById(menuItemId);
- if(htmlMenuItem != null)
- {
- dimensionItem = htmlMenuItem.menuItem;
- if(typeof dimensionItem != "undefined" && dimensionItem != null)
- {
- var dropDownMenu = dimensionItem.getMenu();
- var dimBarItem;
- var dimBarItemDropDown;
- <!--dimBarItem = new CMenuItem(dropDownMenu, dimensionItem.getLabel(), 'slicer(\'<xsl:value-of select="./@hierarchyUniqueName"/>\',\'\', \'0\', \'\')', '',gMenuItemStyle, '<xsl:value-of select="$webRoot"/>', '<xsl:value-of select="$skin_root"/>');-->
- <xsl:choose>
- <xsl:when test="not(/*[local-name()='root']/*[local-name()='dimensions']/ResponseRoot/*/member) and not(/root/*[local-name()='parentMember'])">
- <!-- To avoid endless loop of server requests, remove the drop down menu -->
- dropDownMenu.remove();
- dimensionItem.m_menu = null;
- dimensionItem.m_menuType = '';
- </xsl:when>
- <xsl:otherwise>
- <xsl:for-each select="/*[local-name()='root']/*[local-name()='dimensions']/ResponseRoot/*/member">
- dimBarItem = new CMenuItem(dropDownMenu, '<xsl:value-of select="xtsext:javascriptencode(string(./@memberCaption))"/>', 'slicer(\'<xsl:value-of select="xtsext:javascriptencode(string(./@hierarchyUniqueName))"/>\',\'<xsl:value-of select="xtsext:javascriptencode(string(./@levelUniqueName))"/>\', \'<xsl:value-of select="./@levelNumber"/>\', \'<xsl:value-of select="xtsext:javascriptencode(string(./@_ref))"/>\',\'<xsl:value-of select="xtsext:javascriptencode(string(./@memberCaption))"/>\',\'<xsl:value-of select="/root/env/param[@name='dimIdx']"/>\')', '',gMenuItemStyle, '<xsl:value-of select="$webRoot"/>', '<xsl:value-of select="$skin_root"/>');
- dimBarItemDropDown = dimBarItem.createCascadedMenu(gDimbarStyle);
- var dimBarItemId<xsl:value-of select="position()-1"/><xsl:value-of select="/root/env/param[@name='uniqueId']"/> = dimBarItem.getId();
- dimBarItemDropDown.registerCallback(function test<xsl:value-of select="position()-1"/><xsl:value-of select="/root/env/param[@name='uniqueId']"/>(){loadDimBarItem(dimBarItemId<xsl:value-of select="position()-1"/><xsl:value-of select="/root/env/param[@name='uniqueId']"/>,'<xsl:value-of select="/root/env/param[@name='dimIdx']"/>','<xsl:value-of select="xtsext:javascriptencode(string(./@memberCaption))"/>','<xsl:value-of select="xtsext:javascriptencode(string(./@_ref))"/>');});
- </xsl:for-each>
- <xsl:if test="/root/*[local-name()='parentMember']">
- <xsl:if test="/*[local-name()='root']/*[local-name()='dimensions']/ResponseRoot/*/member">
- dropDownMenu.add(gMenuSeperator);
- </xsl:if>
- dimBarItem = new CMenuItem(dropDownMenu, '<xsl:value-of select="xtsext:javascriptencode(string(/root/*[local-name()='parentMember']/*/*[local-name()='member']/@memberCaption))"/>', 'slicer(\'<xsl:value-of select="xtsext:javascriptencode(string(/root/*[local-name()='parentMember']/*/*[local-name()='member']/@hierarchyUniqueName))"/>\',\'<xsl:value-of select="xtsext:javascriptencode(string(/root/*[local-name()='parentMember']/*/*[local-name()='member']/@levelUniqueName))"/>\', \'<xsl:value-of select="/root/*[local-name()='parentMember']/*/*[local-name()='member']/@levelNumber"/>\', \'<xsl:value-of select="xtsext:javascriptencode(string(/root/*[local-name()='parentMember']/*/*[local-name()='member']/@_ref))"/>\',\'<xsl:value-of select="xtsext:javascriptencode(string(/root/*[local-name()='parentMember']/*/*[local-name()='member']/@memberCaption))"/>\',\'<xsl:value-of select="/root/env/param[@name='dimIdx']"/>\')', '<xsl:value-of select="$webRoot"/>/common/images/tree/nav_up.gif',gMenuItemStyle, '<xsl:value-of select="$webRoot"/>', '<xsl:value-of select="$skin_root"/>');
- </xsl:if>
- dropDownMenu.draw();
- </xsl:otherwise>
- </xsl:choose>
- }
- }
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="faultHandler" type="fault" processor="XSLT">
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" exclude-result-prefixes="xsl">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xsl:choose>
- <xsl:when test="//*[local-name()='CAM']/*[local-name()='exception']//*[local-name()='promptInfo'] or contains(//*[local-name()='exception']/*[local-name()='message']/*[local-name()='messageString'], 'QE-DEF-0313')">
- <logonFault>timeout</logonFault>
- </xsl:when>
- <xsl:otherwise>
- <soapFault>
- <xsl:copy>
- <xsl:copy-of select="/root/fault"/>
- </xsl:copy>
- </soapFault>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="text()"/>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|