123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- BI and PM: qs
- (C) Copyright IBM Corp. 2001, 2019
- 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" requiredCapability="canUseQueryStudio">
- <xts:block id="wait" mode="interpret" processor="XSLT" type="exec" condition=".[/root/env/param[@name='m_tracking'] and /root/env/param[@name='doWait']='1']" 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" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <response>
- <xts:request asText="true" href="bus://dispatcher" protocol="BUS" soapAction="http://www.ibm.com/xmlns/prod/cognos/reportService/201404/.absolute" faultBlock="faultHandler" responseEnvelope="true" 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">
- <bus:tracking>
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(key('env-param','m_tracking'))), true())" disable-output-escaping="yes"/>
- </bus:tracking>
- <!-- For bug 611371. Don't copy the dispatcherTransportVars since these are copied directly from
- the browser. This can cause permission problems due to a 'front' = 'true' variable signifying
- this as an external request, even though it's internal. -->
- <xsl:apply-templates select="/root/header/*[local-name() = 'biBusHeader']/*[local-name() != 'tracking' and local-name() != 'dispatcherTransportVars']"/>
- </bus:biBusHeader>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <xsl:element name="wait" namespace="http://developer.cognos.com/schemas/reportService/1">
- <bus:conversation xsi:type="bus:asynchRequest" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:nil="true"/>
- <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/"/>
- </xsl:element>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </response>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <!-- don't include superfluous fields in Envelope -->
- <xsl:template match="*[local-name()='formFieldVars']/item[name='inlineSpec' or name='conversation' or name='previousConversation' or name='cancelStack']"/>
- <!-- 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>
- <!--
- ===============================================================================================
- getOutput - Special case to handle complete.
- With complete, we just need to call getOutput to get the actual output, so do it here instead of bouncing through the browser .
- ===============================================================================================
- -->
- <xts:block id="getOutput" dependency="wait" type="exec" mode="interpret" processor="XSLT"
- condition=".[not(/root/env/param[@name = 'metadataTree']) and (/root/*[local-name()='response']/*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='waitResponse']/*/*[local-name()='details']/*[local-name()='item']/*[local-name()='status']='responseReady')]" mandatory="false" nodelist="header, env, response">
- <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:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- exclude-result-prefixes="xsl xts xos cm bus SOAP-ENV xsi send"
- >
- <xsl:output method="xml"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:append>
- <affinity>absolute</affinity>
- </xts:append>
- </xts:sequence>
- <xts:sequence>
- <xts:replace select="/root/response">
- <!-- replace the existing response -->
- <response>
- <xts:request href="bus://dispatcher" protocol="BUS" responseEnvelope="true" outputHeader="true" option="xml-multipart" soapAction="http://www.ibm.com/xmlns/prod/cognos/reportService/201404/.absolute" faultBlock="faultHandler">
- <SOAP-ENV:Envelope>
- <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">
- <xsl:if test="/root/env/param[@name='markup_track']!=''">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(key('env-param','markup_track'))), true())" disable-output-escaping="yes"/>
- </xsl:if>
- <!-- For bug 611371. Don't copy the dispatcherTransportVars since these are copied directly from
- the browser. This can cause permission problems due to a 'front' = 'true' variable signifying
- this as an external request, even though it's internal. -->
- <xsl:apply-templates select="/root/header/*[local-name() = 'biBusHeader']/*[local-name() != 'tracking' and local-name() != 'dispatcherTransportVars']"/>
- <xsl:if test="key('env-param','ui.routingServerGroup')!=''">
- <bus:routing>
- <routingServerGroup>
- <xsl:value-of select="key('env-param','ui.routingServerGroup')"/>
- </routingServerGroup>
- </bus:routing>
- </xsl:if>
- </bus:biBusHeader>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <xsl:element name="getOutput" namespace="http://developer.cognos.com/schemas/reportService/1">
- <bus:conversation xsi:type="bus:asynchRequest" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:nil="true"/>
- <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/"/>
- </xsl:element>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </response>
- </xts:replace>
- </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="appendTracking" mode="interpret" processor="XSLT" type="exec" condition=".[/root/env/param[@name='m_tracking']!='']" mandatory="false" nodelist="env">
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:cm="http://developer.cognos.com/schemas/cm/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl xts cm xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:append select="/root">
- <tracking xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(/root/env/param[@name='m_tracking'])), true())" disable-output-escaping="yes"/>
- </tracking>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="appendExecutionParameters" mode="interpret" processor="XSLT" type="exec" condition=".[/root/env/param[@name='executionParameters']!='']" mandatory="false" nodelist="env">
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:cm="http://developer.cognos.com/schemas/cm/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl xts cm xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:append select="/root">
- <executionParameters xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" 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">
- <xsl:choose>
- <xsl:when test="starts-with(/root/env/param[@name='executionParameters'], 'CAF')">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(/root/env/param[@name='executionParameters'])), true())" disable-output-escaping="yes"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="xtsext:web64decode(string(/root/env/param[@name='executionParameters']), true())" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </executionParameters>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!-- Release metadata conversation -->
- <xts:block id="releaseConversation" mode="interpret" processor="XSLT" type="exec" condition=".[/root/env/param[@name = 'qs_releaseConversation'] = 'true']" mandatory="false" nodelist="env, header">
- <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:output method="xml" version="1.0" encoding="UTF-8"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <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/.absolute" 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:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <SOAP-ENV:Header>
- <bus:biBusHeader xsi:type="bus:biBusHeader" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <xsl:if test="/root/env/param[@name='markup_track']!=''">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(key('env-param','markup_track'))), true())" disable-output-escaping="yes"/>
- </xsl:if>
- <xsl:if test="key('env-param','ui.routingServerGroup')!=''">
- <bus:routing>
- <routingServerGroup>
- <xsl:value-of select="key('env-param','ui.routingServerGroup')"/>
- </routingServerGroup>
- </bus:routing>
- </xsl:if>
- <xsl:apply-templates select="/root/header/*[local-name() = 'biBusHeader']/*[local-name() != 'tracking' and local-name() != 'dispatcherTransportVars']"/>
- </bus:biBusHeader>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <rs:release xmlns:rs="http://developer.cognos.com/schemas/reportService/1">
- <bus:conversation xsi:type="bus:asynchRequest" xsi:nil="true"/>
- </rs:release>
- </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="getContent" mode="interpret" processor="XSLT" type="exec" condition=".[not(/root/env/param[@name = 'metadataTree']) and not(/root/env/param[@name = 'qs_releaseConversation']) and
- (/root/response/*/*/*/*/*[local-name() = 'status'] != 'working' or
- /root/response/*/*/*/*/*[local-name() = 'status'] != 'stillWorking' or
- /root/response/*/*/*/*/*[local-name() = 'status'] != 'complete' or
- not(/root/env/param[@name = 'doWait']))]" mandatory="false" dependency="appendTracking appendExecutionParameters getOutput"
- nodelist="env,tracking,header,executionParameters"
- >
- <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="/root/env/param[@name='el']!=''">
- <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:variable name="getMembers">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='memberFolder']='true'">
- <xsl:text>true</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>false</xsl:text>
- </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">
- <xsl:if test="/root/env/param[@name='markup_track']!=''">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(key('env-param','markup_track'))), true())" disable-output-escaping="yes"/>
- </xsl:if>
- <!-- We don't want to copy the tracking info in this case because we want a separate conversation for the metadata -->
- <!-- For bug 611371. Don't copy the dispatcherTransportVars since these are copied directly from
- the browser. This can cause permission problems due to a 'front' = 'true' variable signifying
- this as an external request, even though it's internal. -->
- <xsl:apply-templates select="/root/header/*[local-name() = 'biBusHeader']/*[local-name() != 'tracking' and local-name() != 'dispatcherTransportVars']"/>
- <xsl:if test="key('env-param','ui.routingServerGroup')!=''">
- <bus:routing>
- <routingServerGroup>
- <xsl:value-of select="key('env-param','ui.routingServerGroup')"/>
- </routingServerGroup>
- </bus:routing>
- </xsl:if>
- </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">
- <xsl:choose>
- <xsl:when test="$getMembers='true'">
- <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='startAtPath']))"/>" 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="./hierarchyFolder"/>
- <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="*/@levelUniqueName"/>
- <Property name="*/@levelNumber"/>
- <Property name="*/@levelLabel"/>
- <Property name="*/@parentUniqueName"/>
- <Property name="*/@currencyCode"/>
- <Property name="*/@_IntrinsicPropertiesOff"/>
- <Property name="*/@parentChild"/></Properties>
- </Metadata>
- </metadataRequest>
- </bus:value>
- </xsl:when>
- <xsl:otherwise>
- <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='startAtPath']))"/>" Depth="<xsl:value-of select="/root/env/param[@name='depth']"/>" no_collections="1" _enumLabels="0" >
- <Properties>
- <Property name="*/@name"/>
- <Property name="*/@_path"/>
- <Property name="*/@_ref"/>
- <Property name="*/@isNamespace"/>
- <Property name="*/@screenTip"/>
- <Property name="*/@description"/>
- <Property name="*/@externalOrdinal"/>
- <Property name="./folder"/>
- <Property name="./measureFolder"/>
- <Property name="./querySubject"/>
- <Property name="./queryItem"/>
- <Property name="./queryItemFolder"/>
- <Property name="./filter"/>
- <Property name="./calculation"/>
- <Property name="*/@currency"/>
- <Property name="*/@datatype"/>
- <Property name="*/@usage"/>
- <Property name="*/@regularAggregate"/>
- <Property name="*/@promptType"/>
- <Property name="*/@promptFilterItemRef"/>
- <Property name="*/@promptUseItemRef"/>
- <Property name="*/@promptDisplayItemRef"/>
- <Property name="*/@promptCascadeOnRef"/>
- <Property name="*/@displayType"/>
- <Property name="*/@semiAggregate"/>
- <Property name="*/@sortOnRef"/>
- <Property name="*/@parentChild"/>
- <Property name="*/@calcType"/>
- <Property name="measure/@isHierarchical"/>
- <Property name="dimension/@type"/>
- <Property name="./dimension"/>
- <Property name="./hierarchy"/>
- <Property name="./hierarchyFolder"/>
- <Property name="./level"/>
- <Property name="./measure"/>
- <Property name="*/@_IntrinsicPropertiesOff"/>
- <Property name="measure/aggregateRule"/>
- <Property name="*/@applyAggregate"/>
- <Property name="*/@_effectivePromptInfo"/>
- </Properties>
- </Metadata>
- </metadataRequest>
- </bus:value>
- </xsl:otherwise>
- </xsl:choose>
- </bus:specification>
- <xsl:choose>
- <xsl:when test="key('env-param', 'metadataParameters') != ''">
- <bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <xsl:if test="string(/root/env/param[@name='metadataParameters'])!= 'null'">
- <xsl:value-of select="/root/env/param[@name='metadataParameters']" disable-output-escaping="yes"/>
- </xsl:if>
- <xsl:if test="/root/executionParameters != ''">
- <xsl:for-each select="/root/executionParameters/bus:parameters/*">
- <xsl:copy-of select="."/>
- </xsl:for-each>
- </xsl:if>
- </bus:parameterValues>
- </xsl:when>
- <xsl:when test="/root/executionParameters != ''">
- <bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <xsl:for-each select="/root/executionParameters/bus:parameters/*">
- <xsl:copy-of select="."/>
- </xsl:for-each>
- </bus:parameterValues>
- </xsl:when>
- <xsl:when test="key('env-param', 'parameterValues') != '' and contains(key('env-param', 'parameterValues'), 'item')">
- <xsl:value-of select="string(key('env-param', 'parameterValues'))" disable-output-escaping="yes"/>
- </xsl:when>
- <xsl:when test="key('env-param', 'promptValues') != ''">
- <bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <xsl:for-each select="/root/env/param[@name='promptValues']">
- <xsl:value-of select="." disable-output-escaping="yes"/>
- </xsl:for-each>
- </bus:parameterValues>
- </xsl:when>
- <xsl:otherwise>
- <bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"/>
- </xsl:otherwise>
- </xsl:choose>
- <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>
- </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="appendDocument" mode="interpret" processor="XSLT" type="exec" dependency="releaseConversation getContent getOutput" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <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">
- <xsl:variable name="markup-track">
- <xsl:apply-templates select="/root/output/*/*/*[local-name()='Header']/*[local-name()='biBusHeader']/*[local-name()='tracking']/*[local-name()='conversationContext']" mode="markup"/>
- </xsl:variable>
- <xts:sequence>
- <xts:delete select="/root/env/param[@name='m_tracking']"/>
- <xts:append select="/root/env">
- <param name="m_tracking">
- <xsl:value-of select="string($markup-track)"/>
- </param>
- </xts:append>
- <xsl:choose>
- <xsl:when test="key('env-param','metadataTree')">
- <xts:append select="/root">
- <metadataTree>
- <xsl:value-of select="substring-after(string(key('env-param','metadataTree')), '?>')" disable-output-escaping="yes"/>
- </metadataTree>
- </xts:append>
- </xsl:when>
- <xsl:when test="./*[local-name() = 'runSpecificationResponse']/bus:result/bus:details/item[@xsi:type='bus:asynchDetailReportStatus']/bus:status = 'prompting'">
- <xts:append select="/root/env">
- <param name="htmlFragment">
- <xsl:value-of select="./*[local-name() = 'runSpecificationResponse']/bus:result/bus:details/item[@xsi:type='bus:asynchDetailReportOutput']/bus:outputPages/item"/>
- </param>
- </xts:append>
- </xsl:when>
- <xsl:when test="./response/*/*[local-name()='Body']/*/*/*[local-name()='details']/item[@xsi:type='bus:asynchDetailReportStatus']/bus:status = 'prompting'">
- <xts:delete select="/root/env/param[@name='htmlFragment']"/>
- <xts:append select="/root/env">
- <param name="htmlFragment">
- <xsl:value-of select="./response/*/*[local-name()='Body']/*/*/*[local-name()='details']/item[@xsi:type='bus:asynchDetailReportOutput']/bus:outputPages/item"/>
- </param>
- </xts:append>
- </xsl:when>
- <xsl:otherwise>
- <xts:append select="/root">
- <xsl:variable name="metadata">
- <xsl:choose>
- <xsl:when test="./response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'waitResponse']">
- <xsl:choose>
- <xsl:when test="contains(./response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'waitResponse']/bus:result/bus:details/item/bus:metadata, '<?xml')">
- <xsl:value-of select="substring-after(./response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'waitResponse']/bus:result/bus:details/item/bus:metadata, '?>')" disable-output-escaping="yes"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="./response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'waitResponse']/bus:result/bus:details/item/bus:metadata" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <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>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- detect when we are in a wait state. There seems to be a bug where we can get a 'working' state even though we have the metadata info already -->
- <xsl:choose>
- <xsl:when test="
- $metadata='' and
- (contains(./*[local-name() = 'runSpecificationResponse']/bus:result/bus:status, 'working') or
- contains(./*[local-name() = 'runSpecificationResponse']/bus:result/bus:status, 'stillWorking') or
- contains(./response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'waitResponse']/bus:result/bus:status, 'stillWorking'))">
- <working>
- <xsl:value-of select="string($markup-track)"/>
- </working>
- </xsl:when>
-
- <!-- We can't just reuse $metadata above cause that's a string. We want the actual XML. So, in typical XTS style, we duplicate code! YAY! -->
- <xsl:when test="./response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'waitResponse']">
- <metadataTree>
- <xsl:choose>
- <xsl:when test="contains(./response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'waitResponse']/bus:result/bus:details/item/bus:metadata, '<?xml')">
- <xsl:value-of select="substring-after(./response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'waitResponse']/bus:result/bus:details/item/bus:metadata, '?>')" disable-output-escaping="yes"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="./response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'waitResponse']/bus:result/bus:details/item/bus:metadata" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </metadataTree>
- </xsl:when>
- <xsl:otherwise>
- <metadataTree>
- <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>
- </metadataTree>
- </xsl:otherwise>
- </xsl:choose>
- </xts:append>
- </xsl:otherwise>
- </xsl:choose>
- </xts:sequence>
- </xsl:template>
- <pf:serialize-xml/>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="addMemberFolder" mode="interpret" processor="XSLT" type="exec" dependency="appendDocument" condition=".[(/root/env/param[@name='showMetaExtensions']='1') and (not(/root/response/*/*/*/*/*[local-name() = 'status'] = 'working' or /root/response/*/*/*/*/*[local-name() = 'status'] = 'stillWorking')) and (/root/metadataTree/ResponseRoot or /root/soapFault)]" mandatory="false"
- nodelist="metadataTree, env"
- >
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:template match="/root">
- <xts:sequence>
- <xts:delete select="/root/*[local-name()='metadataTree']/*[local-name()='ResponseRoot']/*[local-name()='level' or local-name()='hierarchy' or local-name()='hierarchyFolder']"/>
- <xts:append select="/root/*[local-name()='metadataTree']/*[local-name()='ResponseRoot']">
- <xsl:for-each select="/root/*[local-name()='metadataTree']/*[local-name()='ResponseRoot']/*[local-name()='hierarchy' or local-name()='hierarchyFolder' or local-name()='level']">
- <xsl:element name="{name()}">
- <xsl:for-each select="@*">
- <xsl:attribute name="{name()}">
- <xsl:value-of select="."/>
- </xsl:attribute>
- </xsl:for-each>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='memberFolder']='true'">
- <xsl:copy-of select="./*[local-name()='member']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:element name="folder">
- <xsl:attribute name="_path"><xsl:value-of select="./@_path"/></xsl:attribute>
- <xsl:attribute name="_ref"><xsl:value-of select="./@_ref"/></xsl:attribute>
- <xsl:attribute name="name">Members</xsl:attribute>
- <xsl:attribute name="memberFolder">true</xsl:attribute>
- </xsl:element>
- <xsl:copy-of select="./*"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:element>
- </xsl:for-each>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="format" type="exec" mode="output" processor="XSLT" mimeType="application/xml" condition="(not(/root/response/*/*/*/*/*[local-name() = 'status'] = 'working' or /root/response/*/*/*/*/*[local-name() = 'status'] = 'stillWorking')) and (/root/metadataTree/ResponseRoot or /root/soapFault)" dependency="addMemberFolder">
- <!-- 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="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <!-- start the output -->
- <xsl:template match="/root">
- <xmlResponse>
- <xsl:choose>
- <xsl:when test="./metadataTree/ResponseRoot">
- <xsl:apply-templates select="./metadataTree/ResponseRoot"/>
- </xsl:when>
- <xsl:when test="./working">
- <xsl:variable name="passport">
- <!-- pull the passport out of the bus header -->
- <xsl:value-of select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
- </xsl:variable>
- <xsl:text/>working;<xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='contextNodeRef']))"/>;<xsl:value-of select="xtsext:javascriptencode(string(xtsext:cafaction(concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string(./working), true()))))"/>;<xsl:text/>
- <xsl:if test="key('env-param', 'depth')!=''">
- <xsl:value-of select="xtsext:javascriptencode(string(key('env-param','depth')))"/>
- </xsl:if>
- </xsl:when>
- <xsl:when test="./env/param[@name='htmlFragment']">
- <xsl:variable name="markup-conv">
- <xsl:choose>
- <xsl:when test="./*[local-name() = 'runSpecificationResponse']/bus:result/bus:primaryRequest">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="./*[local-name() = 'runSpecificationResponse']/bus:result/bus:primaryRequest/*"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="./*[local-name()='response']/*/*[local-name()='Body']/*/bus:result/bus:primaryRequest/*"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:text/>prompting;<xsl:text/>
- <xsl:text/><xsl:value-of select="xtsext:javascriptencode(string($gateway))"/>;<xsl:text/>
- <xsl:text/><xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='contextNodeRef']))"/>;<xsl:text/>
- <xsl:text/><xsl:value-of select="xtsext:javascriptencode(string(xtsext:cafaction(concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($markup-conv), true()))))"/>;<xsl:text/>
- <xsl:text/><xsl:value-of select="xtsext:javascriptencode(string(xtsext:cafaction(concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string(/root/env/param[@name='m_tracking']), true()))))"/>;<xsl:text/>
- <xsl:text/><xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='htmlFragment']))"/><xsl:text/>
- </xsl:when>
- <xsl:otherwise/>
- </xsl:choose>
- <xsl:apply-templates select="./logonFault"/>
- <xsl:apply-templates select="./soapFault"/>
- </xmlResponse>
- </xsl:template>
- <xsl:template match="/root/metadataTree/ResponseRoot">
- <xsl:text/><xsl:value-of select="xtsext:javascriptencode(string(xtsext:cafaction(concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string(/root/env/param[@name='m_tracking']), true()))))"/>;<xsl:text/>
- <xsl:text/><xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="/root/env/param[@name='contextNodeRef']"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:text/>;<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="/root/metadataTree/ResponseRoot/package/@name"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:text/>;<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="/root/metadataTree/ResponseRoot/package/@screenTip"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:variable name="depth">0</xsl:variable>
- <xsl:for-each select="./folder | ./querySubject | ./queryItemFolder | ./dimension | ./hierarchy | ./level | ./member | ./measure | ./measureFolder | ./hierarchyFolder">
- <xsl:variable name="parent"><xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="@_path"/>
- </xsl:with-param>
- </xsl:call-template></xsl:variable>
- <xsl:variable name="parentRefExpression">
- <xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="@_ref"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="name()='dimension' and count(./hierarchy)=1 and count(*)=1 and (not(./hierarchy[@parentChild]) or ./hierarchy[@parentChild!='1'])">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='depth']='2'">resubmitSingleHierarchy;<xsl:text/><xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="./hierarchy/@_path"/>
- </xsl:with-param>
- </xsl:call-template>;<xsl:text/><xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="./hierarchy/@name"/>
- </xsl:with-param>
- </xsl:call-template>;<xsl:text/><xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="./hierarchy/@_ref"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/></xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="buildTreeItemResponseString">
- <xsl:with-param name="node" select="./hierarchy"/>
- <xsl:with-param name="parent" select="$parent"/>
- <xsl:with-param name="depth" select="$depth"/>
- <xsl:with-param name="parentRefExpression" select="$parentRefExpression"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="buildTreeItemResponseString">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="parent" select="$parent"/>
- <xsl:with-param name="depth" select="$depth"/>
- <xsl:with-param name="parentRefExpression" select="$parentRefExpression"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:template>
- <xsl:template match="/root/logonFault">
- <xsl:text/>FAULT;timeout<xsl:text/>
- </xsl:template>
- <xsl:template match="/root/soapFault">
- <xsl:text/>FAULT<xsl:text/>
- <xsl:choose>
- <xsl:when test=".//bus:message">
- <xsl:for-each select=".//bus:message">
- <xsl:text/>;<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="./*[local-name() = 'messageString']"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="markup">
- <xsl:text/><xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="."/>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- </xsl:variable>
- <xsl:text/>;<xsl:value-of select="$markup"/><xsl:text/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="commaAndSemicolonEncode">
- <xsl:param name="strVal"/>
- <xsl:choose>
- <xsl:when test="contains($strVal, ',')">
- <xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal" select="substring-before($strVal, ',')"/>
- </xsl:call-template>&comma<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal" select="substring-after($strVal, ',')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($strVal, ';')">
- <xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal" select="substring-before($strVal, ';')"/>
- </xsl:call-template>&semicolon<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal" select="substring-after($strVal, ';')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="xtsext:javascriptencode(string($strVal))"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="buildTreeItemResponseString">
- <xsl:param name="node"/>
- <xsl:param name="parent"/>
- <xsl:param name="depth"/>
- <xsl:param name="parentRefExpression"/>
- <xsl:for-each select="$node/*">
- <xsl:variable name="path">
- <xsl:if test="name()='member'">children(</xsl:if>
- <xsl:value-of select="@_path"/>
- <xsl:if test="name()='member'">)</xsl:if>
- </xsl:variable>
- <xsl:variable name="ref">
- <xsl:if test="name()='member'">children(</xsl:if>
- <xsl:value-of select="@_ref"/>
- <xsl:if test="name()='member'">)</xsl:if>
- </xsl:variable>
- <xsl:text/>;<xsl:text/>
- <xsl:if test="position()=1">
- <xsl:text/>firstChild<xsl:text/>
- </xsl:if>
- <xsl:if test="position()=last()">
- <xsl:text/>lastChild<xsl:text/>
- </xsl:if>
- <xsl:if test="not((position()=1) or (position()=last()))">
- <xsl:text/>child<xsl:text/>
- </xsl:if>
- <xsl:text/><xsl:value-of select="xtsext:javascriptencode(string($depth))"/>,<xsl:text/>
- <xsl:choose>
- <xsl:when test="@isNamespace='1' and name()='folder'">
- <xsl:text/><xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">namespace</xsl:with-param>
- </xsl:call-template><xsl:text/>
- </xsl:when>
- <xsl:when test="@isHierarchical='1'">
- <xsl:text/><xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">rollupMeasure</xsl:with-param>
- </xsl:call-template><xsl:text/>
- </xsl:when>
- <xsl:when test="@type='3' or @type='measure'">
- <xsl:text/><xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">measureDimension</xsl:with-param>
- </xsl:call-template><xsl:text/>
- </xsl:when>
- <xsl:when test="@calcType='1'">
- <xsl:text/><xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">namedSet</xsl:with-param>
- </xsl:call-template><xsl:text/>
- </xsl:when>
- <xsl:when test="@calcType='2'">
- <xsl:text/><xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">calculationConstant</xsl:with-param>
- </xsl:call-template><xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text/><xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="name()"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:choose>
- <xsl:when test="name()='member'">
- <xsl:value-of select="@memberCaption"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@name"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="@screenTip"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="@_path"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="$ref"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:if test="not(name()='folder' or name()='querySubject' or name()='queryItemFolder' or name()='filter' or name()='dimension' or name()='hierarchy' or name()='hierarchyFolder')">
- <xsl:call-template name="buildQueryItemResponseString">
- <xsl:with-param name="node" select="."/>
- </xsl:call-template>
- </xsl:if>
- <xsl:text/>,<xsl:value-of select="xtsext:javascriptencode(string($parent))"/><xsl:text/>
- <xsl:text/>,<xsl:value-of select="xtsext:javascriptencode(string($parentRefExpression))"/><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="@description"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:if test="(name()='hierarchy' or name()='hierarchyFolder') and @parentChild='1'">
- <xsl:text/>,parentChild<xsl:text/>
- </xsl:if>
- <xsl:if test="/root/env/param[@name='processRecursion']='1'">
- <xsl:choose>
- <xsl:when test="name()='dimension' and count(./hierarchy)=1 and (not(./hierarchy[@parentChild]) or ./hierarchy[@parentChild!='1'])">
- <xsl:call-template name="buildTreeItemResponseString">
- <xsl:with-param name="node" select="./hierarchy"/>
- <xsl:with-param name="parent" select="$node"/>
- <xsl:with-param name="depth" select="$depth + 1"/>
- <xsl:with-param name="parentRefExpression" select="$parentRefExpression"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="buildTreeItemResponseString">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="parent" select="$node"/>
- <xsl:with-param name="depth" select="$depth + 1"/>
- <xsl:with-param name="parentRefExpression" select="$parentRefExpression"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </xsl:for-each>
- </xsl:template>
- <xsl:template name="buildQueryItemResponseString">
- <xsl:param name="node"/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="$node/@datatype"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="$node/@usage"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="$node/@regularAggregate"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:choose>
- <!--
- Bug 540435
- Use the first aggregateRule applyAggregate attribute (defined in WO939)
- instead of using the deprecated semiAggregate attribute
- -->
- <xsl:when test="$node/aggregateRule/@applyAggregate"><xsl:value-of select="$node/aggregateRule/@applyAggregate"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="$node/@semiAggregate"/></xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="$node/@promptType"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="$node/@displayType"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="$node/@sortOnRef"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="$node/@promptCascadeOnRef"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="$node/@promptFilterItemRef"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:choose>
- <xsl:when test="name($node)='member'">
- <xsl:value-of select="$node/@levelNumber"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="position()-1"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="$node/@currency"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="$node/@promptUseItemRef"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="$node/@promptDisplayItemRef"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- </xsl:template>
- <pf:serialize-xml/>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="faultHandler" path="qs/logicsheets/faultHandlerMetadata.xsl" type="fault" processor="XSLT"/>
- </xts:morphlet>
|