prompt.xsd 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: moser
  5. (C) Copyright IBM Corp. 2015, 2020
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="7.4">
  9. <xsd:include schemaLocation="business.xsd"/>
  10. <xsd:include schemaLocation="metadata.xsd"/>
  11. <xsd:element name="parameterValueSet">
  12. <xsd:annotation>
  13. <xsd:documentation>A collection of parameter values.</xsd:documentation>
  14. </xsd:annotation>
  15. <xsd:complexType>
  16. <xsd:complexContent>
  17. <xsd:extension base="objectType">
  18. <xsd:sequence>
  19. <xsd:element ref="parameterValue" minOccurs="0" maxOccurs="unbounded"/>
  20. </xsd:sequence>
  21. </xsd:extension>
  22. </xsd:complexContent>
  23. </xsd:complexType>
  24. </xsd:element>
  25. <xsd:element name="parameterValue">
  26. <xsd:annotation>
  27. <xsd:documentation>A holder for range of parameter value objects.</xsd:documentation>
  28. </xsd:annotation>
  29. <xsd:complexType>
  30. <xsd:sequence>
  31. <xsd:element name="parameterName" type="xsd:string">
  32. <xsd:annotation>
  33. <xsd:documentation>The name of the parameter, this is what appears between the question marks in an expression.
  34. E.g. ?p country?</xsd:documentation>
  35. </xsd:annotation>
  36. </xsd:element>
  37. <xsd:element name="dataType" type="parameterDataType">
  38. <xsd:annotation>
  39. <xsd:documentation>datatype for the parameter</xsd:documentation>
  40. </xsd:annotation>
  41. </xsd:element>
  42. <xsd:element name="invert" type="xsd:boolean" default="false" minOccurs="0">
  43. <xsd:annotation>
  44. <xsd:documentation>If true, negate cumulative result of all simple value operations OR-ed gether to produce final result of this value. E.g.
  45. NOT ( x = 'a' OR x = 'b')</xsd:documentation>
  46. </xsd:annotation>
  47. </xsd:element>
  48. <xsd:element name="values" type="valueType" minOccurs="0" maxOccurs="unbounded"/>
  49. </xsd:sequence>
  50. </xsd:complexType>
  51. </xsd:element>
  52. <xsd:element name="parameterFault">
  53. <xsd:annotation>
  54. <xsd:documentation>The information that is returned by the server when a parameter is used, but there was no corresponding parameter on the request. Defined here for completeness sake, not for persisting in the model.</xsd:documentation>
  55. </xsd:annotation>
  56. <xsd:complexType>
  57. <xsd:sequence>
  58. <xsd:element name="parameterName" type="xsd:string">
  59. <xsd:annotation>
  60. <xsd:documentation>The name of the parameter, this is what appears between the question marks in an expression.
  61. E.g. ?p country?
  62. use this to provide values on the next data request.</xsd:documentation>
  63. </xsd:annotation>
  64. </xsd:element>
  65. <xsd:element name="dataType" type="parameterDataType">
  66. <xsd:annotation>
  67. <xsd:documentation>datatype for the parameter</xsd:documentation>
  68. </xsd:annotation>
  69. </xsd:element>
  70. <xsd:element name="modelFilterItem" type="xsd:string" minOccurs="0">
  71. <xsd:annotation>
  72. <xsd:documentation>The model item that is closest to the use of the parameter in the expression.
  73. E.g.:
  74. expression:
  75. country.cname = ?country?
  76. Parameter name: country
  77. dataType: string
  78. modelFilterItem: country.cname</xsd:documentation>
  79. </xsd:annotation>
  80. </xsd:element>
  81. <xsd:element name="capabilities" type="parameterCapabilitiesType" minOccurs="0"/>
  82. </xsd:sequence>
  83. </xsd:complexType>
  84. </xsd:element>
  85. <xsd:complexType name="parameterCapabilitiesType">
  86. <xsd:all>
  87. <xsd:element name="optional" type="xsd:boolean" minOccurs="0">
  88. <xsd:annotation>
  89. <xsd:documentation>Set to true when a filter in the query uses the parameter and the filter is marked as optional.</xsd:documentation>
  90. </xsd:annotation>
  91. </xsd:element>
  92. <xsd:element name="multivalued" type="xsd:boolean" minOccurs="0">
  93. <xsd:annotation>
  94. <xsd:documentation>Set to true when multiple values or ranges can be accepted.
  95. col in ?p1?
  96. col in_range ?p2?
  97. col in_range_truncated ?p3?</xsd:documentation>
  98. </xsd:annotation>
  99. </xsd:element>
  100. <xsd:element name="discreteValue" type="xsd:boolean" minOccurs="0">
  101. <xsd:annotation>
  102. <xsd:documentation>Set to true when a single value is expected.
  103. col = ?p1?</xsd:documentation>
  104. </xsd:annotation>
  105. </xsd:element>
  106. <xsd:element name="boundRange" type="xsd:boolean" minOccurs="0">
  107. <xsd:annotation>
  108. <xsd:documentation>Set to true for:
  109. col BETWEEN ?p1? and ?p1?</xsd:documentation>
  110. </xsd:annotation>
  111. </xsd:element>
  112. <xsd:element name="unboundedRange" type="xsd:boolean" minOccurs="0">
  113. <xsd:annotation>
  114. <xsd:documentation>Set to true for:
  115. col GT ?p1?
  116. col GE ?p2?
  117. col LT ?p3?
  118. col LE ?p4?
  119. Use symbol for 2 char oper.</xsd:documentation>
  120. </xsd:annotation>
  121. </xsd:element>
  122. </xsd:all>
  123. </xsd:complexType>
  124. <xsd:element name="prompt">
  125. <xsd:complexType>
  126. <xsd:complexContent>
  127. <xsd:extension base="objectType">
  128. <xsd:sequence>
  129. <xsd:element name="parameterName" type="xsd:string">
  130. <xsd:annotation>
  131. <xsd:documentation>name of the parameter, use this to provide values on the next data request.</xsd:documentation>
  132. </xsd:annotation>
  133. </xsd:element>
  134. <xsd:element name="uiControlReference" type="xsd:string">
  135. <xsd:annotation>
  136. <xsd:documentation>Prompt UI control identifier</xsd:documentation>
  137. </xsd:annotation>
  138. </xsd:element>
  139. <xsd:element name="lowerLimit" type="xsd:string" minOccurs="0">
  140. <xsd:annotation>
  141. <xsd:documentation>Optional attribute indicates cut off lower limit for UI control.
  142. E.g. first date that can be selected - 2018-01-01
  143. # let year = timestampMask( toLocal ( $current_timestamp),
  144. 'yyyy');
  145. year + '-01-01' # </xsd:documentation>
  146. </xsd:annotation>
  147. </xsd:element>
  148. <xsd:element name="upperLimit" type="xsd:string" minOccurs="0">
  149. <xsd:annotation>
  150. <xsd:documentation>Optional attribute indicates upper cut off limit for UI control.
  151. For example - last date that can be selected, e.g. 2032-12-11
  152. # let year = timestampMask( toLocal ( $current_timestamp), 'yyyy');
  153. year + '-12-31' # </xsd:documentation>
  154. </xsd:annotation>
  155. </xsd:element>
  156. <xsd:choice>
  157. <xsd:sequence>
  158. <xsd:annotation>
  159. <xsd:documentation>Used for select with value and select with search</xsd:documentation>
  160. </xsd:annotation>
  161. <xsd:element name="staticValueSelector" type="valueType" minOccurs="0" maxOccurs="unbounded">
  162. <xsd:annotation>
  163. <xsd:documentation>These elements are added to the top of selectable values.
  164. The values from the queryValueSelector will follow the static choices.
  165. The UI controls have freedom to use this field, these are user defined ranges or values that can be used in the selection. For example when defining ranges, the values used in the ranges may not be defined in the database ( ranges: :10, 11-20, 21: , the database may not contain the number 11, but 11 can still be used in defining the range).</xsd:documentation>
  166. </xsd:annotation>
  167. </xsd:element>
  168. <xsd:element ref="queryValueSelector" minOccurs="0"/>
  169. </xsd:sequence>
  170. <xsd:element name="refDrillGroup" type="xsd:string">
  171. <xsd:annotation>
  172. <xsd:documentation>Used for select with tree.
  173. Each segment of the navigation path is a level in the tree.</xsd:documentation>
  174. </xsd:annotation>
  175. </xsd:element>
  176. </xsd:choice>
  177. </xsd:sequence>
  178. </xsd:extension>
  179. </xsd:complexContent>
  180. </xsd:complexType>
  181. </xsd:element>
  182. <xsd:element name="queryValueSelector">
  183. <xsd:annotation>
  184. <xsd:documentation>Use these items to make a query to load the list of selectable values</xsd:documentation>
  185. </xsd:annotation>
  186. <xsd:complexType>
  187. <xsd:sequence>
  188. <xsd:element name="useExpression" type="xsd:string"/>
  189. <xsd:element name="displayExpression" type="xsd:string" minOccurs="0"/>
  190. <xsd:element name="sortExpression" minOccurs="0">
  191. <xsd:complexType>
  192. <xsd:sequence>
  193. <xsd:element name="direction" type="sortOrder" default="ascending" minOccurs="0"/>
  194. <xsd:element name="nullPlacement" type="sortOrderNullPlacement" minOccurs="0">
  195. <xsd:annotation>
  196. <xsd:documentation>Placement of NULLs, either first, last, or depending on the underlying database. For most databases NULLS LAST is the default for ascending order, and NULLS FIRST is the default for descending order.
  197. If the element is not specified then it will not be specified in the native SQL, for Cognos SQL it will be ascending nulls first, descending nulls last.</xsd:documentation>
  198. </xsd:annotation>
  199. </xsd:element>
  200. </xsd:sequence>
  201. </xsd:complexType>
  202. </xsd:element>
  203. </xsd:sequence>
  204. </xsd:complexType>
  205. </xsd:element>
  206. <xsd:simpleType name="valueOperatorType">
  207. <xsd:restriction base="xsd:string">
  208. <xsd:enumeration value="isNull"/>
  209. <xsd:enumeration value="greaterThan"/>
  210. <xsd:enumeration value="greaterEqual"/>
  211. <xsd:enumeration value="lessThan"/>
  212. <xsd:enumeration value="lessEqual"/>
  213. <xsd:enumeration value="notEqual"/>
  214. <xsd:enumeration value="equal"/>
  215. <xsd:enumeration value="between"/>
  216. </xsd:restriction>
  217. </xsd:simpleType>
  218. <xsd:simpleType name="parameterDataType">
  219. <xsd:restriction base="xsd:string">
  220. <xsd:enumeration value="boolean"/>
  221. <xsd:enumeration value="string"/>
  222. <xsd:enumeration value="integer"/>
  223. <xsd:enumeration value="decimal"/>
  224. <xsd:enumeration value="datetime"/>
  225. <xsd:enumeration value="time"/>
  226. <xsd:enumeration value="date"/>
  227. <xsd:enumeration value="interval"/>
  228. <xsd:enumeration value="memberUniqueName"/>
  229. </xsd:restriction>
  230. </xsd:simpleType>
  231. <xsd:complexType name="valueType">
  232. <xsd:annotation>
  233. <xsd:documentation>An individual value, could also be a null value. A null values translates in SQL to an IS NULL condition</xsd:documentation>
  234. </xsd:annotation>
  235. <xsd:sequence>
  236. <xsd:element name="operator" type="valueOperatorType"/>
  237. <xsd:element name="use" type="xsd:string" minOccurs="0">
  238. <xsd:annotation>
  239. <xsd:documentation>This contains the value to filter on, except when operator is set to isNull</xsd:documentation>
  240. </xsd:annotation>
  241. </xsd:element>
  242. <xsd:element name="display" type="xsd:string" minOccurs="0"/>
  243. <xsd:element name="use2" type="xsd:string" minOccurs="0">
  244. <xsd:annotation>
  245. <xsd:documentation>Only used for operation=between as the second operand.</xsd:documentation>
  246. </xsd:annotation>
  247. </xsd:element>
  248. <xsd:element name="display2" type="xsd:string" minOccurs="0">
  249. <xsd:annotation>
  250. <xsd:documentation>Only used for operation=between for the second operand</xsd:documentation>
  251. </xsd:annotation>
  252. </xsd:element>
  253. </xsd:sequence>
  254. </xsd:complexType>
  255. <xsd:element name="parameterFeedbackInfo">
  256. <xsd:annotation>
  257. <xsd:documentation>The information that is returned by the server when parameter feedback information is requested.
  258. Defined here for completeness sake, not for persisting in the model.</xsd:documentation>
  259. </xsd:annotation>
  260. <xsd:complexType>
  261. <xsd:sequence>
  262. <xsd:element name="parameterName" type="xsd:string">
  263. <xsd:annotation>
  264. <xsd:documentation>The name of the parameter, this is what appears between the question marks in an expression.
  265. E.g. ?p country?
  266. use this to provide values on the next data request.</xsd:documentation>
  267. </xsd:annotation>
  268. </xsd:element>
  269. <xsd:element name="dataType" type="parameterDataType">
  270. <xsd:annotation>
  271. <xsd:documentation>datatype for the parameter</xsd:documentation>
  272. </xsd:annotation>
  273. </xsd:element>
  274. <xsd:element name="modelFilterItem" type="xsd:string" minOccurs="0">
  275. <xsd:annotation>
  276. <xsd:documentation>The model item that is closest to the use of the parameter in the expression.
  277. E.g.:
  278. expression:
  279. country.cname = ?country?
  280. Parameter name: country
  281. dataType: string
  282. modelFilterItem: country.cname</xsd:documentation>
  283. </xsd:annotation>
  284. </xsd:element>
  285. <xsd:element name="capabilities" type="parameterCapabilitiesType" minOccurs="0"/>
  286. <xsd:element name="invert" type="xsd:boolean" default="false" minOccurs="0">
  287. <xsd:annotation>
  288. <xsd:documentation>If true, negate cumulative result of all simple value operations OR-ed gether to produce final result of this value. E.g.
  289. NOT ( x = 'a' OR x = 'b')</xsd:documentation>
  290. </xsd:annotation>
  291. </xsd:element>
  292. <xsd:element name="values" type="valueType" minOccurs="0" maxOccurs="unbounded"/>
  293. <xsd:element name="location" type="parameterLocationType" minOccurs="0">
  294. <xsd:annotation>
  295. <xsd:documentation>Parameter values that are applied to a request for data can be obtained from various places:
  296. request - supplied by the client on the request
  297. query - defined as part of the query (NYI)
  298. global - global parameters
  299. model - parameter values defined in the data module.
  300. </xsd:documentation>
  301. </xsd:annotation>
  302. </xsd:element>
  303. </xsd:sequence>
  304. </xsd:complexType>
  305. </xsd:element>
  306. <xsd:simpleType name="parameterLocationType">
  307. <xsd:restriction base="xsd:string">
  308. <xsd:enumeration value="request"/>
  309. <xsd:enumeration value="query"/>
  310. <xsd:enumeration value="global"/>
  311. <xsd:enumeration value="module"/>
  312. <xsd:enumeration value="datasource"/>
  313. </xsd:restriction>
  314. </xsd:simpleType>
  315. </xsd:schema>