metadata.xts 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. *****************************************************************
  4. ** Licensed Materials - Property of IBM
  5. **
  6. ** IBM Cognos Products: drill
  7. **
  8. ** (C) Copyright IBM Corp. 2001, 2016
  9. **
  10. ** US Government Users Restricted Rights - Use, duplication or
  11. ** disclosure restricted by GSA ADP Schedule Contract with
  12. ** IBM Corp.
  13. *****************************************************************
  14. -->
  15. <!--
  16. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  17. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  18. -->
  19. <xts:morphlet resolverBase="prompting" xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml,messages/portalRL.xml">
  20. <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">
  21. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  22. <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/">
  23. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  24. <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
  25. <xsl:template match="/">
  26. <xts:sequence>
  27. <xts:append select="/root">
  28. <response>
  29. <xts:request asText="true" href="bus://dispatcher" protocol="BUS" soapAction="http://www.ibm.com/xmlns/prod/cognos/reportService/201610/.absolute" faultBlock="faultHandler" responseEnvelope="true" outputHeader="true">
  30. <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">
  31. <SOAP-ENV:Header>
  32. <bus:biBusHeader xsi:type="bus:biBusHeader">
  33. <bus:tracking>
  34. <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(key('env-param','m_tracking'))), true())" disable-output-escaping="yes"/>
  35. </bus:tracking>
  36. <xsl:apply-templates select="/root/header/*[local-name()='biBusHeader']/*[local-name() != 'tracking']"/>
  37. </bus:biBusHeader>
  38. </SOAP-ENV:Header>
  39. <SOAP-ENV:Body>
  40. <xsl:element name="wait" namespace="http://developer.cognos.com/schemas/reportService/1">
  41. <bus:conversation xsi:type="bus:asynchRequest" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:nil="true"/>
  42. <bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"/>
  43. <bus:options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"/>
  44. </xsl:element>
  45. </SOAP-ENV:Body>
  46. </SOAP-ENV:Envelope>
  47. </xts:request>
  48. </response>
  49. </xts:append>
  50. </xts:sequence>
  51. </xsl:template>
  52. <!-- don't include superfluous fields in Envelope -->
  53. <xsl:template match="*[local-name()='formFieldVars']/item[name='inlineSpec' or name='conversation' or name='previousConversation' or name='cancelStack']"/>
  54. <!-- used to copy the bus header stuff - see "apply-templates" above. -->
  55. <xsl:template match="*">
  56. <xsl:copy>
  57. <xsl:copy-of select="@*"/>
  58. <xsl:apply-templates/>
  59. </xsl:copy>
  60. </xsl:template>
  61. </xsl:stylesheet>
  62. </xts:block>
  63. <!--
  64. ===============================================================================================
  65. getOutput - Special case to handle complete.
  66. With complete, we just need to call getOutput to get the actual output, so do it here instead of bouncing through the browser .
  67. ===============================================================================================
  68. -->
  69. <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'][@xsi:type='bus:asynchDetailReportStatus']/*[local-name()='status']='responseReady')]" mandatory="false" nodelist="header, env, response">
  70. <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" exclude-result-prefixes="xsl xts xos cm bus SOAP-ENV xsi">
  71. <xsl:output method="xml"/>
  72. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  73. <xsl:template match="/root">
  74. <xts:sequence>
  75. <xts:append>
  76. <affinity>absolute</affinity>
  77. </xts:append>
  78. </xts:sequence>
  79. <xts:sequence>
  80. <xts:replace select="/root/response">
  81. <!-- replace the existing response -->
  82. <response>
  83. <xts:request href="bus://dispatcher" protocol="BUS" responseEnvelope="true" outputHeader="true" option="xml-multipart" soapAction="http://www.ibm.com/xmlns/prod/cognos/reportService/201610/.absolute" faultBlock="faultHandler">
  84. <SOAP-ENV:Envelope>
  85. <SOAP-ENV:Header>
  86. <bus:biBusHeader xsi:type="bus:biBusHeader" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  87. <bus:tracking>
  88. <xsl:copy-of select="/root/response/SOAP-ENV:Envelope/SOAP-ENV:Header/bus:biBusHeader/bus:tracking/*[local-name()='conversationContext']"/>
  89. </bus:tracking>
  90. <xsl:apply-templates select="/root/header/bus:biBusHeader/*[local-name()!='tracking']"/>
  91. <xsl:if test="key('env-param','ui.routingServerGroup')!=''">
  92. <bus:routing>
  93. <routingServerGroup>
  94. <xsl:value-of select="key('env-param','ui.routingServerGroup')"/>
  95. </routingServerGroup>
  96. </bus:routing>
  97. </xsl:if>
  98. </bus:biBusHeader>
  99. </SOAP-ENV:Header>
  100. <SOAP-ENV:Body>
  101. <xsl:element name="getOutput" namespace="http://developer.cognos.com/schemas/reportService/1">
  102. <bus:conversation xsi:type="bus:asynchRequest" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:nil="true"/>
  103. <bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"/>
  104. <bus:options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"/>
  105. </xsl:element>
  106. </SOAP-ENV:Body>
  107. </SOAP-ENV:Envelope>
  108. </xts:request>
  109. </response>
  110. </xts:replace>
  111. </xts:sequence>
  112. </xsl:template>
  113. <!-- used to copy the bus header stuff - see "apply-templates" above. -->
  114. <xsl:template match="*">
  115. <xsl:copy>
  116. <xsl:copy-of select="@*"/>
  117. <xsl:apply-templates/>
  118. </xsl:copy>
  119. </xsl:template>
  120. </xsl:stylesheet>
  121. </xts:block>
  122. <xts:block id="appendTracking" mode="interpret" processor="XSLT" type="exec" condition=".[/root/env/param[@name='m_tracking']!='']" mandatory="false">
  123. <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">
  124. <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
  125. <xsl:template match="/root">
  126. <xts:sequence>
  127. <xts:append select="/root">
  128. <tracking xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
  129. <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(/root/env/param[@name='m_tracking'])), true())" disable-output-escaping="yes"/>
  130. </tracking>
  131. </xts:append>
  132. </xts:sequence>
  133. </xsl:template>
  134. </xsl:stylesheet>
  135. </xts:block>
  136. <xts:block id="appendRSParam" mode="interpret" processor="XSLT" type="exec" condition=".[/root/env/param[@name='rptSvcParam']!='']" mandatory="false">
  137. <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">
  138. <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
  139. <xsl:template match="/root">
  140. <xts:sequence>
  141. <xts:append select="/root">
  142. <xts:function name="web64decode">
  143. <xts:param name="source">
  144. <xts:transform name="XMLDecode">
  145. <xsl:value-of select="xtsext:cafaction('sign_unwrap',string(/root/env/param[@name='rptSvcParam']))"/>
  146. </xts:transform>
  147. </xts:param>
  148. </xts:function>
  149. </xts:append>
  150. </xts:sequence>
  151. </xsl:template>
  152. </xsl:stylesheet>
  153. </xts:block>
  154. <xts:block id="getContent" mode="interpret" processor="XSLT" type="exec" condition=".[not(/root/env/param[@name = 'metadataTree']) and
  155. (/root/response/*/*/*/*/*[local-name() = 'status'] != 'working' or
  156. /root/response/*/*/*/*/*[local-name()='status'] != 'stillWorking' or
  157. /root/response/*/*/*/*/*[local-name()='status'] != 'complete' or
  158. not(/root/env/param[@name = 'doWait']))]" mandatory="false" dependency="appendTracking appendRSParam">
  159. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  160. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  161. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  162. <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
  163. <!--
  164. Scope request: Parameter request
  165. Measure Dimension Y *
  166. Hierarchical Measure Y *
  167. Measure Y Y
  168. Dimension Y *
  169. Hierarchy Y *
  170. Level Y *
  171. Named Set N *
  172. Query subject Y *
  173. Query Item Y Y
  174. Attributes N Y
  175. Model Calc (fact) N Y
  176. Model Calc (attributes) N Y
  177. Model Calc (identifier) N Y
  178. * Valid only if the item can be used as a data item in a query
  179. -->
  180. <xsl:template match="/">
  181. <xts:sequence>
  182. <xts:append>
  183. <xts:request asText="true" href="bus://dispatcher" protocol="BUS" soapAction="http://www.ibm.com/xmlns/prod/cognos/reportService/201610/.session" faultBlock="faultHandler" responseEnvelope="false" outputHeader="true">
  184. <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">
  185. <SOAP-ENV:Header>
  186. <bus:biBusHeader xsi:type="bus:biBusHeader" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  187. <xsl:if test="/root/tracking!=''">
  188. <!-- use the round-tripped tracking information -->
  189. <bus:tracking xsi:type="bus:tracking">
  190. <xsl:copy-of select="/root/tracking/*[local-name()!='conversationContext']"/>
  191. <bus:conversationContext xsi:type="bus:conversationContext">
  192. <xsl:copy-of select="/root/tracking/*[local-name()='conversationContext']/*[local-name()!='id']"/>
  193. <bus:id xsi:type="xs:string"/>
  194. </bus:conversationContext>
  195. </bus:tracking>
  196. </xsl:if>
  197. <xsl:if test="key('env-param','ui.routingServerGroup')!=''">
  198. <bus:routing>
  199. <routingServerGroup>
  200. <xsl:value-of select="key('env-param','ui.routingServerGroup')"/>
  201. </routingServerGroup>
  202. </bus:routing>
  203. </xsl:if>
  204. <!-- We don't want to copy the tracking info in this case because we want a separate conversation for the metadata -->
  205. <xsl:apply-templates select="/root/header/bus:biBusHeader/*[local-name()!='tracking']"/>
  206. </bus:biBusHeader>
  207. </SOAP-ENV:Header>
  208. <SOAP-ENV:Body>
  209. <runSpecification xmlns="http://developer.cognos.com/schemas/reportService/1">
  210. <bus:specification xsi:type="bus:reportServiceMetadataSpecification" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  211. <bus:value xsi:type="bus:specification">&lt;metadataRequest connection=&quot;<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='model']))"/>&quot;&gt;
  212. &lt;Metadata authoringLocale=&quot;<xsl:value-of select="/root/env/param[@name='cl']"/>&quot; xml:lang=&quot;<xsl:value-of select="/root/env/param[@name='pl']"/>&quot; <xsl:if test="string(/root/env/param[@name='startAtPath'])!=''">start_at=&quot;<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='startAtPath']))"/>&quot; </xsl:if>Depth=&quot;<xsl:value-of select="/root/env/param[@name='depth']"/>&quot; no_collections=&quot;1&quot;&gt;
  213. <!-- <xsl:if test="string(/root/env/param[@name='startAtPath'])='' and string(/root/env/param[@name='selectNode'])!=''"><xsl:text/>
  214. &lt;Start_at&gt;
  215. <xsl:call-template name="breakSelection"><xsl:with-param name="selection"><xsl:value-of select="xtsext:substringBeforeLast(string(/root/env/param[@name='selectNode']),'.[')"/></xsl:with-param></xsl:call-template>
  216. &lt;/Start_at&gt;<xsl:text/>
  217. </xsl:if> -->
  218. &lt;Properties&gt;
  219. &lt;Property name=&quot;*/@name&quot;/&gt;
  220. &lt;Property name=&quot;*/@_path&quot;/&gt;
  221. &lt;Property name=&quot;*/@_ref&quot;/&gt;
  222. &lt;Property name=&quot;*/@isNamespace&quot;/&gt;
  223. &lt;Property name=&quot;*/@screenTip&quot;/&gt;
  224. &lt;Property name=&quot;*/@description&quot;/&gt;
  225. &lt;Property name=&quot;*/@externalOrdinal&quot;/&gt;
  226. &lt;Property name=&quot;./folder&quot;/&gt;
  227. &lt;Property name=&quot;./measureFolder&quot;/&gt;
  228. &lt;Property name=&quot;./querySubject&quot;/&gt;
  229. &lt;Property name=&quot;./queryItem&quot;/&gt;
  230. &lt;Property name=&quot;./queryItemFolder&quot;/&gt;
  231. &lt;Property name=&quot;./filter&quot;/&gt;
  232. &lt;Property name=&quot;./calculation&quot;/&gt;
  233. &lt;Property name=&quot;*/@currency&quot;/&gt;
  234. &lt;Property name=&quot;*/@datatype&quot;/&gt;
  235. &lt;Property name=&quot;*/@usage&quot;/&gt;
  236. &lt;Property name=&quot;*/@regularAggregate&quot;/&gt;
  237. &lt;Property name=&quot;*/@_effectivePromptInfo&quot;/&gt;
  238. &lt;Property name=&quot;*/@displayType&quot;/&gt;
  239. &lt;Property name=&quot;*/@semiAggregate&quot;/&gt;
  240. &lt;Property name=&quot;*/@sortOnRef&quot;/&gt;
  241. &lt;Property name=&quot;*/@parentChild&quot;/&gt;
  242. &lt;Property name=&quot;*/@calcType&quot;/&gt;
  243. &lt;Property name=&quot;measure/@isHierarchical&quot;/&gt;
  244. &lt;Property name=&quot;dimension/@type&quot;/&gt;
  245. &lt;Property name=&quot;./dimension&quot;/&gt;
  246. &lt;Property name=&quot;./hierarchy&quot;/&gt;
  247. &lt;Property name=&quot;./hierarchyFolder&quot;/&gt;
  248. &lt;Property name=&quot;./level&quot;/&gt;
  249. &lt;Property name=&quot;./measure&quot;/&gt;
  250. &lt;Property name=&quot;*/@_IntrinsicPropertiesOff&quot;/&gt;
  251. &lt;Property name=&quot;measure/aggregateRule&quot;/&gt;
  252. &lt;Property name=&quot;*/@applyAggregate&quot;/&gt;
  253. &lt;/Properties&gt;
  254. &lt;/Metadata&gt;
  255. &lt;/metadataRequest&gt;
  256. </bus:value>
  257. </bus:specification>
  258. <xsl:choose>
  259. <xsl:when test="/root/rptSvcParam">
  260. <bus:parameterValues xsi:type="bus:parameterValueArray" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
  261. <item>
  262. <bus:name xsi:type="xsd:string"><xsl:value-of select="/root/rptSvcParam/@name"/></bus:name>
  263. <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[]">
  264. <item xsi:type="bus:simpleParmValueItem">
  265. <bus:inclusive xsi:type="xsd:boolean">true</bus:inclusive>
  266. <bus:display xsi:type="xsd:string"><xsl:value-of select="/root/rptSvcParam"/></bus:display>
  267. <bus:use xsi:type="xsd:string"><xsl:value-of select="/root/rptSvcParam"/></bus:use>
  268. </item>
  269. </bus:value>
  270. </item>
  271. </bus:parameterValues>
  272. </xsl:when>
  273. <xsl:when test="key('env-param', 'parameterValues') != '' and contains(key('env-param', 'parameterValues'), 'item')">
  274. <bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
  275. <xsl:value-of select="string(key('env-param', 'parameterValues'))" disable-output-escaping="yes"/>
  276. </bus:parameterValues>
  277. </xsl:when>
  278. <xsl:when test="key('env-param', 'promptValues') != ''">
  279. <bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
  280. <xsl:for-each select="/root/env/param[@name='xxCreds']">
  281. <xsl:value-of select="." disable-output-escaping="yes"/>
  282. </xsl:for-each>
  283. <xsl:for-each select="/root/env/param[@name='promptValues']">
  284. <xsl:value-of select="." disable-output-escaping="yes"/>
  285. </xsl:for-each>
  286. </bus:parameterValues>
  287. </xsl:when>
  288. <xsl:otherwise>
  289. <bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"/>
  290. </xsl:otherwise>
  291. </xsl:choose>
  292. <bus:options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
  293. <item xsi:type="bus:runOptionString">
  294. <bus:name xsi:type="bus:runOptionEnum">promptFormat</bus:name>
  295. <bus:value xsi:type="xsd:string">HTML</bus:value>
  296. </item>
  297. <item xsi:type="bus:runOptionBoolean">
  298. <bus:name xsi:type="bus:runOptionEnum">prompt</bus:name>
  299. <bus:value xsi:type="xsd:boolean">false</bus:value>
  300. </item>
  301. </bus:options>
  302. </runSpecification>
  303. </SOAP-ENV:Body>
  304. </SOAP-ENV:Envelope>
  305. </xts:request>
  306. </xts:append>
  307. </xts:sequence>
  308. </xsl:template>
  309. <xsl:template name="breakSelection">
  310. <xsl:param name="selection" select="''"/>
  311. <xsl:if test="$selection != ''">
  312. <xsl:variable name="nextBit"><xsl:if test="contains($selection,'].') and contains(substring-after($selection,']'),'.[')"><xsl:text/><xsl:value-of select="xtsext:substringBeforeLast(string($selection),'.[')"/><xsl:text/></xsl:if></xsl:variable>
  313. <xsl:value-of select="'&lt;Path name=&quot;'"/><xsl:value-of select="xtsext:xmlencode(string($selection))"/><xsl:value-of select="'&quot;/&gt;'"/>
  314. <xsl:if test="$nextBit != ''"><xsl:call-template name="breakSelection"><xsl:with-param name="selection" select="$nextBit"/></xsl:call-template></xsl:if>
  315. </xsl:if>
  316. </xsl:template>
  317. <!-- used to copy the bus header stuff - see "apply-templates" above. -->
  318. <xsl:template match="*">
  319. <xsl:copy>
  320. <xsl:copy-of select="@*"/>
  321. <xsl:apply-templates/>
  322. </xsl:copy>
  323. </xsl:template>
  324. </xsl:stylesheet>
  325. </xts:block>
  326. <xts:block id="appendDocument" mode="interpret" processor="XSLT" type="exec" dependency="getContent getOutput" mandatory="false">
  327. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  328. <xts:logicsheet path="logicsheets/portal.xsl"/>
  329. <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/">
  330. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  331. <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
  332. <xsl:template match="/root">
  333. <xsl:variable name="markup-track">
  334. <xsl:apply-templates select="/root/output/*/*/*[local-name()='Header']/*[local-name()='biBusHeader']/*[local-name()='tracking']/*[local-name()='conversationContext']" mode="markup"/>
  335. </xsl:variable>
  336. <xts:sequence>
  337. <xts:delete select="/root/env/param[@name='m_tracking']"/>
  338. <xts:append select="/root/env">
  339. <param name="m_tracking">
  340. <xsl:value-of select="string($markup-track)"/>
  341. </param>
  342. </xts:append>
  343. <xsl:choose>
  344. <xsl:when test="key('env-param','metadataTree')">
  345. <xts:append select="/root">
  346. <metadataTree>
  347. <xsl:value-of select="substring-after(string(key('env-param','metadataTree')), '?&gt;')" disable-output-escaping="yes"/>
  348. </metadataTree>
  349. </xts:append>
  350. </xsl:when>
  351. <xsl:when test="./*[local-name()='runSpecificationResponse']/bus:result/bus:details/item[@xsi:type='bus:asynchDetailReportStatus']/bus:status='prompting'">
  352. <xts:append select="/root/env">
  353. <param name="htmlFragment">
  354. <xsl:value-of select="./*[local-name()='runSpecificationResponse']/bus:result/bus:details/item[@xsi:type='bus:asynchDetailReportOutput']/bus:outputPages/item"/>
  355. </param>
  356. </xts:append>
  357. </xsl:when>
  358. <xsl:when test="./response/*/*[local-name()='Body']/*/*/*[local-name()='details']/item[@xsi:type='bus:asynchDetailReportStatus']/bus:status = 'prompting'">
  359. <xts:delete select="/root/env/param[@name='htmlFragment']"/>
  360. <xts:append select="/root/env">
  361. <param name="htmlFragment">
  362. <xsl:value-of select="./response/*/*[local-name()='Body']/*/*/*[local-name()='details']/item[@xsi:type='bus:asynchDetailReportOutput']/bus:outputPages/item"/>
  363. </param>
  364. </xts:append>
  365. </xsl:when>
  366. <xsl:otherwise>
  367. <xts:append select="/root">
  368. <xsl:choose>
  369. <xsl:when test="contains(./*[local-name()='runSpecificationResponse']/bus:result/bus:status, 'working') or
  370. contains(./*[local-name()='runSpecificationResponse']/bus:result/bus:status, 'stillWorking') or
  371. contains(./response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'waitResponse']/bus:result/bus:status, 'stillWorking')">
  372. <working>
  373. <xsl:value-of select="string($markup-track)"/>
  374. </working>
  375. </xsl:when>
  376. <xsl:when test="./response/*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='waitResponse']">
  377. <metadataTree>
  378. <xsl:choose>
  379. <xsl:when test="contains(./response/*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='waitResponse']/bus:result/bus:details/item/bus:metadata, '&lt;?xml')">
  380. <xsl:value-of select="substring-after(./response/*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='waitResponse']/bus:result/bus:details/item/bus:metadata, '?&gt;')" disable-output-escaping="yes"/>
  381. </xsl:when>
  382. <xsl:otherwise>
  383. <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"/>
  384. </xsl:otherwise>
  385. </xsl:choose>
  386. </metadataTree>
  387. </xsl:when>
  388. <xsl:otherwise>
  389. <metadataTree>
  390. <xsl:choose>
  391. <xsl:when test="contains(./*[local-name()='runSpecificationResponse']/bus:result/bus:details/item/bus:metadata, '&lt;?xml')">
  392. <xsl:value-of select="substring-after(./*[local-name()='runSpecificationResponse']/bus:result/bus:details/item/bus:metadata, '?&gt;')" disable-output-escaping="yes"/>
  393. </xsl:when>
  394. <xsl:otherwise>
  395. <xsl:value-of select="./*[local-name()='runSpecificationResponse']/bus:result/bus:details/item/bus:metadata" disable-output-escaping="yes"/>
  396. </xsl:otherwise>
  397. </xsl:choose>
  398. </metadataTree>
  399. </xsl:otherwise>
  400. </xsl:choose>
  401. </xts:append>
  402. </xsl:otherwise>
  403. </xsl:choose>
  404. </xts:sequence>
  405. </xsl:template>
  406. <pf:serialize-xml/>
  407. </xsl:stylesheet>
  408. </xts:block>
  409. <xts:block id="format" type="exec" mode="output" processor="XSLT" mimeType="text/plain" condition="(not(/root/response/*/*/*/*/*[local-name()='status']='working' or /root/response/*/*/*/*/*[local-name()='status']='stillWorking')) and (/root/metadataTree/ResponseRoot or /root/soapFault)" dependency="appendDocument">
  410. <!-- get the debug logic sheet -->
  411. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  412. <xts:logicsheet path="logicsheets/portal.xsl"/>
  413. <!-- apply the form logic -->
  414. <xsl:stylesheet version="1.0"
  415. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  416. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  417. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  418. xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/"
  419. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  420. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  421. exclude-result-prefixes="xsl xts dbg xtsext bus pf">
  422. <xsl:output method="text" version="1.0" encoding="UTF-8" indent="no"/>
  423. <pf:variables/>
  424. <!-- start the output -->
  425. <xsl:template match="/root">
  426. <xsl:choose>
  427. <xsl:when test="./metadataTree/ResponseRoot">
  428. <xsl:apply-templates select="./metadataTree/ResponseRoot"/>
  429. </xsl:when>
  430. <xsl:when test="./working">
  431. <xsl:variable name="passport">
  432. <xsl:choose>
  433. <!-- pull the passport out of the bus header -->
  434. <xsl:when test="/root/credential/param[@name='CAM']/*[local-name()='CAM']/*[local-name='CAMPassport']/*[local-name()='id']">
  435. <xsl:value-of select="/root/credential/param[@name='CAM']/*[local-name()='CAM']/*[local-name='CAMPassport']/*[local-name()='id']"/>
  436. </xsl:when>
  437. <!-- if it's not there, see if it is still in the cookie -->
  438. <xsl:otherwise>
  439. <xsl:value-of select="/root/cookies/cookie[@name='cam_passport']"/>
  440. </xsl:otherwise>
  441. </xsl:choose>
  442. </xsl:variable>
  443. <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/>
  444. <xsl:if test="key('env-param', 'depth')!=''">
  445. <xsl:value-of select="xtsext:javascriptencode(string(key('env-param','depth')))"/>
  446. </xsl:if>
  447. </xsl:when>
  448. <xsl:when test="./env/param[@name='htmlFragment']">
  449. <xsl:variable name="markup-conv">
  450. <xsl:choose>
  451. <xsl:when test="./*[local-name()='runSpecificationResponse']/bus:result/bus:primaryRequest">
  452. <xsl:call-template name="serialize-xml">
  453. <xsl:with-param name="node-set" select="./*[local-name()='runSpecificationResponse']/bus:result/bus:primaryRequest/*"/>
  454. </xsl:call-template>
  455. </xsl:when>
  456. <xsl:otherwise>
  457. <xsl:call-template name="serialize-xml">
  458. <xsl:with-param name="node-set" select="./*[local-name()='response']/*/*[local-name()='Body']/*/bus:result/bus:primaryRequest/*"/>
  459. </xsl:call-template>
  460. </xsl:otherwise>
  461. </xsl:choose>
  462. </xsl:variable>
  463. <xsl:text/>prompting;<xsl:text/>
  464. <xsl:text/><xsl:value-of select="xtsext:javascriptencode(string($gateway))"/>;<xsl:text/>
  465. <xsl:text/><xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='contextNodeRef']))"/>;<xsl:text/>
  466. <xsl:text/><xsl:value-of select="xtsext:javascriptencode(string(xtsext:cafaction(concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($markup-conv), true()))))"/>;<xsl:text/>
  467. <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/>
  468. <xsl:text/><xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='htmlFragment']))"/><xsl:text/>
  469. </xsl:when>
  470. <xsl:otherwise/>
  471. </xsl:choose>
  472. <xsl:apply-templates select="./logonFault"/>
  473. <xsl:apply-templates select="./soapFault"/>
  474. </xsl:template>
  475. <xsl:template match="/root/metadataTree/ResponseRoot">
  476. <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/>
  477. <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/>
  478. <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/>
  479. <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/>
  480. <xsl:variable name="depth">0</xsl:variable>
  481. <xsl:for-each select="./folder | ./querySubject | ./queryItemFolder | ./dimension | ./hierarchy | ./level | ./measure | ./measureFolder | ./hierarchyFolder">
  482. <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>
  483. <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>
  484. <xsl:choose>
  485. <xsl:when test="name()='dimension' and count(./hierarchy)=1 and count(*)=1 and (not(./hierarchy[@parentChild]) or ./hierarchy[@parentChild!='1'])">
  486. <xsl:choose>
  487. <!-- <xsl:when test="/root/env/param[@name='depth']='2' and (string(/root/env/param[@name='selectNode'])='' or string(/root/env/param[@name='startAtPath'])!='')">resubmitSingleHierarchy;<xsl:text/> -->
  488. <xsl:when test="/root/env/param[@name='depth']='2' and string(/root/env/param[@name='startAtPath'])!=''">resubmitSingleHierarchy;<xsl:text/>
  489. <xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="./hierarchy/@_path"/></xsl:with-param></xsl:call-template>
  490. <xsl:text/>;<xsl:text/><xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="./hierarchy/@name"/></xsl:with-param></xsl:call-template>
  491. <xsl:text/>;<xsl:text/><xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="./hierarchy/@_ref"/></xsl:with-param></xsl:call-template>
  492. <xsl:text/>
  493. </xsl:when>
  494. <xsl:otherwise>
  495. <xsl:call-template name="buildTreeItemResponseString">
  496. <xsl:with-param name="node" select="./hierarchy"/>
  497. <xsl:with-param name="parent" select="$parent"/>
  498. <xsl:with-param name="depth" select="$depth"/>
  499. <xsl:with-param name="parentRefExpression" select="$parentRefExpression"/>
  500. </xsl:call-template>
  501. </xsl:otherwise>
  502. </xsl:choose>
  503. </xsl:when>
  504. <xsl:otherwise>
  505. <xsl:call-template name="buildTreeItemResponseString">
  506. <xsl:with-param name="node" select="."/>
  507. <xsl:with-param name="parent" select="$parent"/>
  508. <xsl:with-param name="depth" select="$depth"/>
  509. <xsl:with-param name="parentRefExpression" select="$parentRefExpression"/>
  510. </xsl:call-template>
  511. </xsl:otherwise>
  512. </xsl:choose>
  513. </xsl:for-each>
  514. </xsl:template>
  515. <xsl:template match="/root/logonFault">
  516. <xsl:text/>FAULT;timeout<xsl:text/>
  517. </xsl:template>
  518. <xsl:template match="/root/soapFault">
  519. <xsl:variable name="markup">
  520. <xsl:choose>
  521. <xsl:when test=".//bus:message">
  522. <xsl:for-each select=".//bus:message">
  523. <xsl:text/>;busMessageDetail,<xsl:text/>
  524. <xsl:text/><xsl:call-template name="commaAndSemicolonEncode">
  525. <xsl:with-param name="strVal">
  526. <xsl:value-of select="./bus:messageString"/>
  527. </xsl:with-param>
  528. </xsl:call-template><xsl:text/>
  529. </xsl:for-each>
  530. </xsl:when>
  531. <xsl:otherwise>
  532. <xsl:text/>;busDetail<xsl:text/>
  533. <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode">
  534. <xsl:with-param name="strVal">
  535. <xsl:call-template name="serialize-xml">
  536. <xsl:with-param name="node-set" select="."/>
  537. </xsl:call-template>
  538. </xsl:with-param>
  539. </xsl:call-template><xsl:text/>
  540. </xsl:otherwise>
  541. </xsl:choose>
  542. </xsl:variable>
  543. <xsl:text/>FAULT;busMessage,<xsl:text/><xsl:call-template name="commaAndSemicolonEncode">
  544. <xsl:with-param name="strVal">CCC-TLE-0001 <xts:string id="IDS_ERR_TLE_0001"/></xsl:with-param>
  545. </xsl:call-template><xsl:text/>
  546. <xsl:text/><xsl:value-of select="$markup"/><xsl:text/>
  547. </xsl:template>
  548. <xsl:template name="commaAndSemicolonEncode">
  549. <xsl:param name="strVal"/>
  550. <xsl:choose>
  551. <xsl:when test="contains($strVal, ',')">
  552. <xsl:call-template name="commaAndSemicolonEncode">
  553. <xsl:with-param name="strVal" select="substring-before($strVal, ',')"/>
  554. </xsl:call-template>&amp;comma<xsl:call-template name="commaAndSemicolonEncode">
  555. <xsl:with-param name="strVal" select="substring-after($strVal, ',')"/>
  556. </xsl:call-template>
  557. </xsl:when>
  558. <xsl:when test="contains($strVal, ';')">
  559. <xsl:call-template name="commaAndSemicolonEncode">
  560. <xsl:with-param name="strVal" select="substring-before($strVal, ';')"/>
  561. </xsl:call-template>&amp;semicolon<xsl:call-template name="commaAndSemicolonEncode">
  562. <xsl:with-param name="strVal" select="substring-after($strVal, ';')"/>
  563. </xsl:call-template>
  564. </xsl:when>
  565. <xsl:otherwise>
  566. <xsl:value-of select="xtsext:javascriptencode(string($strVal))"/>
  567. </xsl:otherwise>
  568. </xsl:choose>
  569. </xsl:template>
  570. <xsl:template name="buildTreeItemResponseString">
  571. <xsl:param name="node"/>
  572. <xsl:param name="parent"/>
  573. <xsl:param name="depth"/>
  574. <xsl:param name="parentRefExpression"/>
  575. <xsl:for-each select="$node/*">
  576. <xsl:text/>;<xsl:text/>
  577. <xsl:if test="position()=1">
  578. <xsl:text/>firstChild<xsl:text/>
  579. </xsl:if>
  580. <xsl:if test="position()=last()">
  581. <xsl:text/>lastChild<xsl:text/>
  582. </xsl:if>
  583. <xsl:if test="not((position()=1) or (position()=last()))">
  584. <xsl:text/>child<xsl:text/>
  585. </xsl:if>
  586. <xsl:text/><xsl:value-of select="xtsext:javascriptencode(string($depth))"/>,<xsl:text/>
  587. <xsl:choose>
  588. <xsl:when test="@isNamespace='1'">
  589. <xsl:text/><xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal">namespace</xsl:with-param></xsl:call-template><xsl:text/>
  590. </xsl:when>
  591. <xsl:when test="@isHierarchical='1'">
  592. <xsl:text/><xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal">rollupMeasure</xsl:with-param></xsl:call-template><xsl:text/>
  593. </xsl:when>
  594. <xsl:when test="@type='3'">
  595. <xsl:text/><xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal">measureDimension</xsl:with-param></xsl:call-template><xsl:text/>
  596. </xsl:when>
  597. <xsl:when test="@calcType='1'">
  598. <xsl:text/><xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal">namedSet</xsl:with-param></xsl:call-template><xsl:text/>
  599. </xsl:when>
  600. <xsl:when test="@calcType='2'">
  601. <xsl:text/><xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal">calculationConstant</xsl:with-param></xsl:call-template><xsl:text/>
  602. </xsl:when>
  603. <xsl:otherwise>
  604. <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/>
  605. </xsl:otherwise>
  606. </xsl:choose>
  607. <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/>
  608. <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/>
  609. <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/>
  610. <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/>
  611. <xsl:if test="not(name()='folder' or name()='querySubject' or name()='queryItemFolder' or name()='filter' or name()='dimension' or name()='hierarchy' or name()='hierarchyFolder')">
  612. <xsl:call-template name="buildQueryItemResponseString"><xsl:with-param name="node" select="."/></xsl:call-template>
  613. </xsl:if>
  614. <xsl:text/>,<xsl:value-of select="xtsext:javascriptencode(string($parent))"/><xsl:text/>
  615. <xsl:text/>,<xsl:value-of select="xtsext:javascriptencode(string($parentRefExpression))"/><xsl:text/>
  616. <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode">
  617. <xsl:with-param name="strVal">
  618. <xsl:value-of select="@description"/>
  619. </xsl:with-param>
  620. </xsl:call-template><xsl:text/>
  621. <xsl:if test="(name()='hierarchy' or name()='hierarchyFolder') and @parentChild='1'">
  622. <xsl:text/>,parentChild<xsl:text/>
  623. </xsl:if>
  624. <!-- <xsl:if test="/root/env/param[@name='processRecursion']='1' or string(/root/env/param[@name='selectNode'])!=''"> -->
  625. <xsl:if test="/root/env/param[@name='processRecursion']='1'">
  626. <xsl:choose>
  627. <xsl:when test="name()='dimension' and count(./hierarchy)=1 and count(*)=1 and (not(./hierarchy[@parentChild]) or ./hierarchy[@parentChild!='1'])">
  628. <xsl:call-template name="buildTreeItemResponseString">
  629. <xsl:with-param name="node" select="./hierarchy"/>
  630. <xsl:with-param name="parent" select="$node"/>
  631. <xsl:with-param name="depth" select="$depth + 1"/>
  632. <xsl:with-param name="parentRefExpression" select="$parentRefExpression"/>
  633. </xsl:call-template>
  634. </xsl:when>
  635. <xsl:otherwise>
  636. <xsl:call-template name="buildTreeItemResponseString">
  637. <xsl:with-param name="node" select="."/>
  638. <xsl:with-param name="parent" select="$node"/>
  639. <xsl:with-param name="depth" select="$depth + 1"/>
  640. <xsl:with-param name="parentRefExpression" select="$parentRefExpression"/>
  641. </xsl:call-template>
  642. </xsl:otherwise>
  643. </xsl:choose>
  644. </xsl:if>
  645. </xsl:for-each>
  646. </xsl:template>
  647. <xsl:template name="buildQueryItemResponseString">
  648. <xsl:param name="node"/>
  649. <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/>
  650. <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/>
  651. <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/>
  652. <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="$node/@semiAggregate"/></xsl:with-param></xsl:call-template><xsl:text/>
  653. <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/>
  654. <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/>
  655. <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/>
  656. <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/>
  657. <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/>
  658. <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="position()-1"/></xsl:with-param></xsl:call-template><xsl:text/>
  659. <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/>
  660. <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/>
  661. </xsl:template>
  662. <pf:serialize-xml/>
  663. </xsl:stylesheet>
  664. </xts:block>
  665. <xts:block id="faultHandler" type="fault" processor="XSLT">
  666. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" exclude-result-prefixes="xsl">
  667. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  668. <xsl:template match="/">
  669. <xsl:choose>
  670. <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')">
  671. <logonFault>timeout</logonFault>
  672. </xsl:when>
  673. <xsl:otherwise>
  674. <soapFault>
  675. <xsl:copy>
  676. <xsl:copy-of select="/root/fault"/>
  677. </xsl:copy>
  678. </soapFault>
  679. </xsl:otherwise>
  680. </xsl:choose>
  681. </xsl:template>
  682. <xsl:template match="text()"/>
  683. </xsl:stylesheet>
  684. </xts:block>
  685. </xts:morphlet>