bcgtht.tree_to_dita.xsl 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749
  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:gml="http://www.opengis.net/gml"
  5. xmlns:p5bws="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/WPS_Functions.xsd"
  6. xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
  7. xmlns:bcgtht="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/bocian-graph-to-html/bcgtht.xsd"
  8. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  9. xmlns:default_db__x3A__BI_audit_ENERGA_PRACOWNICY="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_PRACOWNICY"
  10. xmlns:p5="https://biuro.biall-net.pl/wfs"
  11. xmlns:default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object"
  12. xmlns:default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row"
  13. xmlns:default_db__x3A__BI_audit_KRS="https://biuro.biall-net.pl/wfs/default_db/BI_audit_KRS"
  14. xmlns:default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI"
  15. xmlns:default_db__x3A__BI_audit_MSIG="https://biuro.biall-net.pl/wfs/default_db/BI_audit_MSIG"
  16. xmlns:default_db__x3A__BI_audit_CEIDG="https://biuro.biall-net.pl/wfs/default_db/BI_audit_CEIDG"
  17. xmlns:system_cache__dita="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/dita.xsd"
  18. xmlns:default_db__x3A__BI_audit_KRS_person="https://biuro.biall-net.pl/wfs/default_db/BI_audit_KRS_person"
  19. xmlns:default_db__x3A__BI_audit_taxpayer="https://biuro.biall-net.pl/wfs/default_db/BI_audit_taxpayer"
  20. xmlns:default_db__x3A__BI_audit_KRS_company="https://biuro.biall-net.pl/wfs/default_db/BI_audit_KRS_company"
  21. xmlns:default_db__x3A__BI_audit_MSIG_company="https://biuro.biall-net.pl/wfs/default_db/BI_audit_MSIG_company"
  22. xmlns:default_db__x3A__TERYT_adresy="https://biuro.biall-net.pl/wfs/default_db/TERYT_adresy"
  23. xmlns:default_db__x3A__BI_audit_MSIG_person="https://biuro.biall-net.pl/wfs/default_db/BI_audit_MSIG_person"
  24. xmlns:default_db__x3A__BI_audit_operational_raport_note="https://biuro.biall-net.pl/wfs/default_db/BI_audit_operational_raport_note"
  25. xmlns:default_db__x3A__BI_audit_MSIG_address="https://biuro.biall-net.pl/wfs/default_db/BI_audit_MSIG_address"
  26. xmlns:default_db__x3A__BI_audit_ENERGA_PRACOWNICY_adresy="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_PRACOWNICY_adresy"
  27. xmlns:yed="http://www.yworks.com/xml/yed/3"
  28. xmlns:p5xmli="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/xmlschema_interface/p5xmli.xsd"
  29. xmlns:p5suis="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/system_ui_info_speech/system_ui_info_speech.xsd"
  30. exclude-result-prefixes="xs vc gml p5bws system_cache__appinfo bcgtht p5 default_db__x3A__BI_audit_KRS default_db__x3A__BI_audit_MSIG default_db__x3A__BI_audit_CEIDG system_cache__dita default_db__x3A__BI_audit_KRS_person default_db__x3A__BI_audit_taxpayer"
  31. version="2.0">
  32. <xsl:import href="../xmlschema_interface/p5xmli.xsi.schemaLocation.xsl"/>
  33. <xsl:import href="bcgtht.tree_to_dita.import.xsl"/>
  34. <xsl:output indent="yes"/>
  35. <xsl:strip-space elements="*"/> <!-- -->
  36. <xsl:include href="../p5/p5.primaryKey.xsl"/>
  37. <xsl:include href="bcgtht.tree_to_dita.src_fid_analys.xsl"/>
  38. <xsl:include href="bcgtht.tree_to_dita.applying_analys.xsl"/>
  39. <xsl:include href="bcgtht.tree_to_dita.clousure.xsl"/>
  40. <xsl:include href="bcgtht.tree_to_dita.clousure.analys.xsl"/>
  41. <xsl:include href="bcgtht.tree_to_dita.clousure.analys.merge.xsl"/>
  42. <xsl:include href="bcgtht.tree_to_dita.clousure.analys.merge.apply.xsl"/>
  43. <xsl:include href="bcgtht.tree_to_dita.clousure.analys.merge.apply.rename.xsl"/>
  44. <xsl:include href="bcgtht.tree_to_dita.clousure.analys.merge.apply.rename.analys.xsl"/>
  45. <xsl:include href="../yed/p5yed.yed.graphml.xsl"/>
  46. <xsl:param name="bcgtht:debug" /> <!-- select="4" -->
  47. <xsl:param name="bcgtht:repository" select="'/Users/a.binder/Downloads'"/> <!-- select="concat($temp,'/bcgtht.repository'" -->
  48. <xsl:param name="bcgtht.clousure.xml" select="concat($bcgtht:repository,'/bcgtht.clousure.xml')"/>
  49. <xsl:param name="bcgtht.clousure.analys.xml" select="concat($bcgtht:repository,'/bcgtht.clousure.analys.xml')"/>
  50. <xsl:param name="bcgtht.src_fid_analys.xml" select="concat($bcgtht:repository,'/bcgtht.src_fid_analys.xml')"/>
  51. <xsl:param name="bcgtht.applying_analys.xml" select="concat($bcgtht:repository,'/bcgtht.applying_analys.xml')"/>
  52. <xsl:param name="bcgtht.applying_analys.merge.xml" select="concat($bcgtht:repository,'/bcgtht.applying_analys.merge.xml')"/>
  53. <xsl:param name="bcgtht.applying_analys.merge.apply.xml" select="concat($bcgtht:repository,'/bcgtht.applying_analys.merge.apply.xml')"/>
  54. <xsl:param name="bcgtht.applying_analys.merge.apply.rename.xml" select="concat($bcgtht:repository,'/bcgtht.applying_analys.merge.apply.rename.xml')"/>
  55. <xsl:param name="bcgtht.applying_analys.merge.apply.rename.analys.xml" select="concat($bcgtht:repository,'/bcgtht.applying_analys.merge.apply.rename.analys.xml')"/>
  56. <xsl:param name="bcgtht.yed.graphml" select="concat($bcgtht:repository,'/bcgtht.yed.graphml')"/>
  57. <xsl:param name="bcgtht.applying_analys.debug.xml" select="concat($bcgtht:repository,'/bcgtht.applying_analys.debug.xml')"/>
  58. <xsl:param name="bcgtht.yed.analys.graphml" select="concat($bcgtht:repository,'/bcgtht.yed.analys.graphml')"/>
  59. <xsl:param name="bcgtht.yed.clousure.analys.merge.apply.graphml" select="concat($bcgtht:repository,'/bcgtht.yed.clousure.analys.merge.apply.graphml')"/>
  60. <xsl:param name="bcgtht.yed.clousure.analys.merge.apply.rename.analys.graphml" select="concat($bcgtht:repository,'/bcgtht.yed.clousure.analys.merge.apply.rename.analys.graphml')"/>
  61. <xsl:param name="bcgtht.clousure.xsd" select="'bcgtht.clousure.xsd'"/>
  62. <!-- to be used from tree_to_dita.xsl -->
  63. <xsl:template mode="bocian-graph-2-html.preprocess" match="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA[@fid]|BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row[@fid]">
  64. <!--<xsl:variable name="fileindex" select="@fid"/>-->
  65. <xsl:param name="fileindex" select="@fid"/>
  66. <xsl:message>#75 result-document <xsl:value-of select="$ditadir"/>/bocian-graph-2-html/<xsl:value-of select="$fileindex"/>.xml ;</xsl:message>
  67. <xsl:result-document href="{$ditadir}/bocian-graph-2-html/{$fileindex}.xml" omit-xml-declaration="yes">
  68. <wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" xmlns="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:default_db__x3A__BI_audit_ENERGA_PRACOWNICY="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_PRACOWNICY" xmlns:p5="https://biuro.biall-net.pl/wfs" xmlns:default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object" xmlns:default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row" xmlns:default_db__x3A__BI_audit_KRS="https://biuro.biall-net.pl/wfs/default_db/BI_audit_KRS" xmlns:default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI" xmlns:default_db__x3A__BI_audit_MSIG="https://biuro.biall-net.pl/wfs/default_db/BI_audit_MSIG" xmlns:default_db__x3A__BI_audit_CEIDG="https://biuro.biall-net.pl/wfs/default_db/BI_audit_CEIDG" xsi:schemaLocation="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_PRACOWNICY https://biuro.biall-net.pl/dev-pl/se-projects/bocian/SE//wfs-data.php/default_db/?SERVICE=WFS&amp;VERSION=1.0.0&amp;TYPENAME=default_db__x3A__BI_audit_ENERGA_PRACOWNICY:BI_audit_ENERGA_PRACOWNICY&amp;REQUEST=DescribeFeatureType" numberMatched="unknown" numberReturned="1" next="https://biuro.biall-net.pl/dev-pl/se-projects/bocian/SE//wfs-data.php/default_db/?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetFeature&amp;TYPENAME=default_db__x3A__BI_audit_ENERGA_PRACOWNICY%3ABI_audit_ENERGA_PRACOWNICY&amp;SRSNAME=EPSG%3A3003&amp;sortBy=ID+D&amp;maxFeatures=20&amp;startIndex=20">
  69. <xsl:apply-templates mode="bocian-graph-2-html.preprocess.root" select="."/>
  70. <!-- strategy
  71. wszystkie wyjscia od pracownika
  72. row_object
  73. row
  74. row_object
  75. KONTR
  76. -->
  77. </wfs:FeatureCollection>
  78. </xsl:result-document>
  79. <bocian-graph-2-html xsl:exclude-result-prefixes="p5 bcgtht" xsl:xpath-default-namespace="" srcfile="{$ditadir}/bocian-graph-2-html/{$fileindex}.xml" dstfile="{$ditadir}/bocian-graph-2-html/{$fileindex}.png.xml" fileindex="{$fileindex}" ditadir="{$ditadir}" />
  80. </xsl:template>
  81. <xsl:template mode="bocian-graph-2-html.preprocess.root" match="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA[BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row]">
  82. <xsl:message>#97-97 bypas .root n/<xsl:value-of select="name()"/>; </xsl:message>
  83. <xsl:apply-templates mode="#current"/>
  84. </xsl:template>
  85. <xsl:template mode="bocian-graph-2-html.preprocess.root" match="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row">
  86. <xsl:message>#97-102 bypas .root n/<xsl:value-of select="name()"/>; go mode .child</xsl:message>
  87. <xsl:apply-templates mode="bocian-graph-2-html.preprocess.child" select="."/>
  88. </xsl:template>
  89. <xsl:template mode="bocian-graph-2-html.preprocess.root" match="*">
  90. <xsl:message>#97-107 run direct mode child n/<xsl:value-of select="name()"/>; go mode .child</xsl:message>
  91. <xsl:apply-templates mode="bocian-graph-2-html.preprocess.child" select="."/>
  92. </xsl:template>
  93. <xsl:template mode="bocian-graph-2-html.preprocess.root" match="text()|comment()"/>
  94. <xsl:template mode=" bocian-graph-2-html.preprocess" match="text()|comment()"/>
  95. <xsl:template mode="bocian-graph-2-html.preprocess.child" match="text()|comment()"/>
  96. <!--<xsl:template mode="bocian-graph-2-html.preprocess" match="text()|comment()|*"/>-->
  97. <xsl:template mode="bocian-graph-2-html.preprocess.child" match="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA">
  98. <xsl:message>#119 running match="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA" - intended for all raport </xsl:message>
  99. <!--<xsl:apply-templates mode="#current" select="*"/>--> <!-- [1] -->
  100. <xsl:variable name="bcgtht:src_fid_analys">
  101. <xsl:apply-templates mode="bcgtht:src_fid_analys" select="."/>
  102. </xsl:variable>
  103. <xsl:message>#126 result-document href="<xsl:value-of select="$bcgtht.src_fid_analys.xml"/></xsl:message>
  104. <xsl:result-document href="{$bcgtht.src_fid_analys.xml}.{@fid}.xml">
  105. <xsl:copy-of select="$bcgtht:src_fid_analys"/>
  106. </xsl:result-document>
  107. <!--<xsl:copy-of select="$bcgtht:src_fid_analys" copy-namespaces="no"/>-->
  108. <xsl:variable name="bcgtht:applying_analys">
  109. <xsl:call-template name="bcgtht:applying_analys">
  110. <xsl:with-param name="bcgtht:src_fid_analys" select="$bcgtht:src_fid_analys"/>
  111. </xsl:call-template>
  112. </xsl:variable>
  113. <!--<xsl:if test="number($bcgtht:debug) &gt; 3">-->
  114. <xsl:message>#140 result-document href="<xsl:value-of select="$bcgtht.applying_analys.xml"/></xsl:message>
  115. <xsl:result-document href="{$bcgtht.applying_analys.xml}.{@fid}">
  116. <xsl:copy-of select="$bcgtht:applying_analys"/>
  117. </xsl:result-document>
  118. <!--</xsl:if>-->
  119. <xsl:if test="number($bcgtht:debug) &gt; 3">
  120. <xsl:message>#129 number($bcgtht:debug = <xsl:value-of select="$bcgtht:debug"/>) &gt; 3 bcgtht:repository = <xsl:value-of select="$bcgtht:repository"/>; </xsl:message>
  121. <xsl:variable name="bcgtht:clousure">
  122. <xsl:apply-templates mode="bcgtht:clousure" select="."/>
  123. </xsl:variable>
  124. <xsl:variable name="yed:graphml">
  125. <xsl:apply-templates mode="yed:graphml" select="$bcgtht:clousure"/>
  126. </xsl:variable>
  127. <xsl:message> result-document href="<xsl:value-of select="$bcgtht.clousure.xml"/></xsl:message>
  128. <xsl:result-document href="{$bcgtht.clousure.xml}">
  129. <xsl:copy-of select="$bcgtht:clousure"/>
  130. </xsl:result-document>
  131. <xsl:variable name="bcgtht:clousure.analys">
  132. <xsl:call-template name="bcgtht:clousure.analys">
  133. <xsl:with-param name="bcgtht:clousure" select="$bcgtht:clousure"/>
  134. </xsl:call-template>
  135. </xsl:variable>
  136. <xsl:message> result-document href="<xsl:value-of select="$bcgtht.clousure.analys.xml"/></xsl:message>
  137. <xsl:result-document href="{$bcgtht.clousure.analys.xml}">
  138. <xsl:copy-of select="$bcgtht:clousure.analys"/>
  139. </xsl:result-document>
  140. <xsl:variable name="yed:analys.graphml">
  141. <xsl:apply-templates mode="yed:graphml" select="$bcgtht:clousure.analys"/>
  142. </xsl:variable>
  143. <xsl:variable name="bcgtht:clousure.analys.merge">
  144. <xsl:apply-templates mode="bcgtht:clousure.analys.merge" select="$bcgtht:clousure.analys"/>
  145. </xsl:variable>
  146. <xsl:message> result-document href="<xsl:value-of select="$bcgtht.applying_analys.merge.xml"/></xsl:message>
  147. <xsl:result-document href="{$bcgtht.applying_analys.merge.xml}">
  148. <xsl:copy-of select="$bcgtht:clousure.analys.merge"/>
  149. </xsl:result-document>
  150. <xsl:message> result-document href="<xsl:value-of select="$bcgtht.yed.analys.graphml"/></xsl:message>
  151. <xsl:result-document href="{$bcgtht.yed.analys.graphml}">
  152. <xsl:copy-of select="$yed:analys.graphml"/>
  153. </xsl:result-document>
  154. <xsl:variable name="bcgtht:clousure.analys.merge.apply">
  155. <xsl:apply-templates mode="bcgtht:clousure.analys.merge.apply" select="$bcgtht:clousure.analys.merge"/>
  156. </xsl:variable>
  157. <xsl:message> result-document href="<xsl:value-of select="$bcgtht.applying_analys.merge.apply.xml"/></xsl:message>
  158. <xsl:result-document href="{$bcgtht.applying_analys.merge.apply.xml}">
  159. <xsl:copy-of select="$bcgtht:clousure.analys.merge.apply"/>
  160. </xsl:result-document>
  161. <xsl:variable name="yed:clousure.analys.merge.apply.graphml">
  162. <xsl:apply-templates mode="yed:graphml" select="$bcgtht:clousure.analys.merge.apply"/>
  163. </xsl:variable>
  164. <xsl:variable name="bcgtht:clousure.analys.merge.apply.rename">
  165. <xsl:apply-templates mode="bcgtht:clousure.analys.merge.apply.rename" select="$bcgtht:clousure.analys.merge.apply"/>
  166. </xsl:variable>
  167. <xsl:message> result-document href="<xsl:value-of select="$bcgtht.applying_analys.merge.apply.rename.xml"/></xsl:message>
  168. <xsl:result-document href="{$bcgtht.applying_analys.merge.apply.rename.xml}">
  169. <xsl:copy-of select="$bcgtht:clousure.analys.merge.apply.rename"/>
  170. </xsl:result-document>
  171. <xsl:call-template name="p5suis:say_to_queue.copy_file.xml">
  172. <xsl:with-param name="filename" select="'bcgtht.applying_analys.merge.apply.rename.xml'"/>
  173. <xsl:with-param name="context" select="$bcgtht:clousure.analys.merge.apply.rename"/>
  174. </xsl:call-template>
  175. <xsl:variable name="bcgtht:clousure.analys.merge.apply.rename.analys">
  176. <xsl:apply-templates mode="bcgtht:clousure.analys.merge.apply.rename.analys" select="$bcgtht:clousure.analys.merge.apply.rename"/>
  177. </xsl:variable>
  178. <xsl:message> result-document href="<xsl:value-of select="$bcgtht.applying_analys.merge.apply.rename.analys.xml"/></xsl:message>
  179. <xsl:result-document href="{$bcgtht.applying_analys.merge.apply.rename.analys.xml}">
  180. <xsl:copy-of select="$bcgtht:clousure.analys.merge.apply.rename.analys"/>
  181. </xsl:result-document>
  182. <xsl:variable name="yed:clousure.analys.merge.apply.rename.analys.graphml">
  183. <xsl:apply-templates mode="yed:graphml" select="$bcgtht:clousure.analys.merge.apply.rename.analys"/>
  184. </xsl:variable>
  185. <xsl:message> result-document href="<xsl:value-of select="$bcgtht.yed.clousure.analys.merge.apply.rename.analys.graphml"/></xsl:message>
  186. <xsl:result-document href="{$bcgtht.yed.clousure.analys.merge.apply.rename.analys.graphml}">
  187. <xsl:copy-of select="$yed:clousure.analys.merge.apply.rename.analys.graphml"/>
  188. </xsl:result-document>
  189. <xsl:message> result-document href="<xsl:value-of select="$bcgtht.yed.clousure.analys.merge.apply.graphml"/></xsl:message>
  190. <xsl:result-document href="{$bcgtht.yed.clousure.analys.merge.apply.graphml}">
  191. <xsl:copy-of select="$yed:clousure.analys.merge.apply.graphml"/>
  192. </xsl:result-document>
  193. <xsl:variable name="bcgtht:clousure.analys.debug">
  194. <xsl:apply-templates mode="bcgtht:clousure.analys.debug" select="$bcgtht:clousure.analys"/>
  195. </xsl:variable>
  196. <xsl:message> result-document href="<xsl:value-of select="$bcgtht.applying_analys.debug.xml"/></xsl:message>
  197. <xsl:result-document href="{$bcgtht.applying_analys.debug.xml}">
  198. <xsl:copy-of select="$bcgtht:clousure.analys.debug"/>
  199. </xsl:result-document>
  200. </xsl:if>
  201. <!--<xsl:copy-of select="$applying_analys" copy-namespaces="no"/>-->
  202. <!--<bocian-graph-2-html.preprocess.applying_analys>-->
  203. <xsl:apply-templates mode="bcgtht:applying_analys" select="$bcgtht:applying_analys"/>
  204. <!--</bocian-graph-2-html.preprocess.applying_analys>-->
  205. </xsl:template>
  206. <xsl:template mode="bocian-graph-2-html.preprocess.from_analys" match="*">
  207. <xsl:copy copy-namespaces="no">
  208. <xsl:copy-of select="@*"/>
  209. <xsl:apply-templates mode="#current"/>
  210. </xsl:copy>
  211. </xsl:template>
  212. <xsl:function name="system_cache__dita:bocian.cached">
  213. <system_cache__dita:bocian.cached>
  214. <fid/>
  215. </system_cache__dita:bocian.cached>
  216. </xsl:function>
  217. <xsl:function name="system_cache__dita:bocian.cached">
  218. <xsl:param name="system_cache__dita:bocian.cached"/>
  219. <xsl:param name="fid"/>
  220. <xsl:choose>
  221. <xsl:when test="$system_cache__dita:bocian.cached//fid[@fid=$fid]">
  222. <xsl:message>#158 cached node <xsl:value-of select="$fid"/> - bypasiing </xsl:message>
  223. </xsl:when>
  224. <xsl:otherwise>
  225. <system_cache__dita:bocian.cached>
  226. <xsl:for-each select="$system_cache__dita:bocian.cached//fid">
  227. <xsl:copy-of select="." copy-namespaces="no"/>
  228. </xsl:for-each>
  229. </system_cache__dita:bocian.cached>
  230. </xsl:otherwise>
  231. </xsl:choose>
  232. </xsl:function>
  233. <!--<xsl:template name="bocian-graph-2-html.applying_analys">
  234. <xsl:param name="dst_fid.not.following.count" required="yes"/>
  235. <xsl:param name="dst_fid.following.count" required="yes"/>
  236. <xsl:param name="src_fid_analys" required="yes"/>
  237. <xsl:param name="src_fid" required="yes"/>
  238. <xsl:param name="src_fid.pos" />
  239. <xsl:param name="dst_fid.not.following.pos" select="1"/>
  240. <xsl:param name="dst_fid.following.pos" select="1"/>
  241. <xsl:param name="last_call"/>
  242. <xsl:param name="last_call.pos" />
  243. <xsl:param name="last_call.pos.count" />
  244. <bocian-graph-2-html.applying_analys>
  245. <xsl:choose>
  246. <xsl:when test="not($dst_fid.not.following.count &gt; 0) and not($dst_fid.following.count &gt; 0)">
  247. <TODO>not($dst_fid.not.following.count &gt; 0) and not($dst_fid.following.count &gt; 0)</TODO>
  248. </xsl:when>
  249. <xsl:otherwise>
  250. <xsl:choose>
  251. <xsl:when test="$dst_fid.not.following.pos &lt; $dst_fid.not.following.count and not($last_call='not.following')">
  252. <xsl:for-each select="$src_fid/dst_fid[not(following-sibling)][$dst_fid.not.following.pos]">
  253. <dst_fid_not_following-sibling>
  254. <xsl:copy copy-namespaces="no">
  255. <xsl:copy-of select="@*"/>
  256. </xsl:copy>
  257. </dst_fid_not_following-sibling>
  258. <xsl:call-template name="bocian-graph-2-html.applying_analys">
  259. <xsl:with-param name="src_fid_analys" select="$src_fid_analys"/>
  260. <xsl:with-param name="dst_fid.not.following.count" select="$dst_fid.not.following.count"/>
  261. <xsl:with-param name="dst_fid.following.count" select="$dst_fid.following.count"/>
  262. <xsl:with-param name="src_fid.pos" select="$src_fid.pos"/>
  263. <xsl:with-param name="src_fid" select="$src_fid"/>
  264. <xsl:with-param name="dst_fid.not.following.pos" select="$dst_fid.not.following.pos"/>
  265. <xsl:with-param name="dst_fid.following.pos" select="$dst_fid.following.pos"/>
  266. <xsl:with-param name="last_call" select="'not.following'"/>
  267. <xsl:with-param name="last_call.pos" select="1"/>
  268. <xsl:with-param name="last_call.pos.count" select="count($src_fid/dst_fid[not(following-sibling)][$dst_fid.not.following.pos]/*)"/>
  269. </xsl:call-template>
  270. </xsl:for-each>
  271. </xsl:when>
  272. <!-\-<xsl:when test="$dst_fid.following.pos &lt; $dst_fid.following.count and $last_call = 'not.following'">
  273. <xsl:for-each select="$src_fid/dst_fid[following-sibling][$dst_fid.following.pos]/*">
  274. <dst_fid_not_following-sibling>
  275. <xsl:copy copy-namespaces="no">
  276. <xsl:copy-of select="@*"/>
  277. </xsl:copy>
  278. </dst_fid_not_following-sibling>
  279. <xsl:call-template name="bocian-graph-2-html.applying_analys">
  280. <xsl:with-param name="src_fid_analys" select="$src_fid_analys"/>
  281. <xsl:with-param name="dst_fid.not.following.count" select="$dst_fid.not.following.count"/>
  282. <xsl:with-param name="dst_fid.following.count" select="$dst_fid.following.count"/>
  283. <xsl:with-param name="src_fid.pos" select="$src_fid.pos"/>
  284. <xsl:with-param name="src_fid" select="$src_fid"/>
  285. <xsl:with-param name="dst_fid.not.following.pos" select="$dst_fid.not.following.pos"/>
  286. <xsl:with-param name="dst_fid.following.pos" select="$dst_fid.following.pos + 1"/>
  287. <xsl:with-param name="last_call" select="'not.following'"/>
  288. </xsl:call-template>
  289. </xsl:for-each>
  290. </xsl:when>-\->
  291. <!-\-<xsl:when test="$dst_fid.not.following.pos &lt; $dst_fid.not.following.count and $last_call='not.following'">
  292. </xsl:when>-\->
  293. </xsl:choose>
  294. </xsl:otherwise>
  295. </xsl:choose>
  296. </bocian-graph-2-html.applying_analys>
  297. </xsl:template>-->
  298. <xsl:template mode="bocian-graph-2-html.preprocess.child" match="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row[@fid]">
  299. <xsl:variable name="fileindex" select="@fid"/>
  300. <!--example call module <xsl:for-each select="$dita//simpletable">
  301. <xsl:apply-templates select="." mode="system_cache__dita:graph__write_dita_preprocess">
  302. <xsl:with-param name="fileindex" select="@id"/>
  303. </xsl:apply-templates>
  304. </xsl:for-each> -->
  305. <!-- example xsl from other module
  306. <xsl:result-document href="{$ditadir}/graph_to_image/{$fileindex}.gnuplot" omit-xml-declaration="yes">
  307. set terminal pngcairo font "arial,6" size 800,600
  308. set nokey
  309. set output '<xsl:value-of select="$fileindex"/>.png'
  310. set boxwidth 0.75
  311. set style fill solid
  312. set title "Wykres"
  313. plot "<xsl:value-of select="$fileindex"/>.gnuplot.dat" using 2:xtic(1) with boxes
  314. </xsl:result-document>
  315. -->
  316. <!--<xsl:result-document href="{$ditadir}/graph_to_image/{$fileindex}.gnuplot.dat" omit-xml-declaration="yes">
  317. <!-\-<system_cache__appinfo:graph_to_image.population.dat>-\->
  318. <!-\-<xsl:attribute name="local-name" select="local-name()"/>-\->
  319. <xsl:variable name="cols" select="count(strow[ position() = 1]/stentry)"/>
  320. <xsl:variable name="strow" select="(strow|sthead)"/>
  321. <xsl:message>#69 graph cols <xsl:value-of select="$cols"/></xsl:message>
  322. <xsl:for-each select="1 to $cols">
  323. <xsl:for-each select="$strow/stentry[ position() = current()]">
  324. <xsl:choose>
  325. <xsl:when test="position() = 1">
  326. <!-\-<xsl:value-of select="system_cache__appinfo:truncate_special_and_do_uppercase(.)"/><xsl:text>&#09;</xsl:text>-\->
  327. <xsl:value-of select="string(.)"/><xsl:text>&#09;</xsl:text>
  328. </xsl:when>
  329. <xsl:otherwise>
  330. <xsl:value-of select="string(.)"/><xsl:text>&#09;</xsl:text>
  331. </xsl:otherwise>
  332. </xsl:choose>
  333. </xsl:for-each>
  334. <xsl:text>&#10;</xsl:text>
  335. </xsl:for-each>
  336. <!-\-</system_cache__appinfo:graph_to_image.population.dat>-\->
  337. <!-\-<xsl:apply-templates mode="preprocess_gml_geometry_image" select="."/>-\->
  338. </xsl:result-document>-->
  339. <gml:featureMember >
  340. <xsl:element name="default_db__x3A__{BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[1]/*[1]/local-name()}:{BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[1]/*[1]/local-name()}">
  341. <xsl:attribute name="p5:primaryKey" select="p5:primaryKey(BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[1]/*[1]/@fid)"/>
  342. <xsl:copy-of select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[1]/*[1]/@fid"/>
  343. <!--<default_db__x3A__BI_audit_ENERGA_PRACOWNICY:BI_audit_ENERGA_PRACOWNICY fid="{@fid}">-->
  344. <!--<xsl:attribute name="p5:primaryKey" select="p5:primaryKey(@fid)"/>-->
  345. <xsl:apply-templates mode="bocian-graph-2-html.preprocess.names" select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[1]"/>
  346. <!--<default_db__x3A__BI_audit_ENERGA_PRACOWNICY:ID>12</default_db__x3A__BI_audit_ENERGA_PRACOWNICY:ID>
  347. <default_db__x3A__BI_audit_ENERGA_PRACOWNICY:imiona>Robert</default_db__x3A__BI_audit_ENERGA_PRACOWNICY:imiona>
  348. <default_db__x3A__BI_audit_ENERGA_PRACOWNICY:nazwisko>Szaj</default_db__x3A__BI_audit_ENERGA_PRACOWNICY:nazwisko>-->
  349. <xsl:variable name="pos.last" select="count(BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object)"/>
  350. <!-- fix @2018-09-09 to piotr standard -->
  351. <xsl:variable name="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row" select="."/>
  352. <default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object fid="{BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[1]/@fid}" >
  353. <xsl:namespace name="default_db__x3A__{BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[1]/local-name()}">https://biuro.biall-net.pl/wfs/default_db/<xsl:value-of select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[1]/local-name()"/></xsl:namespace>
  354. <xsl:attribute name="p5:primaryKey" select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[1]/p5:primaryKey(@fid)"/>
  355. <default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object:ID><xsl:value-of select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[1]/p5:primaryKey(@fid)"/></default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object:ID>
  356. <xsl:element name="default_db__x3A__{local-name()}:{local-name()}" >
  357. <xsl:copy-of select="@fid" copy-namespaces="no"/>
  358. <xsl:attribute name="p5:primaryKey" select="p5:primaryKey(@fid)"/>
  359. <xsl:element name="default_db__x3A__{local-name()}:ID"><xsl:value-of select="p5:primaryKey(@fid)"/></xsl:element>
  360. <xsl:for-each select="0 to ( $pos.last - 1 )">
  361. <xsl:variable name="pos_request" select="xs:integer($pos.last - current())"/>
  362. <xsl:comment>#133 1 to <xsl:value-of select="$pos.last"/> = <xsl:value-of select="$pos.last - current()"/> = <xsl:value-of select="$pos_request"/></xsl:comment>
  363. <xsl:message>#133 1 to <xsl:value-of select="$pos.last"/> = <xsl:value-of select="$pos.last - current()"/> = <xsl:value-of select="$pos_request"/></xsl:message>
  364. <xsl:for-each select="$BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ $pos_request ]">
  365. <xsl:apply-templates mode="bocian-graph-2-html.preprocess.row_objects" select="." >
  366. <xsl:with-param name="pos" select="position()"/>
  367. <xsl:with-param name="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object" select="."/>
  368. <xsl:with-param name="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object.source" select="$BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row"/>
  369. </xsl:apply-templates>
  370. </xsl:for-each>
  371. </xsl:for-each>
  372. </xsl:element>
  373. </default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object>
  374. <!-- EOF fix @2018-09-09 to piotr standard -->
  375. <!--<xsl:element name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object">
  376. <xsl:copy-of select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[1]/@fid"/>
  377. <xsl:attribute name="p5:primaryKey" select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[1]/p5:primaryKey(@fid)"/>
  378. <default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object:ID><xsl:value-of select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[1]/p5:primaryKey(@fid)"/></default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object:ID>
  379. <xsl:comment>#109 parent once </xsl:comment>
  380. <xsl:element name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row">
  381. <xsl:copy-of select="@fid"/>
  382. <xsl:attribute name="p5:primaryKey" select="p5:primaryKey(@fid)"/>
  383. <default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row:ID><xsl:value-of select="p5:primaryKey(@fid)"/></default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row:ID>
  384. <xsl:comment>#109 parent root </xsl:comment>
  385. <xsl:variable name="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row" select="."/>
  386. <xsl:for-each select="0 to ( $pos.last - 1 )">
  387. <xsl:comment>#133 1 to <xsl:value-of select="$pos.last"/> = <xsl:value-of select="$pos.last - current()"/></xsl:comment>
  388. <xsl:for-each select="$BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ ($pos.last - current()) ]">
  389. <xsl:apply-templates mode="bocian-graph-2-html.preprocess.row_objects" select="." >
  390. <xsl:with-param name="pos" select="position()"/>
  391. <xsl:with-param name="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object" select="."/>
  392. </xsl:apply-templates>
  393. </xsl:for-each>
  394. </xsl:for-each>
  395. <!-\-<xsl:apply-templates mode="bocian-graph-2-html.preprocess.row_objects" select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ last()]" >
  396. <xsl:with-param name="pos" select="2"/>
  397. <xsl:with-param name="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object" select="."/>
  398. </xsl:apply-templates>-\->
  399. </xsl:element>
  400. </xsl:element>-->
  401. <!--<xsl:for-each select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ not(position()=1)]" >-->
  402. <!--<xsl:call-template name="bocian-graph-2-html.preprocess.row_objects" />-->
  403. <!--</xsl:for-each>-->
  404. <!-- mode="bocian-graph-2-html.preprocess.row_objects" -->
  405. <!--</default_db__x3A__BI_audit_ENERGA_PRACOWNICY:BI_audit_ENERGA_PRACOWNICY>-->
  406. </xsl:element>
  407. </gml:featureMember>
  408. </xsl:template>
  409. <xsl:template name="bocian-graph-2-html.preprocess.row_objects">
  410. <bocian-graph-2-html.preprocess.row_objects>
  411. <xsl:for-each select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ not(position()=1)]" >
  412. <OBJ>
  413. </OBJ>
  414. <xsl:apply-templates mode="bocian-graph-2-html.preprocess.row_objects" select="."/>
  415. </xsl:for-each>
  416. </bocian-graph-2-html.preprocess.row_objects>
  417. </xsl:template>
  418. <xsl:template mode="bocian-graph-2-html.preprocess bocian-graph-2-html.preprocess.child bocian-graph-2-html.preprocess.applying_analys" match="text()|comment()|*"/>
  419. <xsl:function name="system_cache__dita:bocian.add.elements">
  420. <xsl:param name="local-name"/>
  421. <xsl:choose>
  422. <xsl:when test="contains($local-name,'default_db__x3A__')">
  423. <xsl:value-of select="$local-name"/>
  424. </xsl:when>
  425. <xsl:otherwise>
  426. <xsl:value-of select="concat('default_db__x3A__',$local-name,':',$local-name)"/>
  427. </xsl:otherwise>
  428. </xsl:choose>
  429. </xsl:function>
  430. <xsl:template mode="bocian-graph-2-html.preprocess.names" match="*[* ]">
  431. <xsl:param name="addelement"/>
  432. <xsl:choose>
  433. <xsl:when test="$addelement">
  434. <xsl:comment>#512 not bypassed <xsl:value-of select="local-name()"/></xsl:comment>
  435. <xsl:message>#512 not bypassed <xsl:value-of select="local-name()"/></xsl:message>
  436. <xsl:choose>
  437. <xsl:when test="contains(name(),'default_db__x3A__')">
  438. <xsl:copy copy-namespaces="no">
  439. <xsl:copy-of select="@fid"/>
  440. <xsl:attribute name="p5:primaryKey" select="p5:primaryKey(@fid)"/>
  441. <xsl:apply-templates mode="#current">
  442. <xsl:with-param name="addelement" select="$addelement"/>
  443. </xsl:apply-templates>
  444. </xsl:copy>
  445. </xsl:when>
  446. <xsl:otherwise>
  447. <!-- xmlns:default_db__x3A__BI_audit_ENERGA_PRACOWNICY_adresy="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_PRACOWNICY_adresy" -->
  448. <xsl:element name="default_db__x3A__{local-name()}:{local-name()}" namespace="https://biuro.biall-net.pl/wfs/default_db/{local-name()}" >
  449. <xsl:namespace name="default_db__x3A__{local-name()}" select="concat('https://biuro.biall-net.pl/wfs/default_db/',local-name())"/>
  450. <xsl:copy-of select="@fid"/>
  451. <xsl:attribute name="p5:primaryKey" select="p5:primaryKey(@fid)"/>
  452. <xsl:apply-templates mode="#current">
  453. <xsl:with-param name="addelement" select="$addelement"/>
  454. </xsl:apply-templates>
  455. </xsl:element>
  456. </xsl:otherwise>
  457. </xsl:choose>
  458. </xsl:when>
  459. <xsl:otherwise>
  460. <xsl:comment>#512 bypassed <xsl:value-of select="local-name()"/></xsl:comment>
  461. <xsl:message>#512 bypassed <xsl:value-of select="local-name()"/></xsl:message>
  462. <xsl:apply-templates mode="#current"/>
  463. </xsl:otherwise>
  464. </xsl:choose>
  465. </xsl:template>
  466. <xsl:function name="system_cache__dita:bocian.bypass.elements">
  467. <xsl:param name="element"/>
  468. <xsl:choose>
  469. <xsl:when test="$element = 'relation_from'"/>
  470. <xsl:when test="$element = 'BI_audit_MSIG_person'"/>
  471. <xsl:when test="$element = 'BI_audit_KRS_person'"/>
  472. <xsl:when test="$element = 'BI_audit_MSIG_company'"/>
  473. <xsl:when test="$element = 'BI_audit_KRS_company'"/>
  474. <xsl:when test="$element = 'BI_audit_taxpayer'"/>
  475. <xsl:when test="$element = 'TERYT_adresy'"/>
  476. <xsl:when test="$element = 'BI_audit_MSIG_address'"/>
  477. <xsl:otherwise><xsl:value-of select="true()"/></xsl:otherwise>
  478. </xsl:choose>
  479. </xsl:function>
  480. <xsl:template match="relation_from|BI_audit_MSIG_person[preceding-sibling::* and following-sibling::*][preceding-sibling::* and following-sibling::*]|BI_audit_KRS_person[ preceding-sibling::* and following-sibling::* ]|BI_audit_MSIG_company|BI_audit_KRS_company|BI_audit_taxpayer|TERYT_adresy|BI_audit_MSIG_address" mode="bocian-graph-2-html.preprocess.names" priority="5"/>
  481. <xsl:template mode="bocian-graph-2-html.preprocess.names" match="ID|imiona|nazwisko|Pelna_nazwa_kontrahenta|nazwa"> <!-- |*[not(*)] -->
  482. <xsl:element name="default_db__x3A__{parent::*/local-name()}:{local-name()}" namespace="https://biuro.biall-net.pl/wfs/default_db/{local-name()}">
  483. <xsl:namespace name="default_db__x3A__{local-name()}" select="concat('https://biuro.biall-net.pl/wfs/default_db/',local-name())"/>
  484. <xsl:if test="local-name()='nazwa'"><xsl:value-of select="parent::*/system_cache__dita:localname.translate(local-name())"/><xsl:text> </xsl:text></xsl:if><xsl:value-of select="text()"/>
  485. <!--<xsl:if test="local-name()='ID'"><xsl:comment>#201 parent/name=<xsl:value-of select="parent::*/name()"/></xsl:comment></xsl:if>-->
  486. </xsl:element>
  487. </xsl:template>
  488. <xsl:template mode="bocian-graph-2-html.preprocess.names" match="text()|comment()"/>
  489. <xsl:template mode="bocian-graph-2-html.preprocess.row_objects" match="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object">
  490. <xsl:param name="pos" required="yes"/>
  491. <xsl:param name="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object" required="yes"/>
  492. <xsl:param name="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object.source" required="yes"/>
  493. <!--<bocian-graph-2-html.preprocess.row_objects pos="{$pos}" cnt="{count($BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object//*)}">-->
  494. <xsl:variable name="test_child">
  495. <xsl:apply-templates mode="bocian-graph-2-html.preprocess.names" >
  496. <xsl:with-param name="addelement" select="true()"/>
  497. </xsl:apply-templates>
  498. </xsl:variable>
  499. <xsl:choose>
  500. <xsl:when test="$test_child//*">
  501. <!--<xsl:element name="{*[1]/name()}"></xsl:element>-->
  502. <!--<xsl:comment>#631 todo add .._row <xsl:value-of select="$BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object/parent::BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/@fid"/></xsl:comment>-->
  503. <!--<xsl:comment>#639 adding associated row_object="<xsl:value-of select="$BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object/@fid"/>"; </xsl:comment>-->
  504. <xsl:element name="default_db__x3A__{$BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object/local-name()}:{$BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object/local-name()}" >
  505. <xsl:copy-of select="$BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object/@fid" copy-namespaces="no"/>
  506. <xsl:attribute name="p5:primaryKey" select="$BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object/p5:primaryKey(@fid)"/>
  507. <xsl:element name="default_db__x3A__{$BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object/local-name()}:ID"><xsl:value-of select="$BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object/p5:primaryKey(@fid)"/></xsl:element>
  508. <xsl:apply-templates mode="bocian-graph-2-html.preprocess.names" >
  509. <xsl:with-param name="addelement" select="true()"/>
  510. </xsl:apply-templates>
  511. </xsl:element>
  512. <!--<xsl:apply-templates mode="#current" select="$BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ $pos + 1]" >
  513. <xsl:with-param name="pos" select="$pos + 1"/>
  514. <xsl:with-param name="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object" select="$BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object"/>
  515. </xsl:apply-templates>-->
  516. </xsl:when>
  517. </xsl:choose>
  518. <!--</bocian-graph-2-html.preprocess.row_objects>-->
  519. </xsl:template>
  520. <xsl:template mode="bocian-graph-2-html.preprocess" match="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object">
  521. <xsl:message terminate="yes">#73 match="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object" without @fid !</xsl:message>
  522. </xsl:template>
  523. <xsl:template mode="system_cache__dita:bocian-graph-2-html.write" match="*">
  524. </xsl:template>
  525. <xsl:template mode="system_cache__dita:bocian-graph-2-html.read" match="*">
  526. <xsl:param name="fileindex" required="yes"/> <!-- ex. 3161_IN7_MK_BAZA_DYSTRYBUCJI - is related dir in dita dir with images -->
  527. <xsl:param name="width" select="500"/>
  528. <xsl:param name="map_or_indita" select="'map'"/>
  529. <!-- example usage from other module
  530. <p> Ilości powiązań <note>Uwaga, w przypadku odnalezionych kilku tras do tego samego kontrahenta pokazywana jest jedna trasa (wykres nie zawiera tego ograniczenia)</note>
  531. <xsl:copy-of select="$simpletable"/>
  532. <xsl:apply-templates mode="system_cache__dita:graph__read" select="$simpletable">
  533. <xsl:with-param name="fileindex" select="$simpletable/simpletable/@id"/>
  534. <xsl:with-param name="width" select="500"/>
  535. </xsl:apply-templates>
  536. </p>
  537. -->
  538. <xsl:choose>
  539. <xsl:when test="doc-available(concat($ditadir,'/bocian-graph-2-html/',$fileindex,'.png.xml'))">
  540. <!--<xsl:apply-templates mode="system_cache__dita:graph_to_image" select="doc(concat($ditadir,'/graph_to_image/',$fileindex,'.png.xml'))">
  541. <xsl:with-param name="fileindex" select="$fileindex"/>
  542. <xsl:with-param name="width" select="$width"/>
  543. </xsl:apply-templates>-->
  544. <xsl:choose>
  545. <xsl:when test="$map_or_indita='topic'">
  546. <image href="../bocian-graph-2-html/{$fileindex}.png" width="{$width}"/>
  547. </xsl:when>
  548. <xsl:otherwise>
  549. <image href="bocian-graph-2-html/{$fileindex}.png" width="{$width}"/>
  550. </xsl:otherwise>
  551. </xsl:choose>
  552. </xsl:when>
  553. <xsl:otherwise>
  554. <xsl:comment>#190 doc not aviable <xsl:value-of select="concat($ditadir,'/bocian-graph-2-html/',$fileindex,'.png.xml')"/></xsl:comment>
  555. <xsl:message>#190 doc not aviable <xsl:value-of select="concat($ditadir,'/bocian-graph-2-html/',$fileindex,'.png.xml')"/></xsl:message>
  556. </xsl:otherwise>
  557. </xsl:choose>
  558. <xsl:comment>#180 todo mode="system_cache__dita:bocian-graph-2-html.read" match="*" name=<xsl:value-of select="name()"/></xsl:comment>
  559. </xsl:template>
  560. <xsl:template mode="system_cache__dita:bocian-graph-2-html.read" match="bocian-graph-2-html">
  561. <!-- integration in echoxml file="${postprocess_modules.xml} -->
  562. <xsl:param name="fileindex" required="yes"/> <!-- ex. 3161_IN7_MK_BAZA_DYSTRYBUCJI - is related dir in dita dir with images -->
  563. <xsl:param name="width" select="500"/>
  564. <xsl:comment>#85 todo mode="system_cache__dita:bocian-graph-2-html" match="bocian-graph-2-html"</xsl:comment>
  565. <!--<xsl:apply-templates mode="system_cache__appinfo:images">
  566. <xsl:with-param name="fileindex" select="$fileindex"/>
  567. <xsl:with-param name="width" select="$width"/>
  568. </xsl:apply-templates>-->
  569. </xsl:template>
  570. </xsl:stylesheet>