xform_50to51.xsl 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. <?xml version="1.0"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: fmmd
  5. (C) Copyright IBM Corp. 2003, 2013
  6. US Government Users Restricted Rights - Use, duplication or disclosure
  7. restricted by GSA ADP Schedule Contract with IBM Corp.
  8. -->
  9. <!--
  10. ===============================================================================
  11. Model Upgrade 50 to 51 Notes:
  12. This is an XSLT transformation from a schema version 50 model to a schema
  13. version 51 model
  14. 1: Remove the limitedLocalScope custom property.
  15. 2: Convert valid hierarchy custom properties to formal properties and remove
  16. any identified as invalid. A number of custom properties were copied incorrectly
  17. from the dimension into the hierarchy and level objects.
  18. 3. Remove calculations and queryItems from the dbQuery and mdQuery querySubjects, and convert them
  19. to queryItem expresssion properties.
  20. 4: Insert the dimension "type", "membersRollup", and "default hierarchy" properties for SAPBW dimensions.
  21. 5: Insert PPDS_CODE into dimension, hierarchy and level objects
  22. 6: Set the value of the custom property hierarchyType for hierarchy objects.
  23. 7: Prefix Baltic collation values with "EN_"
  24. ===============================================================================
  25. -->
  26. <xsl:stylesheet xmlns="http://www.developer.cognos.com/schemas/bmt/51/0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fmfunc="http://www.developer.cognos.com/bmt" xmlns:xalan="http://xml.apache.org/xalan" xmlns:table="http://www.developer.cognos.com/schemas/bmt/51/transformTables" exclude-result-prefixes="fmfunc xalan table">
  27. <xsl:include href="fmmd_generalTemplates.xsl"/>
  28. <xsl:strip-space elements="*"/>
  29. <xsl:output encoding="utf-8" method="xml" indent="no"/>
  30. <!-- =============================================================================== -->
  31. <!-- Step 1: drop the limitedLocalScope custom property.
  32. -->
  33. <!-- Template: Remove limitedLocalScope custom property from the datasource -->
  34. <xsl:template match="*[local-name() = 'dataSource']/*[local-name()='property' and @*[local-name()='name' and .='limitedLocalScope']]"/>
  35. <!-- =============================================================================== -->
  36. <!-- Step 2: Convert the hierarchy custom properties to formal properties.
  37. NOTE: Custom properties from the querySubject were copied both to the generated dimension and
  38. to the generated hierarchy. Some cleanup is required in both spots where possible.
  39. -->
  40. <!-- Template: Remove the old dimension custom OLAP properties-->
  41. <xsl:template match="*[local-name()='dimension']/*[local-name()='lastChanged']"/>
  42. <xsl:template match="*[local-name()='dimension']/*[local-name()='property' and @*[local-name()='name' and (.='uniqueName' or .='dimensionType' or .='hierarchyType' or .='multiRoot' or .='balanced' or .='ragged' or .='sortedHierarchy' or .='hierarchyCardinality' or .='rootMember' or .='defaultHierarchy')]]"/>
  43. <xsl:template match="*[local-name()='dimension']/*[local-name()='hierarchy']/*[local-name()='property' and @*[local-name()='name' and (.='dimensionType' or .='hierarchyType' or .='uniqueName' or .='multiRoot' or .='balanced' or .='ragged' or .='sortedHierarchy' or .='hierarchyCardinality' or .='rootMember' or .='defaultHierarchy')]]"/>
  44. <xsl:template match="*[local-name()='dimension']/*[local-name()='hierarchy']/*[local-name()='level']/*[local-name()='property' and @*[local-name()='name' and .='uniqueName']]"/>
  45. <!-- Template: Convert 'multiroot', 'balanced', 'ragged', 'sortedHierarchy' custom properties to actual properties -->
  46. <xsl:template match="*[local-name()='dimension']/*[local-name()='hierarchy']">
  47. <xsl:variable name="hierarchy" select="."/>
  48. <xsl:variable name="externalName" select="*[local-name()='externalName']"/>
  49. <xsl:element name="{local-name()}">
  50. <xsl:for-each select="./node()">
  51. <xsl:choose>
  52. <!--Remove default hierarchy-->
  53. <xsl:when test="local-name()='defaultHierarchy' or local-name()='externalName'"/>
  54. <!-- Remove the old hierarchy custom OLAP properties-->
  55. <xsl:when test="local-name()='property' and @*[local-name()='name' and (.='dimensionType' or .='multiRoot' or .='balanced' or .='ragged' or .='sortedHierarchy' or .='hierarchyCardinality' or .='rootMember' or .='defaultHierarchy')]"/>
  56. <xsl:otherwise>
  57. <xsl:apply-templates select="."/>
  58. </xsl:otherwise>
  59. </xsl:choose>
  60. </xsl:for-each>
  61. <xsl:if test="$externalName">
  62. <xsl:element name="externalName">
  63. <xsl:value-of select="$externalName"/>
  64. </xsl:element>
  65. </xsl:if>
  66. <xsl:for-each select="*[local-name()='property' and @*[local-name()='name' and .='multiRoot']]">
  67. <xsl:element name="{@*[local-name()='name']}">
  68. <xsl:value-of select="."/>
  69. </xsl:element>
  70. </xsl:for-each>
  71. <xsl:for-each select="*[local-name()='property' and @*[local-name()='name' and .='balanced']]">
  72. <xsl:element name="{@*[local-name()='name']}">
  73. <xsl:value-of select="."/>
  74. </xsl:element>
  75. </xsl:for-each>
  76. <xsl:for-each select="*[local-name()='property' and @*[local-name()='name' and .='ragged']]">
  77. <xsl:element name="{@*[local-name()='name']}">
  78. <xsl:value-of select="."/>
  79. </xsl:element>
  80. </xsl:for-each>
  81. <xsl:for-each select="*[local-name()='property' and @*[local-name()='name' and .='rootMember']]">
  82. <xsl:element name="{@*[local-name()='name']}">
  83. <xsl:value-of select="."/>
  84. </xsl:element>
  85. </xsl:for-each>
  86. <xsl:element name="sortedHierarchy">none</xsl:element>
  87. <xsl:for-each select="*[local-name()='property' and @*[local-name()='name' and .='hierarchyCardinality']]">
  88. <xsl:element name="cardinality">
  89. <xsl:value-of select="."/>
  90. </xsl:element>
  91. </xsl:for-each>
  92. <xsl:element name="externalNumberOfLevels">
  93. <xsl:value-of select="count($hierarchy/*[local-name()='level'])"/>
  94. </xsl:element>
  95. </xsl:element>
  96. </xsl:template>
  97. <!-- =============================================================================== -->
  98. <!-- Step 3: Remove calculations and queryItems from the dbQuery and mdQuery querySubjects, and convert them
  99. to queryItem expresssion properties.
  100. -->
  101. <!-- Template: Remove <calculations></calculations> from both dbQuery and mdQuery querySubject definitions-->
  102. <xsl:template match="*[local-name()='querySubject' or local-name()='dimension']/*[local-name()='definition']/*[local-name()='dbQuery' or local-name()='mdQuery']/*[local-name()='calculations']"/>
  103. <!-- Template: Remove <queryItems></queryItems> from modelQuery querySubject definitions-->
  104. <xsl:template match="*[local-name()='querySubject']/*[local-name()='definition']/*[local-name()='modelQuery']/*[local-name()='queryItems']"/>
  105. <!-- Template: Transform embedded calculations so that the expression becomes part of the query item definition -->
  106. <xsl:template match="*[local-name()='queryItem' or local-name()='measure']/*[local-name() = 'columnName']">
  107. <xsl:variable name="strColumnName" select="string(.)"/>
  108. <xsl:variable name="querySubject" select="ancestor::*[local-name()='querySubject' or local-name()='dimension'][1]"/>
  109. <xsl:variable name="querySubject_id" select="generate-id($querySubject)"/>
  110. <xsl:variable name="qiCalcDefinition" select="key('calcDefinition_using_qsID_columnName', concat($querySubject_id, '||', $strColumnName))"/>
  111. <xsl:variable name="queryItemsExpr" select="key('queryItems_using_qsID', $querySubject_id)"/>
  112. <xsl:choose>
  113. <xsl:when test="$qiCalcDefinition">
  114. <xsl:element name="expression">
  115. <xsl:apply-templates select="$qiCalcDefinition/*[local-name()='expression']/node()|$qiCalcDefinition/*[local-name()='refobj']"/>
  116. </xsl:element>
  117. </xsl:when>
  118. <!-- For model queries we rely on the fact that the <queryitems>
  119. collector lists the expressions in the order that the queryitems are
  120. present under the querysubject this is how the expression is found
  121. for a given query item-->
  122. <!--The attribute names such as 'dataItemName' etc. had to be stripped out
  123. of the <refobj> and expression tags-->
  124. <xsl:when test="$queryItemsExpr">
  125. <xsl:variable name="qiName" select="string(../*[local-name()='name' and @*[local-name()='locale' and . = $defaultLocale]])"/>
  126. <xsl:variable name="queryItemNames" select="key('queryItemNames_using_qsID', $querySubject_id)"/>
  127. <xsl:for-each select="$queryItemNames">
  128. <xsl:variable name="pos" select="position()"/>
  129. <xsl:if test="$qiName = string($queryItemNames[$pos])">
  130. <xsl:variable name="elemName" select="local-name($queryItemsExpr[$pos])"/>
  131. <xsl:variable name="expression" select="$queryItemsExpr[$pos]"/>
  132. <xsl:if test="not($elemName = 'expression')">
  133. <xsl:element name="expression">
  134. <xsl:element name="{$elemName}">
  135. <xsl:for-each select="$expression/node()">
  136. <xsl:call-template name="copyQIExpression"/>
  137. </xsl:for-each>
  138. </xsl:element>
  139. </xsl:element>
  140. </xsl:if>
  141. <xsl:if test="$elemName = 'expression'">
  142. <xsl:element name="{$elemName}">
  143. <xsl:for-each select="$expression/node()">
  144. <xsl:call-template name="copyQIExpression"/>
  145. </xsl:for-each>
  146. </xsl:element>
  147. </xsl:if>
  148. </xsl:if>
  149. </xsl:for-each>
  150. </xsl:when>
  151. <xsl:otherwise>
  152. <xsl:element name="externalName">
  153. <xsl:value-of select="$strColumnName"/>
  154. </xsl:element>
  155. </xsl:otherwise>
  156. </xsl:choose>
  157. </xsl:template>
  158. <!-- Template: Insert the dbAggregationRule property for measures -->
  159. <xsl:template match="*[local-name()='dimension']//*[local-name()='measure']/*[last()]">
  160. <!-- Copy the anchor element over -->
  161. <xsl:call-template name="myCopy"/>
  162. <!-- Insert dbAggregationRule -->
  163. <xsl:element name="dbAggregationRule">
  164. <xsl:variable name="bIsMdQuery" select="ancestor::*[local-name()='dimension']/*[local-name()='definition']/*[local-name()='mdQuery']"/>
  165. <xsl:choose>
  166. <xsl:when test="$bIsMdQuery and ../*[local-name()='regularAggregate']">
  167. <xsl:value-of select="../*[local-name()='regularAggregate']"/>
  168. </xsl:when>
  169. <xsl:when test="$bIsMdQuery and ../*[local-name()='semiAggregate']">
  170. <xsl:value-of select="../*[local-name()='semiAggregate']"/>
  171. </xsl:when>
  172. <xsl:otherwise>automatic</xsl:otherwise>
  173. </xsl:choose>
  174. </xsl:element>
  175. </xsl:template>
  176. <!-- Template: Insert Description -->
  177. <xsl:template name="copyQIExpression">
  178. <xsl:choose>
  179. <xsl:when test="self::text()">
  180. <xsl:apply-templates select="."/>
  181. </xsl:when>
  182. <xsl:otherwise>
  183. <xsl:element name="{local-name(.)}">
  184. <xsl:apply-templates select="./node()"/>
  185. </xsl:element>
  186. </xsl:otherwise>
  187. </xsl:choose>
  188. </xsl:template>
  189. <!-- =============================================================================== -->
  190. <!-- Step 4: Insert the dimension "type", "membersRollup", and "default hierarchy" properties for SAPBW dimensions.
  191. -->
  192. <!-- Template: Find the anchor element to append the <type>, <membersRollup>, and <defaultHiearchy> elements -->
  193. <xsl:template match="*[local-name()='dimension']/*[local-name()='definition' or local-name()='levels' or local-name()='hierarchies' or local-name()='previewFilters' or local-name()='securityFilters' or local-name()='externalizeMethod' or local-name()='externalizeAutoSummary'][last()]">
  194. <!-- Copy over the element that the template matched against...it's the anchor for inserting the dimension <type> property -->
  195. <xsl:element name="{local-name()}">
  196. <xsl:apply-templates select="./*"/>
  197. </xsl:element>
  198. <!-- Only add type for dimensions which are based on MD source-->
  199. <xsl:element name="type">
  200. <!-- Determine the dimension type -->
  201. <xsl:variable name="dimType" select="string(../*[local-name()='property' and @*[local-name()='name' and .='dimensionType']])"/>
  202. <xsl:choose>
  203. <xsl:when test="($dimType = 'regular') or ($dimType = 'time') or ($dimType = 'currency') or ($dimType = 'measure')">
  204. <xsl:value-of select="$dimType"/>
  205. </xsl:when>
  206. <xsl:otherwise>
  207. <xsl:value-of select="'regular'"/>
  208. </xsl:otherwise>
  209. </xsl:choose>
  210. </xsl:element>
  211. <xsl:element name="membersRollup">true</xsl:element>
  212. <xsl:if test="../*[local-name()='hierarchy']/*[local-name()='property' and @*[local-name()='name' and .= 'defaultHierarchy'] and .= 'true']">
  213. <xsl:variable name="hierarchy" select="../*[local-name()='hierarchy']"/>
  214. <xsl:variable name="ns" select="../ancestor::*[local-name()='namespace'][1]/*[local-name()='name' and @*[local-name()='locale' and . = $defaultLocale]]"/>
  215. <xsl:variable name="dimName" select="../*[local-name()='name' and @*[local-name()='locale' and . = $defaultLocale]]"/>
  216. <xsl:variable name="hierName" select="$hierarchy/*[local-name()='name' and @*[local-name()='locale' and . = $defaultLocale]]"/>
  217. <xsl:element name="defaultHierarchy">
  218. <xsl:value-of select="concat('[', $ns, '].[', $dimName, '].[', $hierName, ']')"/>
  219. </xsl:element>
  220. </xsl:if>
  221. </xsl:template>
  222. <!-- =============================================================================== -->
  223. <!-- Step 5: Set the PPDS_CODE for SAPBW dimension, hierarchy and level objects.
  224. -->
  225. <!-- Template: Insert the PPDS_CODE for dimensions. -->
  226. <xsl:template match="*[local-name()='dimension']/*[local-name()='name' or local-name()='description' or local-name()='lastChanged' or local-name()='screenTip'][last()]">
  227. <xsl:variable name="mdDimension" select="ancestor::*[local-name()='dimension'][1]/*[local-name()='definition']/*[local-name()='mdQuery']/*[local-name()='mdDimension']"/>
  228. <!-- Copy the anchor element over -->
  229. <xsl:call-template name="myCopy"/>
  230. <!-- Insert PPDS_CODE-->
  231. <xsl:element name="property">
  232. <xsl:attribute name="name">PPDS_CODE</xsl:attribute>
  233. <xsl:attribute name="type">hidden</xsl:attribute>
  234. <xsl:value-of select="concat('2', $mdDimension)"/>
  235. </xsl:element>
  236. </xsl:template>
  237. <!-- Template: Insert the PPDS_CODE for hierarchy. -->
  238. <xsl:template match="*[local-name()='dimension']/*[local-name()='hierarchy']/*[local-name()='name' or local-name()='description' or local-name()='lastChanged' or local-name()='screenTip'][last()]">
  239. <xsl:variable name="uniqueName" select="../*[local-name()='externalName']"/>
  240. <!-- Copy the anchor element over -->
  241. <xsl:call-template name="myCopy"/>
  242. <xsl:call-template name="insertHierarchyType"/>
  243. <!-- Insert PPDS_CODE-->
  244. <xsl:element name="property">
  245. <xsl:attribute name="name">PPDS_CODE</xsl:attribute>
  246. <xsl:attribute name="type">hidden</xsl:attribute>
  247. <xsl:value-of select="concat('4', $uniqueName)"/>
  248. </xsl:element>
  249. </xsl:template>
  250. <!-- Template: Insert the PPDS_CODE for level. -->
  251. <xsl:template match="*[local-name()='dimension']/*[local-name()='hierarchy']/*[local-name()='level']/*[local-name()='name' or local-name()='description' or local-name()='lastChanged' or local-name()='screenTip' or (local-name()='property' and @*[local-name()='name' and .='dimensionString'])][last()]">
  252. <xsl:variable name="uniqueName" select="../*[local-name()='externalName']"/>
  253. <!-- Copy the anchor element over -->
  254. <xsl:call-template name="myCopy"/>
  255. <!-- Insert PPDS_CODE-->
  256. <xsl:element name="property">
  257. <xsl:attribute name="name">PPDS_CODE</xsl:attribute>
  258. <xsl:attribute name="type">hidden</xsl:attribute>
  259. <xsl:value-of select="concat('5', $uniqueName)"/>
  260. </xsl:element>
  261. </xsl:template>
  262. <!-- =============================================================================== -->
  263. <!-- Step 6: Set the value of the custom property hierarchyType for hierarchy objects.
  264. as follows:
  265. - default: if the hierarchy is the default, no matter what dimension type is
  266. - time: if the dimension is a time dimension
  267. - text: if the dimension string = "0HIER_NODE" (dimension string is the unique name of the first regular member on level 00)
  268. - recursive: if the dimension string = dimension unique name
  269. - characteristic otherwise.
  270. -->
  271. <xsl:template name="insertHierarchyType">
  272. <xsl:variable name="dimension" select="ancestor::*[local-name()='dimension'][1]"/>
  273. <xsl:variable name="defaultHierarchy">
  274. <xsl:variable name="strNamespaceName" select="ancestor::*[local-name()='namespace'][1]/*[local-name()='name' and @*[local-name()='locale' and . = $defaultLocale]]"/>
  275. <xsl:variable name="strDimensionName" select="$dimension/*[local-name()='name' and @*[local-name()='locale' and . = $defaultLocale]]"/>
  276. <xsl:variable name="strHierarchyName" select="../*[local-name()='name' and @*[local-name()='locale' and . = $defaultLocale]]"/>
  277. <xsl:value-of select="concat('[', $strNamespaceName, '].[', $strDimensionName, '].[', $strHierarchyName, ']')"/>
  278. </xsl:variable>
  279. <xsl:variable name="hierarchy" select=".."/>
  280. <xsl:element name="property">
  281. <xsl:attribute name="name">hierarchyType</xsl:attribute>
  282. <xsl:attribute name="type">hidden</xsl:attribute>
  283. <xsl:variable name="dimensionString" select="concat('[', ../*[local-name()='level'][1]/*[local-name()='property' and @*[local-name()='name' and .='dimensionString']], ']')"/>
  284. <xsl:variable name="mdDimension" select="string(ancestor::*[local-name()='dimension'][1]/*[local-name()='definition']/*[local-name()='mdQuery']/*[local-name()='mdDimension'])"/>
  285. <xsl:choose>
  286. <xsl:when test="$dimension/*[local-name()='property' and @*[local-name()='name' and .='dimensionType'] and .='time']">time</xsl:when>
  287. <xsl:when test="$hierarchy/*[local-name()='property' and @*[local-name()='name' and .='defaultHierarchy'] and .='true']">default</xsl:when>
  288. <xsl:when test="$dimensionString = string('[0HIER_NODE]')">text</xsl:when>
  289. <xsl:when test="$dimensionString = $mdDimension">recursive</xsl:when>
  290. <xsl:otherwise>characteristic</xsl:otherwise>
  291. </xsl:choose>
  292. </xsl:element>
  293. </xsl:template>
  294. <!-- =============================================================================== -->
  295. <!-- Step 7: Prefix Baltic collation values with "EN_"
  296. -->
  297. <xsl:template match="*[local-name()='queryItem']/*[local-name()='collationSequenceName']/text()">
  298. <!-- NOTE: This is a hash-map mechanism -->
  299. <xsl:variable name="strBalticValue" select="string(.)"/>
  300. <!-- context switch -->
  301. <xsl:for-each select="$collationSequenceTable_root">
  302. <xsl:variable name="lookupValue" select="key('collationSequence_using_balticValue', $strBalticValue)/table:Bering"/>
  303. <xsl:choose>
  304. <xsl:when test="$lookupValue">
  305. <xsl:value-of select="$lookupValue"/>
  306. </xsl:when>
  307. <xsl:otherwise>
  308. <xsl:value-of select="concat('EN_', $strBalticValue)"/>
  309. </xsl:otherwise>
  310. </xsl:choose>
  311. </xsl:for-each>
  312. </xsl:template>
  313. <!-- =============================================================================== -->
  314. <!-- Global variables: -->
  315. <!-- =============================================================================== -->
  316. <xsl:variable name="sEmptyNamespace" select="string(document('')/*/namespace::*[name()=''])"/>
  317. <xsl:variable name="nNewSchema" select="number(substring-before(substring-after($sEmptyNamespace, 'http://www.developer.cognos.com/schemas/bmt/'), '/'))"/>
  318. <xsl:variable name="nOldSchema" select="$nNewSchema - 1"/>
  319. <table:collationSequenceTable>
  320. <table:value>
  321. <table:Baltic>MS_SQL_Latin1_General_CP1_CI_AS</table:Baltic>
  322. <table:Bering>EN_MS_SQL_Latin1_General_CP1_AS_CI</table:Bering>
  323. </table:value>
  324. <table:value>
  325. <table:Baltic>MS_SQL_Latin1_General_CP1_CS_AS</table:Baltic>
  326. <table:Bering>EN_MS_SQL_Latin1_General_CP1_AS</table:Bering>
  327. </table:value>
  328. <table:value>
  329. <table:Baltic>TD_ASCII_CS</table:Baltic>
  330. <table:Bering>EN_TD_ASCII</table:Bering>
  331. </table:value>
  332. <table:value>
  333. <table:Baltic>TD_ASCII_NOT_CS</table:Baltic>
  334. <table:Bering>EN_TD_ASCII_CI</table:Bering>
  335. </table:value>
  336. <table:value>
  337. <table:Baltic>TD_EBCDIC_CS</table:Baltic>
  338. <table:Bering>EN_TD_EBCDIC</table:Bering>
  339. </table:value>
  340. <table:value>
  341. <table:Baltic>TD_EBCDIC_NOT_CS</table:Baltic>
  342. <table:Bering>EN_TD_EBCDIC_CI</table:Bering>
  343. </table:value>
  344. </table:collationSequenceTable>
  345. <xsl:key
  346. name="queryItems_using_qsID"
  347. match="*[local-name() = 'querySubject']/*[local-name()='definition']/*[local-name()='modelQuery']/*[local-name() = 'queryItems']/*"
  348. use="generate-id(ancestor::*[local-name() = 'querySubject'])"/>
  349. <xsl:key
  350. name="calcDefinition_using_qsID_columnName"
  351. match="*[local-name() = 'querySubject']/*[local-name() = 'definition']/*[local-name() = 'dbQuery' or local-name() = 'mdQuery']/*[local-name() = 'calculations']/*[local-name() = 'calculationDefinition']"
  352. use="concat(generate-id(ancestor::*[local-name() = 'querySubject']), '||', *[local-name()='dataItemName'])"/>
  353. <xsl:key
  354. name="queryItemNames_using_qsID"
  355. match="*[local-name() ='queryItem' and ancestor::*[local-name() = 'querySubject']]/*[local-name()='name' and @*[local-name()='locale' and translate(., string('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), string('abcdefghijklmnopqrstuvwxyz')) = translate(/*[local-name()='project']/*[local-name()='defaultLocale'], string('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), string('abcdefghijklmnopqrstuvwxyz'))]]"
  356. use="generate-id(ancestor::*[local-name() = 'querySubject'])"/>
  357. <xsl:key name="collationSequence_using_balticValue" match="table:value" use="table:Baltic"/>
  358. <xsl:variable name="collationSequenceTable_root" select="document('')/*/table:collationSequenceTable"/>
  359. </xsl:stylesheet>