getSpParametersResponse.xts 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: AGS
  5. (C) Copyright IBM Corp. 2005, 2008
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/AGS.xml,messages/portal.xml, messages/portalRL.xml" resolverBase="prompting" includeConfig="true" requiredCapability="canUseEventStudio">
  9. <!--
  10. ================================================================================
  11. decode the parameter context
  12. ===============================================================================================
  13. -->
  14. <xts:block id="decodeContext" processor="XSLT" type="exec">
  15. <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" exclude-result-prefixes="xsl xtsext xts">
  16. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  17. <xsl:template match="/">
  18. <xts:sequence>
  19. <!-- decode the agent items -->
  20. <xts:append select="/root">
  21. <xsl:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap_settemplatename_decodeagentdefinition_settemplateid_dialogadapter001', string( /root/env/param[@name = 'context'])), true() )" disable-output-escaping="yes"/>
  22. </xts:append>
  23. <!-- get rid of the blob for the time being -->
  24. <xts:delete select="/root/env/param[@name = 'context']"/>
  25. </xts:sequence>
  26. </xsl:template>
  27. </xsl:stylesheet>
  28. </xts:block>
  29. <!--
  30. ================================================================================
  31. decode the agent items
  32. ===============================================================================================
  33. -->
  34. <xts:block id="moveContext" processor="XSLT" type="exec" dependency="decodeContext">
  35. <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" exclude-result-prefixes="xsl xtsext xts">
  36. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  37. <xsl:template match="/">
  38. <xts:sequence>
  39. <!-- decode the agent items -->
  40. <xts:append select="/root/env">
  41. <xsl:copy-of select="/root/context/env/*"/>
  42. </xts:append>
  43. </xts:sequence>
  44. </xsl:template>
  45. </xsl:stylesheet>
  46. </xts:block>
  47. <!--
  48. ================================================================================
  49. whip out the parameters that were saved off previously
  50. ===============================================================================================
  51. -->
  52. <xts:block id="decodeExistingParameters" path="/ags/parameters/decodeExistingParameters.xslt" dependency="moveContext" processor="XSLT" type="exec" mandatory="false">
  53. <xts:logicsheet path="logicsheets/portal.xsl"/>
  54. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  55. </xts:block>
  56. <!--
  57. ================================================================================
  58. If we have been through this dialog before we will have saved or unsaved parameter values to display, so whip them out
  59. from the parameter named taskParameters. this contains the previously saved param values retrieved in loadAgent and any unsaved updates
  60. from previous passes through this dialog
  61. ===============================================================================================
  62. -->
  63. <xts:block id="checkExistingParameters" path="/ags/parameters/checkExistingParameters.xslt" dependency="decodeExistingParameters" processor="XSLT" type="exec" mandatory="false">
  64. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  65. </xts:block>
  66. <!--
  67. ===============================================================================================
  68. appendMetadataToDocument - add the results of the requests into the right place
  69. ===============================================================================================
  70. -->
  71. <xts:block id="extractProcedureDetails" mode="interpret" processor="XSLT" type="exec" dependency="checkExistingParameters" mandatory="false">
  72. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  73. <xts:logicsheet path="logicsheets/portal.xsl"/>
  74. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" 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/">
  75. <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
  76. <xsl:template match="/root">
  77. <xts:sequence>
  78. <xts:append select="/root">
  79. <xsl:choose>
  80. <xsl:when test="/root/env/param[@name='procedureDetails']">
  81. <xsl:value-of select="/root/env/param[@name='procedureDetails']" disable-output-escaping="yes"/>
  82. </xsl:when>
  83. <xsl:otherwise>
  84. <procedureDetails>
  85. <ResponseRoot>
  86. <xsl:element name="folder"> <!--folder _path="[pubsds]" _ref="[pubsds]"-->
  87. <xsl:element name="updateSubject">
  88. <xsl:attribute name="_path"><xsl:value-of select="/root/env/param[@name='sql_procedure_name']"/></xsl:attribute>
  89. <xsl:attribute name="_ref"><xsl:value-of select="/root/env/param[@name='sql_procedure_name']"/></xsl:attribute>
  90. <xsl:attribute name="canonicalName">
  91. <xsl:variable name="canonicalName">
  92. <xsl:call-template name="substring-after-last">
  93. <xsl:with-param name="string" select="/root/env/param[@name='sql_procedure_name']" />
  94. <xsl:with-param name="delimiter" select="'.['" />
  95. </xsl:call-template>
  96. </xsl:variable>
  97. <xsl:value-of select="substring-before($canonicalName,']')"/>
  98. </xsl:attribute>
  99. <xsl:apply-templates select="/root/agent_item//name"/>
  100. <xsl:apply-templates select="/root/agent_item//parameterName"/>
  101. </xsl:element>
  102. </xsl:element>
  103. </ResponseRoot>
  104. </procedureDetails>
  105. </xsl:otherwise>
  106. </xsl:choose>
  107. </xts:append>
  108. </xts:sequence>
  109. </xsl:template>
  110. <xsl:template name="substring-after-last">
  111. <xsl:param name="string" />
  112. <xsl:param name="delimiter" />
  113. <xsl:choose>
  114. <xsl:when test="contains($string, $delimiter)">
  115. <xsl:call-template name="substring-after-last">
  116. <xsl:with-param name="string"
  117. select="substring-after($string, $delimiter)" />
  118. <xsl:with-param name="delimiter" select="$delimiter" />
  119. </xsl:call-template>
  120. </xsl:when>
  121. <xsl:otherwise><xsl:value-of select="$string" /></xsl:otherwise>
  122. </xsl:choose>
  123. </xsl:template>
  124. <xsl:template match="name">
  125. <xsl:element name="procParameter">
  126. <xsl:attribute name="parameterName"><xsl:value-of select="."/></xsl:attribute>
  127. <xsl:attribute name="value">?<xsl:value-of select="."/>?</xsl:attribute>
  128. </xsl:element>
  129. </xsl:template>
  130. <xsl:template match="parameterName">
  131. <xsl:element name="procParameter">
  132. <xsl:attribute name="parameterName"><xsl:value-of select="."/></xsl:attribute>
  133. <xsl:attribute name="value">?<xsl:value-of select="."/>?</xsl:attribute>
  134. </xsl:element>
  135. </xsl:template>
  136. <pf:serialize-xml/>
  137. </xsl:stylesheet>
  138. </xts:block>
  139. <!--
  140. ===============================================================================================
  141. appendMetadataToDocument - add the results of the requests into the right place
  142. ===============================================================================================
  143. -->
  144. <xts:block id="extractPassedParameterValues" mode="interpret" processor="XSLT" type="exec" dependency="extractProcedureDetails" mandatory="false">
  145. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  146. <xts:logicsheet path="logicsheets/portal.xsl"/>
  147. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" 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/">
  148. <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
  149. <xsl:template match="/root">
  150. <xts:sequence>
  151. <xts:append select="/root">
  152. <connectionParameterValues>
  153. <xsl:value-of select="/root/env/param[@name='parameterValues']" disable-output-escaping="yes"/>
  154. </connectionParameterValues>
  155. </xts:append>
  156. </xts:sequence>
  157. </xsl:template>
  158. <pf:serialize-xml/>
  159. </xsl:stylesheet>
  160. </xts:block>
  161. <!--
  162. ===============================================================================================
  163. appendMetadataToDocument - add the results of the requests into the right place
  164. ===============================================================================================
  165. -->
  166. <xts:block id="clearStaleConnectionParameterValues" mode="interpret" processor="XSLT" type="exec" dependency="extractPassedParameterValues" mandatory="false">
  167. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  168. <xts:logicsheet path="logicsheets/portal.xsl"/>
  169. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" 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/">
  170. <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
  171. <xsl:template match="/root">
  172. <xts:sequence>
  173. <xts:append select="/root">
  174. <xsl:for-each select="/root/agent_item/parameterData/parameterValues/item[starts-with(./*[local-name() = 'name'], 'credential:')]">
  175. <xsl:variable name="name" select="./*[local-name() = 'name']"/>
  176. <xsl:if test="not(/root/connectionParameterValues/item[./*[local-name() = $name]])">
  177. <xts:delete select="/root/agent_item/parameterData/parameterValues/item[./*[local-name()='name'] = '{$name}']"/>
  178. </xsl:if>
  179. </xsl:for-each>
  180. </xts:append>
  181. </xts:sequence>
  182. </xsl:template>
  183. <pf:serialize-xml/>
  184. </xsl:stylesheet>
  185. </xts:block>
  186. <!--
  187. ===============================================================================================
  188. ProcessResponse - Process the response of the call and transform it into a standard xml structure
  189. ===============================================================================================
  190. -->
  191. <xts:block id="processResponse" mode="interpret" dependency="clearStaleConnectionParameterValues" mandatory="false" processor="XSLT" type="exec">
  192. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
  193. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  194. <xsl:template match="/root">
  195. <xsl:variable name="storedProc">
  196. <xsl:choose>
  197. <xsl:when test="/root/env/param[@name='sql_procedure_name'] and /root/env/param[@name='sql_procedure_name']!=''">
  198. <xsl:value-of select="/root/env/param[@name='sql_procedure_name']"/>
  199. </xsl:when>
  200. <xsl:otherwise>
  201. <xsl:value-of select="/root/*[local-name()='procedureDetails']/*[local-name()='ResponseRoot']/*[local-name()='folder']/descendant::updateSubject[1]/@_ref"/>
  202. </xsl:otherwise>
  203. </xsl:choose>
  204. </xsl:variable>
  205. <!-- This will need to change when QF fix the bug with the getParametersSpecification method-->
  206. <xts:sequence>
  207. <xts:append>
  208. <parametersResponse>
  209. <parameter>
  210. <xsl:for-each select="/root/procedureDetails/ResponseRoot/folder//updateSubject[@_ref=$storedProc]/procParameter">
  211. <item>
  212. <xsl:for-each select="./@*">
  213. <xsl:variable name="name">
  214. <xsl:value-of select="translate(local-name(),'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
  215. </xsl:variable>
  216. <xsl:element name="{$name}">
  217. <xsl:value-of select="."/>
  218. </xsl:element>
  219. </xsl:for-each>
  220. <name>
  221. <xsl:value-of select="@parameterName"/>
  222. </name>
  223. <type>
  224. <xsl:value-of select="@datatype"/>
  225. </type>
  226. </item>
  227. </xsl:for-each>
  228. <!--no sneak in the passed connection parameter values -->
  229. <xsl:for-each select="/root/connectionParameterValues/*/item">
  230. <item>
  231. <value>
  232. <xsl:value-of select="substring-after(./bus:name, ':')"/>
  233. </value>
  234. <name>
  235. <xsl:value-of select="./bus:name"/>
  236. </name>
  237. <type>credential</type>
  238. </item>
  239. </xsl:for-each>
  240. </parameter>
  241. </parametersResponse>
  242. </xts:append>
  243. </xts:sequence>
  244. </xsl:template>
  245. </xsl:stylesheet>
  246. </xts:block>
  247. <!--
  248. ================================================================================
  249. check that we have all the parameters, even those without saved values
  250. and produce a block of xml to be used by the display that contains all the parameters and any parameter values that may have been
  251. saved or recently generated by this page via the rs or the model insert button
  252. remove any saved params that are no longer valid
  253. ===============================================================================================
  254. -->
  255. <xts:block id="mergeParameters" path="/ags/parameters/mergeParameters.xslt" dependency="processResponse" processor="XSLT" type="exec" mandatory="false">
  256. </xts:block>
  257. <!--
  258. ================================================================================
  259. Append the credential param vals
  260. ===============================================================================================
  261. -->
  262. <xts:block id="appendCredentialParams" dependency="mergeParameters" processor="XSLT" type="exec" mandatory="false">
  263. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="xts xsl">
  264. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  265. <xsl:template match="/">
  266. <xts:sequence>
  267. <xts:append select="/root/agent_item/parameterData/parameterValues">
  268. <xsl:for-each select="/root/connectionParameterValues/*/item">
  269. <xsl:variable name="parmName" select="./*[local-name()='name']"/>
  270. <xsl:if test="not(/root/agent_item/parameterData/parameterValues/item[./*[local-name()='name'] = $parmName])">
  271. <!--now sneak in the passed connection parameter values (if its not there) -->
  272. <xsl:copy-of select="."/>
  273. </xsl:if>
  274. </xsl:for-each>
  275. </xts:append>
  276. </xts:sequence>
  277. </xsl:template>
  278. </xsl:stylesheet>
  279. </xts:block>
  280. <!--
  281. ================================================================================
  282. if We have just come back from a jaunt round the report server, update the agent task blob
  283. ===============================================================================================
  284. -->
  285. <xts:block id="createParametersBlob" path="/ags/parameters/createParametersBlob.xslt" dependency="appendCredentialParams" processor="XSLT" type="exec">
  286. <xts:logicsheet path="logicsheets/portal.xsl"/>
  287. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  288. </xts:block>
  289. <!--
  290. ===============================================================================================
  291. get connection parameter info for the display
  292. ===============================================================================================
  293. -->
  294. <xts:block id="expandCredentialInfomation" path="/ags/parameters/expandCredentialInformation.xslt" dependency="createParametersBlob" processor="XSLT" type="exec" mandatory="false" condition=".[/root/agent_item/parameterData/*[local-name()='parameterValues']]">
  295. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  296. </xts:block>
  297. <!--
  298. ===============================================================================================
  299. retrieve datasource connection information for the display
  300. ===============================================================================================
  301. -->
  302. <xts:block id="getCredentialInformation" path="/ags/parameters/getCredentialInformation.xslt" dependency="expandCredentialInfomation" processor="XSLT" type="exec" mandatory="false" condition=".[/root/credentialParameters/credentialParameter]">
  303. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  304. </xts:block>
  305. <!--
  306. ================================================================================
  307. Append the report path to the agent path.
  308. ===============================================================================================
  309. -->
  310. <xts:block id="appendDisplayedPageType" dependency="getCredentialInformation" processor="XSLT" type="exec" mandatory="false">
  311. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="xts xsl">
  312. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  313. <xsl:template match="/">
  314. <xts:sequence>
  315. <xts:append select="/root">
  316. <displayedPage quote-string="">sql</displayedPage>
  317. </xts:append>
  318. </xts:sequence>
  319. </xsl:template>
  320. </xsl:stylesheet>
  321. </xts:block>
  322. <!--
  323. ================================================================================
  324. create a data structure for the display to work on....
  325. take the report server parameters as the basis and include the default literal summary and model values
  326. format:
  327. <parametersDisplay>
  328. <parameter name="... identifier" caption="localised dislpay name" multivalued="true/false" required="true/false" type="" literalValue="" modelValue=""/>
  329. </parametersDisplay>
  330. ===============================================================================================
  331. -->
  332. <xts:block id="createDisplayData" path="/ags/parameters/createDisplayData.xslt" dependency="appendDisplayedPageType" processor="XSLT" type="exec" mandatory="false">
  333. <xts:logicsheet path="logicsheets/portal.xsl"/>
  334. <xts:logicsheet path="ags/logicsheets/dialogs.xsl"/>
  335. </xts:block>
  336. <!--
  337. ===============================================================================================
  338. genMarkup -
  339. ===============================================================================================
  340. -->
  341. <xts:block id="genMarkup" type="exec" processor="XSLT" dependency="createDisplayData" mandatory="false">
  342. <!-- logicsheets -->
  343. <xts:logicsheet path="logicsheets/portal.xsl"/>
  344. <!-- agent studio logicsheets -->
  345. <xts:logicsheet path="ags/logicsheets/arguments.xslt"/>
  346. <xts:logicsheet path="ags/logicsheets/dialogs.xsl"/>
  347. <!-- Dialog specific logicsheets -->
  348. <xts:logicsheet path="logicsheets/presentation/dialog/ui-templates.xsl"/>
  349. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  350. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  351. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  352. <!-- Generic logicsheets -->
  353. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  354. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  355. <!-- apply the form logic -->
  356. <!-- Prevent the href from appearing in the status bar. -->
  357. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  358. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:agsarg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/arguments/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:out="http://www.w3.org/1999/XSL/Transform" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/" xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/" xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/" xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/" xmlns:req-params="http://developer.cognos.com/schemas/request/params" xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/" xmlns:xos="http://developer.cognos.com/schemas/xts/output/" xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/" xmlns:agsdlg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/dialog/" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:x="x" exclude-result-prefixes="agsarg xts xsl cm pf xtsext lyt dp df cf cp xos utml agsdlg x">
  359. <xsl:output method="xml" encoding="utf-8" indent="no"/>
  360. <xsl:key name="request-param" match="/root/*[local-name()='requestParams']/*[local-name()='param']" use="@name"/>
  361. <pf:variables/>
  362. <xsl:variable name="ags_image_root">../ags/images/summary/</xsl:variable>
  363. <xsl:variable name="jobDefinition" select="false()"/>
  364. <xsl:variable name="spacer">
  365. <img height="10" width="10">
  366. <xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute>
  367. </img>
  368. </xsl:variable>
  369. <!-- declared a variable to determine if a report has been selected, used for validation purposes-->
  370. <!-- determine which dialog to show when the set... options link is clicked-->
  371. <xsl:template match="/">
  372. <xts:sequence>
  373. <xts:append select="/root/output">
  374. <xos:part>
  375. <xos:entityHeader>
  376. <xos:param name="Content-Type">text/xml; charset=utf-8</xos:param>
  377. </xos:entityHeader>
  378. <xos:entityBody>
  379. <asyncReply>
  380. <xts:transform name="XMLEncode">
  381. <getParametersResponse>
  382. <markup>
  383. <xts:transform name="XMLEncode">
  384. <dp:list width="100%">
  385. <dp:section>
  386. <dp:label>
  387. <xts:string id="DIALOG_SQL_STOREDPROC"/>
  388. </dp:label>
  389. </dp:section>
  390. <dp:section>
  391. <xsl:choose>
  392. <xsl:when test="/root/procedureDetails/ResponseRoot/folder//updateSubject">
  393. <select id="sql_procedure_name" name="sql_procedure_name" style="width:40%" onchange="reload();">
  394. <xsl:for-each select="/root/procedureDetails/ResponseRoot/folder//updateSubject">
  395. <option>
  396. <xsl:attribute name="value"><xsl:value-of select="@_ref"/></xsl:attribute>
  397. <xsl:if test="string(@_ref) = string(/root/env/param[@name='sql_procedure_name'])">
  398. <xsl:attribute name="selected">selected</xsl:attribute>
  399. </xsl:if>
  400. <xsl:value-of select="@canonicalName"/>
  401. </option>
  402. </xsl:for-each>
  403. </select>
  404. </xsl:when>
  405. <xsl:when test="/root/soapFault">
  406. <xsl:text>
  407. <xts:string id="DIALOG_MESSAGE_NOT_AVAILABLE"/>
  408. </xsl:text>
  409. </xsl:when>
  410. <xsl:otherwise>
  411. <xsl:text>
  412. <xts:string id="DIALOG_MESSAGE_NONE"/>
  413. </xsl:text>
  414. </xsl:otherwise>
  415. </xsl:choose>
  416. </dp:section>
  417. </dp:list>
  418. <!--as the contents of the sql promptDiv contains two elements, ive separated them with raw html as nested layouts cause
  419. indentation problems and layouts and their sections must be parsed at the same time-->
  420. <table border="0" cellpadding="0" cellspacing="0" width="100%">
  421. <tr>
  422. <td height="10" width="100%">
  423. <img height="10" width="1">
  424. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  425. </img>
  426. </td>
  427. </tr>
  428. </table>
  429. <xsl:if test="/root/procedureDetails/ResponseRoot/folder//updateSubject">
  430. <dp:section>
  431. <xsl:variable name="storedProc">
  432. <xsl:choose>
  433. <xsl:when test="/root/env/param[@name='sql_procedure_name'] and /root/env/param[@name='sql_procedure_name']!=''">
  434. <xsl:value-of select="/root/env/param[@name='sql_procedure_name']"/>
  435. </xsl:when>
  436. <xsl:otherwise>
  437. <xsl:value-of select="/root/*[local-name()='procedureDetails']/*[local-name()='ResponseRoot']/*[local-name()='folder']/descendant::updateSubject[1]/@_ref"/>
  438. </xsl:otherwise>
  439. </xsl:choose>
  440. </xsl:variable>
  441. <agsarg:arguments>
  442. <displayedPage>sql</displayedPage>
  443. </agsarg:arguments>
  444. </dp:section>
  445. </xsl:if>
  446. </xts:transform>
  447. </markup>
  448. <!-- take a copy of the parameter display element - which is very nicely formatted -->
  449. <xsl:copy-of select="/root/parametersDisplay"/>
  450. <sp_name>
  451. <xsl:value-of select="/root/env/param[@name='sql_procedure_name']"/>
  452. </sp_name>
  453. </getParametersResponse>
  454. </xts:transform>
  455. </asyncReply>
  456. </xos:entityBody>
  457. </xos:part>
  458. </xts:append>
  459. </xts:sequence>
  460. </xsl:template>
  461. </xsl:stylesheet>
  462. </xts:block>
  463. </xts:morphlet>