pcodpxqeFormatRules.xml 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: OQP
  5. (C) Copyright IBM Corp. 2005, 2010
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM corp.
  7. -->
  8. <!-- When a IBM Cognos developer modifies a rule, it is important to add an english equivalent of it in mdds/docs/RCL001, MDDS Expression Formatting Rules.doc
  9. in section 4.1 in order to keep the spec up to date. -->
  10. <expressionFormatRules xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="providerFormatRulesXQE.xsd">
  11. <defaultTransformationLayer>
  12. <transformation xsi:type="unaryTransformation">
  13. <unaryCondition operandState="present"/>
  14. <result state="operandValue"/>
  15. </transformation>
  16. <transformation xsi:type="binaryTransformation">
  17. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="present" rightHandSide="notPresent"/>
  18. <result state="left"/>
  19. </transformation>
  20. <transformation xsi:type="binaryTransformation">
  21. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="notPresent" rightHandSide="present"/>
  22. <result state="right"/>
  23. </transformation>
  24. <transformation xsi:type="binaryTransformation">
  25. <binaryCondition xsi:type="binaryComparisonCondition" comparison="eq"/>
  26. <result state="left"/>
  27. </transformation>
  28. <transformation xsi:type="binaryTransformation">
  29. <binaryCondition xsi:type="binaryComparisonCondition" comparison="neq"/>
  30. <result state="notPresent"/>
  31. </transformation>
  32. </defaultTransformationLayer>
  33. <propertyTransformationLayer>
  34. <!--Common properties-->
  35. <property name="xml:lang" valueType="text" formatTypes="all"/>
  36. <property name="unitOfMeasure" valueType="text" defaultValue="*" formatTypes="all" hidden="true">
  37. <transformation xsi:type="binaryTransformation"> <!-- When both operands have different unit of measure symbols, the result will not have one -->
  38. <binaryCondition xsi:type="binaryComparisonCondition" comparison="neq"/>
  39. <result state="default"/>
  40. </transformation>
  41. <transformation xsi:type="caseTransformation">
  42. <case>
  43. <condition xsi:type="orCondition"> <!-- When only one operand has a unit of measure symbol... -->
  44. <condition xsi:type="binaryPatternCondition" leftHandSide="present" rightHandSide="notPresent"/>
  45. <condition xsi:type="binaryPatternCondition" leftHandSide="notPresent" rightHandSide="present"/>
  46. </condition>
  47. <transformation xsi:type="caseTransformation">
  48. <case>
  49. <condition xsi:type="orCondition"> <!-- If that symbol is an asterisk then keep it -->
  50. <condition xsi:type="valueCondition" operandIndex="0" propertyName="unitOfMeasure" value="*"/>
  51. <condition xsi:type="valueCondition" operandIndex="1" propertyName="unitOfMeasure" value="*"/>
  52. </condition>
  53. <transformation xsi:type="binaryTransformation"><!--Since the result will be a mixed unit, the format type should be numeric. We don't want a $#.##*-->
  54. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="dontCare"/>
  55. <result state="default" propertyName="formatType"/>
  56. </transformation>
  57. <transformation xsi:type="binaryTransformation">
  58. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="dontCare"/>
  59. <result state="default"/>
  60. </transformation>
  61. </case>
  62. <case> <!-- If the other operand is a constant then keep the unit symbol -->
  63. <condition xsi:type="valueCondition" operandIndex="1" propertyName="formatType" value="constantFormat"/>
  64. <transformation xsi:type="binaryTransformation">
  65. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="present" rightHandSide="dontCare"/>
  66. <result state="left"/>
  67. </transformation>
  68. </case>
  69. <case>
  70. <condition xsi:type="valueCondition" operandIndex="0" propertyName="formatType" value="constantFormat"/>
  71. <transformation xsi:type="binaryTransformation">
  72. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="present"/>
  73. <result state="right"/>
  74. </transformation>
  75. </case>
  76. </transformation>
  77. <transformation xsi:type="binaryTransformation"> <!-- Otherwise don't keep the symbol -->
  78. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="dontCare"/>
  79. <result state="notPresent"/>
  80. </transformation>
  81. </case>
  82. </transformation>
  83. </property>
  84. <!--Format pattern-->
  85. <property name="formatType" valueType="text" defaultValue="numberFormat" formatTypes="all" hidden="true">
  86. <transformation xsi:type="caseTransformation" alwaysApply="true">
  87. <case>
  88. <condition xsi:type="orCondition">
  89. <condition xsi:type="valueCondition" operandIndex="0" propertyName="unitOfMeasure" value="*"/>
  90. <condition xsi:type="valueCondition" operandIndex="1" propertyName="unitOfMeasure" value="*"/>
  91. </condition>
  92. <transformation xsi:type="binaryTransformation">
  93. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="dontCare"/>
  94. <result state="default"/>
  95. </transformation>
  96. </case>
  97. </transformation>
  98. </property>
  99. <!--Decimal precision-->
  100. <property name="decimalSize" valueType="number" defaultValue="3" formatTypes="all">
  101. <transformation xsi:type="binaryTransformation">
  102. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="dontCare"/>
  103. <result state="max"/>
  104. </transformation>
  105. <transformation xsi:type="unaryTransformation">
  106. <unaryCondition operandState="dontCare"/>
  107. <result state="default"/>
  108. </transformation>
  109. </property>
  110. <property name="decimalDelimiter" valueType="text" defaultValue="." formatTypes="all"/>
  111. <!--Scale-->
  112. <property name="scale" valueType="number" formatTypes="all">
  113. <transformation xsi:type="binaryTransformation">
  114. <binaryCondition xsi:type="binaryComparisonCondition" comparison="neq"/>
  115. <result state="min"/>
  116. </transformation>
  117. </property>
  118. <!--Digit grouping-->
  119. <property name="useGrouping" valueType="boolean" formatTypes="all">
  120. <transformation xsi:type="binaryTransformation">
  121. <binaryCondition xsi:type="binaryComparisonCondition" comparison="neq"/>
  122. <result state="true"/>
  123. </transformation>
  124. </property>
  125. <property name="groupDelimiter" valueType="text" formatTypes="all"/>
  126. <property name="groupSize" valueType="number" formatTypes="all"/>
  127. <!--Negative Number Sign -->
  128. <property name="sign" valueType="text" formatTypes="all"/>
  129. <property name="useTrailingSign" valueType="boolean" formatTypes="all"/>
  130. <!--Number format properties-->
  131. <property name="useScientific" valueType="boolean" formatTypes="constantFormat;numberFormat">
  132. <transformation xsi:type="binaryTransformation">
  133. <binaryCondition xsi:type="binaryComparisonCondition" comparison="neq"/>
  134. <result state="true"/>
  135. </transformation>
  136. </property>
  137. <property name="exponentSymbol" valueType="text" formatTypes="constantFormat;numberFormat"/>
  138. <property name="exponentSize" valueType="number" formatTypes="constantFormat;numberFormat"/>
  139. <!--Currency format properties-->
  140. <property name="currencyCode" valueType="text" formatTypes="currencyFormat">
  141. <transformation xsi:type="binaryTransformation" alwaysApply="true">
  142. <binaryCondition xsi:type="binaryComparisonCondition" comparison="neq"/>
  143. <result propertyName="unitOfMeasure" state="default"/>
  144. </transformation>
  145. <transformation xsi:type="binaryTransformation" alwaysApply="true">
  146. <binaryCondition xsi:type="binaryComparisonCondition" comparison="neq"/>
  147. <result propertyName="formatType" state="default"/>
  148. </transformation>
  149. <transformation xsi:type="caseTransformation" alwaysApply="true">
  150. <case>
  151. <condition xsi:type="andCondition">
  152. <condition xsi:type="valueCondition" operandIndex="0" propertyName="formatType" value="currencyFormat"/>
  153. <condition xsi:type="valueCondition" operandIndex="1" propertyName="formatType" value="currencyFormat"/>
  154. </condition>
  155. <transformation xsi:type="binaryTransformation">
  156. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="present" rightHandSide="notPresent"/>
  157. <result state="default" propertyName="unitOfMeasure"/>
  158. </transformation>
  159. <transformation xsi:type="binaryTransformation">
  160. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="notPresent" rightHandSide="present"/>
  161. <result state="default" propertyName="unitOfMeasure"/>
  162. </transformation>
  163. </case>
  164. </transformation>
  165. </property>
  166. <property name="currencySymbol" valueType="text" formatTypes="currencyFormat">
  167. <transformation xsi:type="binaryTransformation" alwaysApply="true">
  168. <binaryCondition xsi:type="binaryComparisonCondition" comparison="neq"/>
  169. <result state="default" propertyName="unitOfMeasure"/>
  170. </transformation>
  171. <transformation xsi:type="binaryTransformation" alwaysApply="true">
  172. <binaryCondition xsi:type="binaryComparisonCondition" comparison="neq"/>
  173. <result state="default" propertyName="formatType"/>
  174. </transformation>
  175. </property>
  176. <property name="intlCurrencySymbol" valueType="text" formatTypes="currencyFormat">
  177. <transformation xsi:type="binaryTransformation">
  178. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="present" rightHandSide="notPresent"/>
  179. <result state="notPresent"/>
  180. </transformation>
  181. <transformation xsi:type="binaryTransformation">
  182. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="notPresent" rightHandSide="present"/>
  183. <result state="notPresent"/>
  184. </transformation>
  185. </property>
  186. <property name="useIntlSymbol" valueType="boolean" formatTypes="currencyFormat">
  187. <transformation xsi:type="binaryTransformation">
  188. <binaryCondition xsi:type="binaryComparisonCondition" comparison="neq"/>
  189. <result state="true"/>
  190. </transformation>
  191. </property>
  192. <property name="useTrailingSymbol" valueType="boolean" formatTypes="currencyFormat"/>
  193. <!--Percent format properties-->
  194. <property name="percentSymbol" valueType="text" formatTypes="percentFormat"/>
  195. <property name="percentScale" valueType="number" formatTypes="percentFormat">
  196. <transformation xsi:type="binaryTransformation">
  197. <binaryCondition xsi:type="binaryComparisonCondition" comparison="neq"/>
  198. <result state="min"/>
  199. </transformation>
  200. </property>
  201. <!--Date format properties-->
  202. <property name="dateStyle" valueType="text" formatTypes="dateFormat"/>
  203. <property name="displayOrder" valueType="text" formatTypes="dateFormat"/>
  204. <property name="showDays" valueType="text" formatTypes="dateFormat"/>
  205. <!--Time format properties-->
  206. <property name="showAmPm" valueType="boolean" formatTypes="timeFormat"/>
  207. <property name="showTimeZone" valueType="boolean" formatTypes="timeFormat"/>
  208. <property name="showHours" valueType="text" formatTypes="timeFormat"/>
  209. <property name="showMinutes" valueType="boolean" formatTypes="timeFormat"/>
  210. <property name="showSeconds" valueType="boolean" formatTypes="timeFormat"/>
  211. <property name="showMilliseconds" valueType="boolean" formatTypes="timeFormat"/>
  212. <property name="clock" valueType="text" formatTypes="timeFormat"/>
  213. </propertyTransformationLayer>
  214. <typeTransformationLayer>
  215. <typeTransformation>
  216. <formatType typeName="constantFormat"/>
  217. <formatType typeName="timeFormat"/>
  218. <formatType typeName="dateFormat"/>
  219. <formatType typeName="percentFormat"/>
  220. <formatType typeName="currencyFormat"/>
  221. <formatType typeName="numberFormat"/>
  222. </typeTransformation>
  223. </typeTransformationLayer>
  224. <expressionTransformationLayer>
  225. <expression name="Concatenation" mdxKeyword=" || "/>
  226. <!-- string concatenation is "+" in MS and "||" in the other MDX versions -->
  227. <expression name="Addition" mdxKeyword=" + "/>
  228. <expression name="Subtraction" mdxKeyword=" - "/>
  229. <expression name="Multiplication" mdxKeyword=" * ">
  230. <typeTransformation>
  231. <formatType typeName="constantFormat"/>
  232. <formatType typeName="percentFormat"/>
  233. <formatType typeName="numberFormat"/>
  234. <formatType typeName="currencyFormat"/>
  235. </typeTransformation>
  236. <property name="unitOfMeasure">
  237. <transformation xsi:type="binaryTransformation">
  238. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="present" rightHandSide="notPresent"/>
  239. <result state="left"/>
  240. </transformation>
  241. <transformation xsi:type="binaryTransformation">
  242. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="notPresent" rightHandSide="present"/>
  243. <result state="right"/>
  244. </transformation>
  245. </property>
  246. <property name="decimalSize">
  247. <transformation xsi:type="caseTransformation">
  248. <case>
  249. <condition xsi:type="andCondition">
  250. <condition xsi:type="valueCondition" operandIndex="0" propertyName="formatType" value="currencyFormat"/>
  251. <condition xsi:type="notCondition">
  252. <condition xsi:type="valueCondition" operandIndex="1" propertyName="formatType" value="currencyFormat"/>
  253. </condition>
  254. </condition>
  255. <transformation xsi:type="binaryTransformation">
  256. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="present" rightHandSide="dontCare"/>
  257. <result state="left"/>
  258. </transformation>
  259. </case>
  260. <case>
  261. <condition xsi:type="andCondition">
  262. <condition xsi:type="notCondition">
  263. <condition xsi:type="valueCondition" operandIndex="0" propertyName="formatType" value="currencyFormat"/>
  264. </condition>
  265. <condition xsi:type="valueCondition" operandIndex="1" propertyName="formatType" value="currencyFormat"/>
  266. </condition>
  267. <transformation xsi:type="binaryTransformation">
  268. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="present"/>
  269. <result state="right"/>
  270. </transformation>
  271. </case>
  272. <case>
  273. <condition xsi:type="andCondition">
  274. <condition xsi:type="valueCondition" operandIndex="0" propertyName="formatType" value="currencyFormat"/>
  275. <condition xsi:type="valueCondition" operandIndex="1" propertyName="formatType" value="currencyFormat"/>
  276. </condition>
  277. <transformation xsi:type="binaryTransformation">
  278. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="empty" rightHandSide="empty"/>
  279. <result state="empty"/>
  280. </transformation>
  281. <transformation xsi:type="binaryTransformation">
  282. <binaryCondition xsi:type="binaryComparisonCondition" comparison="neq"/>
  283. <result state="max"/>
  284. </transformation>
  285. </case>
  286. </transformation>
  287. </property>
  288. </expression>
  289. <expression name="Division" mdxKeyword=" / ">
  290. <typeTransformation>
  291. <formatType typeName="constantFormat"/>
  292. <formatType typeName="percentFormat"/>
  293. <formatType typeName="numberFormat"/>
  294. <formatType typeName="currencyFormat"/>
  295. </typeTransformation>
  296. <property name="unitOfMeasure">
  297. <transformation xsi:type="caseTransformation">
  298. <case>
  299. <condition xsi:type="andCondition"> <!-- If the numerator is not a currency and the denominator is, then the result is assigned an unknown unit. -->
  300. <condition xsi:type="notCondition">
  301. <condition xsi:type="valueCondition" operandIndex="0" propertyName="formatType" value="currencyFormat"/>
  302. </condition>
  303. <condition xsi:type="valueCondition" operandIndex="1" propertyName="formatType" value="currencyFormat"/>
  304. </condition>
  305. <transformation xsi:type="binaryTransformation"><!--Since the result will be a mixed unit, the format type should be numeric. We don't want a #.##%*-->
  306. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="dontCare"/>
  307. <result state="default" propertyName="formatType"/>
  308. </transformation>
  309. <transformation xsi:type="binaryTransformation">
  310. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="dontCare"/>
  311. <result state="default"/>
  312. </transformation>
  313. </case>
  314. </transformation>
  315. <!--Numerator has a unit of measure-->
  316. <transformation xsi:type="binaryTransformation">
  317. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="present" rightHandSide="notPresent"/>
  318. <result state="left"/>
  319. </transformation>
  320. <!--Denominator has a unit of measure-->
  321. <transformation xsi:type="binaryTransformation"><!--Since the result will be a mixed unit, the format type should be numeric. We don't want a $#.##*-->
  322. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="notPresent" rightHandSide="present"/>
  323. <result state="default" propertyName="formatType"/>
  324. </transformation>
  325. <transformation xsi:type="binaryTransformation">
  326. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="notPresent" rightHandSide="present"/>
  327. <result state="default"/>
  328. </transformation>
  329. <!--Both operands have the same unit of measure-->
  330. <transformation xsi:type="binaryTransformation">
  331. <binaryCondition xsi:type="binaryComparisonCondition" comparison="eq"/>
  332. <result state="notPresent"/>
  333. </transformation>
  334. </property>
  335. <property name="decimalSize">
  336. <transformation xsi:type="caseTransformation">
  337. <case>
  338. <condition xsi:type="andCondition"> <!-- If the numerator is a currency and the denominator is a constant, number, percentage or it's undefined, then the result has as many decimals as the numerator -->
  339. <condition xsi:type="valueCondition" operandIndex="0" propertyName="formatType" value="currencyFormat"/>
  340. <condition xsi:type="orCondition">
  341. <condition xsi:type="valueCondition" operandIndex="1" propertyName="formatType" value="numberFormat"/>
  342. <condition xsi:type="valueCondition" operandIndex="1" propertyName="formatType" value="percentFormat"/>
  343. <condition xsi:type="valueCondition" operandIndex="1" propertyName="formatType" value="constantFormat"/>
  344. <condition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="notPresent"/>
  345. </condition>
  346. </condition>
  347. <transformation xsi:type="binaryTransformation">
  348. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="present" rightHandSide="dontCare"/>
  349. <result state="left"/>
  350. </transformation>
  351. </case>
  352. </transformation>
  353. <transformation xsi:type="binaryTransformation"> <!-- Else the result has the default number of decimals -->
  354. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="dontCare"/>
  355. <result state="default"/>
  356. </transformation>
  357. </property>
  358. <property name="formatType">
  359. <transformation xsi:type="caseTransformation">
  360. <case>
  361. <condition xsi:type="orCondition"> <!-- If the denominator is a constant, a number, percentage, or it's undefined, then the result has the same type as the numerator -->
  362. <condition xsi:type="valueCondition" operandIndex="1" propertyName="formatType" value="numberFormat"/>
  363. <condition xsi:type="valueCondition" operandIndex="1" propertyName="formatType" value="percentFormat"/>
  364. <condition xsi:type="valueCondition" operandIndex="1" propertyName="formatType" value="constantFormat"/>
  365. <condition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="notPresent"/>
  366. </condition>
  367. <transformation xsi:type="binaryTransformation">
  368. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="present" rightHandSide="dontCare"/>
  369. <result state="left"/>
  370. </transformation>
  371. </case>
  372. </transformation>
  373. <transformation xsi:type="binaryTransformation"> <!-- In all other cases, the result is a number -->
  374. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="dontCare"/>
  375. <result state="default"/>
  376. </transformation>
  377. </property>
  378. </expression>
  379. <expression name="Hyperbolic Tangent" mdxKeyword="TANHYP">
  380. <property name="formatType">
  381. <transformation xsi:type="unaryTransformation">
  382. <unaryCondition operandState="dontCare"/>
  383. <result state="default"/>
  384. </transformation>
  385. </property>
  386. <property name="decimalSize">
  387. <transformation xsi:type="unaryTransformation" alwaysApply="true">
  388. <unaryCondition operandState="dontCare"/>
  389. <result state="default"/>
  390. </transformation>
  391. </property>
  392. </expression>
  393. <expression name="Hyperbolic Cosine" mdxKeyword="COSHYP">
  394. <property name="formatType">
  395. <transformation xsi:type="unaryTransformation">
  396. <unaryCondition operandState="dontCare"/>
  397. <result state="default"/>
  398. </transformation>
  399. </property>
  400. <property name="decimalSize">
  401. <transformation xsi:type="unaryTransformation" alwaysApply="true">
  402. <unaryCondition operandState="dontCare"/>
  403. <result state="default"/>
  404. </transformation>
  405. </property>
  406. </expression>
  407. <expression name="Hyperbolic Sine" mdxKeyword="SINHYP">
  408. <property name="formatType">
  409. <transformation xsi:type="unaryTransformation">
  410. <unaryCondition operandState="dontCare"/>
  411. <result state="default"/>
  412. </transformation>
  413. </property>
  414. <property name="decimalSize">
  415. <transformation xsi:type="unaryTransformation" alwaysApply="true">
  416. <unaryCondition operandState="dontCare"/>
  417. <result state="default"/>
  418. </transformation>
  419. </property>
  420. </expression>
  421. <expression name="Tangent" mdxKeyword="TAN">
  422. <property name="formatType">
  423. <transformation xsi:type="unaryTransformation">
  424. <unaryCondition operandState="dontCare"/>
  425. <result state="default"/>
  426. </transformation>
  427. </property>
  428. <property name="decimalSize">
  429. <transformation xsi:type="unaryTransformation" alwaysApply="true">
  430. <unaryCondition operandState="dontCare"/>
  431. <result state="default"/>
  432. </transformation>
  433. </property>
  434. </expression>
  435. <expression name="Cosine" mdxKeyword="COS">
  436. <property name="formatType">
  437. <transformation xsi:type="unaryTransformation">
  438. <unaryCondition operandState="dontCare"/>
  439. <result state="default"/>
  440. </transformation>
  441. </property>
  442. <property name="decimalSize">
  443. <transformation xsi:type="unaryTransformation" alwaysApply="true">
  444. <unaryCondition operandState="dontCare"/>
  445. <result state="default"/>
  446. </transformation>
  447. </property>
  448. </expression>
  449. <expression name="Sine" mdxKeyword="SIN">
  450. <property name="formatType">
  451. <transformation xsi:type="unaryTransformation">
  452. <unaryCondition operandState="dontCare"/>
  453. <result state="default"/>
  454. </transformation>
  455. </property>
  456. <property name="decimalSize">
  457. <transformation xsi:type="unaryTransformation" alwaysApply="true">
  458. <unaryCondition operandState="dontCare"/>
  459. <result state="default"/>
  460. </transformation>
  461. </property>
  462. </expression>
  463. <expression name="Inverse Tangent" mdxKeyword="ARCTAN">
  464. <property name="formatType">
  465. <transformation xsi:type="unaryTransformation">
  466. <unaryCondition operandState="dontCare"/>
  467. <result state="default"/>
  468. </transformation>
  469. </property>
  470. <property name="decimalSize">
  471. <transformation xsi:type="unaryTransformation" alwaysApply="true">
  472. <unaryCondition operandState="dontCare"/>
  473. <result state="default"/>
  474. </transformation>
  475. </property>
  476. </expression>
  477. <expression name="Inverse Cosine" mdxKeyword="ARCCOS">
  478. <property name="formatType">
  479. <transformation xsi:type="unaryTransformation">
  480. <unaryCondition operandState="dontCare"/>
  481. <result state="default"/>
  482. </transformation>
  483. </property>
  484. <property name="decimalSize">
  485. <transformation xsi:type="unaryTransformation" alwaysApply="true">
  486. <unaryCondition operandState="dontCare"/>
  487. <result state="default"/>
  488. </transformation>
  489. </property>
  490. </expression>
  491. <expression name="Inverse Sine" mdxKeyword="ARCSIN">
  492. <property name="formatType">
  493. <transformation xsi:type="unaryTransformation">
  494. <unaryCondition operandState="dontCare"/>
  495. <result state="default"/>
  496. </transformation>
  497. </property>
  498. <property name="decimalSize">
  499. <transformation xsi:type="unaryTransformation" alwaysApply="true">
  500. <unaryCondition operandState="dontCare"/>
  501. <result state="default"/>
  502. </transformation>
  503. </property>
  504. </expression>
  505. <expression name="Log Base 10" mdxKeyword="LOG10">
  506. <property name="formatType">
  507. <transformation xsi:type="unaryTransformation">
  508. <unaryCondition operandState="dontCare"/>
  509. <result state="default"/>
  510. </transformation>
  511. </property>
  512. <property name="decimalSize">
  513. <transformation xsi:type="unaryTransformation" alwaysApply="true">
  514. <unaryCondition operandState="dontCare"/>
  515. <result state="default"/>
  516. </transformation>
  517. </property>
  518. </expression>
  519. <expression name="Natural Log" mdxKeyword="LN">
  520. <property name="formatType">
  521. <transformation xsi:type="unaryTransformation">
  522. <unaryCondition operandState="dontCare"/>
  523. <result state="default"/>
  524. </transformation>
  525. </property>
  526. <property name="decimalSize">
  527. <transformation xsi:type="unaryTransformation" alwaysApply="true">
  528. <unaryCondition operandState="dontCare"/>
  529. <result state="default"/>
  530. </transformation>
  531. </property>
  532. </expression>
  533. <expression name="Exponential" mdxKeyword="EXP">
  534. <property name="formatType">
  535. <transformation xsi:type="unaryTransformation">
  536. <unaryCondition operandState="dontCare"/>
  537. <result state="default"/>
  538. </transformation>
  539. </property>
  540. </expression>
  541. <expression name="Square Root" mdxKeyword="SQRT">
  542. <property name="decimalSize">
  543. <transformation xsi:type="caseTransformation" alwaysApply="true">
  544. <case>
  545. <condition xsi:type="valueCondition" operandIndex="0" propertyName="formatType" value="currencyFormat"/>
  546. <transformation xsi:type="unaryTransformation">
  547. <unaryCondition operandState="empty"/>
  548. <result state="default"/>
  549. </transformation>
  550. <transformation xsi:type="unaryTransformation">
  551. <unaryCondition operandState="present"/>
  552. <result state="operandValue"/>
  553. </transformation>
  554. </case>
  555. <case>
  556. <condition xsi:type="notCondition">
  557. <condition xsi:type="valueCondition" operandIndex="0" propertyName="formatType" value="currencyFormat"/>
  558. </condition>
  559. <transformation xsi:type="unaryTransformation">
  560. <unaryCondition operandState="dontCare"/>
  561. <result state="default"/>
  562. </transformation>
  563. </case>
  564. </transformation>
  565. </property>
  566. <property name="unitOfMeasure">
  567. <transformation xsi:type="unaryTransformation">
  568. <unaryCondition operandState="dontCare"/>
  569. <result state="notPresent"/>
  570. </transformation>
  571. </property>
  572. </expression>
  573. <expression name="Absolute Value" mdxKeyword="ABS">
  574. <property name="decimalSize">
  575. <transformation xsi:type="unaryTransformation">
  576. <unaryCondition operandState="present"/>
  577. <result state="operandValue"/>
  578. </transformation>
  579. </property>
  580. </expression>
  581. <expression name="Round" mdxKeyword="ROUND">
  582. <property name="decimalSize">
  583. <transformation xsi:type="binaryTransformation">
  584. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="dontCare"/>
  585. <result state="default"/>
  586. </transformation>
  587. </property>
  588. </expression>
  589. <expression name="Round Down" mdxKeyword="ROUNDDOWN">
  590. <property name="decimalSize">
  591. <transformation xsi:type="binaryTransformation">
  592. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="dontCare"/>
  593. <result state="default"/>
  594. </transformation>
  595. </property>
  596. </expression>
  597. <expression name="Round Up" mdxKeyword="ROUNDUP">
  598. <property name="decimalSize">
  599. <transformation xsi:type="binaryTransformation">
  600. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="dontCare"/>
  601. <result state="default"/>
  602. </transformation>
  603. </property>
  604. </expression>
  605. <expression name="Power" mdxKeyword="POWER">
  606. <property name="formatType">
  607. <transformation xsi:type="binaryTransformation">
  608. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="present" rightHandSide="dontCare"/>
  609. <result state="left"/>
  610. </transformation>
  611. </property>
  612. </expression>
  613. <!--Aggregation functions-->
  614. <expression mdxKeyword="AGGREGATE" name="Aggregate"/>
  615. <expression mdxKeyword="AVG" name="Average"/>
  616. <expression mdxKeyword="SUM" name="Sum"/>
  617. <expression mdxKeyword="MIN" name="Minimum"/>
  618. <expression mdxKeyword="MAX" name="Maximum"/>
  619. <expression mdxKeyword="STDDEV" name="Standard Deviation">
  620. <property name="formatType">
  621. <transformation xsi:type="binaryTransformation">
  622. <binaryCondition xsi:type="binaryComparisonCondition" comparison="neq"/>
  623. <result state="default"/>
  624. </transformation>
  625. </property>
  626. </expression>
  627. <expression mdxKeyword="VAR" name="Variance">
  628. <property name="decimalSize">
  629. <transformation xsi:type="binaryTransformation" alwaysApply="true">
  630. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="dontCare"/>
  631. <result state="default"/>
  632. </transformation>
  633. </property>
  634. <property name="formatType">
  635. <transformation xsi:type="binaryTransformation">
  636. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="dontCare"/>
  637. <result state="default"/>
  638. </transformation>
  639. </property>
  640. <property name="unitOfMeasure">
  641. <transformation xsi:type="binaryTransformation">
  642. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="dontCare"/>
  643. <result state="notPresent"/>
  644. </transformation>
  645. </property>
  646. </expression>
  647. <expression mdxKeyword="MEDIAN" name="Median"/>
  648. <expression mdxKeyword="COUNT" name="Count">
  649. <property name="decimalSize">
  650. <transformation xsi:type="binaryTransformation" alwaysApply="true">
  651. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="dontCare"/>
  652. <result state="empty"/>
  653. </transformation>
  654. </property>
  655. <property name="formatType">
  656. <transformation xsi:type="binaryTransformation">
  657. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="dontCare"/>
  658. <result state="default"/>
  659. </transformation>
  660. </property>
  661. <property name="unitOfMeasure">
  662. <transformation xsi:type="binaryTransformation">
  663. <binaryCondition xsi:type="binaryPatternCondition" leftHandSide="dontCare" rightHandSide="dontCare"/>
  664. <result state="notPresent"/>
  665. </transformation>
  666. </property>
  667. </expression>
  668. <!--PCODP string functions-->
  669. <expression name="Contains" mdxKeyword="CONTAINS"/>
  670. <expression name="Starts With" mdxKeyword="STARTSWITH"/>
  671. <expression name="Ends With" mdxKeyword="ENDSWITH"/>
  672. <expression name="To Uppercase" mdxKeyword="TOUPPER"/>
  673. <expression name="To Lowercase" mdxKeyword="TOLOWER"/>
  674. </expressionTransformationLayer>
  675. </expressionFormatRules>