123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- +===================================================================+
- | Licensed Materials - Property of IBM
- | BI and PM: prmt
- | (C) Copyright IBM Corp. 2002, 2011
- |
- | 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:sl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/prmt/soaplogic/"
- xmlns:out="dummy-uri"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- 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:xsi="http://www.w3.org/2001/XMLSchema-instance"
- exclude-result-prefixes="xsl sl xtsext xts">
- <xsl:output method="xml" encoding="UTF-8" indent="no"/>
- <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
- <xsl:template match="sl:soaplogic">
- <out:template name="SetParameters">
- <parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]">
- <out:if test="/root/PromptValues/PromptValue">
- <out:call-template name="generateParameters"/>
- </out:if>
- <out:if test="/root/*[local-name()='additionalParamValues']">
- <out:copy-of select="/root/*[local-name()='additionalParamValues']/*/*"/>
- </out:if>
- </parameterValues>
- </out:template>
- <out:template name="generateParameters">
- <out:for-each select="/root/PromptValues/PromptValue[not(./@name=preceding-sibling::PromptValue/@name)]">
- <item xsi:type="bus:parameterValue">
- <out:variable name="name" select="@name"/>
- <bus:name xsi:type="xsd:string"><out:value-of select="$name"/></bus:name>
- <out:choose>
- <out:when test="count(./selectChoices/*) > 0">
- <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[]">
- <out:call-template name="do-prompt-item"/>
- <out:for-each select="following-sibling::PromptValue[@name = $name]">
- <out:call-template name="do-prompt-item"/>
- </out:for-each>
- </bus:value>
- </out:when>
- <out:when test="not(./selectChoices)">
- <out:call-template name="do-simple-prompt-item"/>
- <out:for-each select="following-sibling::PromptValue[@name = $name]">
- <out:call-template name="do-simple-prompt-item"/>
- </out:for-each>
- </out:when>
- </out:choose>
- </item>
- </out:for-each>
- </out:template>
- <out:template name="do-simple-prompt-item">
- <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[]">
- <item xsi:type="bus:simpleParmValueItem">
- <out:call-template name="do-prompt-item-value">
- <out:with-param name="item" select="."/>
- </out:call-template>
- </item>
- </bus:value>
- </out:template>
- <out:template name="do-prompt-item">
- <out:for-each select="./selectChoices/selectOption">
- <item xsi:type="bus:simpleParmValueItem">
- <out:call-template name="do-prompt-item-value">
- <out:with-param name="item" select="."/>
- </out:call-template>
- </item>
- </out:for-each>
- <out:for-each select="./selectChoices/selectBoundRange">
- <item xsi:type="bus:boundRangeParmValueItem">
- <bus:inclusive xsi:type="xsd:boolean">true</bus:inclusive>
- <bus:start xsi:type="bus:simpleParmValueItem">
- <out:call-template name="do-prompt-item-value">
- <out:with-param name="item" select="./start"/>
- </out:call-template>
- </bus:start>
- <bus:end xsi:type="bus:simpleParmValueItem">
- <out:call-template name="do-prompt-item-value">
- <out:with-param name="item" select="./end"/>
- </out:call-template>
- </bus:end>
- </item>
- </out:for-each>
- <out:for-each select="./selectChoices/selectUnboundedEndRange">
- <item xsi:type="bus:unboundedEndRangeParmValueItem">
- <bus:inclusive xsi:type="xsd:boolean">true</bus:inclusive>
- <bus:start xsi:type="bus:simpleParmValueItem">
- <out:call-template name="do-prompt-item-value">
- <out:with-param name="item" select="./start"/>
- </out:call-template>
- </bus:start>
- </item>
- </out:for-each>
- <out:for-each select="./selectChoices/selectUnboundedStartRange">
- <item xsi:type="bus:unboundedStartRangeParmValueItem">
- <bus:inclusive xsi:type="xsd:boolean">true</bus:inclusive>
- <bus:end xsi:type="bus:simpleParmValueItem">
- <out:call-template name="do-prompt-item-value">
- <out:with-param name="item" select="./end"/>
- </out:call-template>
- </bus:end>
- </item>
- </out:for-each>
- <out:for-each select="./selectChoices/selectTreeOption">
- <out:call-template name="SP_selectTreeOption"/>
- </out:for-each>
- </out:template>
- <out:template name="do-prompt-item-value">
- <out:param name="item"/>
- <out:choose>
- <out:when test="$item/@useValue">
- <bus:inclusive xsi:type="xsd:boolean">true</bus:inclusive>
- <bus:display xsi:type="xsd:string"><out:value-of select="$item/@displayValue"/></bus:display>
- <bus:use xsi:type="xsd:string"><out:value-of select="$item/@useValue"/></bus:use>
- </out:when>
- <out:when test="$item/@nullUse">
- <bus:inclusive xsi:type="xsd:boolean">true</bus:inclusive>
- <bus:use xsi:type="xsd:string" xsi:nil="true"/>
- <out:choose>
- <out:when test="$item/@displayValue">
- <bus:display xsi:type="xsd:string">
- <out:value-of select="$item/@displayValue"/>
- </bus:display>
- </out:when>
- <out:otherwise>
- <bus:display xsi:type="xsd:string" xsi:nil="true"/>
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:when test="not($item='')">
- <bus:inclusive xsi:type="xsd:boolean">true</bus:inclusive>
- <bus:display xsi:type="xsd:string"><out:value-of select="$item"/></bus:display>
- <bus:use xsi:type="xsd:string"><out:value-of select="$item"/></bus:use>
- </out:when>
- <out:otherwise>
- <out:attribute name="xsi:nil">true</out:attribute>
- <out:attribute name="xsi:type"></out:attribute>
- </out:otherwise>
- </out:choose>
- </out:template>
- <out:template name="SP_selectTreeOption">
- <item xsi:type="bus:hierarchicalParmValueItem">
- <bus:inclusive xsi:type="xsd:boolean">true</bus:inclusive>
- <value xsi:type="bus:simpleParmValueItem">
- <out:call-template name="do-prompt-item-value">
- <out:with-param name="item" select="."/>
- </out:call-template>
- </value>
- <out:choose>
- <out:when test="./selectTreeOption">
- <subNodes xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:hierarchicalParmValueItem[]" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <out:for-each select="./selectTreeOption">
- <out:call-template name="SP_selectTreeOption"/>
- </out:for-each>
- </subNodes>
- </out:when>
- <out:otherwise>
- <subNodes xsi:nil="true"/>
- </out:otherwise>
- </out:choose>
- </item>
- </out:template>
- <out:template name="SetOptions">
- <out:variable name="user-format" select="/root/header/bus:biBusHeader/*[local-name() = 'userPreferenceVars']/item[name='format']/value"/>
- <out:variable name="execution-format" select="/root/source/cm:queryResponse/*/cm:executionFormat"/>
- <out:variable name="outputFormat">
- <out:choose>
- <out:when test="key('env-param', 'run.outputFormat') != ''">
- <out:choose>
- <out:when test="contains(key('env-param', 'run.outputFormat'), 'HTML')">HTMLFragment</out:when>
- <out:otherwise><out:value-of select="key('env-param', 'run.outputFormat')"/></out:otherwise>
- </out:choose>
- </out:when>
- <out:when test="$execution-format != ''">
- <out:choose>
- <out:when test="contains($execution-format, 'HTML')">HTMLFragment</out:when>
- <out:otherwise><out:value-of select="$execution-format"/></out:otherwise>
- </out:choose>
- </out:when>
- <out:when test="contains($user-format, 'HTML') or $user-format = ''">HTMLFragment</out:when>
- <out:otherwise><out:value-of select="$user-format"/></out:otherwise>
- </out:choose>
- </out:variable>
- <options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[]">
- <out:if test=" key('env-param', 'cv.id') != '' or key('env-param', 'cv.selection') = 'false' or key('env-param', 'cv.drill') = 'false' or ( string-length( key('env-param', 'rs_aliases') ) > 0 ) ">
- <item xsi:type="bus:runOptionNameValueArray">
- <bus:name xsi:type="bus:runOptionEnum">xslParameters</bus:name>
- <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:nameValue[]">
- <out:if test="key('env-param', 'cv.id')!=''">
- <item xsi:type="bus:nameValue">
- <name xsi:type="xsd:string">CognosViewerID</name>
- <value xsi:type="xsd:string"><out:value-of select="key('env-param', 'cv.id')"/></value>
- </item>
- </out:if>
- <out:if test="key('env-param', 'cv.selection') = 'false'">
- <item xsi:type="bus:nameValue">
- <name xsi:type="xsd:string">CVDisableSelection</name>
- <value xsi:type="xsd:string">true</value>
- </item>
- </out:if>
- <out:if test="key('env-param', 'cv.drill') = 'false'">
- <item xsi:type="bus:nameValue">
- <name xsi:type="xsd:string">CVDisableDrill</name>
- <value xsi:type="xsd:string">true</value>
- </item>
- </out:if>
- <out:if test=" string-length( key('env-param', 'rs_aliases') ) > 0 ">
- <item xsi:type="bus:nameValue">
- <name xsi:type="xsd:string">RSIncludeAlias</name>
- <value xsi:type="xsd:string">
- <out:value-of select="key('env-param', 'rs_aliases')"/>
- </value>
- </item>
- </out:if>
- </bus:value>
- </item>
- </out:if>
- <item xsi:type="bus:runOptionBoolean">
- <bus:name xsi:type="bus:runOptionEnum">saveOutput</bus:name>
- <bus:value xsi:type="xsd:boolean">false</bus:value>
- </item>
- <item xsi:type="bus:runOptionStringArray">
- <bus:name xsi:type="bus:runOptionEnum">outputFormat</bus:name>
- <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]">
- <item><out:value-of select="$outputFormat"/></item>
- </bus:value>
- </item>
- <out:choose>
- <out:when test="key('env-param', 'run.outputLocale')!=''">
- <item xsi:type="bus:runOptionLanguageArray">
- <bus:name xsi:type="bus:runOptionEnum">outputLocale</bus:name>
- <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]">
- <item><out:value-of select="key('env-param','run.outputLocale')"/></item>
- </bus:value>
- </item>
- </out:when>
- <out:when test="key('env-param', 'LO')!=''">
- <item xsi:type="bus:runOptionLanguageArray">
- <bus:name xsi:type="bus:runOptionEnum">outputLocale</bus:name>
- <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]">
- <item><out:value-of select="key('env-param','LO')"/></item>
- </bus:value>
- </item>
- </out:when>
- </out:choose>
- <out:if test="key('env-param', 'run.prompt') != ''">
- <item xsi:type="bus:runOptionBoolean">
- <bus:name xsi:type="bus:runOptionEnum">prompt</bus:name>
- <bus:value xsi:type="xsd:boolean"><out:value-of select="key('env-param', 'run.prompt')"/></bus:value>
- </item>
- </out:if>
- <out:if test="key('env-param', 'run.outputPageDefinition') != ''">
- <item xsi:type="bus:runOptionString">
- <bus:name xsi:type="bus:runOptionEnum">outputPageDefinition</bus:name>
- <bus:value xsi:type="xsd:string"><out:value-of select="key('env-param', 'run.outputPageDefinition')"/></bus:value>
- </item>
- </out:if>
- <out:if test="key('env-param', 'run.outputPageOrientation') != ''">
- <item xsi:type="bus:runOptionString">
- <bus:name xsi:type="bus:runOptionEnum">outputPageOrientation</bus:name>
- <bus:value xsi:type="xsd:string"><out:value-of select="key('env-param', 'run.outputPageOrientation')"/></bus:value>
- </item>
- </out:if>
- <out:if test="key('env-param', 'run.recordingEnabled') != ''">
- <item xsi:type="bus:runOptionBoolean">
- <bus:name xsi:type="bus:runOptionEnum">recordingEnabled</bus:name>
- <bus:value xsi:type="xsd:boolean"><out:value-of select="key('env-param', 'run.recordingEnabled')"/></bus:value>
- </item>
- </out:if>
- <out:if test="key('env-param', 'run.verticalElements') != ''">
- <item xsi:type="bus:runOptionInt">
- <bus:name xsi:type="bus:runOptionEnum">verticalElements</bus:name>
- <bus:value xsi:type="xsd:int"><out:value-of select="key('env-param', 'run.verticalElements')"/></bus:value>
- </item>
- </out:if>
- <out:if test="key('env-param', 'run.horizontalElements') != ''">
- <item xsi:type="bus:runOptionInt">
- <bus:name xsi:type="bus:runOptionEnum">horizontalElements</bus:name>
- <bus:value xsi:type="xsd:int"><out:value-of select="key('env-param', 'run.horizontalElements')"/></bus:value>
- </item>
- </out:if>
- <item xsi:type="bus:runOptionData">
- <bus:name xsi:type="bus:runOptionEnum">data</bus:name>
- <bus:value xsi:type="bus:dataEnum">
- <out:choose>
- <out:when test="key('env-param', 'run.data') != ''">
- <out:value-of select="key('env-param', 'run.data')"/>
- </out:when>
- <out:otherwise>
- <out:text>runWithAllData</out:text>
- </out:otherwise>
- </out:choose>
- </bus:value>
- </item>
- <item xsi:type="bus:asynchOptionInt">
- <bus:name xsi:type="bus:asynchOptionEnum">primaryWaitThreshold</bus:name>
- <bus:value xsi:type="xsd:int">
- <out:choose>
- <out:when test="key('env-param','async.primaryWaitThreshold')"><out:value-of select="key('env-param','async.primaryWaitThreshold')"/></out:when>
- <out:otherwise><out:text>3</out:text></out:otherwise>
- </out:choose>
- </bus:value>
- </item>
- <out:if test="not(key('env-param', 'ui.spec'))">
- <item xsi:type="bus:asynchOptionBoolean">
- <bus:name xsi:type="bus:asynchOptionEnum">alwaysIncludePrimaryRequest</bus:name>
- <bus:value xsi:type="xsd:string">true</bus:value>
- </item>
- </out:if>
- <out:choose>
- <out:when test="/root/env/param[@name='run.outputEncapsulation'] and /root/env/param[@name='run.outputEncapsulation'] != ''">
- <item xsi:type="bus:runOptionOutputEncapsulation">
- <bus:name xsi:type="bus:runOptionEnum">outputEncapsulation</bus:name>
- <bus:value xsi:type="bus:outputEncapsulationEnum"><out:value-of select="/root/env/param[@name='run.outputEncapsulation']"/></bus:value>
- </item>
- </out:when>
- <out:when test="contains($outputFormat, 'HTML') or (contains(/root/http/param[@name='HTTP_USER_AGENT'] , 'Mozilla/5.0') and contains($outputFormat, 'XML') )">
- <item xsi:type="bus:runOptionOutputEncapsulation">
- <bus:name xsi:type="bus:runOptionEnum">outputEncapsulation</bus:name>
- <bus:value xsi:type="bus:outputEncapsulationEnum">none</bus:value>
- </item>
- </out:when>
- <out:otherwise>
- <item xsi:type="bus:runOptionOutputEncapsulation">
- <bus:name xsi:type="bus:runOptionEnum">outputEncapsulation</bus:name>
- <bus:value xsi:type="bus:outputEncapsulationEnum">URLQueryString</bus:value>
- </item>
- </out:otherwise>
- </out:choose>
- <out:choose>
- <out:when test="/root/env/param[@name='run.attachmentEncoding'] and /root/env/param[@name='run.attachmentEncoding'] != ''">
- <item xsi:type="bus:asynchOptionEncoding">
- <bus:name xsi:type="bus:asynchOptionEnum">attachmentEncoding</bus:name>
- <bus:value xsi:type="bus:encodingEnum"><out:value-of select="string(/root/env/param[@name='run.attachmentEncoding'])"/></bus:value>
- </item>
- </out:when>
- <out:when test="contains($outputFormat, 'HTML') and not(/root/env/param[@name='m_session'])">
- <item xsi:type="bus:asynchOptionEncoding">
- <bus:name xsi:type="bus:asynchOptionEnum">attachmentEncoding</bus:name>
- <bus:value xsi:type="bus:encodingEnum">MIME</bus:value>
- </item>
- </out:when>
- <out:otherwise>
- <item xsi:type="bus:asynchOptionEncoding">
- <bus:name xsi:type="bus:asynchOptionEnum">attachmentEncoding</bus:name>
- <bus:value xsi:type="bus:encodingEnum">base64</bus:value>
- </item>
- </out:otherwise>
- </out:choose>
- <item xsi:type="bus:runOptionString">
- <bus:name xsi:type="bus:runOptionEnum">promptFormat</bus:name>
- <bus:value xsi:type="xsd:string">HTMLFragment</bus:value>
- </item>
- <item xsi:type="bus:runOptionAnyURI">
- <bus:name xsi:type="bus:runOptionEnum">xslURL</bus:name>
- <bus:value xsi:type="xsd:string">
- <out:choose>
- <out:when test="key('env-param', 'run.xslURL') != ''"><out:value-of select="key('env-param', 'run.xslURL')"/></out:when>
- <out:otherwise>rv.xsl</out:otherwise>
- </out:choose>
- </bus:value>
- </item>
- </options>
- </out:template>
- <out:template name="SetDeliveryOptions">
- <options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[]">
- <out:if test="key('env-param', 'continueConversation') = 'true'">
- <item xsi:type="bus:runOptionBoolean">
- <name xsi:type="bus:runOptionEnum">continueConversation</name>
- <value xsi:type="xsd:boolean">true</value>
- </item>
- </out:if>
- <out:if test="/root/env/*[@name='m_ro_outputFormat_PDF'] = 'PDF' and (not(/root/env/*[@name='changed_specify_format']) or /root/env/*[@name='specify_format']='checked')">
- <out:for-each select="/root/env/*[@name='m_ro_outputPageDefinition' or @name='m_ro_outputPageOrientation']">
- <out:variable name="runOptionName" select="substring-after(@name, 'm_ro_')"/>
- <item xsi:type="bus:runOptionString">
- <name xsi:type="bus:runOptionEnum">
- <out:value-of select="$runOptionName"/>
- </name>
- <value xsi:type="xsd:string">
- <out:value-of select="."/>
- </value>
- </item>
- </out:for-each>
- </out:if>
- <out:choose>
- <out:when test="/root/env/*[@name='save_how'] and /root/env/*[@name='save_how']='new_entry'">
- <item xsi:type="bus:runOptionSaveAs">
- <name xsi:type="bus:runOptionEnum">saveAs</name>
- <objectClass xsi:type="bus:reportSaveAsEnum">
- <out:value-of select="/root/env/*[@name='m_ro_saveAsType']"/>
- </objectClass>
- <objectName xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:multilingualToken[]">
- <item xsi:type="bus:multilingualToken">
- <locale xsi:type="xsd:string"><out:value-of select="/root/env/*[@name='run.outputLocale']"/></locale>
- <value xsi:type="xsd:string">
- <out:value-of select="/root/env/*[@name='m_ro_saveAsName']"/>
- </value>
- </item>
- </objectName>
- <parentSearchPath xsi:type="xsd:string">
- <out:value-of select="/root/env/*[@name='m_ro_saveAsPath']"/>
- </parentSearchPath>
- </item>
- </out:when>
- <out:when test="/root/env/*[@name='m_ro_saveOutput'] and /root/env/*[@name='m_ro_saveOutput']!=''">
- <item xsi:type="bus:runOptionBoolean">
- <name xsi:type="bus:runOptionEnum">
- <out:value-of select="'saveOutput'"/>
- </name>
- <value xsi:type="xsd:boolean">
- <out:value-of select="/root/env/*[@name='m_ro_saveOutput']"/>
- </value>
- </item>
- </out:when>
- </out:choose>
- <out:if test="/root/env/*[starts-with(@name,'m_ro_outputFormat')] and (not(/root/env/*[@name='changed_specify_format']) or /root/env/*[@name='specify_format']='checked')">
- <item xsi:type="bus:runOptionStringArray">
- <name xsi:type="bus:runOptionEnum">outputFormat</name>
- <value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[]">
- <out:for-each select="/root/env/*[starts-with(@name,concat('m_ro_','outputFormat'))]">
- <out:if test="(@name!='m_ro_outputFormat_HTML' or /root/env/*[@name='m_ro_outputF_HTML_Type']='true') and . != ''">
- <item xsi:type="xsd:string">
- <out:value-of select="."/>
- </item>
- </out:if>
- </out:for-each>
- </value>
- </item>
- </out:if>
- <out:if test="/root/env/*[@name='run.outputLocale'] and (not(/root/env/*[@name='changed_specify_language']) or /root/env/*[@name='specify_language']='checked')">
- <item xsi:type="bus:runOptionLanguageArray">
- <name xsi:type="bus:runOptionEnum">outputLocale</name>
- <value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[]">
- <out:for-each select="/root/env/*[starts-with(@name,concat('m_ro_','outputLocale'))]">
- <out:if test="(@name!='m_ro_outputFormat_HTML' or /root/env/*[@name='m_ro_outputF_HTML_Type']='true') and . != ''">
- <item xsi:type="xsd:string">
- <out:value-of select="."/>
- </item>
- </out:if>
- </out:for-each>
- </value>
- </item>
- </out:if>
- </options>
- </out:template>
- <out:template name="SetDrillOptions">
- <options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[]">
- <item xsi:type="bus:drillOptionParameterValues">
- <bus:name xsi:type="bus:drillOptionEnum">
- <out:value-of select="/root/env/param[@name='rv_drillOption']"/>
- </bus:name>
- <out:call-template name="SetDrillOptionParameters"/>
- </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:runOptionStringArray">
- <bus:name xsi:type="bus:runOptionEnum">outputFormat</bus:name>
- <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]">
- <item>HTMLFragment</item>
- </bus:value>
- </item>
- <item xsi:type="bus:runOptionOutputEncapsulation">
- <bus:name xsi:type="bus:runOptionEnum">outputEncapsulation</bus:name>
- <bus:value xsi:type="bus:outputEncapsulationEnum">none</bus:value>
- </item>
- <out:choose>
- <out:when test="not(/root/env/param[@name='m_session']) or /root/env/param[@name='session']=''">
- <item xsi:type="bus:asynchOptionEncoding">
- <bus:name xsi:type="bus:asynchOptionEnum">attachmentEncoding</bus:name>
- <bus:value xsi:type="bus:encodingEnum">MIME</bus:value>
- </item>
- </out:when>
- <out:otherwise>
- <item xsi:type="bus:asynchOptionEncoding">
- <bus:name xsi:type="bus:asynchOptionEnum">attachmentEncoding</bus:name>
- <bus:value xsi:type="bus:encodingEnum">base64</bus:value>
- </item>
- </out:otherwise>
- </out:choose>
- </options>
- </out:template>
- <out:template name="SetDrillOptionParameters">
- <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]">
- <out:for-each select="/root/DrillRequestParameters/RVDrillParams/*[local-name()='DG']">
- <item>
- <bus:name xsi:type="xs:string">
- <out:value-of select="./DI"/>
- </bus:name>
- <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[]">
- <item xsi:type="bus:simpleParmValueItem">
- <bus:use xsi:type="xs:string">
- <out:value-of select="./MUN"/>
- </bus:use>
- <out:if test="/root/env/param[@name='rv_drillRefQuery']!=''">
- <bus:display xsi:type="xs:string"><out:value-of select="/root/env/param[@name='rv_drillRefQuery']"/></bus:display>
- </out:if>
- </item>
- </bus:value>
- </item>
- </out:for-each>
- </bus:value>
- </out:template>
- </xsl:template>
- <!-- the main engine -->
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
|