p5dkp.map.budzet_rola.xsl 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
  3. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  4. xmlns:p5bws="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/WPS_Functions.xsd"
  5. xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
  6. xmlns:p5dkp="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.xsd"
  7. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  8. xmlns:p5suis="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/system_ui_info_speech/system_ui_info_speech.xsd"
  9. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  10. xmlns:p5xsda="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/xsd_asserts/p5xsda.xsd"
  11. exclude-result-prefixes="xs"
  12. version="2.0">
  13. <xsl:output indent="yes"/>
  14. <xsl:strip-space elements="*"/>
  15. <xsl:param name="p5dkp:xsd" required="yes"/>
  16. <xsl:param name="p5dkp.map.etap.xml" required="yes"/>
  17. <xsl:param name="p5dkp.map.worker.xml" required="yes"/>
  18. <xsl:param name="p5dkp.map.role.xml" required="yes"/>
  19. <xsl:param name="p5dkp.map.product.xml" required="yes"/>
  20. <xsl:param name="p5dkp.map.wymagania.xml" required="yes"/>
  21. <xsl:param name="p5dkp.map.zadanie.xml" required="yes"/>
  22. <xsl:param name="p5dkp.map.keys.xml" required="yes"/>
  23. <xsl:param name="debug"/>
  24. <xsl:include href="p5dkp.dita.xsl"/>
  25. <xsl:include href="p5dkp.local.idref.xsl"/>
  26. <xsl:include href="../xsd_asserts/p5xsda.sort_elements.xsl"/>
  27. <xsl:include href="p5dkp.nodes.path.add.xsl"/>
  28. <xsl:variable name="map.etap" select="doc($p5dkp.map.etap.xml)"/>
  29. <xsl:variable name="map.role" select="doc($p5dkp.map.role.xml)"/>
  30. <xsl:variable name="map.product" select="doc($p5dkp.map.product.xml)"/>
  31. <xsl:variable name="map.worker" select="doc($p5dkp.map.worker.xml)"/>
  32. <xsl:variable name="map.wymagania" select="doc($p5dkp.map.wymagania.xml)"/>
  33. <xsl:variable name="map.zadanie" select="doc($p5dkp.map.zadanie.xml)"/>
  34. <xsl:variable name="p5dkp.map.keys" select="doc($p5dkp.map.keys.xml)"/>
  35. <xsl:template match="p5dkp:map.etap.xml" mode="p5dkp:map.budzet_rola.xml">
  36. <xsl:param name="p5dkp:nodes.path"/>
  37. <p5dkp:map.budzet_rola.xml xsi:schemaLocation="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.xsd {$p5dkp:xsd}">
  38. <xsl:apply-templates mode="#current"/>
  39. <!--<xsl:variable name="p5xsda:xs.sequence">
  40. <xsl:apply-templates mode="p5xsda:xs.sequence" select="doc($p5dkp:xsd)/schema/element[@name='map.budzet_rola.xml']" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
  41. </xsl:variable>
  42. <p5xsda:xs.sequence>
  43. <xsl:copy-of select="$p5xsda:xs.sequence"/>
  44. </p5xsda:xs.sequence>
  45. <TEST_SEQ>
  46. <xsl:for-each select="$p5xsda:xs.sequence/sequence/*[@ref]" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  47. <xsl:apply-templates mode="p5dkp:wymagania.root" select="$map.wymagania//p5dkp:wymagania">
  48. <xsl:sort select="number(wymagania_prio/text())" order="descending"/>
  49. </xsl:apply-templates>
  50. </xsl:for-each>
  51. </TEST_SEQ>-->
  52. <xsl:apply-templates mode="p5dkp:wymagania.root" select="$map.wymagania//p5dkp:wymagania">
  53. <!--<xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,wymagania_no)"/>-->
  54. <xsl:sort select="number(wymagania_prio/text())" order="descending"/>
  55. </xsl:apply-templates>
  56. <xsl:apply-templates mode="p5dkp:role.root" select="$map.role//p5dkp:role">
  57. <!--<xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,wymagania_no)"/>-->
  58. <xsl:sort select="number(role_prio/text())" order="descending"/>
  59. </xsl:apply-templates>
  60. <xsl:apply-templates mode="p5dkp:product.root" select="$map.product//p5dkp:product">
  61. <!--<xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,wymagania_no)"/>-->
  62. <xsl:sort select="number(product_prio/text())" order="ascending"/>
  63. </xsl:apply-templates>
  64. <xsl:apply-templates mode="p5dkp:zadanie.root" select="$map.zadanie//p5dkp:zadanie">
  65. <!--<xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,wymagania_no)"/>-->
  66. <xsl:sort select="number(zadanie_prio/text())" order="descending"/>
  67. </xsl:apply-templates>
  68. <xsl:apply-templates mode="p5dkp:worker.root" select="$map.worker//p5dkp:worker">
  69. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,wymagania_no)"/>
  70. </xsl:apply-templates>
  71. </p5dkp:map.budzet_rola.xml>
  72. </xsl:template>
  73. <xsl:template mode="p5dkp:map.budzet_rola.xml" match="p5dkp:etap">
  74. <xsl:param name="p5dkp:nodes.path"/>
  75. <xsl:variable name="keyscope.1" select="tokenize(@keyscope,' ')[1]"/>
  76. <xsl:copy copy-namespaces="yes">
  77. <xsl:copy-of select="@*"/>
  78. <xsl:apply-templates mode="p5dkp:map.budzet_rola.xml.local"/>
  79. <xsl:message>#89 debug number(wymagania_prio/text()) ; count()=<xsl:value-of select="count($map.wymagania//p5dkp:wymagania[etap_no[@keyref = current()/etap_no/@p5dkp:id]]/wymagania_prio)"/>; copy-of <xsl:copy-of select="$map.wymagania//p5dkp:wymagania[etap_no[@keyref = current()/etap_no/@p5dkp:id]]"/></xsl:message>
  80. <xsl:apply-templates mode="p5dkp:wymagania" select="$map.wymagania//p5dkp:wymagania[etap_no[@keyref = current()/etap_no/@p5dkp:id]]">
  81. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,etap_no)"/>
  82. <xsl:sort select="number(wymagania_prio/text())" order="descending"/>
  83. </xsl:apply-templates>
  84. </xsl:copy>
  85. </xsl:template>
  86. <xsl:template mode="p5dkp:etap" match="p5dkp:etap">
  87. <xsl:param name="p5dkp:nodes.path"/>
  88. <xsl:copy copy-namespaces="yes">
  89. <xsl:copy-of select="@*"/>
  90. <xsl:apply-templates mode="p5dkp:map.budzet_rola.xml.local"/>
  91. <xsl:apply-templates mode="p5dkp:role" select="$map.role//p5dkp:role[role_no[@p5dkp:id = current()/role_no/@keyref]]">
  92. <!--<xsl:with-param name="p5dkp:nodes.path" select="concat($p5dkp:nodes.path,'/',name())"/>-->
  93. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,etap_no)"/>
  94. </xsl:apply-templates>
  95. </xsl:copy>
  96. </xsl:template>
  97. <xsl:template mode="p5dkp:wymagania p5dkp:wymaganie_no_required_finished" match="p5dkp:wymagania">
  98. <xsl:param name="mode" select="'p5dkp:wymagania'"/>
  99. <xsl:param name="p5dkp:nodes.path"/>
  100. <xsl:element name="{$mode}">
  101. <xsl:copy-of select="@*"/>
  102. <xsl:apply-templates mode="p5dkp:map.budzet_rola.xml.local.idref"/>
  103. <xsl:apply-templates mode="p5dkp:role" select="$map.role//p5dkp:role[role_no[@p5dkp:id = current()/role_no/@keyref]]">
  104. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,wymagania_no)"/>
  105. </xsl:apply-templates>
  106. <xsl:apply-templates mode="p5dkp:product" select="$map.product//p5dkp:product[product_no[@p5dkp:id = current()/product_no/@keyref]]">
  107. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,wymagania_no)"/>
  108. </xsl:apply-templates>
  109. <xsl:choose>
  110. <xsl:when test="$p5dkp:nodes.path and $p5dkp:nodes.path//etap_no">
  111. <!--<p5dkp:nodes.path_FILTERED_ROLE>-->
  112. <!--<xsl:attribute name="for" select="$p5dkp:nodes.path//etap_no/@p5dkp:id"/>-->
  113. <xsl:apply-templates mode="p5dkp:zadanie" select="$map.zadanie//p5dkp:zadanie[wymagania_no[@keyref = current()/wymagania_no/@p5dkp:id] and etap_no[@keyref = $p5dkp:nodes.path//etap_no/@p5dkp:id] ]">
  114. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,wymagania_no)"/>
  115. <xsl:with-param name="mode" select="'p5dkp:zadanie.etap'"/>
  116. <xsl:sort select="number(zadanie_prio/text())" order="descending"/>
  117. </xsl:apply-templates>
  118. <!--</p5dkp:nodes.path_FILTERED_ROLE>-->
  119. </xsl:when>
  120. </xsl:choose>
  121. <xsl:if test="$p5dkp:nodes.path and $p5dkp:nodes.path//role_no">
  122. <xsl:apply-templates mode="p5dkp:zadanie" select="$map.zadanie//p5dkp:zadanie[wymagania_no[@keyref = current()/wymagania_no/@p5dkp:id] and role_no[@keyref = $p5dkp:nodes.path//role_no[1]/@p5dkp:id] ]">
  123. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,wymagania_no)"/>
  124. <xsl:with-param name="mode" select="'p5dkp:zadanie.role'"/>
  125. <xsl:sort select="number(zadanie_prio/text())" order="descending"/>
  126. </xsl:apply-templates>
  127. </xsl:if>
  128. <xsl:apply-templates mode="p5dkp:zadanie" select="$map.zadanie//p5dkp:zadanie[wymagania_no[@keyref = current()/wymagania_no/@p5dkp:id]]">
  129. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,wymagania_no)"/>
  130. <xsl:sort select="number(zadanie_prio/text())" order="descending"/>
  131. </xsl:apply-templates>
  132. <!--<p5dkp:nodes.path_DEBUG__>
  133. <xsl:copy-of select="p5dkp:nodes.path.add($p5dkp:nodes.path,wymagania_no)"/>
  134. </p5dkp:nodes.path_DEBUG__>-->
  135. </xsl:element>
  136. </xsl:template>
  137. <xsl:template mode="p5dkp:wymagania.root" match="p5dkp:wymagania">
  138. <xsl:param name="mode" select="'p5dkp:wymagania'"/>
  139. <xsl:param name="p5dkp:nodes.path"/>
  140. <xsl:copy>
  141. <xsl:copy-of select="@*"/>
  142. <xsl:apply-templates mode="p5dkp:map.budzet_rola.xml.local"/>
  143. <xsl:apply-templates mode="p5dkp:role" select="$map.role//p5dkp:role[role_no[@p5dkp:id = current()/role_no/@keyref]]">
  144. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,wymagania_no)"/>
  145. </xsl:apply-templates>
  146. <xsl:apply-templates mode="p5dkp:product" select="$map.product//p5dkp:product[product_no[@p5dkp:id = current()/product_no/@keyref]]">
  147. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,wymagania_no)"/>
  148. </xsl:apply-templates>
  149. <xsl:apply-templates mode="p5dkp:zadanie" select="$map.zadanie//p5dkp:zadanie[wymagania_no[@p5dkp:id= current()/wymagania_no/@keyref]]">
  150. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,wymagania_no)"/>
  151. <xsl:sort select="number(zadanie_prio/text())" order="descending"/>
  152. </xsl:apply-templates>
  153. <xsl:apply-templates mode="p5dkp:wymaganie_no_required_finished" select="$map.wymagania//p5dkp:wymagania[wymagania_no[@p5dkp:id = current()/wymaganie_no_required_finished/@keyref]]">
  154. <xsl:with-param name="mode" select="'p5dkp:wymaganie_no_required_finished'"/>
  155. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,wymagania_no)"/>
  156. <xsl:sort select="number(wymagania_prio/text())" order="descending"/>
  157. </xsl:apply-templates>
  158. </xsl:copy>
  159. </xsl:template>
  160. <xsl:template mode="p5dkp:zadanie.root" match="p5dkp:zadanie">
  161. <xsl:param name="p5dkp:nodes.path"/>
  162. <xsl:copy>
  163. <xsl:copy-of select="@*"/>
  164. <xsl:apply-templates mode="p5dkp:map.budzet_rola.xml.local">
  165. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,wymagania_no)"/>
  166. </xsl:apply-templates>
  167. <xsl:apply-templates mode="p5dkp:etap" select="$map.etap//p5dkp:etap[etap_no[@p5dkp:id= current()/etap_no/@keyref]]">
  168. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,zadanie_no)"/>
  169. </xsl:apply-templates>
  170. <xsl:apply-templates mode="p5dkp:wymagania" select="$map.wymagania//p5dkp:wymagania[wymagania_no[@keyref = current()/wymagania_no/@p5dkp:id]]">
  171. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,zadanie_no)"/>
  172. <xsl:sort select="number(wymagania_prio/text())" order="descending"/>
  173. </xsl:apply-templates>
  174. <xsl:apply-templates mode="p5dkp:role" select="$map.role//p5dkp:role[role_no[@p5dkp:id = current()/role_no/@keyref]]">
  175. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,zadanie_no)"/>
  176. </xsl:apply-templates>
  177. <xsl:apply-templates mode="p5dkp:worker" select="$map.worker//p5dkp:worker[worker_no[@p5dkp:id = current()/worker_no/@keyref]]">
  178. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,zadanie_no)"/>
  179. </xsl:apply-templates>
  180. </xsl:copy>
  181. </xsl:template>
  182. <xsl:template mode="p5dkp:zadanie" match="p5dkp:zadanie">
  183. <xsl:param name="p5dkp:nodes.path"/>
  184. <xsl:param name="mode" select="'p5dkp:zadanie'"/>
  185. <xsl:element name="{$mode}">
  186. <xsl:copy-of select="@*"/>
  187. <xsl:apply-templates mode="p5dkp:map.budzet_rola.xml.local.idref"/>
  188. <xsl:apply-templates mode="p5dkp:worker" select="$map.worker//p5dkp:worker[worker_no[@p5dkp:id= current()/worker_no/@keyref ]]">
  189. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,zadanie_no)"/>
  190. </xsl:apply-templates>
  191. <p5dkp:nodes.path_DEBUG>
  192. <xsl:copy-of select="p5dkp:nodes.path.add($p5dkp:nodes.path,zadanie_no)"></xsl:copy-of>
  193. </p5dkp:nodes.path_DEBUG>
  194. </xsl:element>
  195. </xsl:template>
  196. <xsl:template mode="p5dkp:role" match="p5dkp:role">
  197. <xsl:param name="p5dkp:nodes.path"/>
  198. <xsl:copy copy-namespaces="yes" inherit-namespaces="yes">
  199. <!--<xsl:namespace name="" select="'http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.xsd'"/>-->
  200. <xsl:copy-of select="@*"/>
  201. <xsl:apply-templates mode="p5dkp:map.budzet_rola.xml.local.idref"/>
  202. <xsl:choose>
  203. <xsl:when test="$p5dkp:nodes.path and $p5dkp:nodes.path//etap_no">
  204. <!--<p5dkp:nodes.path_FILTERED_ROLE>
  205. <xsl:attribute name="for" select="$p5dkp:nodes.path//etap_no/@p5dkp:id"/>-->
  206. <xsl:apply-templates mode="p5dkp:zadanie" select="$map.zadanie//p5dkp:zadanie[role_no[@keyref = current()/role_no/@p5dkp:id] and etap_no[@keyref = $p5dkp:nodes.path//etap_no/@p5dkp:id] ]">
  207. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,wymagania_no)"/>
  208. <xsl:with-param name="mode" select="'p5dkp:zadanie.etap'"/>
  209. <xsl:sort select="number(zadanie_prio/text())" order="descending"/>
  210. </xsl:apply-templates>
  211. <xsl:apply-templates mode="p5dkp:zadanie" select="$map.zadanie//p5dkp:zadanie[role_no[@keyref = current()/role_no/@p5dkp:id] and not(etap_no[@keyref = $p5dkp:nodes.path//etap_no/@p5dkp:id]) ]">
  212. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,wymagania_no)"/>
  213. <xsl:with-param name="mode" select="'p5dkp:zadanie.etap.mismatch'"/>
  214. <xsl:sort select="number(zadanie_prio/text())" order="descending"/>
  215. </xsl:apply-templates>
  216. <!--</p5dkp:nodes.path_FILTERED_ROLE>-->
  217. </xsl:when>
  218. </xsl:choose>
  219. <xsl:apply-templates mode="p5dkp:zadanie" select="$map.zadanie//p5dkp:zadanie[role_no[@keyref = current()/role_no/@p5dkp:id]]">
  220. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,wymagania_no)"/>
  221. <xsl:sort select="number(zadanie_prio/text())" order="descending"/>
  222. </xsl:apply-templates>
  223. <xsl:apply-templates mode="p5dkp:worker" select="$map.worker//p5dkp:worker[role_no[@p5dkp:id = current()/role_no/@keyref]]">
  224. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,role_no)"/>
  225. <xsl:sort select="number(worker_prio/text())" order="descending"/>
  226. </xsl:apply-templates>
  227. </xsl:copy>
  228. </xsl:template>
  229. <xsl:template mode="p5dkp:role.root" match="p5dkp:role">
  230. <xsl:param name="p5dkp:nodes.path"/>
  231. <xsl:copy >
  232. <xsl:copy-of select="@*"/>
  233. <xsl:apply-templates mode="p5dkp:map.budzet_rola.xml.local"/>
  234. <xsl:apply-templates mode="p5dkp:etap" select="$map.etap//p5dkp:etap[etap_no[@keyref = current()/etap_no/@p5dkp:id]]">
  235. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,role_no)"/>
  236. </xsl:apply-templates>
  237. <xsl:apply-templates mode="p5dkp:wymagania" select="$map.wymagania//p5dkp:wymagania[role_no[@keyref = current()/role_no/@p5dkp:id]]">
  238. <xsl:sort select="number(wymagania_prio/text())" order="descending"/>
  239. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,role_no)"/>
  240. </xsl:apply-templates>
  241. <xsl:apply-templates mode="p5dkp:product" select="$map.product//p5dkp:product[product_no[@p5dkp:id = current()/product_no/@keyref]]">
  242. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,role_no)"/>
  243. </xsl:apply-templates>
  244. <xsl:apply-templates mode="p5dkp:zadanie" select="$map.zadanie//p5dkp:zadanie[role_no[@keyref = current()/role_no/@p5dkp:id]]">
  245. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,role_no)"/>
  246. <xsl:sort select="number(zadanie_prio/text())" order="descending"/>
  247. </xsl:apply-templates>
  248. <xsl:apply-templates mode="p5dkp:worker" select="$map.worker//p5dkp:worker[role_no[@keyref = current()/role_no/@p5dkp:id]]">
  249. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,role_no)"/>
  250. </xsl:apply-templates>
  251. </xsl:copy>
  252. </xsl:template>
  253. <xsl:template mode="p5dkp:product" match="p5dkp:product">
  254. <xsl:param name="p5dkp:nodes.path"/>
  255. <xsl:copy>
  256. <xsl:copy-of select="@*"/>
  257. <xsl:apply-templates mode="p5dkp:map.budzet_rola.xml.local.idref"/>
  258. </xsl:copy>
  259. </xsl:template>
  260. <xsl:template mode="p5dkp:product.root" match="p5dkp:product">
  261. <xsl:copy>
  262. <xsl:copy-of select="@*"/>
  263. <xsl:apply-templates mode="p5dkp:map.budzet_rola.xml.local"/>
  264. </xsl:copy>
  265. </xsl:template>
  266. <xsl:template mode="p5dkp:worker.root" match="p5dkp:worker">
  267. <xsl:param name="p5dkp:nodes.path"/>
  268. <xsl:choose>
  269. <xsl:when test=" contains($p5dkp:nodes.path,name())">
  270. <xsl:comment>#196 loop <xsl:value-of select="$p5dkp:nodes.path"/></xsl:comment>
  271. </xsl:when>
  272. <xsl:otherwise>
  273. <xsl:copy>
  274. <xsl:copy-of select="@*"/>
  275. <xsl:apply-templates mode="p5dkp:map.budzet_rola.xml.local"/>
  276. <xsl:apply-templates mode="p5dkp:role" select="$map.role//p5dkp:role[role_no[@p5dkp:id = current()/role_no/@keyref]]">
  277. <xsl:with-param name="p5dkp:nodes.path" select="p5dkp:nodes.path.add($p5dkp:nodes.path,worker_no)"/>
  278. </xsl:apply-templates>
  279. </xsl:copy>
  280. </xsl:otherwise>
  281. </xsl:choose>
  282. </xsl:template>
  283. <xsl:template mode="p5dkp:worker" match="p5dkp:worker">
  284. <xsl:param name="p5dkp:nodes.path"/>
  285. <xsl:copy>
  286. <xsl:copy-of select="@*"/>
  287. <xsl:apply-templates mode="p5dkp:map.budzet_rola.xml.local.idref"/>
  288. </xsl:copy>
  289. </xsl:template>
  290. <!--<xsl:template mode="p5dkp:wymagania" match="*">
  291. <NOT><xsl:copy-of select="@*"/><xsl:value-of select="name()"/></NOT>
  292. </xsl:template>-->
  293. <xsl:template mode="p5dkp:wymagania" match="comment()|text()">
  294. <!--<NOT><xsl:value-of select="name()"/></NOT>-->
  295. </xsl:template>
  296. </xsl:stylesheet>