Browse Source

Merge branch 'master' of ssh://biuro.biall-net.pl:2222/plabudda/se

a.binder 6 years ago
parent
commit
edbd19c96e
26 changed files with 5065 additions and 2099 deletions
  1. 1 1
      SE/bash_sync_perms.php
  2. 2 0
      SE/schema/WPS_Functions/apache_fop/fop-2.3/fop/examples/fo/basic/images.fo
  3. 924 1289
      SE/schema/WPS_Functions/apache_fop/fop-2.3/fop/examples/fo/tables/borders.fo
  4. 27 17
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.defaults.param.xsl
  5. 684 96
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.Hi-Lo-Close.xsl
  6. 169 188
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.Yaxis.xsl
  7. 2 2
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.bar.test.svg
  8. 370 1
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.bar.xsl
  9. 1027 149
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.complex.test.svg
  10. 336 203
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.complex.test.xsl
  11. 190 1
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.xy.xsl
  12. 230 11
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.cursor.region.xsl
  13. 334 17
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.cursor.xsl
  14. 89 7
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.data.xsl
  15. BIN
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.resolution.numbers
  16. 1 1
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.resolution.xsl
  17. 184 12
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.translate.xsl
  18. 14 2
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.xsl
  19. 82 10
      SE/se-lib/Route/UrlAction/UserContact.php
  20. 1 1
      SE/se-lib/Route/UrlAction/UserSaldoAfterContact.php
  21. 20 0
      SE/se-lib/Route/UrlAction/WindykacjaUpdateStatus.php
  22. 25 2
      SE/se-lib/Route/UrlAction/WindykacjaUpdateStatus.php.view.js
  23. 99 73
      SE/se-lib/TableAjax.php.TableAjax.js
  24. 2 2
      SE/se-lib/TableAjax.php.p5UI__selected.js
  25. 80 2
      SE/se-lib/Windykacja/StatsHelper.php
  26. 172 12
      SE/static/p5UI/initP5MainMenuDropdown.js

+ 1 - 1
SE/bash_sync_perms.php

@@ -545,7 +545,7 @@ class SyncPerms {
 		echo "DBG: UrlAction_WmsGenerate->doGenerate() END\n";
 
 		echo "DBG: UrlAction_BiAuditGenerate->doGenerate() START...\n";
-		Router::getRoute('UrlAction_BiAuditGenerate')->doGenerate(); //musze przetestowac raport!
+		//Router::getRoute('UrlAction_BiAuditGenerate')->doGenerate(); //musze przetestowac raport!
 		echo "DBG: UrlAction_BiAuditGenerate->doGenerate() END\n";
 	}
 

+ 2 - 0
SE/schema/WPS_Functions/apache_fop/fop-2.3/fop/examples/fo/basic/images.fo

@@ -12,6 +12,7 @@
       <fo:region-body margin-bottom="50pt"/>
       <fo:region-after extent="25pt"/>
     </fo:simple-page-master>
+    
     <fo:page-sequence-master master-name="psmOddEven">
       <fo:repeatable-page-master-alternatives>
         <fo:conditional-page-master-reference master-reference="right" page-position="first"/>
@@ -19,6 +20,7 @@
         <fo:conditional-page-master-reference master-reference="right" odd-or-even="odd"/>
       </fo:repeatable-page-master-alternatives>
     </fo:page-sequence-master>
+    
   </fo:layout-master-set>
   <fo:page-sequence id="N2528" master-reference="psmOddEven">
     <fo:static-content flow-name="xsl-region-after">

+ 924 - 1289
SE/schema/WPS_Functions/apache_fop/fop-2.3/fop/examples/fo/tables/borders.fo

@@ -1,1333 +1,968 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
   <fo:layout-master-set>
-    <fo:simple-page-master master-name="first"
-          margin-right="1.5cm"
-          margin-left="1.5cm"
-          margin-bottom="2cm"
-          margin-top="1cm"
-          page-width="21cm"
-          page-height="29.7cm">
+    <fo:simple-page-master master-name="first" margin-right="1.5cm" margin-left="1.5cm"
+      margin-bottom="2cm" margin-top="1cm" page-width="21cm" page-height="29.7cm">
       <fo:region-body margin-top="1cm"/>
       <fo:region-before extent="1cm"/>
       <fo:region-after extent="1.5cm"/>
     </fo:simple-page-master>
   </fo:layout-master-set>
-
   <fo:page-sequence master-reference="first">
     <fo:static-content flow-name="xsl-region-before">
-      <fo:block line-height="14pt" font-size="10pt"
-    text-align="end">table examples</fo:block>
+      <fo:block line-height="14pt" font-size="10pt" text-align="end">table examples</fo:block>
     </fo:static-content>
     <fo:static-content flow-name="xsl-region-after">
-      <fo:block line-height="14pt" font-size="10pt"
-    text-align="end">Page <fo:page-number/></fo:block>
+      <fo:block line-height="14pt" font-size="10pt" text-align="end">Page
+        <fo:page-number/></fo:block>
     </fo:static-content>
-
     <fo:flow flow-name="xsl-region-body">
-
-      <fo:block space-before.optimum="3pt" space-after.optimum="15pt">
-      Table 1: cell borders
-      </fo:block>
-
+      <fo:block space-before.optimum="3pt" space-after.optimum="15pt"> Table 1: cell borders </fo:block>
       <fo:table border-collapse="separate" table-layout="fixed" width="100%">
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="2cm"/>
-
-    <fo:table-body>
-    <fo:table-row>
-      <fo:table-cell border-left-color="green" border-left-width="0.5pt" border-left-style="solid">
-        <fo:block text-align="center">
-        green left
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-top-color="red" border-top-width="0.5pt" border-top-style="solid">
-        <fo:block text-align="center">
-        red top
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-right-color="blue" border-right-width="0.5pt" border-right-style="solid">
-        <fo:block text-align="center">
-        blue right
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-bottom-color="yellow" border-bottom-width="0.5pt" border-bottom-style="solid">
-        <fo:block text-align="center">
-        yellow bottom
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell
-          border-left-color="green" border-left-width="0.5pt" border-left-style="solid"
-          border-top-color="red" border-top-width="0.5pt" border-top-style="solid"
-          border-right-color="blue" border-right-width="0.5pt" border-right-style="solid"
-          border-bottom-color="yellow" border-bottom-width="0.5pt" border-bottom-style="solid">
-        <fo:block text-align="center">
-        all
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row>
-      <fo:table-cell border-color="green" border-left-width="2pt" border-style="solid">
-        <fo:block text-align="center">
-        2pt
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-top-color="red" border-top-width="2pt" border-top-style="dashed">
-        <fo:block text-align="center">
-        2pt
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-right-color="blue" border-right-width="2pt" border-right-style="dotted">
-        <fo:block text-align="center">
-        2pt
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-bottom-color="yellow" border-bottom-width="2pt" border-bottom-style="double">
-        <fo:block text-align="center">
-        2pt
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell
-          border-left-color="green" border-left-width="2pt" border-left-style="solid"
-          border-top-color="red" border-top-width="2pt" border-top-style="dashed"
-          border-right-color="blue" border-right-width="2pt" border-right-style="double"
-          border-bottom-color="yellow" border-bottom-width="2pt" border-bottom-style="dotted">
-        <fo:block text-align="center">
-        2pt
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row>
-      <fo:table-cell border-left-color="green" border-left-width="10pt" border-left-style="solid">
-        <fo:block text-align="center">
-        10pt
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-top-color="red" border-top-width="10pt" border-top-style="solid">
-        <fo:block text-align="center">
-        10pt
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-right-color="blue" border-right-width="10pt" border-right-style="solid">
-        <fo:block text-align="center">
-        10pt
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-bottom-color="yellow" border-bottom-width="10pt" border-bottom-style="solid">
-        <fo:block text-align="center">
-        10pt
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell
-          border-left-color="green" border-left-width="2pt" border-left-style="solid"
-          border-top-color="red" border-top-width="4pt" border-top-style="solid"
-          border-right-color="blue" border-right-width="8pt" border-right-style="solid"
-          border-bottom-color="yellow" border-bottom-width="10pt" border-bottom-style="solid">
-        <fo:block text-align="center">
-        2pt - 10pt
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row>
-      <fo:table-cell border-color="green" border-width="0.5pt" border-style="solid">
-        <fo:block text-align="center">
-        0.5pt
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-color="red" border-width="1pt" border-style="solid">
-        <fo:block text-align="center">
-        1pt
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-color="blue" border-width="2pt" border-style="solid">
-        <fo:block text-align="center">
-        2pt
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-color="yellow" border-width="10pt" border-style="solid">
-        <fo:block text-align="center">
-        10pt
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-color="yellow" border-width="20pt" border-style="solid">
-        <fo:block text-align="center">
-        20pt
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-  </fo:table-body>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="2cm"/>
+        <fo:table-body>
+          <fo:table-row>
+            <fo:table-cell border-left-color="green" border-left-width="0.5pt"
+              border-left-style="solid">
+              <fo:block text-align="center"> green left </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-top-color="red" border-top-width="0.5pt" border-top-style="solid">
+              <fo:block text-align="center"> red top </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-right-color="blue" border-right-width="0.5pt"
+              border-right-style="solid">
+              <fo:block text-align="center"> blue right </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-bottom-color="yellow" border-bottom-width="0.5pt"
+              border-bottom-style="solid">
+              <fo:block text-align="center"> yellow bottom </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-left-color="green" border-left-width="0.5pt"
+              border-left-style="solid" border-top-color="red" border-top-width="0.5pt"
+              border-top-style="solid" border-right-color="blue" border-right-width="0.5pt"
+              border-right-style="solid" border-bottom-color="yellow" border-bottom-width="0.5pt"
+              border-bottom-style="solid">
+              <fo:block text-align="center"> all </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell border-color="green" border-left-width="2pt" border-style="solid">
+              <fo:block text-align="center"> 2pt </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-top-color="red" border-top-width="2pt" border-top-style="dashed">
+              <fo:block text-align="center"> 2pt </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-right-color="blue" border-right-width="2pt"
+              border-right-style="dotted">
+              <fo:block text-align="center"> 2pt </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-bottom-color="yellow" border-bottom-width="2pt"
+              border-bottom-style="double">
+              <fo:block text-align="center"> 2pt </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-left-color="green" border-left-width="2pt"
+              border-left-style="solid" border-top-color="red" border-top-width="2pt"
+              border-top-style="dashed" border-right-color="blue" border-right-width="2pt"
+              border-right-style="double" border-bottom-color="yellow" border-bottom-width="2pt"
+              border-bottom-style="dotted">
+              <fo:block text-align="center"> 2pt </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell border-left-color="green" border-left-width="10pt"
+              border-left-style="solid">
+              <fo:block text-align="center"> 10pt </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-top-color="red" border-top-width="10pt" border-top-style="solid">
+              <fo:block text-align="center"> 10pt </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-right-color="blue" border-right-width="10pt"
+              border-right-style="solid">
+              <fo:block text-align="center"> 10pt </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-bottom-color="yellow" border-bottom-width="10pt"
+              border-bottom-style="solid">
+              <fo:block text-align="center"> 10pt </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-left-color="green" border-left-width="2pt"
+              border-left-style="solid" border-top-color="red" border-top-width="4pt"
+              border-top-style="solid" border-right-color="blue" border-right-width="8pt"
+              border-right-style="solid" border-bottom-color="yellow" border-bottom-width="10pt"
+              border-bottom-style="solid">
+              <fo:block text-align="center"> 2pt - 10pt </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell border-color="green" border-width="0.5pt" border-style="solid">
+              <fo:block text-align="center"> 0.5pt </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-color="red" border-width="1pt" border-style="solid">
+              <fo:block text-align="center"> 1pt </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-color="blue" border-width="2pt" border-style="solid">
+              <fo:block text-align="center"> 2pt </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-color="yellow" border-width="10pt" border-style="solid">
+              <fo:block text-align="center"> 10pt </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-color="yellow" border-width="20pt" border-style="solid">
+              <fo:block text-align="center"> 20pt </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
-      <fo:block space-before.optimum="30pt" space-after.optimum="15pt">
-      Table 2: row borders
-      </fo:block>
-
+      <fo:block space-before.optimum="30pt" space-after.optimum="15pt"> Table 2: row borders </fo:block>
       <fo:table border-collapse="collapse" table-layout="fixed" width="100%">
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-
-    <fo:table-body>
-    <fo:table-row border-left-color="green" border-left-width="0.5pt" border-left-style="solid">
-      <fo:table-cell>
-        <fo:block text-align="center">
-        row with
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        green left
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        border
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row border-top-color="red" border-top-width="0.5pt" border-top-style="solid">
-      <fo:table-cell>
-        <fo:block text-align="center">
-        row with
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        red top
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        border
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row border-right-color="blue" border-right-width="0.5pt" border-right-style="solid">
-      <fo:table-cell>
-        <fo:block text-align="center">
-        row with
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        blue right
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        border
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row border-bottom-color="yellow" border-bottom-width="0.5pt" border-bottom-style="solid">
-      <fo:table-cell>
-        <fo:block text-align="center">
-        row with
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        yellow bottom
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        border
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row border-color="purple" border-width="0.5pt" border-style="solid">
-      <fo:table-cell>
-        <fo:block text-align="center">
-        row with
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        all
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        border
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-  </fo:table-body>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-body>
+          <fo:table-row border-left-color="green" border-left-width="0.5pt"
+            border-left-style="solid">
+            <fo:table-cell>
+              <fo:block text-align="center"> row with </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> green left </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> border </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row border-top-color="red" border-top-width="0.5pt" border-top-style="solid">
+            <fo:table-cell>
+              <fo:block text-align="center"> row with </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> red top </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> border </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row border-right-color="blue" border-right-width="0.5pt"
+            border-right-style="solid">
+            <fo:table-cell>
+              <fo:block text-align="center"> row with </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> blue right </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> border </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row border-bottom-color="yellow" border-bottom-width="0.5pt"
+            border-bottom-style="solid">
+            <fo:table-cell>
+              <fo:block text-align="center"> row with </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> yellow bottom </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> border </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row border-color="purple" border-width="0.5pt" border-style="solid">
+            <fo:table-cell>
+              <fo:block text-align="center"> row with </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> all </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> border </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
-      <fo:block space-before.optimum="30pt" space-after.optimum="15pt">
-      Table 3: column borders
-      </fo:block>
-
+      <fo:block space-before.optimum="30pt" space-after.optimum="15pt"> Table 3: column borders </fo:block>
       <fo:table border-collapse="collapse" table-layout="fixed" width="100%">
-  <fo:table-column column-width="3cm" border-left-color="green" border-left-width="0.5pt" border-left-style="solid"/>
-  <fo:table-column column-width="3cm" border-top-color="red" border-top-width="0.5pt" border-top-style="solid"/>
-  <fo:table-column column-width="3cm" border-right-color="blue" border-right-width="0.5pt" border-right-style="solid"/>
-  <fo:table-column column-width="3cm" border-bottom-color="yellow" border-bottom-width="0.5pt" border-bottom-style="solid"/>
-  <fo:table-column column-width="3cm" border-color="orange" border-width="0.5pt" border-style="solid"/>
-
-    <fo:table-body>
-    <fo:table-row>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        table columns
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        with
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        different
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        borders
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        extra
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        table row
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-  </fo:table-body>
+        <fo:table-column column-width="3cm" border-left-color="green" border-left-width="0.5pt"
+          border-left-style="solid"/>
+        <fo:table-column column-width="3cm" border-top-color="red" border-top-width="0.5pt"
+          border-top-style="solid"/>
+        <fo:table-column column-width="3cm" border-right-color="blue" border-right-width="0.5pt"
+          border-right-style="solid"/>
+        <fo:table-column column-width="3cm" border-bottom-color="yellow" border-bottom-width="0.5pt"
+          border-bottom-style="solid"/>
+        <fo:table-column column-width="3cm" border-color="orange" border-width="0.5pt"
+          border-style="solid"/>
+        <fo:table-body>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block text-align="center"> table columns </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> with </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> different </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> borders </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block text-align="center"> extra </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> table row </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
-      <fo:block space-before.optimum="30pt" space-after.optimum="15pt">
-      Table 4: column borders over page
-      </fo:block>
-
+      <fo:block space-before.optimum="30pt" space-after.optimum="15pt"> Table 4: column borders over
+        page </fo:block>
       <fo:table border-collapse="collapse" table-layout="fixed" width="100%">
-  <fo:table-column column-width="3cm" border-left-color="green" border-left-width="0.5pt" border-left-style="solid"/>
-  <fo:table-column column-width="3cm" border-top-color="red" border-top-width="0.5pt" border-top-style="solid"/>
-  <fo:table-column column-width="3cm" border-right-color="blue" border-right-width="0.5pt" border-right-style="solid"/>
-  <fo:table-column column-width="3cm" border-bottom-color="yellow" border-bottom-width="0.5pt" border-bottom-style="solid"/>
-  <fo:table-column column-width="3cm" border-color="orange" border-width="0.5pt" border-style="solid"/>
-
-    <fo:table-body>
-    <fo:table-row>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        table columns
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        with
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        different
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        borders
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        extra
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        table row
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-  </fo:table-body>
+        <fo:table-column column-width="3cm" border-left-color="green" border-left-width="0.5pt"
+          border-left-style="solid"/>
+        <fo:table-column column-width="3cm" border-top-color="red" border-top-width="0.5pt"
+          border-top-style="solid"/>
+        <fo:table-column column-width="3cm" border-right-color="blue" border-right-width="0.5pt"
+          border-right-style="solid"/>
+        <fo:table-column column-width="3cm" border-bottom-color="yellow" border-bottom-width="0.5pt"
+          border-bottom-style="solid"/>
+        <fo:table-column column-width="3cm" border-color="orange" border-width="0.5pt"
+          border-style="solid"/>
+        <fo:table-body>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block text-align="center"> table columns </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> with </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> different </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> borders </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block text-align="center"> extra </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> table row </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
-      <fo:block space-before.optimum="30pt" space-after.optimum="15pt">
-      Table 5: body borders
-      </fo:block>
-
+      <fo:block space-before.optimum="30pt" space-after.optimum="15pt"> Table 5: body borders </fo:block>
       <fo:table border-collapse="separate" table-layout="fixed" width="100%">
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-
-    <fo:table-body border-left-color="green" border-left-width="0.5pt" border-left-style="solid">
-    <fo:table-row>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        body with
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        left border
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-  </fo:table-body>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-body border-left-color="green" border-left-width="0.5pt" border-left-style="solid">
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block text-align="center"> body with </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> left border </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
       <fo:table border-collapse="separate" table-layout="fixed" width="100%">
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-
-    <fo:table-body border-top-color="red" border-top-width="0.5pt" border-top-style="solid">
-    <fo:table-row>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        body with
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        top border
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-  </fo:table-body>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-body border-top-color="red" border-top-width="0.5pt" border-top-style="solid">
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block text-align="center"> body with </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> top border </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
       <fo:table border-collapse="separate" table-layout="fixed" width="100%">
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-
-    <fo:table-body border-right-color="blue" border-right-width="0.5pt" border-right-style="solid">
-    <fo:table-row>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        body with
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        right border
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-  </fo:table-body>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-body border-right-color="blue" border-right-width="0.5pt"
+          border-right-style="solid">
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block text-align="center"> body with </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> right border </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
       <fo:table border-collapse="separate" table-layout="fixed" width="100%">
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-
-    <fo:table-body border-bottom-color="yellow" border-bottom-width="0.5pt" border-bottom-style="solid">
-    <fo:table-row>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        body with
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        bottom border
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-  </fo:table-body>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-body border-bottom-color="yellow" border-bottom-width="0.5pt"
+          border-bottom-style="solid">
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block text-align="center"> body with </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> bottom border </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
       <fo:table border-collapse="separate" table-layout="fixed" width="100%">
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-
-    <fo:table-body border-color="orange" border-width="0.5pt" border-style="solid">
-    <fo:table-row>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        body with
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        all border
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-  </fo:table-body>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-body border-color="orange" border-width="0.5pt" border-style="solid">
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block text-align="center"> body with </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> all border </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
-      <fo:block space-before.optimum="30pt" space-after.optimum="15pt">
-      Table 6: table borders
-      </fo:block>
-
-      <fo:table border-left-color="green" border-left-width="0.5pt" border-left-style="solid" border-collapse="separate" table-layout="fixed" width="100%">
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-
-    <fo:table-body>
-    <fo:table-row>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        table with
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        left border
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-  </fo:table-body>
+      <fo:block space-before.optimum="30pt" space-after.optimum="15pt"> Table 6: table borders </fo:block>
+      <fo:table border-left-color="green" border-left-width="0.5pt" border-left-style="solid"
+        border-collapse="separate" table-layout="fixed" width="100%">
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-body>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block text-align="center"> table with </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> left border </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
-      <fo:table border-top-color="red" border-top-width="0.5pt" border-top-style="solid" border-collapse="separate" table-layout="fixed" width="100%">
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-
-    <fo:table-body>
-    <fo:table-row>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        table with
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        top border
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-  </fo:table-body>
+      <fo:table border-top-color="red" border-top-width="0.5pt" border-top-style="solid"
+        border-collapse="separate" table-layout="fixed" width="100%">
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-body>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block text-align="center"> table with </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> top border </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
-      <fo:table border-right-color="blue" border-right-width="0.5pt" border-right-style="solid" border-collapse="separate" table-layout="fixed" width="100%">
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-
-    <fo:table-body>
-    <fo:table-row>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        table with
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        right border
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-  </fo:table-body>
+      <fo:table border-right-color="blue" border-right-width="0.5pt" border-right-style="solid"
+        border-collapse="separate" table-layout="fixed" width="100%">
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-body>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block text-align="center"> table with </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> right border </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
-      <fo:table border-bottom-color="yellow" border-bottom-width="0.5pt" border-bottom-style="solid" border-collapse="separate" table-layout="fixed" width="100%">
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-
-    <fo:table-body>
-    <fo:table-row>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        table with
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        bottom border
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-  </fo:table-body>
+      <fo:table border-bottom-color="yellow" border-bottom-width="0.5pt" border-bottom-style="solid"
+        border-collapse="separate" table-layout="fixed" width="100%">
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-body>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block text-align="center"> table with </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> bottom border </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
-      <fo:table border-color="orange" border-width="0.5pt" border-style="solid" border-collapse="separate" table-layout="fixed" width="100%">
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-  <fo:table-column column-width="3cm"/>
-
-    <fo:table-body>
-    <fo:table-row>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        table with
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        all border
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-  </fo:table-body>
+      <fo:table border-color="orange" border-width="0.5pt" border-style="solid"
+        border-collapse="separate" table-layout="fixed" width="100%">
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-body>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block text-align="center"> table with </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> all border </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
-      <fo:block space-before.optimum="30pt" space-after.optimum="15pt">
-      Table 7: combinations
-      </fo:block>
-
-      <fo:table border-left-color="green" border-left-width="0.5pt" border-left-style="solid" border-collapse="collapse" table-layout="fixed" width="100%">
-  <fo:table-column column-width="2.5cm"/>
-  <fo:table-column column-width="2.5cm" border-left-color="green" border-left-width="0.5pt" border-left-style="solid"/>
-  <fo:table-column column-width="2.5cm" border-top-color="red" border-top-width="0.5pt" border-top-style="solid"/>
-  <fo:table-column column-width="2.5cm" border-right-color="blue" border-right-width="0.5pt" border-right-style="solid"/>
-  <fo:table-column column-width="2.5cm" border-bottom-color="yellow" border-bottom-width="0.5pt" border-bottom-style="solid"/>
-  <fo:table-column column-width="2.5cm" border-color="orange" border-width="0.5pt" border-style="solid"/>
-
-    <fo:table-body border-color="aqua" border-width="0.5pt" border-style="solid">
-    <fo:table-row border-left-color="green" border-left-width="0.5pt" border-left-style="solid">
-      <fo:table-cell border-left-color="green" border-left-width="0.5pt" border-left-style="solid">
-        <fo:block text-align="center">
-        a
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-top-color="red" border-top-width="0.5pt" border-top-style="solid">
-        <fo:block text-align="center">
-        b
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-right-color="blue" border-right-width="0.5pt" border-right-style="solid">
-        <fo:block text-align="center">
-        c
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-bottom-color="yellow" border-bottom-width="0.5pt" border-bottom-style="solid">
-        <fo:block text-align="center">
-        d
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-color="orange" border-width="0.5pt" border-style="solid">
-        <fo:block text-align="center">
-        e
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row border-top-color="red" border-top-width="0.5pt" border-top-style="solid">
-      <fo:table-cell border-left-color="green" border-left-width="0.5pt" border-left-style="solid">
-        <fo:block text-align="center">
-        a
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-top-color="red" border-top-width="0.5pt" border-top-style="solid">
-        <fo:block text-align="center">
-        b
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-right-color="blue" border-right-width="0.5pt" border-right-style="solid">
-        <fo:block text-align="center">
-        c
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-bottom-color="yellow" border-bottom-width="0.5pt" border-bottom-style="solid">
-        <fo:block text-align="center">
-        d
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-color="orange" border-width="0.5pt" border-style="solid">
-        <fo:block text-align="center">
-        e
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row border-right-color="blue" border-right-width="0.5pt" border-right-style="solid">
-      <fo:table-cell border-left-color="green" border-left-width="0.5pt" border-left-style="solid">
-        <fo:block text-align="center">
-        a
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-top-color="red" border-top-width="0.5pt" border-top-style="solid">
-        <fo:block text-align="center">
-        b
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-right-color="blue" border-right-width="0.5pt" border-right-style="solid">
-        <fo:block text-align="center">
-        c
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-bottom-color="yellow" border-bottom-width="0.5pt" border-bottom-style="solid">
-        <fo:block text-align="center">
-        d
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-color="orange" border-width="0.5pt" border-style="solid">
-        <fo:block text-align="center">
-        e
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row border-bottom-color="yellow" border-bottom-width="0.5pt" border-bottom-style="solid">
-      <fo:table-cell border-left-color="green" border-left-width="0.5pt" border-left-style="solid">
-        <fo:block text-align="center">
-        a
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-top-color="red" border-top-width="0.5pt" border-top-style="solid">
-        <fo:block text-align="center">
-        b
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-right-color="blue" border-right-width="0.5pt" border-right-style="solid">
-        <fo:block text-align="center">
-        c
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-bottom-color="yellow" border-bottom-width="0.5pt" border-bottom-style="solid">
-        <fo:block text-align="center">
-        d
-        </fo:block>
-      </fo:table-cell>
-        <fo:table-cell border-color="orange" border-width="0.5pt" border-style="solid">
-        <fo:block text-align="center">
-        e
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row border-color="orange" border-width="0.5pt" border-style="solid">
-      <fo:table-cell border-left-color="green" border-left-width="0.5pt" border-left-style="solid">
-        <fo:block text-align="center">
-        a
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-top-color="red" border-top-width="0.5pt" border-top-style="solid">
-        <fo:block text-align="center">
-        b
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-right-color="blue" border-right-width="0.5pt" border-right-style="solid">
-        <fo:block text-align="center">
-        c
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-bottom-color="yellow" border-bottom-width="0.5pt" border-bottom-style="solid">
-        <fo:block text-align="center">
-        d
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-color="orange" border-width="0.5pt" border-style="solid">
-        <fo:block text-align="center">
-        e
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row>
-      <fo:table-cell border-left-color="green" border-left-width="0.5pt" border-left-style="solid">
-        <fo:block text-align="center">
-        a
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-top-color="red" border-top-width="0.5pt" border-top-style="solid">
-        <fo:block text-align="center">
-        b
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-right-color="blue" border-right-width="0.5pt" border-right-style="solid">
-        <fo:block text-align="center">
-        c
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-bottom-color="yellow" border-bottom-width="0.5pt" border-bottom-style="solid">
-        <fo:block text-align="center">
-        d
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell border-color="orange" border-width="0.5pt"  border-style="solid">
-        <fo:block text-align="center">
-        e
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        text for an extra line in the table row
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-  </fo:table-body>
+      <fo:block space-before.optimum="30pt" space-after.optimum="15pt"> Table 7: combinations </fo:block>
+      <fo:table border-left-color="green" border-left-width="0.5pt" border-left-style="solid"
+        border-collapse="collapse" table-layout="fixed" width="100%">
+        <fo:table-column column-width="2.5cm"/>
+        <fo:table-column column-width="2.5cm" border-left-color="green" border-left-width="0.5pt"
+          border-left-style="solid"/>
+        <fo:table-column column-width="2.5cm" border-top-color="red" border-top-width="0.5pt"
+          border-top-style="solid"/>
+        <fo:table-column column-width="2.5cm" border-right-color="blue" border-right-width="0.5pt"
+          border-right-style="solid"/>
+        <fo:table-column column-width="2.5cm" border-bottom-color="yellow"
+          border-bottom-width="0.5pt" border-bottom-style="solid"/>
+        <fo:table-column column-width="2.5cm" border-color="orange" border-width="0.5pt"
+          border-style="solid"/>
+        <fo:table-body border-color="aqua" border-width="0.5pt" border-style="solid">
+          <fo:table-row border-left-color="green" border-left-width="0.5pt"
+            border-left-style="solid">
+            <fo:table-cell border-left-color="green" border-left-width="0.5pt"
+              border-left-style="solid">
+              <fo:block text-align="center"> a </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-top-color="red" border-top-width="0.5pt" border-top-style="solid">
+              <fo:block text-align="center"> b </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-right-color="blue" border-right-width="0.5pt"
+              border-right-style="solid">
+              <fo:block text-align="center"> c </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-bottom-color="yellow" border-bottom-width="0.5pt"
+              border-bottom-style="solid">
+              <fo:block text-align="center"> d </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-color="orange" border-width="0.5pt" border-style="solid">
+              <fo:block text-align="center"> e </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row border-top-color="red" border-top-width="0.5pt" border-top-style="solid">
+            <fo:table-cell border-left-color="green" border-left-width="0.5pt"
+              border-left-style="solid">
+              <fo:block text-align="center"> a </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-top-color="red" border-top-width="0.5pt" border-top-style="solid">
+              <fo:block text-align="center"> b </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-right-color="blue" border-right-width="0.5pt"
+              border-right-style="solid">
+              <fo:block text-align="center"> c </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-bottom-color="yellow" border-bottom-width="0.5pt"
+              border-bottom-style="solid">
+              <fo:block text-align="center"> d </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-color="orange" border-width="0.5pt" border-style="solid">
+              <fo:block text-align="center"> e </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row border-right-color="blue" border-right-width="0.5pt"
+            border-right-style="solid">
+            <fo:table-cell border-left-color="green" border-left-width="0.5pt"
+              border-left-style="solid">
+              <fo:block text-align="center"> a </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-top-color="red" border-top-width="0.5pt" border-top-style="solid">
+              <fo:block text-align="center"> b </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-right-color="blue" border-right-width="0.5pt"
+              border-right-style="solid">
+              <fo:block text-align="center"> c </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-bottom-color="yellow" border-bottom-width="0.5pt"
+              border-bottom-style="solid">
+              <fo:block text-align="center"> d </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-color="orange" border-width="0.5pt" border-style="solid">
+              <fo:block text-align="center"> e </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row border-bottom-color="yellow" border-bottom-width="0.5pt"
+            border-bottom-style="solid">
+            <fo:table-cell border-left-color="green" border-left-width="0.5pt"
+              border-left-style="solid">
+              <fo:block text-align="center"> a </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-top-color="red" border-top-width="0.5pt" border-top-style="solid">
+              <fo:block text-align="center"> b </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-right-color="blue" border-right-width="0.5pt"
+              border-right-style="solid">
+              <fo:block text-align="center"> c </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-bottom-color="yellow" border-bottom-width="0.5pt"
+              border-bottom-style="solid">
+              <fo:block text-align="center"> d </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-color="orange" border-width="0.5pt" border-style="solid">
+              <fo:block text-align="center"> e </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row border-color="orange" border-width="0.5pt" border-style="solid">
+            <fo:table-cell border-left-color="green" border-left-width="0.5pt"
+              border-left-style="solid">
+              <fo:block text-align="center"> a </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-top-color="red" border-top-width="0.5pt" border-top-style="solid">
+              <fo:block text-align="center"> b </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-right-color="blue" border-right-width="0.5pt"
+              border-right-style="solid">
+              <fo:block text-align="center"> c </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-bottom-color="yellow" border-bottom-width="0.5pt"
+              border-bottom-style="solid">
+              <fo:block text-align="center"> d </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-color="orange" border-width="0.5pt" border-style="solid">
+              <fo:block text-align="center"> e </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell border-left-color="green" border-left-width="0.5pt"
+              border-left-style="solid">
+              <fo:block text-align="center"> a </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-top-color="red" border-top-width="0.5pt" border-top-style="solid">
+              <fo:block text-align="center"> b </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-right-color="blue" border-right-width="0.5pt"
+              border-right-style="solid">
+              <fo:block text-align="center"> c </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-bottom-color="yellow" border-bottom-width="0.5pt"
+              border-bottom-style="solid">
+              <fo:block text-align="center"> d </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-color="orange" border-width="0.5pt" border-style="solid">
+              <fo:block text-align="center"> e </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> text for an extra line in the table row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
-  <fo:block space-before.optimum="30pt" space-after.optimum="15pt">
-  Table 8:  This is a table with border properties (border-style, 
-  border-width, border-color) defined at the fo:table-column and 
-  fo:table-row level.  Not all properties are currently 
-  implemented--check the compliance page on the FOP website for current 
-  implementation status.
-  </fo:block>
-
-    <fo:table border-collapse="collapse" table-layout="fixed" width="100%">
-    <fo:table-column column-width="3cm" border-color="blue" border-width="0.5pt" border-style="solid"/>
-    <fo:table-column column-width="3cm" border-color="blue" border-width="0.5pt" border-style="solid"/>
-    <fo:table-column column-width="3cm" border-color="blue" border-width="0.5pt" border-style="solid"/>
-
-    <fo:table-body>
-	  <fo:table-row border-color="blue" border-width="0.5pt" border-style="solid">
-	    <fo:table-cell>
-	      <fo:block text-align="center">
-	      (1,1)
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell>
-	      <fo:block text-align="center">
-	      (1,2)
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell>
-	      <fo:block text-align="center">
-	      (1,3)
-	      </fo:block>
-	    </fo:table-cell>
-	  </fo:table-row>
-	  <fo:table-row  border-color="blue" border-width="0.5pt" border-style="solid">
-	    <fo:table-cell>
-	      <fo:block text-align="center">
-	      (2,1)
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell>
-	      <fo:block text-align="center">
-	      (2,2)
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell>
-	      <fo:block text-align="center">
-	      (2,3)
-	      </fo:block>
-	    </fo:table-cell>
-	  </fo:table-row>
-	  <fo:table-row  border-color="blue" border-width="0.5pt" border-style="solid">
-	    <fo:table-cell>
-	      <fo:block text-align="center">
-	      (3,1)
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell>
-	      <fo:block text-align="center">
-	      (3,2)
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell>
-	      <fo:block text-align="center">
-	      (3,3)
-	      </fo:block>
-	    </fo:table-cell>
-	  </fo:table-row>
-	</fo:table-body>
+      <fo:block space-before.optimum="30pt" space-after.optimum="15pt"> Table 8: This is a table
+        with border properties (border-style, border-width, border-color) defined at the
+        fo:table-column and fo:table-row level. Not all properties are currently implemented--check
+        the compliance page on the FOP website for current implementation status. </fo:block>
+      <fo:table border-collapse="collapse" table-layout="fixed" width="100%">
+        <fo:table-column column-width="3cm" border-color="blue" border-width="0.5pt"
+          border-style="solid"/>
+        <fo:table-column column-width="3cm" border-color="blue" border-width="0.5pt"
+          border-style="solid"/>
+        <fo:table-column column-width="3cm" border-color="blue" border-width="0.5pt"
+          border-style="solid"/>
+        <fo:table-body>
+          <fo:table-row border-color="blue" border-width="0.5pt" border-style="solid">
+            <fo:table-cell>
+              <fo:block text-align="center"> (1,1) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> (1,2) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> (1,3) </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row border-color="blue" border-width="0.5pt" border-style="solid">
+            <fo:table-cell>
+              <fo:block text-align="center"> (2,1) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> (2,2) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> (2,3) </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row border-color="blue" border-width="0.5pt" border-style="solid">
+            <fo:table-cell>
+              <fo:block text-align="center"> (3,1) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> (3,2) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> (3,3) </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
+      </fo:table>
+      <fo:block space-before.optimum="30pt" space-after.optimum="15pt"> Table 9: This table has
+        border properties defined at the fo:table-cell level. </fo:block>
+      <fo:table border-collapse="collapse" table-layout="fixed" width="100%">
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-body>
+          <fo:table-row>
+            <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
+              <fo:block text-align="center"> (1,1) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
+              <fo:block text-align="center"> (1,2) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
+              <fo:block text-align="center"> (1,3) </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
+              <fo:block text-align="center"> (2,1) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
+              <fo:block text-align="center"> (2,2) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
+              <fo:block text-align="center"> (2,3) </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
+              <fo:block text-align="center"> (3,1) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
+              <fo:block text-align="center"> (3,2) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
+              <fo:block text-align="center"> (3,3) </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
-  <fo:block space-before.optimum="30pt" space-after.optimum="15pt">
-  Table 9: This table has border properties defined at the 
-  fo:table-cell level.
-  </fo:block>
-
-    <fo:table border-collapse="collapse" table-layout="fixed" width="100%">
-    <fo:table-column column-width="3cm"/>
-    <fo:table-column column-width="3cm"/>
-    <fo:table-column column-width="3cm"/>
-
-    <fo:table-body>
-	  <fo:table-row>
-	    <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
-	      <fo:block text-align="center">
-	      (1,1)
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
-	      <fo:block text-align="center">
-	      (1,2)
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
-	      <fo:block text-align="center">
-	      (1,3)
-	      </fo:block>
-	    </fo:table-cell>
-	  </fo:table-row>
-	  <fo:table-row>
-	    <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
-	      <fo:block text-align="center">
-	      (2,1)
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
-	      <fo:block text-align="center">
-	      (2,2)
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
-	      <fo:block text-align="center">
-	      (2,3)
-	      </fo:block>
-	    </fo:table-cell>
-	  </fo:table-row>
-	  <fo:table-row>
-	    <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
-	      <fo:block text-align="center">
-	      (3,1)
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
-	      <fo:block text-align="center">
-	      (3,2)
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
-	      <fo:block text-align="center">
-	      (3,3)
-	      </fo:block>
-	    </fo:table-cell>
-	  </fo:table-row>
-	</fo:table-body>
+      <fo:block space-before.optimum="30pt" space-after.optimum="15pt"> Table 10: This example is
+        the first example given in the CSS2 border conflict resolution rules. (See
+        http://www.w3.org/TR/REC-CSS2/tables.html#border-conflict-resolution) When all properties
+        are resolved and implemented, the table below should resemble the one shown in this section
+        of the CSS2 specification. Check the FOP compliance page for current implementation status. </fo:block>
+      <fo:table border-collapse="collapse" table-layout="fixed" width="100%" border-style="solid"
+        border-width="5pt" border-color="yellow">
+        <fo:table-column column-width="3cm" border-style="solid" border-width="3pt"
+          border-color="black"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-body>
+          <fo:table-row>
+            <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+              <fo:block text-align="center"> 1 </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+              <fo:block text-align="center"> 2 </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+              <fo:block text-align="center"> 3 </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+              <fo:block text-align="center"> 4 </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-style="dashed" border-width="5pt" border-color="blue"
+              padding="1em">
+              <fo:block text-align="center"> 5 </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-style="solid" border-width="5pt" border-color="green"
+              padding="1em">
+              <fo:block text-align="center"> 6 </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+              <fo:block text-align="center"> 7 </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+              <fo:block text-align="center"> 8 </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+              <fo:block text-align="center"> 9 </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+              <fo:block text-align="center"> 10 </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+              <fo:block text-align="center"> 11 </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+              <fo:block text-align="center"> 12 </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+              <fo:block text-align="center"> 13 </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+              <fo:block text-align="center"> 14 </fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+              <fo:block text-align="center"> 15 </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
-  <fo:block space-before.optimum="30pt" space-after.optimum="15pt">
-  Table 10: This example is the first example given in the CSS2 border conflict 
-  resolution rules.  
-  (See http://www.w3.org/TR/REC-CSS2/tables.html#border-conflict-resolution)
-  When all properties are resolved and implemented, the table below should
-  resemble the one shown in this section of the CSS2 specification. 
-  Check the FOP compliance page for current implementation status.
-  </fo:block>
-
-    <fo:table border-collapse="collapse" table-layout="fixed" width="100%"
-        border-style="solid" border-width="5pt" border-color="yellow">
-    <fo:table-column column-width="3cm" 
-        border-style="solid" border-width="3pt" border-color="black"/>
-    <fo:table-column column-width="3cm"/>
-    <fo:table-column column-width="3cm"/>
-
-    <fo:table-body>
-	  <fo:table-row>
-	    <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
-	      <fo:block text-align="center">
-	      1
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
-	      <fo:block text-align="center">
-	      2
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
-	      <fo:block text-align="center">
-	      3
-	      </fo:block>
-	    </fo:table-cell>
-	  </fo:table-row>
-	  <fo:table-row>
-	    <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
-	      <fo:block text-align="center">
-	      4
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell border-style="dashed" border-width="5pt" border-color="blue" padding="1em">
-	      <fo:block text-align="center">
-	      5
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell border-style="solid" border-width="5pt" border-color="green" padding="1em">
-	      <fo:block text-align="center">
-	      6
-	      </fo:block>
-	    </fo:table-cell>
-	  </fo:table-row>
-	  <fo:table-row>
-	    <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
-	      <fo:block text-align="center">
-	      7
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
-	      <fo:block text-align="center">
-	      8
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
-	      <fo:block text-align="center">
-	      9
-	      </fo:block>
-	    </fo:table-cell>
-	  </fo:table-row>
-	  <fo:table-row>
-	    <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
-	      <fo:block text-align="center">
-	      10
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
-	      <fo:block text-align="center">
-	      11
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
-	      <fo:block text-align="center">
-	      12
-	      </fo:block>
-	    </fo:table-cell>
-	  </fo:table-row>
-	  <fo:table-row>
-	    <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
-	      <fo:block text-align="center">
-	      13
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
-	      <fo:block text-align="center">
-	      14
-	      </fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
-	      <fo:block text-align="center">
-	      15
-	      </fo:block>
-	    </fo:table-cell>
-	  </fo:table-row>
-	</fo:table-body>
+      <fo:block space-before.optimum="30pt" space-after.optimum="15pt"> Table 11: This example is a
+        test of Rule 4 of the CSS2 border conflict resolution rules. (See
+        http://www.w3.org/TR/REC-CSS2/tables.html#border-conflict-resolution) This rule gives the
+        order of precedence of resolution to be cell (highest), then row, then column, then table
+        (lowest), in those cases where the border properties differ only on color. </fo:block>
+      <fo:table border-collapse="collapse" table-layout="fixed" width="100%">
+        <fo:table-column column-width="3cm" border-style="solid" border-width="3pt"
+          border-color="black"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm"/>
+        <fo:table-column column-width="3cm" border-style="solid" border-width="3pt"
+          border-color="black"/>
+        <fo:table-body>
+          <fo:table-row border-style="solid" border-width="3pt" border-color="red">
+            <fo:table-cell border-style="solid" border-width="3pt" border-color="blue">
+              <fo:block text-align="center">cell, row, col</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center">row</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-style="solid" border-width="3pt" border-color="blue">
+              <fo:block text-align="center">cell, row</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center">row</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center">row, col</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block text-align="center">col</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center">none</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center">none</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center">none</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center">col</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell border-style="solid" border-width="3pt" border-color="blue">
+              <fo:block text-align="center">cell, col</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center">none</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-style="solid" border-width="3pt" border-color="blue">
+              <fo:block text-align="center">cell</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center">none</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center">col</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
-  <fo:block space-before.optimum="30pt" space-after.optimum="15pt">
-  Table 11: This example is a test of Rule 4 of the CSS2 border conflict 
-  resolution rules.
-  (See http://www.w3.org/TR/REC-CSS2/tables.html#border-conflict-resolution)
-  This rule gives the order of precedence of resolution to be cell (highest), 
-  then row, then column, then table (lowest), in those cases where
-  the border properties differ only on color.
-  </fo:block>
-
-    <fo:table border-collapse="collapse" table-layout="fixed" width="100%">
-
-    <fo:table-column column-width="3cm" 
-        border-style="solid" border-width="3pt" border-color="black"/>
-    <fo:table-column column-width="3cm"/>
-    <fo:table-column column-width="3cm"/>
-    <fo:table-column column-width="3cm"/>
-    <fo:table-column column-width="3cm"
-        border-style="solid" border-width="3pt" border-color="black"/>
-
-    <fo:table-body>
-	  <fo:table-row border-style="solid" border-width="3pt" border-color="red">
-	    <fo:table-cell border-style="solid" border-width="3pt" border-color="blue">
-	      <fo:block text-align="center">cell, row, col</fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell>
-	      <fo:block text-align="center">row</fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell border-style="solid" border-width="3pt" border-color="blue">
-	      <fo:block text-align="center">cell, row</fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell>
-	      <fo:block text-align="center">row</fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell>
-	      <fo:block text-align="center">row, col</fo:block>
-	    </fo:table-cell>
-	  </fo:table-row>
-	  <fo:table-row>
-	    <fo:table-cell>
-	      <fo:block text-align="center">col</fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell>
-	      <fo:block text-align="center">none</fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell>
-	      <fo:block text-align="center">none</fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell>
-	      <fo:block text-align="center">none</fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell>
-	      <fo:block text-align="center">col</fo:block>
-	    </fo:table-cell>
-	  </fo:table-row>
-	  <fo:table-row>
-	    <fo:table-cell border-style="solid" border-width="3pt" border-color="blue">
-	      <fo:block text-align="center">cell, col</fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell>
-	      <fo:block text-align="center">none</fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell border-style="solid" border-width="3pt" border-color="blue">
-	      <fo:block text-align="center">cell</fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell>
-	      <fo:block text-align="center">none</fo:block>
-	    </fo:table-cell>
-	    <fo:table-cell>
-	      <fo:block text-align="center">col</fo:block>
-	    </fo:table-cell>
-	  </fo:table-row>
-	</fo:table-body>
-  </fo:table>
-      
     </fo:flow>
   </fo:page-sequence>
 </fo:root>

+ 27 - 17
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.defaults.param.xsl

@@ -24,27 +24,28 @@
     
     <!-- standard zapisysania danych -->
     <xsl:param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate.default" select="0"/>
-    <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate.default" select="300"/>
+    <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate.default" select="600"/>
     
     <xsl:param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate.default" select="0"/>
-    <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate.default" select="300"/>
+    <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate.default" select="600"/>
     
     
     
     
     
     <xsl:param name="system_cache__dita__x3A__svg:width.default" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate.default"/>
-    <xsl:param name="system_cache__dita__x3A__svg:height.default" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate.default"/>
+    <xsl:param name="system_cache__dita__x3A__svg:height.default" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate.default"/>
     <xsl:param name="system_cache__dita__x3A__svg:pwidth.default" select="$system_cache__dita__x3A__svg:width.default * 0.8"/>
     <xsl:param name="system_cache__dita__x3A__svg:pheight.default" select="$system_cache__dita__x3A__svg:width.default * 0.8"/><!-- wielkosc % stocku dp VOLUMES -->
-    <xsl:param name="system_cache__dita__x3A__svg:offsetX.default" select="($system_cache__dita__x3A__svg:width.default - $system_cache__dita__x3A__svg:pwidth.default) div 2"/>
-    <xsl:param name="system_cache__dita__x3A__svg:offsetY.default" select="($system_cache__dita__x3A__svg:height.default - $system_cache__dita__x3A__svg:pheight.default) div 2"/>
-    
-    
+    <xsl:param name="system_cache__dita__x3A__svg:offsetX.default" select="5"/>
+    <xsl:param name="system_cache__dita__x3A__svg:offsetY.default" select="5"/>
     
     
     
     
+    <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.block.horizontal-time-activity.height" select="$system_cache__dita__x3A__svg:height.default * 0.6"/>
+    <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.block.total-volume.height" select="$system_cache__dita__x3A__svg:height.default * 0.2"/>
+    <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.block.hi-lo-chart-1.height" select="$system_cache__dita__x3A__svg:height.default * 0.2"/>
     
     
     <!--<xsl:variable name="pwidth" select="$width * 0.8"/>-->
@@ -58,8 +59,9 @@
     <xsl:param name="system_cache__dita__x3A__svg:minorLeftExtent.default" select="2"/><!-- $system_cache__dita__x3A__svg:pwidth.default -->
     <xsl:param name="system_cache__dita__x3A__svg:minorBottomExtent.default" select="2"/><!-- $system_cache__dita__x3A__svg:pwidth.default -->
     
-    <xsl:param name="system_cache__dita__x3A__svg:majorTicks.default" select="10"/>
-    <xsl:param name="system_cache__dita__x3A__svg:minorTicks.default" select="4"/>
+    <xsl:param name="system_cache__dita__x3A__svg:majorTicks.default" select="5"/>
+    <xsl:param name="system_cache__dita__x3A__svg:minorTicks.default" select="5"/>
+    <xsl:param name="system_cache__dita__x3A__svg:openCloseExtent.default" select="5"/>
     
     
     
@@ -78,6 +80,9 @@
         <system_cache__dita__x3A__svg:colors>
             <svgu:color>red</svgu:color>
             <svgu:color>green</svgu:color>
+            <svgu:color>brown</svgu:color>
+            <svgu:color>blue</svgu:color>
+            <svgu:color>yellow</svgu:color>
         </system_cache__dita__x3A__svg:colors>
     </xsl:param>
     
@@ -107,6 +112,11 @@
         <xsl:param name="system_cache__dita__x3A__svg:height" select="$system_cache__dita__x3A__svg:height.default"/>
         <xsl:param name="system_cache__dita__x3A__svg:cursor.current.Y" select="0"/>
         <xsl:param name="color" select="'yellow'"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="0"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:width"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:cursor.current.Y"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:height"/>
+        
         <xsl:param name="system_cache__dita__x3A__svg:debug.level.trigger" select="4"/>
         <xsl:choose>
             <xsl:when test="number($system_cache__dita__x3A__svg:debug.level) &gt; $system_cache__dita__x3A__svg:debug.level.trigger">
@@ -118,17 +128,17 @@
             id="width.default.top"
             style="stroke-width: 5; stroke: red"/>-->
                 <svg:line 
-                    x1="0"
-                    y1="{$system_cache__dita__x3A__svg:cursor.current.Y}"
-                    x2="{$system_cache__dita__x3A__svg:width}"
-                    y2="{$system_cache__dita__x3A__svg:height}"
+                    x1="{$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate}"
+                    y1="{$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate}"
+                    x2="{$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate}"
+                    y2="{$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate}"
                     id="width.default.bottom"
                     style="stroke-width: 2; stroke: {$color}"/>
                 <svg:line 
-                    x1="0"
-                    y1="{$system_cache__dita__x3A__svg:height}"
-                    x2="{$system_cache__dita__x3A__svg:width}"
-                    y2="{$system_cache__dita__x3A__svg:cursor.current.Y}"
+                    x1="{$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate}"
+                    y1="{$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate}"
+                    x2="{$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate}"
+                    y2="{$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate}"
                     id="width.default.right"
                     style="stroke-width: 2; stroke: {$color}"/>
             </xsl:when>

+ 684 - 96
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.Hi-Lo-Close.xsl

@@ -5,28 +5,136 @@
     xmlns:svgu="http://www.ora.com/XSLTCookbook/ns/svg-utils"
     xmlns:test="http://www.ora.com/XSLTCookbook/ns/test"
     xmlns:system_cache__dita__x3A__svg="http://biuro.biall-net.pl/WPS_Functions/system_cache__dita__x3A__p5gnuplot/system_cache__dita__x3A__svg.xsd"
+    xmlns:default_db__x3A__BI_audit_BENFORD="https://biuro.biall-net.pl/wfs/default_db/BI_audit_BENFORD"
     exclude-result-prefixes="svgu test">
     
     <!--<xsl:include href="system_cache__dita__x3A__svg.utils.xsl"/>-->
     
+    <xsl:template mode="system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal" match="*">
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.id"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.block"/>
+        <xsl:param name="system_cache__dita__x3A__svg:cursor"/>
+        <xsl:param name="system_cache__dita__x3A__svg:labelMajor" tunnel="yes"/>    
+        <xsl:param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" required="yes" /><!-- select="500" -->
+        
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" required="yes" />
+        
+        
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.name" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.value" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.label" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.name" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.value" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x.label" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x.name" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x.name.value" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x.value" />
+        
+        
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate + $system_cache__dita__x3A__svg:offsetX.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate - $system_cache__dita__x3A__svg:offsetY.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length - ( 2 * $system_cache__dita__x3A__svg:offsetY.default )"/>
+        
+        
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate + $system_cache__dita__x3A__svg:offsetY.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate - $system_cache__dita__x3A__svg:offsetY.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length - ( 2 * $system_cache__dita__x3A__svg:offsetY.default )"/>
+        
+        
+        <xsl:comment>#37 mode system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal</xsl:comment>
+        <!--<system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal>-->
+            <!--<xsl:copy>-->
+                <!--<xsl:copy-of select="@*"/>-->
+                <xsl:apply-templates mode="system_cache__dita__x3A__svg:openHiLoClose" select=".">
+                    <!--<xsl:with-param name="system_cache__dita__x3A__svg:labelMajor" select="$system_cache__dita__x3A__svg:labelMajor" tunnel="yes"/>-->
+                    <xsl:with-param name="system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal" select="true()" tunnel="yes"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.id" select="$system_cache__dita__x3A__svg:resolution.coordinate.id"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.block" select="$system_cache__dita__x3A__svg:resolution.coordinate.block"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" />
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" />
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length" /><!-- select="500" -->
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" />
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" />
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length" />
+                    
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.name" select="$system_cache__dita__x3A__svg:data.y1.name" />
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.value"  select="$system_cache__dita__x3A__svg:data.y1.value"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.label" select="$system_cache__dita__x3A__svg:data.y1.label" />
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.name" select="$system_cache__dita__x3A__svg:data.y2.name" />
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.value" select="$system_cache__dita__x3A__svg:data.y2.value" />
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x.label" select="$system_cache__dita__x3A__svg:data.x.label" />
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x.name" select="$system_cache__dita__x3A__svg:data.x.name" />
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x.name.value" select="$system_cache__dita__x3A__svg:data.x.name.value" />
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x.value" select="$system_cache__dita__x3A__svg:data.x.value" />
+                    
+                </xsl:apply-templates>
+            <!--</xsl:copy>-->
+        <!--</system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal>-->
+    </xsl:template>
+    
+    
     <xsl:template mode="system_cache__dita__x3A__svg:openHiLoClose" match="system_cache__dita__x3A__svg:cursor|*"/>
     
     
     <xsl:template mode="system_cache__dita__x3A__svg:openHiLoClose" match="system_cache__dita__x3A__svg:data.current-group">
+        <xsl:param name="system_cache__dita__x3A__svg:labelMajor" tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal" tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.id"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.block"/>
+        
+        <xsl:param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" required="yes" /><!-- select="500" -->
+        
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" required="yes" />
+        
+        
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.name" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.value" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.label" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.name" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.value" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x.label" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x.name" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x.name.value" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x.value" />
+        
+        
+        
         <xsl:param name="system_cache__dita__x3A__svg:cursor" required="yes"/>
-        <xsl:param name="system_cache__dita__x3A__svg:cursor.current.Y" select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)"/>
-        <xsl:param name="system_cache__dita__x3A__svg:width__x3A__limit" select="system_cache__dita__x3A__svg:width__x3A__limit__x3A__extract($system_cache__dita__x3A__svg:cursor)"/>
-        <xsl:param name="system_cache__dita__x3A__svg:height__x3A__limit" select="system_cache__dita__x3A__svg:height__x3A__limit__x3A__extract($system_cache__dita__x3A__svg:cursor)"/>
-        <xsl:param name="system_cache__dita__x3A__svg:cursor.current.height" >
-            <xsl:call-template name="system_cache__dita__x3A__svg:cursor.current.height">
-                <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
-            </xsl:call-template>
-        </xsl:param>
+        
+        <!--<xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" />-->
+        <xsl:param name="system_cache__dita__x3A__svg:height__x3A__limit" />
+        <!--<xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length" />-->
+            
+            
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate + $system_cache__dita__x3A__svg:offsetX.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate - $system_cache__dita__x3A__svg:offsetY.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length - ( 2 * $system_cache__dita__x3A__svg:offsetY.default )"/>
+        
+        
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate + $system_cache__dita__x3A__svg:offsetY.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate - $system_cache__dita__x3A__svg:offsetY.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length - ( 2 * $system_cache__dita__x3A__svg:offsetY.default )"/>
+        
+        
+        
+       
         <xsl:comment>#15 system_cache__dita__x3A__svg:openHiLoClose matched /n <xsl:value-of select="name()"/>;</xsl:comment>
         
         
         <xsl:variable name="system_cache__dita__x3A__svg:x.count.data.current-group" select="count(descendant-or-self::system_cache__dita__x3A__svg:data.current-group/@system_cache__dita__x3A__svg:data.id)" />
-                       <!-- system_cache__dita__x3A__svg:data.x1.id -->
+                                                                                                                                                        
         <xsl:variable name="system_cache__dita__x3A__svg:x1.count.leadingTimeDate" select="count(descendant-or-self::system_cache__dita__x3A__svg:leadingTimeDate/@system_cache__dita__x3A__svg:data.id)" />
         <xsl:variable name="system_cache__dita__x3A__svg:x1.min.leadingTimeDate" select="min(descendant-or-self::system_cache__dita__x3A__svg:leadingTimeDate/@system_cache__dita__x3A__svg:data.position)" />
         <xsl:variable name="system_cache__dita__x3A__svg:x1.max.leadingTimeDate" select="max(descendant-or-self::system_cache__dita__x3A__svg:leadingTimeDate/@system_cache__dita__x3A__svg:data.position)" />
@@ -37,20 +145,83 @@
         <xsl:variable name="system_cache__dita__x3A__svg:y2.min.relation_DateRangeElements" select="min(descendant-or-self::relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y2.value/number())" />
         <xsl:variable name="system_cache__dita__x3A__svg:y2.max.relation_DateRangeElements" select="max(descendant-or-self::relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y2.value/number())" />
         <xsl:variable name="system_cache__dita__x3A__svg:y.max.relation_DateRangeElements" select="system_cache__dita__x3A__svg:math.max($system_cache__dita__x3A__svg:y1.max.relation_DateRangeElements, $system_cache__dita__x3A__svg:y2.max.relation_DateRangeElements)"/>
-        <xsl:variable name="system_cache__dita__x3A__svg:y.min.relation_DateRangeElements" select="system_cache__dita__x3A__svg:math.max($system_cache__dita__x3A__svg:y1.min.relation_DateRangeElements, $system_cache__dita__x3A__svg:y2.min.relation_DateRangeElements)"/>
+        <xsl:variable name="system_cache__dita__x3A__svg:y.min.relation_DateRangeElements" select="system_cache__dita__x3A__svg:math.min($system_cache__dita__x3A__svg:y1.min.relation_DateRangeElements, $system_cache__dita__x3A__svg:y2.min.relation_DateRangeElements)"/>
         <xsl:variable name="system_cache__dita__x3A__svg:range.x1" select="$system_cache__dita__x3A__svg:x1.max.leadingTimeDate - $system_cache__dita__x3A__svg:x1.min.leadingTimeDate"/>
         <xsl:variable name="system_cache__dita__x3A__svg:range.y" select="$system_cache__dita__x3A__svg:y.max.relation_DateRangeElements - $system_cache__dita__x3A__svg:y.min.relation_DateRangeElements"/>
         
+      
+        
+       <xsl:comment>#151 testing evaluated vars n/ <xsl:value-of select="name()"/> / <xsl:value-of select="*/name()"/>;; c[<xsl:value-of select="count(descendant-or-self::system_cache__dita__x3A__svg:leadingTimeDate)"/>]
+            $system_cache__dita__x3A__svg:labelMajor = <xsl:value-of select="$system_cache__dita__x3A__svg:labelMajor"/>
+            $system_cache__dita__x3A__svg:x1.min.leadingTimeDate = <xsl:value-of select="$system_cache__dita__x3A__svg:x1.min.leadingTimeDate"/>
+            $system_cache__dita__x3A__svg:y.min.relation_DateRangeElements = <xsl:value-of select="$system_cache__dita__x3A__svg:y.min.relation_DateRangeElements"/>
+            $system_cache__dita__x3A__svg:x1.min.leadingTimeDate = <xsl:value-of select="$system_cache__dita__x3A__svg:x1.min.leadingTimeDate"/>
+            $system_cache__dita__x3A__svg:x1.max.leadingTimeDate = <xsl:value-of select="$system_cache__dita__x3A__svg:x1.max.leadingTimeDate"/>
+           $system_cache__dita__x3A__svg:data.y1.name = <xsl:value-of select="$system_cache__dita__x3A__svg:data.y1.name"/>
+           $system_cache__dita__x3A__svg:data.y1.value = <xsl:value-of select="$system_cache__dita__x3A__svg:data.y1.value"/>
+           $system_cache__dita__x3A__svg:data.y1.label = <xsl:value-of select="$system_cache__dita__x3A__svg:data.y1.label"/>
+           $system_cache__dita__x3A__svg:data.y2.name = <xsl:value-of select="$system_cache__dita__x3A__svg:data.y2.name"/>
+           $system_cache__dita__x3A__svg:data.y2.value = <xsl:value-of select="$system_cache__dita__x3A__svg:data.y2.value"/>
+           $system_cache__dita__x3A__svg:data.x.label = <xsl:value-of select="$system_cache__dita__x3A__svg:data.x.label"/>
+           $system_cache__dita__x3A__svg:data.x.name = <xsl:value-of select="$system_cache__dita__x3A__svg:data.x.name"/>
+           $system_cache__dita__x3A__svg:data.x.name.value = <xsl:value-of select="$system_cache__dita__x3A__svg:data.x.name.value"/>
+           $system_cache__dita__x3A__svg:data.x.value = <xsl:value-of select="$system_cache__dita__x3A__svg:data.x.value"/>
+           
+           
+       </xsl:comment>
+       
+        <xsl:variable name="system_cache__dita__x3A__svg:offsetY.minY">
+            <xsl:choose>
+                <xsl:when test="$system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal">
+                    <xsl:value-of select="$system_cache__dita__x3A__svg:x1.min.leadingTimeDate"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:value-of select="$system_cache__dita__x3A__svg:y.min.relation_DateRangeElements"/>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+        
         
+        <xsl:variable name="system_cache__dita__x3A__svg:offsetY.maxY">
+            <xsl:choose>
+                <xsl:when test="$system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal">
+                    <xsl:value-of select="$system_cache__dita__x3A__svg:x1.max.leadingTimeDate"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:value-of select="$system_cache__dita__x3A__svg:y.max.relation_DateRangeElements"/>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
         
+        <xsl:variable name="system_cache__dita__x3A__svg:offsetX.maxX">
+            <xsl:choose>
+                <xsl:when test="$system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal">
+                    <xsl:value-of select="$system_cache__dita__x3A__svg:y.max.relation_DateRangeElements"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:value-of select="$system_cache__dita__x3A__svg:x1.max.leadingTimeDate"/>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+      
+        <xsl:variable name="system_cache__dita__x3A__svg:offsetX.minX">
+            <xsl:choose>
+                <xsl:when test="$system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal">
+                    <xsl:value-of select="$system_cache__dita__x3A__svg:y.min.relation_DateRangeElements"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:value-of select="$system_cache__dita__x3A__svg:x1.min.leadingTimeDate"/>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
       
         <xsl:choose>
-            <xsl:when test="number($system_cache__dita__x3A__svg:debug.level ) &gt; 4 or 1=1">
+            <xsl:when test="number($system_cache__dita__x3A__svg:debug.level ) &gt; 40 or 2=1">
                 <xsl:copy copy-namespaces="no">
-                    <xsl:attribute name="system_cache__dita__x3A__svg:cursor.current.Y" select="$system_cache__dita__x3A__svg:cursor.current.Y"/>
-                    <xsl:attribute name="system_cache__dita__x3A__svg:width__x3A__limit" select="$system_cache__dita__x3A__svg:width__x3A__limit"/>
+                    <xsl:attribute name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                    <xsl:attribute name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length"/>
                     <xsl:attribute name="system_cache__dita__x3A__svg:height__x3A__limit" select="$system_cache__dita__x3A__svg:height__x3A__limit"/>
-                    <xsl:attribute name="system_cache__dita__x3A__svg:cursor.current.height" select="$system_cache__dita__x3A__svg:cursor.current.height"/>
+                    <xsl:attribute name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length"/>
                     <xsl:copy-of select="@*[contains(name(),'system_cache__dita__x3A__svg:data')]" copy-namespaces="no" />
                     
                     
@@ -99,7 +270,7 @@
                     <!--<xsl:variable name="system_cache__dita__x3A__svg:numBars" select="system_cache__dita__x3A__svg:math.min($hiCount, $system_cache__dita__x3A__svg:count.leadingTimeDate)"/>-->
                     <!-- <xsl:variable name="system_cache__dita__x3A__svg:x1.numBars" select="$system_cache__dita__x3A__svg:x1.count.leadingTimeDate"/>
             <xsl:attribute name="system_cache__dita__x3A__svg:x1.numBars" select="$system_cache__dita__x3A__svg:x1.numBars"/>
-            <xsl:variable name="system_cache__dita__x3A__svg:x1.spacing" select="$system_cache__dita__x3A__svg:width__x3A__limit div ($system_cache__dita__x3A__svg:x1.numBars + 1)"/>
+            <xsl:variable name="system_cache__dita__x3A__svg:x1.spacing" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length div ($system_cache__dita__x3A__svg:x1.numBars + 1)"/>
             <xsl:attribute name="system_cache__dita__x3A__svg:x1.spacing" select="$system_cache__dita__x3A__svg:x1.spacing"/>
             -->
                     
@@ -119,38 +290,51 @@
         
         
         <xsl:comment>#119 offsetting datasetn in pairs:
-                $system_cache__dita__x3A__svg:offsetY.minY == ($system_cache__dita__x3A__svg:y.min.relation_DateRangeElements) <xsl:value-of select="$system_cache__dita__x3A__svg:y.min.relation_DateRangeElements"/>
-                $system_cache__dita__x3A__svg:offsetY.maxY == ($system_cache__dita__x3A__svg:y.max.relation_DateRangeElements) <xsl:value-of select="$system_cache__dita__x3A__svg:y.max.relation_DateRangeElements"/>
-                $system_cache__dita__x3A__svg:offsetY.height == ($system_cache__dita__x3A__svg:cursor.current.height) <xsl:value-of select="$system_cache__dita__x3A__svg:cursor.current.height"/>
+             matched n/ <xsl:value-of select="name()"/> /n <xsl:value-of select="*/name()"/>
+                $system_cache__dita__x3A__svg:offsetY.minY == <xsl:value-of select="$system_cache__dita__x3A__svg:offsetY.minY"/> ($system_cache__dita__x3A__svg:y.min.relation_DateRangeElements) <xsl:value-of select="$system_cache__dita__x3A__svg:y.min.relation_DateRangeElements"/>
+                $system_cache__dita__x3A__svg:offsetY.maxY == <xsl:value-of select="$system_cache__dita__x3A__svg:offsetY.maxY"/> ($system_cache__dita__x3A__svg:y.max.relation_DateRangeElements) <xsl:value-of select="$system_cache__dita__x3A__svg:y.max.relation_DateRangeElements"/>
+               $system_cache__dita__x3A__svg:data.y2.bounds.max.length <xsl:value-of select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length"/>
 
-                system_cache__dita__x3A__svg:offsetX.minX == ($system_cache__dita__x3A__svg:x1.min.leadingTimeDate) <xsl:value-of select="$system_cache__dita__x3A__svg:x1.min.leadingTimeDate"/>
-                system_cache__dita__x3A__svg:offsetX.maxX == ($system_cache__dita__x3A__svg:x1.max.leadingTimeDate) <xsl:value-of select="$system_cache__dita__x3A__svg:x1.max.leadingTimeDate"/>
-                system_cache__dita__x3A__svg:offsetX.width == ($system_cache__dita__x3A__svg:width__x3A__limit) <xsl:value-of select="$system_cache__dita__x3A__svg:width__x3A__limit"/>
+                system_cache__dita__x3A__svg:offsetX.minX <xsl:value-of select="$system_cache__dita__x3A__svg:offsetX.minX"/> == ($system_cache__dita__x3A__svg:x1.min.leadingTimeDate) <xsl:value-of select="$system_cache__dita__x3A__svg:x1.min.leadingTimeDate"/>
+                system_cache__dita__x3A__svg:offsetX.maxX == <xsl:value-of select="$system_cache__dita__x3A__svg:offsetX.maxX"/> ($system_cache__dita__x3A__svg:x1.max.leadingTimeDate) <xsl:value-of select="$system_cache__dita__x3A__svg:x1.max.leadingTimeDate"/>
+                $system_cache__dita__x3A__svg:data.x2.bounds.max.length <xsl:value-of select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length"/>
                 
-                system_cache__dita__x3A__svg:cursor.current.Y == ($system_cache__dita__x3A__svg:cursor.current.Y) <xsl:value-of select="$system_cache__dita__x3A__svg:cursor.current.Y"/>
+                system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate == ($system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate) <xsl:value-of select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
             </xsl:comment>
         <svg:g debug="svgu:openHiLoClose.x51"  >
             
+            <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds">
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$system_cache__dita__x3A__svg:offsetX.minX"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$system_cache__dita__x3A__svg:offsetX.maxX"/>
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$system_cache__dita__x3A__svg:offsetY.minY"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$system_cache__dita__x3A__svg:offsetY.maxY"/>
+                
+            </xsl:call-template>
             
-            
-            <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.basic">
+            <!--<xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds">
                 <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$system_cache__dita__x3A__svg:y.min.relation_DateRangeElements" />
                 <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$system_cache__dita__x3A__svg:y.max.relation_DateRangeElements" />
-                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.height" select="$system_cache__dita__x3A__svg:cursor.current.height"/>
+                <!-\-<xsl:with-param name="system_cache__dita__x3A__svg:offsetY.height" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length"/>-\->
                 
                 <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$system_cache__dita__x3A__svg:x1.min.leadingTimeDate" />
                 <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$system_cache__dita__x3A__svg:x1.max.leadingTimeDate" />
-                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.width" select="$system_cache__dita__x3A__svg:width__x3A__limit"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.width" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length"/>
                 
-                <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.Y" select="$system_cache__dita__x3A__svg:cursor.current.Y"/>
-            </xsl:call-template>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+            </xsl:call-template>-->
             
             <!--<xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.major">
                 <xsl:with-param name="system_cache__dita__x3A__svg:offsetX" select="$offsetX"/>
                 <xsl:with-param name="system_cache__dita__x3A__svg:offsetY" select="$offsetY"/>
                 <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.height" select="$height"/>
                 <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.min" select="$min"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.Y" select="$system_cache__dita__x3A__svg:cursor.current.Y"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
                 <xsl:with-param name="yscale" select="$scale"/>
             </xsl:call-template>-->
             
@@ -158,22 +342,36 @@
             
             <xsl:apply-templates mode="#current">
                 <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.Y" select="$system_cache__dita__x3A__svg:cursor.current.Y"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length"/>
+                
                 <!--<xsl:with-param name="system_cache__dita__x3A__svg:x1.spacing" select="$system_cache__dita__x3A__svg:x1.spacing"/>-->
                 
                 <xsl:with-param name="system_cache__dita__x3A__svg:y.min.relation_DateRangeElements" select="$system_cache__dita__x3A__svg:y.min.relation_DateRangeElements" />
                 <xsl:with-param name="system_cache__dita__x3A__svg:y.max.relation_DateRangeElements" select="$system_cache__dita__x3A__svg:y.max.relation_DateRangeElements" />
-                <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.height" select="$system_cache__dita__x3A__svg:cursor.current.height"/>
+                
                 
                 <xsl:with-param name="system_cache__dita__x3A__svg:x1.min.leadingTimeDate" select="$system_cache__dita__x3A__svg:x1.min.leadingTimeDate" />
                 <xsl:with-param name="system_cache__dita__x3A__svg:x1.max.leadingTimeDate" select="$system_cache__dita__x3A__svg:x1.max.leadingTimeDate" />
-                <xsl:with-param name="system_cache__dita__x3A__svg:width__x3A__limit" select="$system_cache__dita__x3A__svg:width__x3A__limit"/>
+                
                 
                 <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.index" select="system_cache__dita__x3A__svg:resolution.coordinate.index.1()" tunnel="yes"/>
                 <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.axis" select="system_cache__dita__x3A__svg:resolution.coordinate.axis.y()" tunnel="yes"/>
                 <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.data.name" select="'leadingTimeDate-From'" tunnel="yes"/>
                 <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.data.position__x3A__limit" select="1" tunnel="yes"/>
                 
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$system_cache__dita__x3A__svg:offsetX.minX"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$system_cache__dita__x3A__svg:offsetX.maxX"/>
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$system_cache__dita__x3A__svg:offsetY.minY"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$system_cache__dita__x3A__svg:offsetY.maxY"/>
+                
+                
             </xsl:apply-templates>
         </svg:g>        
         
@@ -193,20 +391,20 @@
         
         <!--<xsl:apply-templates mode="system_cache__dita__x3A__svg:resolution.offset.dataset.prepared.data.label" select="."/>-->
         
-        
-        <xsl:call-template name="system_cache__dita__x3A__svg:resolution.offset.dataset.prepared.data.label">
+        <xsl:comment>#191 TODO TODO call-template name="system_cache__dita__x3A__svg:resolution.offset.dataset.prepared.data.label </xsl:comment>
+        <!--<xsl:call-template name="system_cache__dita__x3A__svg:resolution.offset.dataset.prepared.data.label">
             <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor" tunnel="yes"/>
-        </xsl:call-template>
+        </xsl:call-template>-->
             
         
         
         
         <!--<xsl:apply-templates mode="system_cache__dita__x3A__svg:openHiLoClose.label" select="$system_cache__dita__x3A__svg:openHiLoClose.resolution.coordinate.label">
             <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
-            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.Y" select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)"/>
-            <xsl:with-param name="system_cache__dita__x3A__svg:width__x3A__limit" select="system_cache__dita__x3A__svg:width__x3A__limit__x3A__extract($system_cache__dita__x3A__svg:cursor)"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate($system_cache__dita__x3A__svg:cursor)"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="system_cache__dita__x3A__svg:data.x2.bounds.max.length__x3A__extract($system_cache__dita__x3A__svg:cursor)"/>
             <xsl:with-param name="system_cache__dita__x3A__svg:height__x3A__limit" select="system_cache__dita__x3A__svg:height__x3A__limit__x3A__extract($system_cache__dita__x3A__svg:cursor)"/>
-            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.height" select="system_cache__dita__x3A__svg:cursor.current.height($system_cache__dita__x3A__svg:cursor)"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="system_cache__dita__x3A__svg:data.y2.bounds.max.length($system_cache__dita__x3A__svg:cursor)"/>
         </xsl:apply-templates>-->
         
         <!--<system_cache__dita__x3A__svg:data.current-group system_cache__dita__x3A__svg:data.name="BI_audit_ENERGA_PRACOWNICY"
@@ -334,20 +532,20 @@
         <xsl:param name="system_cache__dita__x3A__svg:offsetX.minX" select="@system_cache__dita__x3A__svg:offsetX.minX"/>
         <xsl:param name="system_cache__dita__x3A__svg:offsetX.maxX" select="@system_cache__dita__x3A__svg:offsetX.maxX"/>
         <xsl:param name="system_cache__dita__x3A__svg:offsetX.width" select="@system_cache__dita__x3A__svg:offsetX.width"/>
-        <xsl:param name="system_cache__dita__x3A__svg:cursor.current.Y" select="@system_cache__dita__x3A__svg:cursor.current.Y"/>
-
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="@system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+        
         <xsl:comment>#317 testing labels</xsl:comment>
         <svg:g debug="svgu:openHiLoClose.317"  >
             <!--<xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.basic">
                 <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$system_cache__dita__x3A__svg:y.min.relation_DateRangeElements" />
                 <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$system_cache__dita__x3A__svg:y.max.relation_DateRangeElements" />
-                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.height" select="$system_cache__dita__x3A__svg:cursor.current.height"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.height" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length"/>
                 
                 <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$system_cache__dita__x3A__svg:x1.min.leadingTimeDate" />
                 <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$system_cache__dita__x3A__svg:x1.max.leadingTimeDate" />
-                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.width" select="$system_cache__dita__x3A__svg:width__x3A__limit"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.width" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length"/>
                 
-                <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.Y" select="$system_cache__dita__x3A__svg:cursor.current.Y"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
             </xsl:call-template>-->
             
             
@@ -356,16 +554,16 @@
             
             <!--<xsl:apply-templates mode="#current">
                 <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.Y" select="$system_cache__dita__x3A__svg:cursor.current.Y"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
                 <!-\-<xsl:with-param name="system_cache__dita__x3A__svg:x1.spacing" select="$system_cache__dita__x3A__svg:x1.spacing"/>-\->
                 
                 <xsl:with-param name="system_cache__dita__x3A__svg:y.min.relation_DateRangeElements" select="$system_cache__dita__x3A__svg:y.min.relation_DateRangeElements" />
                 <xsl:with-param name="system_cache__dita__x3A__svg:y.max.relation_DateRangeElements" select="$system_cache__dita__x3A__svg:y.max.relation_DateRangeElements" />
-                <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.height" select="$system_cache__dita__x3A__svg:cursor.current.height"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length"/>
                 
                 <xsl:with-param name="system_cache__dita__x3A__svg:x1.min.leadingTimeDate" select="$system_cache__dita__x3A__svg:x1.min.leadingTimeDate" />
                 <xsl:with-param name="system_cache__dita__x3A__svg:x1.max.leadingTimeDate" select="$system_cache__dita__x3A__svg:x1.max.leadingTimeDate" />
-                <xsl:with-param name="system_cache__dita__x3A__svg:width__x3A__limit" select="$system_cache__dita__x3A__svg:width__x3A__limit"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length"/>
                 
                 <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.index" select="system_cache__dita__x3A__svg:resolution.coordinate.index.1()" tunnel="yes"/>
                 <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.axis" select="system_cache__dita__x3A__svg:resolution.coordinate.axis.y()" tunnel="yes"/>
@@ -380,30 +578,136 @@
     
   
     <xsl:template mode="system_cache__dita__x3A__svg:openHiLoClose" match="system_cache__dita__x3A__svg:leadingTimeDate[not(count(relation_DateRangeElements) &gt;1)  and @system_cache__dita__x3A__svg:data.position and relation_DateRangeElements[@system_cache__dita__x3A__svg:data.y1.value]]">
+        <xsl:param name="system_cache__dita__x3A__svg:labelMajor" tunnel="yes"/>
         <xsl:param name="system_cache__dita__x3A__svg:cursor" required="yes"/>
-        <xsl:param name="system_cache__dita__x3A__svg:cursor.current.Y" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal" tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" required="yes" /><!-- select="500" -->
+        
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" required="yes" />
+        
+        
         <!--<xsl:param name="system_cache__dita__x3A__svg:x1.spacing" required="yes"/>-->
         
         <xsl:param name="system_cache__dita__x3A__svg:y.min.relation_DateRangeElements" required="yes"/>
         <xsl:param name="system_cache__dita__x3A__svg:y.max.relation_DateRangeElements" required="yes"/>
-        <xsl:param name="system_cache__dita__x3A__svg:cursor.current.height" required="yes"/>
+        
         
         <xsl:param name="system_cache__dita__x3A__svg:x1.min.leadingTimeDate" required="yes" />
         <xsl:param name="system_cache__dita__x3A__svg:x1.max.leadingTimeDate"  required="yes"/>
-        <xsl:param name="system_cache__dita__x3A__svg:width__x3A__limit" required="yes"/>
         
+        <xsl:param name="system_cache__dita__x3A__svg:offsetX.minX" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:offsetX.maxX" required="yes" />
         
+        <xsl:param name="system_cache__dita__x3A__svg:offsetY.minY" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:offsetY.maxY" required="yes" />
         
+        <xsl:variable name="xScale">
+            <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__extract__scale">
+                <xsl:with-param name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__extract__scale.x" select="true()"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$system_cache__dita__x3A__svg:offsetX.minX"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$system_cache__dita__x3A__svg:offsetX.maxX"/>
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$system_cache__dita__x3A__svg:offsetY.minY"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$system_cache__dita__x3A__svg:offsetY.maxY"/>
+                
+            </xsl:call-template>
+        </xsl:variable>
+        <xsl:variable name="yScale">
+            <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__extract__scale">
+                <xsl:with-param name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__extract__scale.y" select="true()"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$system_cache__dita__x3A__svg:offsetX.minX"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$system_cache__dita__x3A__svg:offsetX.maxX"/>
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$system_cache__dita__x3A__svg:offsetY.minY"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$system_cache__dita__x3A__svg:offsetY.maxY"/>
+                
+            </xsl:call-template>
+        </xsl:variable>
+        
+        <xsl:variable name="x1Value">
+            <xsl:choose>
+                <xsl:when test="$system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal">
+                    <xsl:value-of select="relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y1.value"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:value-of select="@system_cache__dita__x3A__svg:data.position"/>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+        
+        <xsl:variable name="x2Value">
+            <xsl:choose>
+                <xsl:when test="$system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal">
+                    <xsl:value-of select="relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y2.value"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:value-of select="@system_cache__dita__x3A__svg:data.position"/>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
         
+        <xsl:variable name="y1Value">
+            <xsl:choose>
+                <xsl:when test="$system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal">
+                    <xsl:value-of select="@system_cache__dita__x3A__svg:data.position"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:value-of select="relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y1.value"/>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
         
-        <xsl:comment>#openHiLoClose.229 matched/n<xsl:value-of select="name()"/></xsl:comment>
+        <xsl:variable name="y2Value">
+            <xsl:choose>
+                <xsl:when test="$system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal">
+                    <xsl:value-of select="@system_cache__dita__x3A__svg:data.position"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:value-of select="relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y2.value"/>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+        
+        
+        <xsl:comment>#openHiLoClose.229 matched/n<xsl:value-of select="name()"/>
+            $xScale = <xsl:value-of select="$xScale"/> ; yScale = <xsl:value-of select="$yScale"/>
+            $system_cache__dita__x3A__svg:labelMajor = <xsl:value-of select="$system_cache__dita__x3A__svg:labelMajor"/>
+            $system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal = <xsl:value-of select="$system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal"/>
+            $system_cache__dita__x3A__svg:offsetX.minX = <xsl:value-of select="$system_cache__dita__x3A__svg:offsetX.minX"/>
+            $system_cache__dita__x3A__svg:offsetX.maxX = <xsl:value-of select="$system_cache__dita__x3A__svg:offsetX.maxX"/>
+            $system_cache__dita__x3A__svg:offsetY.minY = <xsl:value-of select="$system_cache__dita__x3A__svg:offsetY.minY"/>
+            $system_cache__dita__x3A__svg:offsetY.maxY = <xsl:value-of select="$system_cache__dita__x3A__svg:offsetY.maxY"/>
+            $x1Value = <xsl:value-of select="$x1Value"/>; $x2Value = <xsl:value-of select="$x2Value"/>
+            $y1Value = <xsl:value-of select="$y1Value"/>  $y2Value = <xsl:value-of select="$y2Value"/>
+            relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y1.value = <xsl:value-of select="relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y1.value"/>
+            relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y2.value = <xsl:value-of select="relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y2.value"/>
+            @system_cache__dita__x3A__svg:data.position = <xsl:value-of select="@system_cache__dita__x3A__svg:data.position"/>
+            @system_cache__dita__x3A__svg:data.y1.label = <xsl:value-of select="relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y1.label"/>
+            @system_cache__dita__x3A__svg:data.y2.label = <xsl:value-of select="relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y2.label"/>
+        </xsl:comment>
         <!--<xsl:copy copy-namespaces="no">
             <xsl:copy-of select="@*[contains(name(),'system_cache__dita__x3A__svg:data')]" copy-namespaces="no"/>
             <xsl:apply-templates mode="#current">
                 <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
             </xsl:apply-templates>
         </xsl:copy>-->
-        <svg:line   debug="svgu:openHiLoClose.74">
+        
+        
+        <svg:line   debug="svgu:openHiLoClose.74 {@*/relation_DateRangeElements/name()}">
              
              <!--id="{$context}_highLow_{$pos}"-->
             <!--x1="{$spacing * $pos}"-->
@@ -412,25 +716,25 @@
             <!-- y2="{current( )}" -->
             <xsl:call-template name="system_cache__dita__x3A__svg:resolution.x">
                 <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.index" select="1"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:position" select="@system_cache__dita__x3A__svg:data.position"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:position" select="$x1Value"/>
                 <xsl:with-param name="system_cache__dita__x3A__svg:spacing" select="1"/>
             </xsl:call-template>
             <xsl:call-template name="system_cache__dita__x3A__svg:resolution.x">
                 <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.index" select="2"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:position" select="@system_cache__dita__x3A__svg:data.position"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:position" select="$x2Value"/>
                 <xsl:with-param name="system_cache__dita__x3A__svg:spacing" select="1"/>
             </xsl:call-template>
             <xsl:call-template name="system_cache__dita__x3A__svg:resolution.y">
                 <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.index" select="1"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:position.value" select="relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y1.value"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:position.value" select="$y1Value"/>
             </xsl:call-template>
             <xsl:call-template name="system_cache__dita__x3A__svg:resolution.y">
                 <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.index" select="2"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:position.value" select="relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y2.value"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:position.value" select="$y2Value"/>
             </xsl:call-template>
             <xsl:call-template name="system_cache__dita__x3A__svg:resolution.id">
                 <xsl:with-param name="system_cache__dita__x3A__svg:resolution.context" select="'HiLow266'"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:position" select="@system_cache__dita__x3A__svg:data.position"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:position" select="relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y2.value"/>
             </xsl:call-template>
             <xsl:attribute name="style">
                 <xsl:call-template name="svgu:hiLoBarStyle">
@@ -440,29 +744,136 @@
                     <xsl:with-param name="stroke" select="5"/>
                 </xsl:call-template>
             </xsl:attribute>      
-            <xsl:attribute name="transform.validate.y.1.{relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y1.value}">
-                <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.basic__x3A__height__x3A__limit__x3A__validate">
-                    <xsl:with-param name="yValue" select="relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y1.value"/>
-                    <xsl:with-param name="xValue" select="@system_cache__dita__x3A__svg:data.position"/>
-                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$system_cache__dita__x3A__svg:y.min.relation_DateRangeElements" />
-                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$system_cache__dita__x3A__svg:y.max.relation_DateRangeElements" />
-                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.height" select="$system_cache__dita__x3A__svg:cursor.current.height"/>
-                    
-                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$system_cache__dita__x3A__svg:x1.min.leadingTimeDate" />
-                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$system_cache__dita__x3A__svg:x1.max.leadingTimeDate" />
-                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.width" select="$system_cache__dita__x3A__svg:width__x3A__limit"/>
-                    
-                    <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.Y" select="$system_cache__dita__x3A__svg:cursor.current.Y"/>
+            <xsl:attribute name="transform.validate.y.1.{$y1Value}">
+                <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug"><!-- system_cache__dita__x3A__svg:transform.translate.bounds__x3A__height__x3A__limit__x3A__validate -->
+                    <xsl:with-param name="yValue" select="$y1Value"/>
+                    <xsl:with-param name="xValue" select="$x1Value"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug.x" select="true()"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug.write" select="true()"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$system_cache__dita__x3A__svg:offsetX.minX"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$system_cache__dita__x3A__svg:offsetX.maxX"/>
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length"/>
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$system_cache__dita__x3A__svg:offsetY.minY"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$system_cache__dita__x3A__svg:offsetY.maxY"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length"/>
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
                 </xsl:call-template>
+                
             </xsl:attribute>
             
+            
+            
             <xsl:comment>#debug 277
                 */n()/= <xsl:value-of select="*/name()"/>
                 @system_cache__dita__x3A__svg:data.id = <xsl:value-of select="@system_cache__dita__x3A__svg:data.id"/>
-                    relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y1.value = <xsl:value-of select="relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y1.value"/>
+                    relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y1.value = $y1Value = <xsl:value-of select="$y1Value"/>
             </xsl:comment>
         </svg:line>
+         
+        <svg:text debug="HiLoText.1.585"
+            
+            ><!-- transform="translate({@system_cache__dita__x3A__svg:data.position},{relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y1.value})  scale(1,{-1 div $scaleY}) translate({- @system_cache__dita__x3A__svg:data.position},{- relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y1.value})" -->
+            <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__fix_text">
+                
+                <xsl:with-param name="xValue" select="$x1Value"/>
+                <xsl:with-param name="yValue" select="$y1Value"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$system_cache__dita__x3A__svg:offsetX.minX"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$system_cache__dita__x3A__svg:offsetX.maxX"/>
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$system_cache__dita__x3A__svg:offsetY.minY"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$system_cache__dita__x3A__svg:offsetY.maxY"/>
+                
+            </xsl:call-template>
+            <xsl:attribute name="style"><!-- x="{$xMajor1}" y="{$yMajor1 }" --><!-- transform="translate({$xMajor1},{$yMajor1})  scale(1,{-$scale}) translate({-$xMajor1},{-$yMajor1})" -->
+                <xsl:call-template name="yAxisLabelStyle">
+                    <!--<xsl:with-param name="context" select="$context"/>-->
+                </xsl:call-template>
+            </xsl:attribute>
+            <xsl:call-template name="system_cache__dita__x3A__svg:resolution.x">
+                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.index" select="''"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:position" select="$x1Value"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:spacing" select="1"/>
+            </xsl:call-template>
+            <xsl:call-template name="system_cache__dita__x3A__svg:resolution.y">
+                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.index" select="''"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:position.value" select="$y1Value"/>
+            </xsl:call-template>
+            <xsl:value-of select="relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y1.label"/>
+        </svg:text>
         
+        <svg:text debug="HiLoText585.y2"
+            
+            ><!-- transform="translate({@system_cache__dita__x3A__svg:data.position},{relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y1.value})  scale(1,{-1 div $scaleY}) translate({- @system_cache__dita__x3A__svg:data.position},{- relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y1.value})" -->
+            <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__fix_text">
+                
+                <xsl:with-param name="xValue" select="$x2Value"/>        
+                <xsl:with-param name="yValue" select="$y2Value"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$system_cache__dita__x3A__svg:offsetX.minX"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$system_cache__dita__x3A__svg:offsetX.maxX"/>
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$system_cache__dita__x3A__svg:offsetY.minY"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$system_cache__dita__x3A__svg:offsetY.maxY"/>
+                
+            </xsl:call-template>
+            <xsl:attribute name="style"><!-- x="{$xMajor1}" y="{$yMajor1 }" --><!-- transform="translate({$xMajor1},{$yMajor1})  scale(1,{-$scale}) translate({-$xMajor1},{-$yMajor1})" -->
+                
+                <xsl:text>text-anchor:end;font-size:7;baseline-shift:-50%</xsl:text>
+                <!--<xsl:call-template name="yAxisLabelStyle">
+                    <!-\-<xsl:with-param name="context" select="$context"/>-\->
+                </xsl:call-template>-->
+            </xsl:attribute>
+            <xsl:call-template name="system_cache__dita__x3A__svg:resolution.x">
+                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.index" select="''"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:position" select="$x2Value"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:spacing" select="1"/>
+            </xsl:call-template>
+            <xsl:call-template name="system_cache__dita__x3A__svg:resolution.y">
+                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.index" select="''"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:position.value" select="$y2Value"/>
+            </xsl:call-template>
+            <xsl:value-of select="relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y2.label"/><!-- @default_db__x3A__BI_audit_BENFORD:NameField.foreign.value -->
+        </svg:text>
+        <xsl:call-template name="system_cache__dita__x3A__svg:labelMajor">
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.label" select="@system_cache__dita__x3A__svg:data.y1.label"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.label" select="@system_cache__dita__x3A__svg:data.y2.label"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.x.label" select="@system_cache__dita__x3A__svg:data.x.label"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+            
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length"/>
+            
+            
+            <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$system_cache__dita__x3A__svg:offsetX.minX"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$system_cache__dita__x3A__svg:offsetX.maxX"/>
+            
+            <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$system_cache__dita__x3A__svg:offsetY.minY"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$system_cache__dita__x3A__svg:offsetY.maxY"/>
+            <xsl:with-param name="x1Value" select="$x1Value"/>
+            <xsl:with-param name="x2Value" select="$x2Value"/>
+            <xsl:with-param name="y1Value" select="$y1Value"/>
+            <xsl:with-param name="y2Value" select="$y2Value"/>
+            
+        </xsl:call-template>
         <xsl:comment>#460
         TEST IF CONSTEXT
                  <xsl:value-of select="name()"/>
@@ -529,22 +940,35 @@
     
     
     
-    <xsl:template name="svgu:openHiLoClose">
+    <xsl:template name="system_cache__dita__x3A__svg:openHiLoClose">
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.id"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.block" required="no"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.region" required="no"/>
+        
+        
+        <xsl:param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" required="yes" /><!-- select="500" -->
+        
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" required="yes" />
+        
         <xsl:param name="openData" required="yes"/><!-- select="/.." -->            
         <xsl:param name="hiData"  required="yes"/><!-- select="/.." -->            
         <xsl:param name="loData" required="yes" /><!-- select="/.." -->            
         <xsl:param name="closeData" required="yes" /><!-- select="/.." -->            
-        <xsl:param name="width" select="500"/>
-        <xsl:param name="height" select="500"/>
+        
+        
         <xsl:param name="offsetX" select="0"/>
         <xsl:param name="offsetY" select="0"/>
-        <xsl:param name="openCloseExtent" select="8"/>
-        <xsl:param name="max">
+        <xsl:param name="openCloseExtent" select="$system_cache__dita__x3A__svg:openCloseExtent.default"/>
+        <xsl:param name="maxY">
             <xsl:call-template name="system_cache__dita__x3A__svg:emath.max">
                 <xsl:with-param name="nodes" select="$hiData"/>
             </xsl:call-template>
         </xsl:param>
-        <xsl:param name="min">
+        <xsl:param name="minY">
             <xsl:call-template name="system_cache__dita__x3A__svg:emath.min">
                 <xsl:with-param name="nodes" select="$loData"/>
             </xsl:call-template>
@@ -553,15 +977,19 @@
         
         
         <xsl:param name="boundingBox" select="false()"/>
-        <xsl:param name="system_cache__dita__x3A__svg:transform.cursor" />
-        <xsl:param name="system_cache__dita__x3A__svg:cursor" required="yes"/>
-        <xsl:param name="system_cache__dita__x3A__svg:cursor.current.Y" select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)"/>
+       
         
         
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate + $system_cache__dita__x3A__svg:offsetX.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate - $system_cache__dita__x3A__svg:offsetY.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length - ( 2 * $system_cache__dita__x3A__svg:offsetY.default )"/>
         
         
-        <xsl:variable name="system_cache__dita__x3A__svg:cursor.current.Y" select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)"/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate + $system_cache__dita__x3A__svg:offsetY.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate - $system_cache__dita__x3A__svg:offsetY.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length - ( 2 * $system_cache__dita__x3A__svg:offsetY.default )"/>
         
+     
         <xsl:variable name="hiCount" select="count($hiData)"/>
         <xsl:variable name="loCount" select="count($loData)"/>
         <xsl:variable name="openCount" select="count($openData)"/>
@@ -569,23 +997,113 @@
         
         <xsl:variable name="numBars" select="system_cache__dita__x3A__svg:math.min($hiCount, $loCount)"/>
         
-        <xsl:variable name="spacing" select="$width div ($numBars + 1)"/>
-        <xsl:message>#44 LoHi $loCount=<xsl:value-of select="$loCount"/> min=<xsl:value-of select="$min"/>; $max=<xsl:value-of select="$max"/>;</xsl:message>
-        <xsl:variable name="range" select="number($max) - number($min)"/>
-        <xsl:variable name="scale" select="$height div $range"/>
         
-        <svg:g debug="svgu:openHiLoClose.1 $min={$min} $max={$max} $width={$width} $height={$height} $range={$range}" 
-            ><!-- transform="translate({$offsetX},{$offsetY+$height}) 
+        <xsl:variable name="spacing" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length div ($numBars + 1)"/>
+        <xsl:variable name="minX" select="$spacing - $openCloseExtent - $system_cache__dita__x3A__svg:offsetX.default"/>
+        <xsl:variable name="maxX" select="$spacing * $numBars +  $openCloseExtent + $system_cache__dita__x3A__svg:offsetX.default"/>
+        <xsl:message>#44 LoHi $loCount=<xsl:value-of select="$loCount"/> minY=<xsl:value-of select="$minY"/>; $maxY=<xsl:value-of select="$maxY"/>;</xsl:message>
+        
+         
+        <xsl:variable name="rangeY" select="number($maxY) - number($minY)"/>
+        <xsl:variable name="scaleY" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length div $rangeY"/>
+        
+        
+        <xsl:variable name="maxY">
+            <xsl:call-template name="system_cache__dita__x3A__svg:emath.max">
+                <xsl:with-param name="nodes" select="$loData"/>
+                <xsl:with-param name="value" select="$maxY"/>
+            </xsl:call-template>
+        </xsl:variable>
+        <xsl:variable name="maxY">
+            <xsl:call-template name="system_cache__dita__x3A__svg:emath.max">
+                <xsl:with-param name="nodes" select="$openData"/>
+                <xsl:with-param name="value" select="$maxY"/>
+            </xsl:call-template>
+        </xsl:variable>
+        <xsl:variable name="maxY">
+            <xsl:call-template name="system_cache__dita__x3A__svg:emath.max">
+                <xsl:with-param name="nodes" select="$closeData"/>
+                <xsl:with-param name="value" select="$maxY"/>
+            </xsl:call-template>
+        </xsl:variable>
+        <xsl:variable name="maxY" select="$maxY "/>
+        <xsl:variable name="minY" select="$minY "/>
+        
+        
+        
+        <xsl:message>#44-b bounds.max.length=<xsl:value-of select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length"/>
+            $scaleY = <xsl:value-of select="$scaleY"/> $rangeY = <xsl:value-of select="$rangeY"/>
+        </xsl:message>
+        <xsl:comment>#590 Hi Lo
+        $spacing = <xsl:value-of select="$spacing"/>
+            $maxY = <xsl:value-of select="$maxY"/>
+            $minY = <xsl:value-of select="$minY"/>
+            $numBars = <xsl:value-of select="$numBars"/>
+            $scaleY = <xsl:value-of select="$scaleY"/>
+            $rangeY = <xsl:value-of select="$rangeY"/>
+            $minX = <xsl:value-of select="$minX"/>
+            $maxX = <xsl:value-of select="$maxX"/>
+        </xsl:comment>
+        <!--<xsl:call-template name="system_cache__dita__x3A__svg:default.param.plot">
+            <xsl:with-param name="color">green</xsl:with-param>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+        </xsl:call-template>-->
+        
+        <svg:g   debug="svgu:openHiLoClose.1
+            $min={$minY} $max={$maxY} $system_cache__dita__x3A__svg:data.x2.bounds.max.length={$system_cache__dita__x3A__svg:data.x2.bounds.max.length} $system_cache__dita__x3A__svg:data.x2.bounds.max.length={$system_cache__dita__x3A__svg:data.x2.bounds.max.length} $rangeY={$rangeY}" 
+            ><!-- transform="translate({$offsetX},{$offsetY+$system_cache__dita__x3A__svg:data.x2.bounds.max.length}) 
             scale(1,{-$scale})
             translate(0,{-$min})" -->
-            <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.major">
-                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX" select="$offsetX"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY" select="$offsetY"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.height" select="$height"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.min" select="$min"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.Y" select="$system_cache__dita__x3A__svg:cursor.current.Y"/>
-                <xsl:with-param name="yscale" select="$scale"/>
+            <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds">
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$minX"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$maxX"/>
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$minY"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$maxY"/>
+                
             </xsl:call-template>
+            <xsl:comment>system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug for maxX
+            <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug">
+                <xsl:with-param name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug.x" select="true()"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug.write" select="true()"/>
+                <xsl:with-param name="yValue"  select="$maxY"/>
+                <xsl:with-param name="xValue" select="$maxX" />
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$minX" />
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$maxX" />
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"  select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"  />
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length"  />
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"  select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"  />
+                
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$minY" />
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$maxY" />
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/><!-- should be lower -->
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length"  /><!-- should be replaced by system_cache__dita__x3A__svg:data.y2.bounds.max.length -->
+                
+                
+            </xsl:call-template>
+            </xsl:comment>
+            
+            
+            <!--<xsl:call-template name="system_cache__dita__x3A__svg:default.param.plot">
+                <xsl:with-param name="color">green</xsl:with-param>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$minX"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$maxX"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$minY"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$maxY"/>
+            </xsl:call-template>-->
+            
             <xsl:for-each select="$hiData">
                 <xsl:variable name="pos" select="position( )"/>
                 
@@ -602,6 +1120,8 @@
                     </xsl:attribute>      
                 </svg:line>  
                 
+                <xsl:comment>#678 next $openData</xsl:comment>
+                
                 <!--draw open mark if opening data present -->        
                 <xsl:if test="$openCount >= $pos">
                     <svg:line x1="{$spacing * $pos - $openCloseExtent}" 
@@ -609,12 +1129,12 @@
                         x2="{$spacing * $pos}"  
                         y2="{$openData[$pos]}"
                         id="{$context}_open_{$pos}"
-                        debug="svgu:openHiLoClose.93"
+                        debug="svgu:openHiLoClose.93_{$pos}"
                         >
                         <xsl:attribute name="style">
                             <xsl:call-template name="svgu:openCloseBarStyle">
                                 <xsl:with-param name="pos" select="$pos"/>
-                                <xsl:with-param name="scale" select="$scale"/>
+                                <xsl:with-param name="scale" select="$scaleY"/>
                                 <xsl:with-param name="context" select="$context"/>
                             </xsl:call-template>
                         </xsl:attribute>         
@@ -633,7 +1153,7 @@
                         <xsl:attribute name="style">
                             <xsl:call-template name="svgu:openCloseBarStyle">
                                 <xsl:with-param name="pos" select="$pos"/>
-                                <xsl:with-param name="scale" select="$scale"/>
+                                <xsl:with-param name="scale" select="$scaleY"/>
                                 <xsl:with-param name="context" select="$context"/>
                             </xsl:call-template>
                         </xsl:attribute>         
@@ -645,6 +1165,74 @@
         
     </xsl:template>     
     
+
+
+    <xsl:template name="system_cache__dita__x3A__svg:labelMajor">
+        <xsl:param name="x1Value"/>
+        <xsl:param name="x2Value"/>
+        <xsl:param name="y1Value"/>
+        <xsl:param name="y2Value"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.x.label"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.label"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.label"/>
+        <xsl:param name="system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal" tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" required="yes" /><!-- select="500" -->
+        
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" required="yes" />
+        
+        <xsl:param name="system_cache__dita__x3A__svg:offsetX.minX" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:offsetX.maxX" required="yes" />
+        
+        <xsl:param name="system_cache__dita__x3A__svg:offsetY.minY" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:offsetY.maxY" required="yes" />
+        <xsl:choose>
+            <xsl:when test="$system_cache__dita__x3A__svg:data.x.label"/>
+            <xsl:when test="$system_cache__dita__x3A__svg:data.y1.label"/>
+            <xsl:when test="$system_cache__dita__x3A__svg:data.y2.label"/>
+            <xsl:when test="@default_db__x3A__BI_audit_BENFORD:NameField.foreign.value">
+                <svg:text debug="#160 system_cache__dita__x3A__svg:labelMajor"
+                    
+                    ><!-- transform="translate({@system_cache__dita__x3A__svg:data.position},{relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y1.value})  scale(1,{-1 div $scaleY}) translate({- @system_cache__dita__x3A__svg:data.position},{- relation_DateRangeElements/@system_cache__dita__x3A__svg:data.y1.value})" -->
+                    <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__fix_text">
+                        
+                        <xsl:with-param name="xValue" select="$x2Value"/>        
+                        <xsl:with-param name="yValue" select="$y2Value"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+                        
+                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$system_cache__dita__x3A__svg:offsetX.minX"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$system_cache__dita__x3A__svg:offsetX.maxX"/>
+                        
+                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$system_cache__dita__x3A__svg:offsetY.minY"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$system_cache__dita__x3A__svg:offsetY.maxY"/>
+                        
+                    </xsl:call-template>
+                    <xsl:attribute name="style"><!-- x="{$xMajor1}" y="{$yMajor1 }" --><!-- transform="translate({$xMajor1},{$yMajor1})  scale(1,{-$scale}) translate({-$xMajor1},{-$yMajor1})" -->
+                        <xsl:text>text-anchor:end;font-size:7;baseline-shift:-50%</xsl:text>
+                    </xsl:attribute>
+                    <xsl:call-template name="system_cache__dita__x3A__svg:resolution.x">
+                        <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.index" select="''"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:position" select="$x2Value"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:spacing" select="1"/>
+                    </xsl:call-template>
+                    <xsl:call-template name="system_cache__dita__x3A__svg:resolution.y">
+                        <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.index" select="''"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:position.value" select="$y2Value"/>
+                    </xsl:call-template>
+                    <xsl:value-of select="@default_db__x3A__BI_audit_BENFORD:NameField.foreign.value"/><!-- @default_db__x3A__BI_audit_BENFORD:NameField.foreign.value -->
+                </svg:text>
+            </xsl:when>
+        </xsl:choose>
+    </xsl:template>
+
+
+
     <xsl:template name="svgu:hiLoBarStyle">
         <xsl:param name="pos"/>
         <xsl:param name="context"/>

+ 169 - 188
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.Yaxis.xsl

@@ -13,114 +13,116 @@
     
     
     <xsl:template name="system_cache__dita__x3A__svg:yAxis">
-        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.block" required="yes"/>
-        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.region" required="yes"/>
-        <xsl:param name="Ydata"/>
-        <xsl:param name="minY" >
-            <xsl:call-template name="system_cache__dita__x3A__svg:emath.min">
-                <xsl:with-param name="nodes" select="$Ydata"/>
-            </xsl:call-template>
-        </xsl:param><!--select="0" Min x coordinate -->
-        <xsl:param name="maxY" >
-            <xsl:call-template name="system_cache__dita__x3A__svg:emath.max">
-                <xsl:with-param name="nodes" select="$Ydata"/>
-            </xsl:call-template>
-        </xsl:param><!-- select="100" Max x coordinate -->
-       
-        <xsl:param name="system_cache__dita__x3A__svg:cursor"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.id"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.block" required="no"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.region" required="no"/>
+        <xsl:param name="dataY" required="yes" />
+        
+        <xsl:param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" required="yes" /><!-- select="500" -->
+        
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" required="yes" />
+        
+        <!--<xsl:param name="height"  required="yes"/>--><!-- select="500" -->
+        <xsl:param name="boundingBox" select="false( )"/>
+        <xsl:param name="barLabel" select="true()"/>
+        <xsl:param name="system_cache__dita__x3A__svg:colors" select="$system_cache__dita__x3A__svg:colors.default"></xsl:param>
+        
+        <xsl:param name="minX" select="0"/>
+        
+        <xsl:param name="majorTicks" 
+            select="$system_cache__dita__x3A__svg:majorTicks.default"/>
+        <xsl:param name="minorTicks" 
+            select="$system_cache__dita__x3A__svg:minorTicks.default"/>
+        
+        <xsl:param name="minY" select="0">
+            <!--<xsl:call-template name="system_cache__dita__x3A__svg:emath.min">
+                <xsl:with-param name="nodes" select="$dataY"/>
+            </xsl:call-template>-->
+        </xsl:param>
+        
+        
+        
+        <xsl:param name="barWidth" select="5"/>
         
+        <xsl:param name="orientation" select="0"/>
         
-        <xsl:param name="labelMajor"/>
+        <xsl:param name="maxX" select="(number($system_cache__dita__x3A__svg:data.x2.bounds.max.length) div (count($dataY) + 1)) * count($dataY)"/>
         
-        <xsl:param name="system_cache__dita__x3A__svg:cursor.current.height" >
-            <xsl:call-template name="system_cache__dita__x3A__svg:cursor.current.height">
-                <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+        
+        
+        
+        
+        <xsl:param name="maxY">
+            <xsl:call-template name="system_cache__dita__x3A__svg:emath.max">
+                <xsl:with-param name="nodes" select="$dataY"/>
             </xsl:call-template>
         </xsl:param>
+        
+        <xsl:param name="labelMajor" select="true()"/>
+        
+        
         <!-- Compute the range and scaling factors -->
         
         
-        <xsl:comment>#99 $offsetX $minY = <xsl:value-of select="$minY"/>  - $maxY = <xsl:value-of select="$maxY"/>
-            
-                    
-        </xsl:comment>
-        <xsl:variable name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate">
-            <xsl:call-template name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate">
-                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.region" select="$system_cache__dita__x3A__svg:resolution.coordinate.region"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.block" select="$system_cache__dita__x3A__svg:resolution.coordinate.block"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
-            </xsl:call-template>
-        </xsl:variable>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate + $system_cache__dita__x3A__svg:offsetX.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate - $system_cache__dita__x3A__svg:offsetY.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length - ( 2 * $system_cache__dita__x3A__svg:offsetY.default )"/>
         
-        <xsl:variable name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate">
-            <xsl:call-template name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate">
-                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.region" select="$system_cache__dita__x3A__svg:resolution.coordinate.region"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.block" select="$system_cache__dita__x3A__svg:resolution.coordinate.block"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
-            </xsl:call-template>
-        </xsl:variable>
         
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate + $system_cache__dita__x3A__svg:offsetY.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate - $system_cache__dita__x3A__svg:offsetY.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length - ( 2 * $system_cache__dita__x3A__svg:offsetY.default )"/>
         
         
-        <xsl:variable name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate">
-            <xsl:call-template name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate">
-                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.region" select="$system_cache__dita__x3A__svg:resolution.coordinate.region"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.block" select="$system_cache__dita__x3A__svg:resolution.coordinate.block"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
-            </xsl:call-template>
-        </xsl:variable>
+        <xsl:variable name="rangeY" select="$maxY - $minY"/>
+        <xsl:variable name="scaleY" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length div $rangeY"/>
         
-        <xsl:variable name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate">
-            <xsl:call-template name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate">
-                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.region" select="$system_cache__dita__x3A__svg:resolution.coordinate.region"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.block" select="$system_cache__dita__x3A__svg:resolution.coordinate.block"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
-            </xsl:call-template>
-        </xsl:variable>
+        <xsl:variable name="nTicks"    select="$majorTicks * $minorTicks + 1"/>
+        <xsl:variable name="yIncr"  select="($maxY - $minY) div ($majorTicks * $minorTicks)"/>
         
         
-        <xsl:message>#9323 Yaxis: $system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate = (<xsl:value-of select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>) 
-            $system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate = (<xsl:value-of select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>) ;
-            
-        </xsl:message>
-        <xsl:comment>#9202 name="xMajor2"  $maxY=<xsl:value-of select="$maxY"/> ; $minY=<xsl:value-of select="$minY"/> ;
-            $system_cache__dita__x3A__svg:resolution.coordinate.block(<xsl:value-of select="$system_cache__dita__x3A__svg:resolution.coordinate.block"/>)
-                [system_cache__dita__x3A__svg:resolution.coordinate.region] = <xsl:value-of select="$system_cache__dita__x3A__svg:resolution.coordinate.region"/> ]
-                
-                $system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate = [<xsl:value-of select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>]
-                $system_cache__dita__x3A__svg:data.y2.bounds.min.coordinate = [<xsl:value-of select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>]
-            
-                $offsetX = system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate  after detecting from region = [[<xsl:value-of select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>]]
-                $system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate = [[<xsl:value-of select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/> ;]]
-            
-            $$system_cache__dita__x3A__svg:cursor.current.Y = <xsl:value-of select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)"/>
-            $system_cache__dita__x3A__svg:offsetY.height =$system_cache__dita__x3A__svg:cursor.current.height  [[
-            <xsl:call-template name="system_cache__dita__x3A__svg:cursor.current.height">
-                <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
-            </xsl:call-template>]]
-            
-            
-            
+        <xsl:comment>#99 $offsetX 
+            $system_cache__dita__x3A__svg:resolution.coordinate.id = <xsl:value-of select="$system_cache__dita__x3A__svg:resolution.coordinate.id"/>
+            $system_cache__dita__x3A__svg:resolution.coordinate.block = <xsl:value-of select="$system_cache__dita__x3A__svg:resolution.coordinate.block"/>
+             (system_cache__dita__x3A__svg:resolution.coordinate.region.start()=<xsl:value-of select="system_cache__dita__x3A__svg:resolution.coordinate.region.start()"/>)
+            $system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate = <xsl:value-of select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+            $minY = <xsl:value-of select="$minY"/>  - $maxY = <xsl:value-of select="$maxY"/>
+            $majorTicks = <xsl:value-of select="$majorTicks"/>
+            $minorTicks = <xsl:value-of select="$minorTicks"/>
+            $nTicks = <xsl:value-of select="$nTicks"/> = $majorTicks * $minorTicks + 1
+            $yIncr = <xsl:value-of select="$yIncr"/>   =   select="($maxY - $minY) div ($majorTicks * $minorTicks)"
         </xsl:comment>
         
+        
+        
         <!-- Establish a Cartesian coordinate system with correct offset -->
         <!-- and scaling                                                 -->
         <xsl:choose>
-            <xsl:when test="2=1 and 
-                number($system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate) and 
+            <xsl:when test="1=1 and 
+                $system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate and 
                 number($system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate) and 
                 number($system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate) and
                 number($system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate) 
                 ">
-                
+                <!--<xsl:call-template name="system_cache__dita__x3A__svg:default.param.plot">
+                    <xsl:with-param name="color">brown</xsl:with-param>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+                </xsl:call-template>-->
                 <svg:g debug="svgu:yAxis.168 block={$system_cache__dita__x3A__svg:resolution.coordinate.block}
                     $minY={$minY} $maxY={$maxY} $system_cache__dita__x3A__svg:cursor.current.heig" system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate="{$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate}"
                      system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate="{$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate}"
                     >
                     <!-- transform="translate({$offsetX},{$offsetY+$height})  scale(1,{-$scale}) translate(0,{-$min})" -->
                     <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds">
-                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="1"/>
-                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="1"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$minX"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$maxX"/>
                       
                         <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$minY"/>
                         <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$maxY"/>
@@ -130,133 +132,112 @@
                         <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
                         
                         <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
-                        <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
-                        
-                        
-                        
-                        
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>                        
                     </xsl:call-template>
                     
                     
-                    
-                    
-                    
-                    <xsl:call-template name="system_cache__dita__x3A__svg:default.param.plot">
-                        <xsl:with-param name="color">brown</xsl:with-param>
-                        <xsl:with-param name="system_cache__dita__x3A__svg:height" select="$system_cache__dita__x3A__svg:cursor.current.height"/>
-                        <xsl:with-param name="system_cache__dita__x3A__svg:width" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
-                    </xsl:call-template>
                     <!-- wnioski - trzeba , jak glowna skala jest -0.01 to $range musi sie wpasowac do scale i dzialac wylacznie w tych przedzialach 
                         
                         transform=" translate(550,10)  translate(0,555)  translate(0,100)  scale(1,-0.01) " ==  svg width="{600}" height="{655}
                         == 0 * -0,01 =0 == +100 ==100 + 555 =655 + 10 ==665
                         -->
                     
-                    <svg:line debug="system_cache__dita__x3A__svg:yAxis.6174 1sc" 
-                        x1="{$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate}"
-                        y1="{$minY}"
-                        x2="{$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate}" 
-                        y2="{$maxY}"><!-- X1-$majorLeftExtent  X2=-$majorLeftExtent -->
-                        <!--<xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.major">
-                            <xsl:with-param name="xMajor" select="-$majorLeftExtent"/>
-                            <xsl:with-param name="yMajor" select="$max"/><!-\- $min -\->
-                            <xsl:with-param name="yscale" select="-(1 div $scale)"/>
-                            <!-\-<xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.Y" select="$system_cache__dita__x3A__svg:cursor.current.Y"/>-\->
-                        </xsl:call-template>-->
-                        <!--XXX<xsl:attribute name="transform.validate.y1">
-                            <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.major__x3A__height__x3A__limit__x3A__validate">
-                                <xsl:with-param name="yValue" select="$min"/>
-                                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX" select="$offsetX"/>
-                                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY" select="$offsetY"/>
-                                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.height" select="$system_cache__dita__x3A__svg:cursor.current.height"/>
-                                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.min" select="$min"/>
-                                <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.Y" select="$system_cache__dita__x3A__svg:cursor.current.Y"/>
-                                <xsl:with-param name="yscale" select="$scale"/>
-                                <xsl:with-param name="system_cache__dita__x3A__svg:transform.cursor" select="$system_cache__dita__x3A__svg:transform.cursor"/>
-                            </xsl:call-template>
-                        </xsl:attribute>-->
-                        
-                        <!--XXX<xsl:attribute name="transform.validate.y2">
-                            <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.major__x3A__height__x3A__limit__x3A__validate">
-                                <xsl:with-param name="yValue" select="$max"/>
-                                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX" select="$offsetX"/>
-                                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY" select="$offsetY"/>
-                                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.height" select="$system_cache__dita__x3A__svg:cursor.current.height"/>
-                                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.min" select="$min"/>
-                                <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.Y" select="$system_cache__dita__x3A__svg:cursor.current.Y"/>
-                                
-                                <xsl:with-param name="yscale" select="$scale"/>
-                                <xsl:with-param name="system_cache__dita__x3A__svg:transform.cursor" select="$system_cache__dita__x3A__svg:transform.cursor"/>
-                            </xsl:call-template>
-                        </xsl:attribute>-->
-                        <xsl:attribute name="style">
-                            <xsl:call-template name="yAxisStyle">
-                                <!--<xsl:with-param name="context" select="$context"/>-->
-                            </xsl:call-template>
-                        </xsl:attribute>
-                    </svg:line>
+                    
                     <xsl:comment>#246 call ticks with $yMajor1=$min <xsl:value-of select="$minY"/>; 
                         
                             
                         </xsl:comment>
-                    <!--DDD<xsl:call-template name="svgu:ticks">
-                        <xsl:with-param name="xMajor1" select="-$majorLeftExtent"/>
-                        <xsl:with-param name="yMajor1" select="$min"/>
-                        <xsl:with-param name="xMajor2" select="$majorRightExtent"/>
-                        <xsl:with-param name="yMajor2" select="$min"/>
-                        <xsl:with-param name="labelMajor" select="$labelMajor"/>
-                        <xsl:with-param name="freq" select="$minorTicks"/>
-                        <xsl:with-param name="xMinor1" select="-$minorLeftExtent"/>
-                        <xsl:with-param name="yMinor1" select="$min"/>
-                        <xsl:with-param name="xMinor2" select="$minorRightExtent"/>
-                        <xsl:with-param name="yMinor2" select="$min"/>
-                        <xsl:with-param name="nTicks" 
-                            select="$majorTicks * $minorTicks + 1"/>
-                        <xsl:with-param name="yIncr" 
-                            select="($max - $min) div ($majorTicks * $minorTicks)"/>
-                        <xsl:with-param name="scale" select="1 div $scale"/>
-                        <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.Y" select="$system_cache__dita__x3A__svg:cursor.current.Y"/>
-                        <xsl:with-param name="system_cache__dita__x3A__svg:transform.cursor" select="$system_cache__dita__x3A__svg:transform.cursor"/>
-                    </xsl:call-template>-->
+                         <xsl:choose>
+                             <xsl:when test="$system_cache__dita__x3A__svg:resolution.coordinate.block = system_cache__dita__x3A__svg:resolution.coordinate.region(system_cache__dita__x3A__svg:resolution.coordinate.region.start())">
+                                
+                                 <svg:line debug="system_cache__dita__x3A__svg:yAxis.6174 1sc" 
+                                     x1="{$maxX}"
+                                     y1="{$minY}"
+                                     x2="{$maxX}" 
+                                     y2="{$maxY}">     
+                                     <xsl:attribute name="style">
+                                         <xsl:call-template name="yAxisStyle">
+                                             <!--<xsl:with-param name="context" select="$context"/>-->
+                                         </xsl:call-template>
+                                     </xsl:attribute>
+                                 </svg:line>
+                                 <xsl:call-template name="system_cache__dita__x3A__svg:ticks">
+                                     <xsl:with-param name="xMajor1" select="$maxX * 0.7"/>
+                                     <xsl:with-param name="yMajor1" select="$minY"/>
+                                     <xsl:with-param name="xMajor2" select="$maxX"/>
+                                     <xsl:with-param name="yMajor2" select="$minY"/>
+                                     <xsl:with-param name="labelMajor" select="$labelMajor"/>
+                                     <xsl:with-param name="freq" select="$minorTicks"/>
+                                     <xsl:with-param name="xMinor1" select="$maxX * 0.9"/>
+                                     <xsl:with-param name="yMinor1" select="$minX"/>
+                                     <xsl:with-param name="xMinor2" select="$maxX"/>
+                                     <xsl:with-param name="yMinor2" select="$minY"/>
+                                     <xsl:with-param name="nTicks"    select="$majorTicks * $minorTicks + 1"/>
+                                     <xsl:with-param name="yIncr"  select="($maxY - $minY) div ($majorTicks * $minorTicks)"/>
+                                     <xsl:with-param name="scale" select="1 div $scaleY"/>
+                                     <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"  select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>                        <!-- $system_cache__dita__x3A__svg:cursor.current.Y -->
+                                     <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"  select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                                     <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length"  select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length"/>                        
+                                     
+                                     <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"  select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>                        <!-- $system_cache__dita__x3A__svg:cursor.current.Y -->
+                                     <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"  select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+                                     <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length"  select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length"/>
+                                     
+                                 </xsl:call-template>
+                             </xsl:when>
+                             <xsl:otherwise>
+                                 <svg:line debug="system_cache__dita__x3A__svg:yAxis.6174 1sc" 
+                                     x1="{$minX}"
+                                     y1="{$minY}"
+                                     x2="{$minX}" 
+                                     y2="{$maxY}">     
+                                     <xsl:attribute name="style">
+                                         <xsl:call-template name="yAxisStyle">
+                                             <!--<xsl:with-param name="context" select="$context"/>-->
+                                         </xsl:call-template>
+                                     </xsl:attribute>
+                                 </svg:line>
+                                 <xsl:call-template name="system_cache__dita__x3A__svg:ticks">
+                                     <xsl:with-param name="xMajor1" select="$minX"/>
+                                     <xsl:with-param name="yMajor1" select="$minY"/>
+                                     <xsl:with-param name="xMajor2" select="$maxX * 0.7"/>
+                                     <xsl:with-param name="yMajor2" select="$minY"/>
+                                     <xsl:with-param name="labelMajor" select="$labelMajor"/>
+                                     <xsl:with-param name="freq" select="$minorTicks"/>
+                                     <xsl:with-param name="xMinor1" select="$minX"/>
+                                     <xsl:with-param name="yMinor1" select="$minX"/>
+                                     <xsl:with-param name="xMinor2" select="$maxX * 0.1"/>
+                                     <xsl:with-param name="yMinor2" select="$minY"/>
+                                     <xsl:with-param name="nTicks"    select="$majorTicks * $minorTicks + 1"/>
+                                     <xsl:with-param name="yIncr"  select="($maxY - $minY) div ($majorTicks * $minorTicks)"/>
+                                     <xsl:with-param name="scale" select="1 div $scaleY"/>
+                                     <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"  select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>                        <!-- $system_cache__dita__x3A__svg:cursor.current.Y -->
+                                     <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"  select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                                     <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length"  select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length"/>                        
+                                     
+                                     <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"  select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>                        <!-- $system_cache__dita__x3A__svg:cursor.current.Y -->
+                                     <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"  select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+                                     <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length"  select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length"/>
+                                     
+                                 </xsl:call-template>
+                             </xsl:otherwise>
+                         </xsl:choose>
+                    
                 </svg:g>
                 
             </xsl:when>
             <xsl:otherwise>
-                <xsl:comment>#254aaa not set all Xmax etc, to plot axis...
-                number($system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate[<xsl:value-of select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>]) and
-                    number($system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate[<xsl:value-of select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>]) and
-                    number($system_cache__dita__x3A__svg:cursor.current.height[<xsl:value-of select="$system_cache__dita__x3A__svg:height - $system_cache__dita__x3A__svg:cursor.current.height "/>]) and 
-                    number(system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor))[<xsl:value-of select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)"/>]
-                    $minY = <xsl:value-of select="$minY"/>
-                    $maxY = <xsl:value-of select="$maxY"/>
-                </xsl:comment>
-                <xsl:message>#254aaa not set all Xmax etc, to plot axis...
-                    number($system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate[<xsl:value-of select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>]) and
-                    number($system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate[<xsl:value-of select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>]) and
-                    number($system_cache__dita__x3A__svg:cursor.current.height[<xsl:value-of select="$system_cache__dita__x3A__svg:cursor.current.height"/>]) and 
-                    number(system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor))[<xsl:value-of select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)"/>]
-                    
-                </xsl:message>
-                <TEST_APPEND_335>
-                    <!--<xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds">
-                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="1"/>
-                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="1"/>
-                        
-                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$minY"/>
-                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$maxY"/>
-                        
-                        
-                        <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
-                        <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
-                        
-                        <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
-                        <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
-                        
-                        
-                        
-                        
-                    </xsl:call-template>-->
-                </TEST_APPEND_335>
+             <xsl:comment>#196 error with
+             
+             est="1=1 and 
+                number($system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate)[<xsl:value-of select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>] and 
+                number($system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate)[<xsl:value-of select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>] and 
+                number($system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate)[<xsl:value-of select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>] and
+                number($system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate)[<xsl:value-of select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>]
+                
+             </xsl:comment>   
+                
+                
             </xsl:otherwise>
         </xsl:choose>
         

+ 2 - 2
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.bar.test.svg

@@ -4,8 +4,8 @@
 <svg:svg xmlns:svg="http://www.w3.org/2000/svg"
          xmlns:test="http://www.ora.com/XSLTCookbook/ns/test"
          xmlns:system_cache__dita__x3A__svg="http://biuro.biall-net.pl/WPS_Functions/system_cache__dita__x3A__p5gnuplot/system_cache__dita__x3A__svg.xsd"
-         width="800"
-         height="800">
+         width="11100"
+         height="11800">
    <svg:g xmlns:emath="http://www.exslt.org/math"
           transform="translate(50,25)                  translate(150,175)                  rotate(-180)                  translate(-150,-175)">
       <svg:rect x="0"

+ 370 - 1
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.bar.xsl

@@ -19,6 +19,375 @@
     </xsl:template>
     
     
+    
+    <xsl:template mode="system_cache__dita__x3A__svg:bars" match="*">
+        <!--<xsl:param name="system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal" />-->
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.id"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.block"/>
+        <xsl:param name="system_cache__dita__x3A__svg:cursor"/>
+        
+        <xsl:param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" required="yes" /><!-- select="500" -->
+        
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" required="yes" />
+        
+        
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.name" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.value" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.label" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.name" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.value" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x.label" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x.name" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x.name.value" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x.value" />
+        
+        
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate + $system_cache__dita__x3A__svg:offsetX.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate - $system_cache__dita__x3A__svg:offsetY.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length - ( 2 * $system_cache__dita__x3A__svg:offsetY.default )"/>
+        
+        
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate + $system_cache__dita__x3A__svg:offsetY.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate - $system_cache__dita__x3A__svg:offsetY.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length - ( 2 * $system_cache__dita__x3A__svg:offsetY.default )"/>
+        
+        <!--<xsl:variable name="dataX">
+            <xsl:copy-of select="descendant-or-self::*[ @*[ name()=$system_cache__dita__x3A__svg:data.x.name and . = $system_cache__dita__x3A__svg:data.x.name.value]]/@*[ name() = $system_cache__dita__x3A__svg:data.x.value]"/>
+        </xsl:variable>-->
+        <!--<xsl:variable name="dataY">
+            <xsl:copy-of select="descendant-or-self::*[ @*[ name()=$system_cache__dita__x3A__svg:data.x.name and . = $system_cache__dita__x3A__svg:data.x.name.value]]/@*[ name() = $system_cache__dita__x3A__svg:data.y1.value]"/>
+        </xsl:variable>-->
+        <!--system_cache__dita__x3A__svg:apply-template.mode="system_cache__dita__x3A__svg:bars"
+        system_cache__dita__x3A__svg:apply-template.select.param="system_cache__dita__x3A__svg:data__x3A__assign"
+        system_cache__dita__x3A__svg:data.y1.name="system_cache__dita__x3A__svg:data.x.BI_audit_ENERGA_RUM_UMOWY.leadingTimeYear-month.value"
+        system_cache__dita__x3A__svg:data.y1.value="default_db__x3A__BI_audit_BENFORD:CostField.sum"
+        system_cache__dita__x3A__svg:data.y1.label="system_cache__dita__x3A__svg:data.y1.label"
+        system_cache__dita__x3A__svg:data.x.label="system_cache__dita__x3A__svg:data.y.BI_audit_ENERGA_RUM_UMOWY.current-grouping-key"
+        system_cache__dita__x3A__svg:data.x.name="system_cache__dita__x3A__svg:data.y.BI_audit_ENERGA_RUM_UMOWY.data.name"
+        system_cache__dita__x3A__svg:data.x.name.value="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object"
+        system_cache__dita__x3A__svg:data.x.value="system_cache__dita__x3A__svg:data.x.BI_audit_ENERGA_RUM_UMOWY.leadingTimeYear-month.valueY"/>-->
+        
+            <xsl:comment>#58 mode="system_cache__dita__x3A__svg:bars" todo </xsl:comment>
+            <xsl:choose>
+                <xsl:when test="descendant-or-self::*[ @*[ name()=$system_cache__dita__x3A__svg:data.x.name and . = $system_cache__dita__x3A__svg:data.x.name.value]]/@*[ name() = $system_cache__dita__x3A__svg:data.y1.value]">
+                    <xsl:call-template name="system_cache__dita__x3A__svg:bars">
+                        <!--<xsl:with-param name="system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal" select="true()" tunnel="yes"/>-->
+                        <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.id" select="$system_cache__dita__x3A__svg:resolution.coordinate.id"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.block" select="$system_cache__dita__x3A__svg:resolution.coordinate.block"/>
+                        <!--<xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>-->
+                        
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" />
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" />
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length" /><!-- select="500" -->
+                        
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" />
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" />
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length" />
+                        <xsl:with-param name="dataY" select="descendant-or-self::*[ @*[ name()=$system_cache__dita__x3A__svg:data.x.name and . = $system_cache__dita__x3A__svg:data.x.name.value]]/@*[ name() = $system_cache__dita__x3A__svg:data.y1.value]"/>
+                        <xsl:with-param name="dataX" select="descendant-or-self::*[ @*[ name()=$system_cache__dita__x3A__svg:data.x.name and . = $system_cache__dita__x3A__svg:data.x.name.value]]/@*[ name() = $system_cache__dita__x3A__svg:data.x.value]"/>
+                        
+                    </xsl:call-template>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:comment>E95 empty set for descendant-or-self::*[ @*[ name()=$system_cache__dita__x3A__svg:data.x.name and . = $system_cache__dita__x3A__svg:data.x.name.value]]/@*[ name() = $system_cache__dita__x3A__svg:data.y1.value] </xsl:comment>
+                    <copy_97_debug>
+                        <xsl:copy-of select="descendant-or-self::*[ @*[ name()=$system_cache__dita__x3A__svg:data.x.name and . = $system_cache__dita__x3A__svg:data.x.name.value]]/@*[ name() = $system_cache__dita__x3A__svg:data.y1.value]"></xsl:copy-of>
+                    </copy_97_debug>
+                </xsl:otherwise>
+            </xsl:choose>
+            
+            
+        
+        
+        
+        
+    </xsl:template>
+    
+    
+    <xsl:template name="system_cache__dita__x3A__svg:bars">
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.block" required="no"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.id" required="no"/>
+        <!--<xsl:param name="dataX" required="yes" />--> <!-- x values select="/.." -->
+        <xsl:param name="dataY" required="yes" /><!-- select="/.." -->
+        <xsl:param name="context" select="'bars_context_unset'"/>
+        <xsl:param name="dataX"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" required="yes" /><!-- select="500" -->
+        
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" required="yes" />
+        
+        <!--<xsl:param name="height"  required="yes"/>--><!-- select="500" -->
+        <xsl:param name="boundingBox" select="false( )"/>
+        <xsl:param name="barLabel" select="false( )"/>
+        <xsl:param name="system_cache__dita__x3A__svg:colors" select="$system_cache__dita__x3A__svg:colors.default"></xsl:param>
+        
+        <xsl:param name="minX" >
+            <xsl:choose>
+                <xsl:when test="$dataX">
+                    <xsl:call-template name="system_cache__dita__x3A__svg:emath.min">
+                        <xsl:with-param name="nodes" select="$dataX"/>
+                    </xsl:call-template>
+                </xsl:when>
+                <xsl:otherwise><xsl:value-of select="0"/></xsl:otherwise>
+            </xsl:choose>
+        </xsl:param>
+        
+            
+        
+        
+        <xsl:param name="minY" select="0">
+            <!--<xsl:call-template name="system_cache__dita__x3A__svg:emath.min">
+                <xsl:with-param name="nodes" select="$dataY"/>
+            </xsl:call-template>-->
+        </xsl:param>
+        
+        
+        
+        <xsl:param name="barWidth" select="5"/>
+        
+        <xsl:param name="orientation" select="0"/>
+        
+        
+        
+            
+        
+        
+        <!--<xsl:param name="maxX" select="count($dataY)"/>-->
+            
+        
+        <xsl:param name="maxX" >
+            <xsl:choose>
+                <xsl:when test="$dataX">
+                    <xsl:call-template name="system_cache__dita__x3A__svg:emath.max">
+                        <xsl:with-param name="nodes" select="$dataX"/>
+                    </xsl:call-template>
+                </xsl:when>
+                <xsl:otherwise><xsl:value-of select="(number($system_cache__dita__x3A__svg:data.x2.bounds.max.length) div (count($dataY) + 1)) * count($dataY)"/></xsl:otherwise>
+            </xsl:choose>
+            
+        </xsl:param>
+        
+        <!--<xsl:variable name="Yrange" select="$maxY - $minY"/>-->
+        
+     
+        
+        <xsl:param name="maxY">
+            <xsl:call-template name="system_cache__dita__x3A__svg:emath.max">
+                <xsl:with-param name="nodes" select="$dataY"/>
+            </xsl:call-template>
+        </xsl:param>
+        
+        
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate + $system_cache__dita__x3A__svg:offsetX.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate - $system_cache__dita__x3A__svg:offsetY.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length - ( 2 * $system_cache__dita__x3A__svg:offsetY.default )"/>
+        
+        
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate + $system_cache__dita__x3A__svg:offsetY.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate - $system_cache__dita__x3A__svg:offsetY.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length - ( 2 * $system_cache__dita__x3A__svg:offsetY.default )"/>
+        
+        <!--<xsl:variable name="Yrange" select="$maxY - $minY"/>-->
+        
+        <!--<xsl:param name="barWidth" select="5"/>--> 
+        <xsl:variable name="numBars" select="count($dataY)"/>
+        <xsl:variable name="spacing" select="number($system_cache__dita__x3A__svg:data.x2.bounds.max.length) div (count($dataY) + 1)"/><!-- select="$width div ($numBars + 1)" -->
+        <xsl:variable name="xScale">
+            <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__extract__scale">
+                <xsl:with-param name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__extract__scale.x" select="true()"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$minX"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$maxX"/>
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$minY"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$maxY"/>
+                
+            </xsl:call-template>
+        </xsl:variable>
+        <xsl:variable name="barWidth" select="$barWidth div $xScale"/>
+        
+        <xsl:comment>
+            #184 $numBars = <xsl:value-of select="$numBars"/>
+                $maxY = <xsl:value-of select="$maxY"/> ;  $minY = <xsl:value-of select="$minY"/> ; 
+                $maxX = <xsl:value-of select="$maxX"/>  ; $minX = <xsl:value-of select="$minX"/> ;
+                $dataY[1]/n = <xsl:value-of select="$dataY[1]/name()"/> /v =<xsl:value-of select="$dataY[1]"/>
+                $barWidth = <xsl:value-of select="$barWidth"/> - propos <xsl:value-of select="$barWidth div $xScale"/>
+                $spacing = <xsl:value-of select="$spacing"/>  ; $numBars = <xsl:value-of select="$numBars"/>
+                $xScale = <xsl:value-of select="$xScale"/>
+                <xsl:choose>
+                    <xsl:when test="count($dataY) = count($dataX)">
+                        test="count($dataY) = count($dataX)" = OK
+                    </xsl:when>
+                    <xsl:otherwise>
+                         test="count($dataY) = count($dataX)" = FAILED
+                    </xsl:otherwise>
+                </xsl:choose>
+            
+                <xsl:for-each select="$dataX[position() &lt; 10]">
+                    pos[<xsl:value-of select="position()"/>] = <xsl:value-of select="."/> [<xsl:value-of select="current()"/>]
+                </xsl:for-each>
+        </xsl:comment>
+        
+        
+        <!-- select="$width div ($numBars + 1)" -->
+        
+        
+        <xsl:if test="number($system_cache__dita__x3A__svg:debug.level) &gt; 10">
+            <svg:path debug="svgu:xyPlot.bars 75"
+                d="M {$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate},{$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate} 
+                L {$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate},{$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate} 
+                L {$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate},{$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate} 
+                L {$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate},{$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate}
+                L {$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate},{$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate}
+                "
+                style="fill: none; stroke: red; stroke-width:1; vector-effect:non-scaling-stroke;"/>
+        </xsl:if>
+        
+        <xsl:if test="$boundingBox">
+            
+        </xsl:if>
+        <!-- We change the data order to compensate for rotation -->
+        <!-- See sort below -->
+        <xsl:variable name="data-order">
+            <xsl:choose>
+                <xsl:when test="number($orientation) mod 360 >= 180">ascending</xsl:when>
+                <xsl:otherwise>descending</xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable> 
+        
+        
+        
+        
+        <svg:g 
+            debug="svgu:bars.63  $maxY={$maxY} $width={$system_cache__dita__x3A__svg:data.x2.bounds.max.length} cursor.current.height={$system_cache__dita__x3A__svg:data.y2.bounds.max.length} "
+            >
+            <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds">
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$minX"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$maxX"/>
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$minY"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$maxY"/>
+                
+            </xsl:call-template>
+            <!-- transform="translate({$offsetX},{$offsetY}) 
+            translate({number($width) div 2},{number($system_cache__dita__x3A__svg:cursor.current.height) div 2}) 
+            rotate({number($orientation) - 180}) 
+            translate({-number($width) div 2},{-number($system_cache__dita__x3A__svg:cursor.current.height) div 2}) 
+            scale(1,-{number($system_cache__dita__x3A__svg:cursor.current.height) div $maxY})" -->
+            <xsl:for-each select="$dataY">
+                <!-- We use a sort on position to traverse the data in reverse -->
+                <!-- when necessary. -->
+                <!--<xsl:sort select="position( )" data-type="number" 
+                    order="{$data-order}"/>-->
+                
+                <xsl:variable name="pos" select="position( )"/>
+                <xsl:variable name="x1Value">
+                    <xsl:choose>
+                        <xsl:when test="$dataX and count($dataY) = count($dataX)">
+                            <xsl:value-of select="$dataX[$pos]"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:value-of select="$spacing * $pos"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:variable>
+                <xsl:variable name="x2Value">
+                    <xsl:choose>
+                        <xsl:when test="$dataX and count($dataY) = count($dataX)">
+                            <xsl:value-of select="$dataX[$pos] "/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:value-of select="$spacing * $pos"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:variable>
+                
+                
+                
+                
+                <svg:line x1="{$x1Value}"  debug="svgu:bars.115"
+                    y1="0" 
+                    x2="{$x2Value}"  
+                    y2="{current( )}" id="{$system_cache__dita__x3A__svg:resolution.coordinate.block}_bar_{$pos}">
+                    <xsl:attribute name="style">
+                        <xsl:value-of      select="concat('stroke-width: ',$barWidth,'; ')"/>
+                        <xsl:call-template name="svgu:barStyle">
+                            <xsl:with-param name="pos" select="$pos"/>
+                            <!--<xsl:with-param name="context" select="$context"/>-->
+                            <xsl:with-param name="system_cache__dita__x3A__svg:colors" select="$system_cache__dita__x3A__svg:colors" tunnel="yes"/>
+                        </xsl:call-template>
+                    </xsl:attribute>    
+                    <xsl:attribute name="transform.validate.y.{current( )}">
+                        <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug">
+                            <xsl:with-param name="yValue" select="current( )"/>
+                            <xsl:with-param name="xValue" select="$x1Value"/>
+                            <xsl:with-param name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug.write" select="true()"/>
+                            <xsl:with-param name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug.x" select="true()"/>
+                            <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$minX"/>
+                            <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$maxX"/>
+                            
+                            
+                            <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                            <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                            
+                            <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length"/>
+                            
+                            <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$minY"/>
+                            <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$maxY"/>
+                            <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length"/>
+                            
+                            <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                            <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+                        </xsl:call-template>
+                    </xsl:attribute>
+                </svg:line>  
+                
+                <!-- If user requests bar labels we position a text value -->
+                <!-- of the data point above the bar. The complex series of     -->   
+                <!-- transformations is used to make the text display correctly -->
+                <!-- despite the rotations and scalings to the coordinate system -->
+                <xsl:if test="$barLabel">
+                    <svg:text x="{number($pos)}" 
+                        y="{number(current( )) * (number($system_cache__dita__x3A__svg:data.y2.bounds.max.length) div number($maxY))}" 
+                        transform="scale(1,{number($maxY) div number($system_cache__dita__x3A__svg:data.y2.bounds.max.length)}) 
+                        translate(0,10) 
+                        translate({number($pos)},{current( ) * 
+                        (number($system_cache__dita__x3A__svg:data.y2.bounds.max.length) div number($maxY))}) 
+                        rotate({180 - number($orientation)}) 
+                        translate({- number($pos)},
+                        {-current( ) * (number($system_cache__dita__x3A__svg:data.y2.bounds.max.length) div number($maxY))})"
+                        id="{$context}_barLabel_{$pos}">
+                        <xsl:attribute name="style">
+                            <xsl:call-template name="svgu:barLabelStyle">
+                                <xsl:with-param name="pos" select="$pos"/>
+                                <xsl:with-param name="context" select="$context"/>
+                            </xsl:call-template>
+                        </xsl:attribute>         
+                        <xsl:value-of select="."/>
+                    </svg:text>
+                </xsl:if>        
+            </xsl:for-each>
+        </svg:g>
+        
+    </xsl:template>
+    
+    
     <xsl:template name="svgu:bars">
         <xsl:param name="data" required="yes" />  <!--select="/.." data to chart -->
         <xsl:param name="width" required="yes"/>
@@ -190,7 +559,7 @@
         <xsl:variable name="colors" select="$system_cache__dita__x3A__svg:colors//svgu:color"/>
         <xsl:value-of 
             select="concat('stroke: ',$colors[(number($pos) - 1 ) mod count($colors) 
-            + 1])"/>
+            + 1])"/><!--<xsl:text> vector-effect:non-scaling-stroke; </xsl:text>-->
     </xsl:template>
     
     <xsl:template name="svgu:barLabelStyle">

File diff suppressed because it is too large
+ 1027 - 149
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.complex.test.svg


+ 336 - 203
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.complex.test.xsl

@@ -69,14 +69,14 @@
     
     <xsl:variable name="system_cache__dita__x3A__svg:offsetY" select="10"/>
     <xsl:variable name="system_cache__dita__x3A__svg:width" select="600"/>
-    <xsl:variable name="system_cache__dita__x3A__svg:height" select="500 +
+    <xsl:variable name="system_cache__dita__x3A__svg:height" select="600 +
         $system_cache__dita__x3A__svg:offsetY + 
         $system_cache__dita__x3A__svg:title.font-size.default +
         $system_cache__dita__x3A__svg:shortdesc.font-size.default +
         $system_cache__dita__x3A__svg:vheight"/>
     <xsl:variable name="system_cache__dita__x3A__svg:pwidth" select="500"/>
-    <xsl:variable name="system_cache__dita__x3A__svg:pheight" select="500"/>
-    <xsl:variable name="system_cache__dita__x3A__svg:offsetX" select="system_cache__dita__x3A__svg:offsetX($system_cache__dita__x3A__svg:width,$system_cache__dita__x3A__svg:pwidth)"/>
+    <!--<xsl:variable name="system_cache__dita__x3A__svg:pheight" select="500"/>-->
+    <!--<xsl:variable name="system_cache__dita__x3A__svg:offsetX" select="system_cache__dita__x3A__svg:offsetX($system_cache__dita__x3A__svg:width,$system_cache__dita__x3A__svg:pwidth)"/>-->
     
     
     <xsl:variable name="system_cache__dita__x3A__svg:dataMin">
@@ -102,9 +102,9 @@
     
     
     
-    <xsl:variable name="DEVEL_FLAG_YAXIS_TOP_LEFT_90" select="0"/>
-    <xsl:variable name="DEVEL_FLAG_HI_LOW_FROM_POWIAZANIA" select="0"/>
-    <xsl:variable name="DEVEL_FLAG_HI_LOW_FROM_POWIAZANIA.TEMP_GEM" select="0"/>
+    <xsl:variable name="DEVEL_FLAG_YAXIS_TOP_LEFT_90" select="1"/>
+    <xsl:variable name="DEVEL_FLAG_HI_LOW_FROM_POWIAZANIA" select="1"/>
+    <xsl:variable name="DEVEL_FLAG_HI_LOW_FROM_POWIAZANIA.TEMP_GEM" select="1"/>
     
     
     <xsl:template match="/">
@@ -150,7 +150,7 @@
                         $system_cache__dita__x3A__svg:title.font-size.default = <xsl:value-of select="$system_cache__dita__x3A__svg:title.font-size.default"/>
                     </xsl:comment>
                     
-                  <xsl:copy-of select="$system_cache__dita__x3A__svg:cursor"/>                  
+                                    
             
             <xsl:message>#155 test co jest zle $system_cache__dita__x3A__svg:width=[<xsl:value-of select="$system_cache__dita__x3A__svg:width"/>];
                  
@@ -179,12 +179,12 @@
                                  <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
                              </xsl:call-template>
                          </xsl:variable>   
-                        <xsl:call-template name="system_cache__dita__x3A__svg:default.param.plot">
+                        <!--<xsl:call-template name="system_cache__dita__x3A__svg:default.param.plot">
                             <xsl:with-param name="color">blue</xsl:with-param>
                             <xsl:with-param name="system_cache__dita__x3A__svg:width" select="$system_cache__dita__x3A__svg:width"/>
                             <xsl:with-param name="system_cache__dita__x3A__svg:height" select="$system_cache__dita__x3A__svg:cursor.current.height"/>
                             <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.Y" select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)"/>
-                        </xsl:call-template>
+                        </xsl:call-template>-->
             
                             <svg:text hash="#171" x="{$system_cache__dita__x3A__svg:width div 2}" y="{system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor) + $system_cache__dita__x3A__svg:cursor.current.height }"  
                                                     style="text-anchor:middle; font-size:{$system_cache__dita__x3A__svg:shortdesc.font-size.default}">od do</svg:text><!-- 4 * $system_cache__dita__x3A__svg:offsetY -->
@@ -199,7 +199,7 @@
                         <svg:g debug="#278fo:block-container  region-name- hi-lo-chart-grou">
                             
                             
-                       <xsl:copy-of select="$system_cache__dita__x3A__svg:cursor"/>
+                       
                        
                             
                             <xsl:comment> #361-BEFORE-COMMIT_CURSOR svgu:xyPlot 118
@@ -214,123 +214,62 @@
                                     <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
                                     <xsl:with-param name="id" select="system_cache__dita__x3A__svg:resolution.coordinate.block.horizontal-time-activity()"/>
                                     <!--<xsl:with-param name="system_cache__dita__x3A__svg:next.neighbor.bottom.id"/>-->
-                                    <xsl:with-param name="system_cache__dita__x3A__svg:increment" select="$system_cache__dita__x3A__svg:pheight"/>
+                                    <xsl:with-param name="system_cache__dita__x3A__svg:increment" select="$system_cache__dita__x3A__svg:resolution.coordinate.block.horizontal-time-activity.height"/>
                                     <xsl:with-param name="comment">#225 after volumes force by $system_cache__dita__x3A__svg:pheight; in this time current.Y(<xsl:value-of select="$system_cache__dita__x3A__svg:cursor.current.height"/>) and current.height(<xsl:value-of select="$system_cache__dita__x3A__svg:cursor.current.height"/>)</xsl:with-param>
                                     <xsl:with-param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:height" tunnel="yes"/>
-                                    <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.body.instream-foreign-object.dataX" select="'//dataX'" tunnel="yes"/>
-                                    <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.body.instream-foreign-object.dataY" select="'//Vol10MA'" tunnel="yes"/>
-                                    <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.start.extent" select="10" tunnel="yes"/>
+                                    <!--<xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.body.instream-foreign-object.Xdata" select="'dataX'" tunnel="yes"/>
+                                    <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.body.instream-foreign-object.Ydata" select="'Vol10MA'" tunnel="yes"/>
+                                    <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.body.instream-foreign-object.template" select="'system_cache__dita__x3A__svg:xyPlot'" tunnel="yes"/>
+                                    --><xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.start.extent" select="40" tunnel="yes"/>
                                     <!--<xsl:with-param name=""></xsl:with-param>-->
                                 </xsl:call-template>
                             </xsl:variable>
-                            <xsl:variable name="system_cache__dita__x3A__svg:cursor.current.width">
-                                <xsl:call-template name="system_cache__dita__x3A__svg:cursor.current.width">
+                            
+                            
+                            <xsl:variable name="system_cache__dita__x3A__svg:cursor">
+                                <xsl:call-template name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object">
                                     <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                                    <xsl:with-param name="id" select="system_cache__dita__x3A__svg:resolution.coordinate.block.horizontal-time-activity()"/>
+                                    <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.region" select="system_cache__dita__x3A__svg:resolution.coordinate.region(system_cache__dita__x3A__svg:resolution.coordinate.region.start())"/>
+                                    
+                                    <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Ydata" select="'Close'" />
+                                    <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.template" select="'system_cache__dita__x3A__svg:yAxis'" />
+                                    <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.labelMajor" select="true()"  tunnel="yes"/>
+                                    
+                                    <!--<xsl:with-param name=""></xsl:with-param>-->
                                 </xsl:call-template>
                             </xsl:variable>
-                            <xsl:variable name="system_cache__dita__x3A__svg:cursor.current.height">
-                                <xsl:call-template name="system_cache__dita__x3A__svg:cursor.current.height">
-                                    <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
-                                </xsl:call-template>
-                            </xsl:variable>   
-                            <xsl:comment> #361-AFTER-COMMIT_CURSOR svgu:xyPlot 118
-                                #237B $system_cache__dita__x3A__svg:cursor/*/*/n = <xsl:value-of select="$system_cache__dita__x3A__svg:cursor//*/name()"/>
-                            $system_cache__dita__x3A__svg:cursor.current.height = <xsl:value-of select="$system_cache__dita__x3A__svg:cursor.current.height"/>
-                                $system_cache__dita__x3A__svg:cursor.current.width = <xsl:value-of select="$system_cache__dita__x3A__svg:cursor.current.width"/>
-                            $system_cache__dita__x3A__svg:cursor.current.Y = <xsl:value-of select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)"/>
-                            </xsl:comment>
                             
-                            <xsl:copy-of select="$system_cache__dita__x3A__svg:cursor"></xsl:copy-of>
                         
+                            <xsl:comment>#248 after add system_cache__dita__x3A__svg:esolution.coordinate.region.body</xsl:comment>
+                            
                         
+                            
                             <!--<xsl:variable name="system_cache__dita__x3A__svg:cursor.current.Y" select="573"/>--><!-- system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor) -->
                         <!--    <xsl:variable name="system_cache__dita__x3A__svg:cursor.current.Y" select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)"/>
                             <xsl:variable name="system_cache__dita__x3A__svg:cursor.current.height" select="system_cache__dita__x3A__svg:cursor.current.height($system_cache__dita__x3A__svg:cursor) "/><!-\- system_cache__dita__x3A__svg:cursor.current.height($system_cache__dita__x3A__svg:cursor) -\->
                        -->    
-                            <xsl:call-template name="system_cache__dita__x3A__svg:default.param.plot">
+                            <!--<xsl:call-template name="system_cache__dita__x3A__svg:default.param.plot">
                                 <xsl:with-param name="color">yellow</xsl:with-param>
                                 <xsl:with-param name="system_cache__dita__x3A__svg:width" select="$system_cache__dita__x3A__svg:width"/>
                                 <xsl:with-param name="system_cache__dita__x3A__svg:height" select="$system_cache__dita__x3A__svg:cursor.current.height"/>
                                 <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.Y" select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)"/>
-                            </xsl:call-template>
+                            </xsl:call-template>-->
                             
-                            <!--<xsl:choose>
-                                <xsl:when test="system_cache__dita__x3A__svg:cursor.current.height($system_cache__dita__x3A__svg:cursor) = 100">
-                                    <xsl:comment>#305 OK test="system_cache__dita__x3A__svg:cursor.current.height($system_cache__dita__x3A__svg:cursor) = 100" </xsl:comment>
-                                </xsl:when>
-                                <xsl:otherwise>
-                                    <xsl:comment>#305 ERROR test="system_cache__dita__x3A__svg:cursor.current.height($system_cache__dita__x3A__svg:cursor)[<xsl:value-of select="system_cache__dita__x3A__svg:cursor.current.height($system_cache__dita__x3A__svg:cursor)"/>] NOT = 100" </xsl:comment>
-                                </xsl:otherwise>
-                            </xsl:choose>-->
                             
                             
-                        <!--<xsl:comment>#235 $system_cache__dita__x3A__svg:cursor.current.Y=<xsl:value-of select="$system_cache__dita__x3A__svg:cursor.current.Y"/></xsl:comment>-->
-                        
-                            <!--<xsl:copy-of select="$system_cache__dita__x3A__svg:cursor"/>-->
-                            <xsl:comment> #361 svgu:xyPlot 118
-                                $system_cache__dita__x3A__svg:cursor.current.height = <xsl:value-of select="$system_cache__dita__x3A__svg:cursor.current.height"/>
-                                $system_cache__dita__x3A__svg:cursor.current.Y = <xsl:value-of select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)"/>
-                                $spacing="<xsl:value-of select="$system_cache__dita__x3A__svg:spacing"/>
-                                $system_cache__dita__x3A__svg:offsetX = <xsl:value-of select="$system_cache__dita__x3A__svg:offsetX"/>
-                                $system_cache__dita__x3A__svg:offsetY = <xsl:value-of select="$system_cache__dita__x3A__svg:offsetY"/>
-                                "</xsl:comment>
-                        <!-- This is to make the line plot start on first bar and end on last bar -->  
-                        <!--<xsl:variable name="spacing" select="$pwidth div count(*/row/High) + 1"/>-->
-                        <!--<xsl:copy-of select="$system_cache__dita__x3A__svg:cursor"/>-->
-                        <xsl:call-template name="svgu:xyPlot">
-                            <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.block" select="system_cache__dita__x3A__svg:resolution.coordinate.block.horizontal-time-activity()"/>
-                            <xsl:with-param name="dataX" select="//dataX"/>
-                            <xsl:with-param name="dataY" select="//Vol10MA"/>  
-                            <xsl:with-param name="width" select="$system_cache__dita__x3A__svg:width"/><!-- $system_cache__dita__x3A__svg:pwidth - 2 * $system_cache__dita__x3A__svg:spacing -->
-                            <!--<xsl:with-param name="height" select="$system_cache__dita__x3A__svg:vheight"/>-->
-                            <xsl:with-param name="offsetX" select="$system_cache__dita__x3A__svg:offsetX + $system_cache__dita__x3A__svg:spacing"/>
-                            <xsl:with-param name="offsetY" select="$system_cache__dita__x3A__svg:offsetY"/><!-- $system_cache__dita__x3A__svg:pheight - $system_cache__dita__x3A__svg:offsetY -->
-                            <!--<xsl:with-param name="minY" select="$system_cache__dita__x3A__svg:min"/>-->
-                            <!--<xsl:with-param name="maxY" select="$system_cache__dita__x3A__svg:max"/>-->
-                            <!--<xsl:with-param name="system_cache__dita__x3A__svg:transform.cursor" select="$system_cache__dita__x3A__svg:transform.cursor"/>-->
-                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
-                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.height" select="$system_cache__dita__x3A__svg:cursor.current.height"/><!-- $system_cache__dita__x3A__svg:cursor.current.height -->
-                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.Y" select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)"/><!-- $system_cache__dita__x3A__svg:cursor.current.Y -->
-                            <xsl:with-param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:height" tunnel="yes" />
-                            <xsl:with-param name="system_cache__dita__x3A__svg:width__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:width" tunnel="yes" />
                             
-                        </xsl:call-template>
+                       
+                        
                        
                         
                         
-                      
-                            <!--<xsl:variable name="system_cache__dita__x3A__svg:cursor.current.Y" select="550"/>--><!-- system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor) -->
-                            <!--<xsl:variable name="system_cache__dita__x3A__svg:cursor.current.height" select="100"/>--><!-- system_cache__dita__x3A__svg:cursor.current.height($system_cache__dita__x3A__svg:cursor) -->
-                            
-                            <xsl:comment>#3227 svgu:bars 100 VOLUME 
-                                   domyslna wysokosc $system_cache__dita__x3A__svg:height=<xsl:value-of select="$system_cache__dita__x3A__svg:height"/>
-                                   $system_cache__d ita__x3A__svg:cursor.current.height() =<xsl:value-of select="$system_cache__dita__x3A__svg:cursor.current.height "/>;
-                                   system_cache__dita__x3A__svg:cursor.current.Y()=<xsl:value-of select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)"/> $offsetY=$system_cache__dita__x3A__svg:pheight(<xsl:value-of select="$system_cache__dita__x3A__svg:pheight"/>)-$system_cache__dita__x3A__svg:offsetY(<xsl:value-of select="$system_cache__dita__x3A__svg:offsetY"/>)
-                                    TEST_BOUNDS=<xsl:value-of select="$system_cache__dita__x3A__svg:height - $system_cache__dita__x3A__svg:cursor.current.height "/> - should be more than 0
-                            </xsl:comment>
-                            
                             
                             
                             
-                            <xsl:call-template name="svgu:bars">
-                                <xsl:with-param name="data" select="//Volume"/>
-                                <xsl:with-param name="width" select="$system_cache__dita__x3A__svg:width"/> 
-                                <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.height" select="$system_cache__dita__x3A__svg:cursor.current.height "/>
-                                <xsl:with-param name="orientation" select="0"/>
-                                <xsl:with-param name="offsetX" select="$system_cache__dita__x3A__svg:offsetX"/>
-                                <xsl:with-param name="offsetY" select="$system_cache__dita__x3A__svg:offsetY"/><!-- $system_cache__dita__x3A__svg:pheight - $system_cache__dita__x3A__svg:offsetY -->
-                                <xsl:with-param name="barLabel" select="false( )"/>
-                                <xsl:with-param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:height" tunnel="yes" />
-                                <xsl:with-param name="system_cache__dita__x3A__svg:width__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:width" tunnel="yes" />
-                                
-                                <!--<xsl:with-param name="min" select="$system_cache__dita__x3A__svg:min"/>-->
-                                <!--<xsl:with-param name="max" select="$system_cache__dita__x3A__svg:max"/>-->
-                                <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
-                                <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.Y" select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)"/>
-                            </xsl:call-template>
-                        
                         
                         
+                            
                         
                            
                         
@@ -341,132 +280,278 @@
                                     <!--XXX<xsl:variable name="system_cache__dita__x3A__svg:cursor.current.Y" select="73"/>--><!-- system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor) -->
                                     <!--<xsl:variable name="system_cache__dita__x3A__svg:cursor.current.height" select="500"/>--><!-- system_cache__dita__x3A__svg:cursor.current.height($system_cache__dita__x3A__svg:cursor) -->
                                     
+                                    <xsl:variable name="system_cache__dita__x3A__svg:cursor">
+                                        <xsl:call-template name="system_cache__dita__x3A__svg:cursor.commit">
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                                            <xsl:with-param name="id" select="system_cache__dita__x3A__svg:resolution.coordinate.block.hi-lo-chart-1()"/>
+                                            <!--<xsl:with-param name="system_cache__dita__x3A__svg:next.neighbor.bottom.id"/>-->
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:increment" select="$system_cache__dita__x3A__svg:resolution.coordinate.block.hi-lo-chart-1.height"/>
+                                            <xsl:with-param name="comment">#333 for data test analysis</xsl:with-param>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:height" tunnel="yes"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.start.extent" select="40" tunnel="yes"/>
+                                            <!--<xsl:with-param name=""></xsl:with-param>-->
+                                        </xsl:call-template>
+                                    </xsl:variable>
+                                    
+                                    
+                                    
+                                    
+                                    
+                                    <!--<xsl:variable name="system_cache__dita__x3A__svg:cursor.current.Y" select="550"/>--><!-- system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor) -->
+                                    <!--<xsl:variable name="system_cache__dita__x3A__svg:cursor.current.height" select="100"/>--><!-- system_cache__dita__x3A__svg:cursor.current.height($system_cache__dita__x3A__svg:cursor) -->
+                                    
+                                    <xsl:comment>#3227 svgu:bars 100 VOLUME 
+                                   domyslna wysokosc $system_cache__dita__x3A__svg:height=<xsl:value-of select="$system_cache__dita__x3A__svg:height"/>
+                                   $system_cache__d ita__x3A__svg:cursor.current.height() =<xsl:value-of select="$system_cache__dita__x3A__svg:cursor.current.height "/>;
+                                   
+                                    TEST_BOUNDS=<xsl:value-of select="$system_cache__dita__x3A__svg:height - $system_cache__dita__x3A__svg:cursor.current.height "/> - should be more than 0
+                            </xsl:comment>
+                                    
+                                    
+                                    
                                     
-                                    <xsl:comment>#453 cursor.commit('system_cache__dita__x3A__svg:pheight')</xsl:comment>
+                                    <xsl:variable name="system_cache__dita__x3A__svg:cursor">
+                                        <xsl:call-template name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object">
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                                            <xsl:with-param name="id" select="system_cache__dita__x3A__svg:resolution.coordinate.block.hi-lo-chart-1()"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.region" select="system_cache__dita__x3A__svg:resolution.coordinate.region(system_cache__dita__x3A__svg:resolution.coordinate.region.start())"/>
+                                            
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Ydata" select="'Close'" />
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.template" select="'system_cache__dita__x3A__svg:yAxis'" />
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.labelMajor" select="true()"  tunnel="yes"/>
+                                            
+                                            <!--<xsl:with-param name=""></xsl:with-param>-->
+                                        </xsl:call-template>
+                                    </xsl:variable>
+                                    
+                                    
+                                    
+                                    <xsl:variable name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__free_space__x3A__extract">
+                                        <xsl:call-template name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__free_space__x3A__extract">
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.block" select="system_cache__dita__x3A__svg:resolution.coordinate.block.horizontal-time-activity()"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.region" select="system_cache__dita__x3A__svg:resolution.coordinate.region(system_cache__dita__x3A__svg:resolution.coordinate.region.body())"/>
+                                        </xsl:call-template>
+                                    </xsl:variable>
+                                    
+                                    <xsl:comment>#453 $system_cache__dita__x3A__svg:height__x3A__limit__x3A__free_space__x3A__extract = <xsl:value-of select="$system_cache__dita__x3A__svg:height__x3A__limit__x3A__free_space__x3A__extract"/> -  </xsl:comment>
                                     <xsl:variable name="system_cache__dita__x3A__svg:cursor">
                                         <xsl:call-template name="system_cache__dita__x3A__svg:cursor.commit">
                                             <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
                                             <xsl:with-param name="id" select="system_cache__dita__x3A__svg:resolution.coordinate.block.total-volume()"/>
-                                            <xsl:with-param name="system_cache__dita__x3A__svg:increment" select="$system_cache__dita__x3A__svg:height - ( system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor) + $system_cache__dita__x3A__svg:cursor.current.height ) "/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:increment" select="$system_cache__dita__x3A__svg:height__x3A__limit__x3A__free_space__x3A__extract"/><!-- $system_cache__dita__x3A__svg:height - ( system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor) + $system_cache__dita__x3A__svg:cursor.current.height )  -->
                                             <xsl:with-param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:height" tunnel="yes"/>
                                             <xsl:with-param name="comment">#174 after series of graph, lower graph for volumes system_cache__dita__x3A__svg:resolution.coordinate.block.total-volume</xsl:with-param>
                                             <!--<xsl:with-param name="nextY.height" select="$system_cache__dita__x3A__svg:vheight"/>-->
-                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.end.extent" select="10" tunnel="yes"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.start.extent" select="40" tunnel="yes"/>
+                                            
+                                        </xsl:call-template>
+                                    </xsl:variable>
+                                    <xsl:variable name="system_cache__dita__x3A__svg:cursor">
+                                        <xsl:call-template name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object">
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                                            <xsl:with-param name="id" select="system_cache__dita__x3A__svg:resolution.coordinate.block.total-volume()"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.region">system_cache__dita__x3A__svg:esolution.coordinate.region.body</xsl:with-param>
+                                            <!--<xsl:with-param name="system_cache__dita__x3A__svg:next.neighbor.bottom.id"/>-->
+                                            
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Xdata" select="'dataX'" />
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Ydata" select="'Vol10MA'" />
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.template" select="'system_cache__dita__x3A__svg:xyPlot'" />
+                                            
+                                            <!--<xsl:with-param name=""></xsl:with-param>-->
+                                        </xsl:call-template>
+                                    </xsl:variable>
+                                    <xsl:variable name="system_cache__dita__x3A__svg:cursor">
+                                        <xsl:call-template name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object">
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                                            <xsl:with-param name="id" select="system_cache__dita__x3A__svg:resolution.coordinate.block.total-volume()"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.region">system_cache__dita__x3A__svg:esolution.coordinate.region.body</xsl:with-param>
+                                                                                       
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Ydata" select="'Volume'" />
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.template" select="'system_cache__dita__x3A__svg:bars'" />
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.labelMajor" select="true()"  tunnel="yes"/>
+                                            <!--<xsl:with-param name=""></xsl:with-param>-->
                                         </xsl:call-template>
                                     </xsl:variable>
-                                    
                                     
                                     <xsl:comment>#2227svgu:yAxis 90 gorna lewa os, razem z poziomicami ktore szly za szeroko
                                             system_cache__dita__x3A__svg:cursor.current.height($system_cache__dita__x3A__svg:cursor) = <xsl:value-of select="$system_cache__dita__x3A__svg:cursor.current.height"/>
                                             system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)  = <xsl:value-of select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor) "/>
                                     </xsl:comment>
-                                    <xsl:copy-of select="$system_cache__dita__x3A__svg:cursor"></xsl:copy-of>
                                     
                                     
+                                 
                                     
-                                    <xsl:call-template name="system_cache__dita__x3A__svg:yAxis">
-                                       <!-- <xsl:with-param name="offsetX" select="$system_cache__dita__x3A__svg:offsetX"/>
-                                        <xsl:with-param name="offsetY" select="$system_cache__dita__x3A__svg:offsetY"/>
-                                        <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.height" select="system_cache__dita__x3A__svg:cursor.current.height($system_cache__dita__x3A__svg:cursor)"/>-->
-                                        <!--<xsl:with-param name="height" select="$system_cache__dita__x3A__svg:cursor.current.height"/>--><!-- $system_cache__dita__x3A__svg:pheight -->
-                                        <!--<xsl:with-param name="minY" select="$system_cache__dita__x3A__svg:min"/>
-                                        <xsl:with-param name="maxY" select="$system_cache__dita__x3A__svg:max"/>-->
-                                        <xsl:with-param name="Ydata" select="//Volume"/>
-                                        <xsl:with-param name="labelMajor" select="true()"/>
-                                        <xsl:with-param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:height" tunnel="yes" />
-                                        <xsl:with-param name="system_cache__dita__x3A__svg:width__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:width" tunnel="yes" />
-                                        
-                                        <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
-                                        
-                                        <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.block" select="system_cache__dita__x3A__svg:resolution.coordinate.block.total-volume()"/>
-                                        <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.region"  select="system_cache__dita__x3A__svg:resolution.coordinate.region(system_cache__dita__x3A__svg:resolution.coordinate.region.end())" />
-                                    </xsl:call-template>
+                                    <xsl:variable name="system_cache__dita__x3A__svg:cursor">
+                                        <xsl:call-template name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object">
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                                            <xsl:with-param name="id" select="system_cache__dita__x3A__svg:resolution.coordinate.block.total-volume()"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.region" select="system_cache__dita__x3A__svg:resolution.coordinate.region(system_cache__dita__x3A__svg:resolution.coordinate.region.start())"/>
+                                            
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Ydata" select="'Volume'" />
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.template" select="'system_cache__dita__x3A__svg:yAxis'" />
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.labelMajor" select="true()"  tunnel="yes"/>
+                                            
+                                            <!--<xsl:with-param name=""></xsl:with-param>-->
+                                        </xsl:call-template>
+                                    </xsl:variable>
                                     
-                                    <xsl:comment>#400 svgu:yAxis 130 mala skala po prawej na dole 
-                                $system_cache__dita__x3A__svg:cursor.current.Y=<xsl:value-of select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)"/>
-                                
-                                
-                            </xsl:comment>
-                                    <!--<xsl:call-template name="system_cache__dita__x3A__svg:yAxis">
-                                        <!-\-<xsl:with-param name="offsetX" select="$system_cache__dita__x3A__svg:width - $system_cache__dita__x3A__svg:offsetX"/>
-                                <xsl:with-param name="offsetY" select="$system_cache__dita__x3A__svg:offsetY"/><!-\\- $system_cache__dita__x3A__svg:height - $system_cache__dita__x3A__svg:vheight - $system_cache__dita__x3A__svg:offsetY -\\->
-                                <xsl:with-param name="width" select="$system_cache__dita__x3A__svg:width"/>
-                                <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.height" select="system_cache__dita__x3A__svg:cursor.current.height($system_cache__dita__x3A__svg:cursor) "/>-\->
-                                        <!-\-<xsl:with-param name="height" select="system_cache__dita__x3A__svg:cursor.current.height($system_cache__dita__x3A__svg:cursor) "/>-\->
-                                        <xsl:with-param name="minY" select="0"/>
-                                        <xsl:with-param name="maxY" select="10000"/>
-                                        <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.block" select="system_cache__dita__x3A__svg:resolution.coordinate.block.total-volume()"/>
-                                        <!-\-<xsl:with-param name="context" select=" 'volume' "/>-\->
-                                        <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
-                                        <!-\-<xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.Y" select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)"/>-\->
-                                        <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.region" select="system_cache__dita__x3A__svg:resolution.coordinate.region(system_cache__dita__x3A__svg:resolution.coordinate.region.end())"/>
-                                    </xsl:call-template>-->
                                     
-                                   
                                     
-                                </xsl:when>
-                                <xsl:otherwise>
-                                    <xsl:comment>#90 $DEVEL_FLAG_YAXIS_TOP_LEFT_90 disabled</xsl:comment>
-                                </xsl:otherwise>
-                            </xsl:choose>
-                            
-                            <xsl:choose>
-                                <xsl:when test="$DEVEL_FLAG_HI_LOW_FROM_POWIAZANIA.TEMP_GEM">
+                                    
+                                                
+                                    
                                     <xsl:comment>#280 $DEVEL_FLAG_HI_LOW_FROM_POWIAZANIA.TEMP_GEM</xsl:comment>
-                                    <xsl:call-template name="svgu:openHiLoClose">
-                                        <xsl:with-param name="openData" select="//Open"/>            
-                                        <xsl:with-param name="hiData" select="//High"/>            
-                                        <xsl:with-param name="loData" select="//Low"/>            
-                                        <xsl:with-param name="closeData" select="//Close"/>
-                                        
-                                        <!--<xsl:with-param name="min" />--><!-- select="$system_cache__dita__x3A__svg:min" -->
-                                        <!--<xsl:with-param name="max" />--><!-- select="$system_cache__dita__x3A__svg:max" -->
-                                        <xsl:with-param name="width" select="$system_cache__dita__x3A__svg:width"/> 
-                                        <xsl:with-param name="height" select="$system_cache__dita__x3A__svg:pheight"/>
-                                        <xsl:with-param name="offsetX" select="$system_cache__dita__x3A__svg:offsetX"/>
-                                        <xsl:with-param name="offsetY" select="$system_cache__dita__x3A__svg:offsetY"/>
-                                        <xsl:with-param name="boundingBox" select="1"/>
+                                    
+                                    <xsl:comment>svgu:openHiLoClose 76</xsl:comment>
+                                    <!--<system_cache__dita__x3A__svg:data.current-group system_cache__dita__x3A__svg:data.name="BI_audit_ENERGA_PRACOWNICY"
+                                        system_cache__dita__x3A__svg:data.id="BI_audit_ENERGA_PRACOWNICY.65424"
+                                        system_cache__dita__x3A__svg:data.position="1"
+                                        system_cache__dita__x3A__svg:data.x1.id="BI_audit_ENERGA_PRACOWNICY.65424"><!-\-#156 todo was call-template name="system_cache__dita__x3A__svg:cursor.commit-\->
+                                        <system_cache__dita__x3A__svg:leadingTimeDate system_cache__dita__x3A__svg:data.name="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object"
+                                            system_cache__dita__x3A__svg:data.id="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object.29827477"
+                                            system_cache__dita__x3A__svg:data.position="1"
+                                            system_cache__dita__x3A__svg:data.x1.id="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object.29827477"><!-\-#156 todo was call-template name="system_cache__dita__x3A__svg:cursor.commit-\-><!-\-#27 bypassed n/BI_audit_KRS-\-><!-\-#27 bypassed n/relation_from-\->
+                                            <relation_DateRangeElements xmlns:ogr="http://ogr.maptools.org/"
+                                                xmlns:default_db="https://biuro.biall-net.pl/wfs/default_db"
+                                                xmlns:p5="https://biuro.biall-net.pl/wfs"
+                                                xmlns:get_wfs="http://biuro.biall-net.pl/WPS_Functions/get_wfs/get_wfs.xsd"
+                                                xmlns:default_db__x3A__BI_audit_VALIDATE="https://biuro.biall-net.pl/wfs/default_db/BI_audit_VALIDATE"
+                                                xmlns:default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA="https://biuro.biall-net.pl/wfs/default_db/ENERGA_RUM_KONTRAHENCI_POWIAZANIA"
+                                                system_cache__dita__x3A__svg:data.y1.name="leadingTimeDate-From"
+                                                system_cache__dita__x3A__svg:data.y1.value="733227"
+                                                system_cache__dita__x3A__svg:data.y1.label="2008-10-07"
+                                                system_cache__dita__x3A__svg:data.y2.name="leadingTimeDate-To"
+                                                system_cache__dita__x3A__svg:data.y2.value="735327"
+                                                system_cache__dita__x3A__svg:data.y2.label="2014-07-07"/>
+                                            <!-\-#44 lower context apply template/upper select for-each-group-context-\->
+                                        </system_cache__dita__x3A__svg:leadingTimeDate>-->
+                                    <xsl:variable name="system_cache__dita__x3A__svg:cursor">
+                                        <xsl:call-template name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object">
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                                            <xsl:with-param name="id" select="system_cache__dita__x3A__svg:resolution.coordinate.block.hi-lo-chart-1()"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.region">system_cache__dita__x3A__svg:esolution.coordinate.region.body</xsl:with-param>
+                                            
+                                            <!--<xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Ydata" select="'Volume'" />-->
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.template" select="'system_cache__dita__x3A__svg:openHiLoClose'" />
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.labelMajor" select="true()"  />
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.openData" select="'Open'"/>            
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.hiData" select="'High'"/>            
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.loData" select="'Low'"/>            
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.closeData" select="'Close'"/>
+                                            <!--<xsl:with-param name=""></xsl:with-param>-->
+                                        </xsl:call-template>
+                                    </xsl:variable>
+                                    
+                                    
+                                    <!--<xsl:variable name="system_cache__dita__x3A__svg:cursor">
+                                        <xsl:call-template name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object">
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                                            <xsl:with-param name="id" select="system_cache__dita__x3A__svg:resolution.coordinate.block.horizontal-time-activity()"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.region">system_cache__dita__x3A__svg:esolution.coordinate.region.body</xsl:with-param>
+                                            
+                                            <!-\-<xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Ydata" select="'Volume'" />-\->
+                                            
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.apply-template.mode" select="'system_cache__dita__x3A__svg:openHiLoClose'" />
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.apply-template.select.param" select="'system_cache__dita__x3A__svg:data__x3A__assign'" />
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.labelMajor" select="true()"  />
+                                            <!-\-<xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.openData" select="'Open'"/>-\->            
+                                           
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.name" select="'system_cache__dita__x3A__svg:data.y1.name'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.value" select="'system_cache__dita__x3A__svg:data.y1.value'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.label" select="'system_cache__dita__x3A__svg:data.y1.label'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.name" select="'system_cache__dita__x3A__svg:data.y2.name'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.value" select="'system_cache__dita__x3A__svg:data.y2.value'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.x.label" select="'system_cache__dita__x3A__svg:data.y2.label'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.x.name" select="'system_cache__dita__x3A__svg:data.name'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.x.name.value" select="'BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.x.value" select="'system_cache__dita__x3A__svg:data.position'"/>
+                                            
+                                            
+                                            <!-\-<xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.closeData" select="'Close'"/>-\->
+                                            <!-\-<xsl:with-param name=""></xsl:with-param>-\->
+                                        </xsl:call-template>
+                                    </xsl:variable>-->
+                                    
+                                    
+                                    <xsl:variable name="system_cache__dita__x3A__svg:cursor">
+                                        <xsl:call-template name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object">
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                                            <xsl:with-param name="id" select="system_cache__dita__x3A__svg:resolution.coordinate.block.horizontal-time-activity()"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.region">system_cache__dita__x3A__svg:esolution.coordinate.region.body</xsl:with-param>
+                                            
+                                            <!--<xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Ydata" select="'Volume'" />-->
+                                            
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.apply-template.mode" select="'system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal'" />
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.apply-template.select.param" select="'system_cache__dita__x3A__svg:data__x3A__assign'" />
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.labelMajor" select="true()"  />
+                                            <!--<xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.openData" select="'Open'"/>-->            
+                                            
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.name" select="'system_cache__dita__x3A__svg:data.y1.name'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.value" select="'system_cache__dita__x3A__svg:data.y1.value'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.label" select="'system_cache__dita__x3A__svg:data.y1.label'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.name" select="'system_cache__dita__x3A__svg:data.y2.name'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.value" select="'system_cache__dita__x3A__svg:data.y2.value'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.x.label" select="'system_cache__dita__x3A__svg:data.y2.label'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.x.name" select="'system_cache__dita__x3A__svg:data.name'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.x.name.value" select="'BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.x.value" select="'system_cache__dita__x3A__svg:data.position'"/>
+                                            
+                                            
+                                            <!--<xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.closeData" select="'Close'"/>-->
+                                            <!--<xsl:with-param name=""></xsl:with-param>-->
+                                        </xsl:call-template>
+                                    </xsl:variable>
+                                    
+                                    
+                                    <xsl:variable name="system_cache__dita__x3A__svg:cursor">
+                                        <xsl:call-template name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object">
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                                            <xsl:with-param name="id" select="system_cache__dita__x3A__svg:resolution.coordinate.block.total-volume()"/>
+                                           
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.region">system_cache__dita__x3A__svg:esolution.coordinate.region.body</xsl:with-param>
+                                            
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Ydata" select="'Volume'" />
+                                            
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.labelMajor" select="true()"  tunnel="yes"/>
+                                            
+                                            
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.apply-template.mode" select="'system_cache__dita__x3A__svg:bars'" />
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.apply-template.select.param" select="'system_cache__dita__x3A__svg:data__x3A__assign'" />
+                                            
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.name" select="'system_cache__dita__x3A__svg:data.x.BI_audit_ENERGA_RUM_UMOWY.leadingTimeYear-month.value'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.value" select="'default_db__x3A__BI_audit_BENFORD:CostField.sum'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.label" select="'system_cache__dita__x3A__svg:data.y1.label'"/>
+                                           <!-- <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.name" select="'system_cache__dita__x3A__svg:data.y2.name'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.value" select="'system_cache__dita__x3A__svg:data.y2.value'"/>-->
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.x.label" select="'system_cache__dita__x3A__svg:data.y.BI_audit_ENERGA_RUM_UMOWY.current-grouping-key'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.x.name" select="'system_cache__dita__x3A__svg:data.y.BI_audit_ENERGA_RUM_UMOWY.data.name'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.x.name.value" select="'BI_audit_ENERGA_RUM_UMOWY'"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:data.x.value" select="'system_cache__dita__x3A__svg:data.x.BI_audit_ENERGA_RUM_UMOWY.leadingTimeYear-month.value'"/>
+
+                                            <!--<xsl:with-param name=""></xsl:with-param>-->
+                                        </xsl:call-template>
+                                    </xsl:variable>
+                                    
+                                    <xsl:copy-of select="$system_cache__dita__x3A__svg:cursor"></xsl:copy-of>
+                                    
+                                    <!--<xsl:comment>#174 applying for powiazania rows lower</xsl:comment>-->  
+                                    <xsl:variable name="system_cache__dita__x3A__svg:data__x3A__assign">
+                                        <xsl:apply-templates mode="system_cache__dita__x3A__svg:data__x3A__assign" select="doc('file:/opt/local/pl.procesy5/p5build_SE/temp/WPS_Functions/default_db/CRM_PROCES_tree/relations-1415_000001/interested_row.xml')">
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                                        </xsl:apply-templates>
+                                    </xsl:variable>
+                                    
+                                    <xsl:call-template name="system_cache__dita__x3A__svg:cursor.region.plot">
                                         <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
-                                        <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.Y" select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)"/>
-                                        <xsl:with-param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:height" tunnel="yes" />
-                                        <xsl:with-param name="system_cache__dita__x3A__svg:width__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:width" tunnel="yes" />
-                                        
+                                        <xsl:with-param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:height" tunnel="yes"/>
+                                        <xsl:with-param name="system_cache__dita__x3A__svg:width__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:width" tunnel="yes"/>
+                                        <!--<xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.region">system_cache__dita__x3A__svg:esolution.coordinate.region.body</xsl:with-param>-->
+                                        <!--<xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.region.position" select="1"/>-->
+                                        <!--<xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.id" select="system_cache__dita__x3A__svg:resolution.coordinate.block.horizontal-time-activity()"/>-->
+                                        <xsl:with-param name="system_cache__dita__x3A__svg:data__x3A__assign" select="$system_cache__dita__x3A__svg:data__x3A__assign" tunnel="yes"/>
                                     </xsl:call-template>
-                                </xsl:when>
-                                <xsl:otherwise>
-                                    <xsl:comment>#280 $DEVEL_FLAG_HI_LOW_FROM_POWIAZANIA.TEMP_GEM disabled</xsl:comment>
-                                </xsl:otherwise>
-                            </xsl:choose>
-                            
-                            
-                            
-                            <xsl:comment>svgu:openHiLoClose 76</xsl:comment>
-                            
-                            <!--<xsl:variable name="interested_row.relations-1415_000001" select="doc('file:/opt/local/pl.procesy5/p5build_SE/temp/WPS_Functions/default_db/CRM_PROCES_tree/relations-1415_000001/interested_row.xml')"/>-->
-                            
-                            
-                            <!--<xsl:copy-of select="$system_cache__dita__x3A__svg:cursor"/>-->
-                            
-                            <!--<xsl:comment>#174 applying for powiazania rows lower</xsl:comment>-->  
-                            <xsl:variable name="system_cache__dita__x3A__svg:data__x3A__assign">
-                                <xsl:apply-templates mode="system_cache__dita__x3A__svg:data__x3A__assign" select="doc('file:/opt/local/pl.procesy5/p5build_SE/temp/WPS_Functions/default_db/CRM_PROCES_tree/relations-1415_000001/interested_row.xml')">
-                                    <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
-                                </xsl:apply-templates>
-                            </xsl:variable>
-                            <!--<xsl:for-each select="$interested_row.relations-1415_000001/descendant-or-self::BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row">-->
-                            <!-- pierw kowalscy jak powiazani-->
-                            
-                            <!-- pierw umowy na dol -->
-                            <!--</xsl:for-each>-->
-                            
-                            <xsl:comment>#250 TODO POSSIBLE COPY copy-of select="$system_cache__dita__x3A__svg:data__x3A__assig to uncomment - context</xsl:comment>
-                            <!--<xsl:copy-of select="$system_cache__dita__x3A__svg:data__x3A__assign"/>-->
-                            
-                            
-                            
-                            
-                            <xsl:choose>
-                                <xsl:when test="$DEVEL_FLAG_HI_LOW_FROM_POWIAZANIA">
+                                    
                                     
                                     <xsl:comment>#1186 lower applying powiazania for hi low ( + $system_cache__dita__x3A__svg:height == <xsl:value-of select="$system_cache__dita__x3A__svg:height"/>)
                                     
@@ -476,7 +561,21 @@
                                         test manu <xsl:copy-of select="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[@system_cache__dita__x3A__svg:height__x3A__limit][1]//@system_cache__dita__x3A__svg:height__x3A__limit"/>
                                         system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate () <xsl:value-of select="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate($system_cache__dita__x3A__svg:cursor,system_cache__dita__x3A__svg:height__x3A__limit__x3A__extract($system_cache__dita__x3A__svg:cursor),$system_cache__dita__x3A__svg:cursor.current.height )"/>
                                     </xsl:comment>
-                                    <xsl:copy-of select="$system_cache__dita__x3A__svg:cursor"></xsl:copy-of>
+                                    
+                                    
+                                    
+                                    <!--<xsl:variable name="interested_row.relations-1415_000001" select="doc('file:/opt/local/pl.procesy5/p5build_SE/temp/WPS_Functions/default_db/CRM_PROCES_tree/relations-1415_000001/interested_row.xml')"/>-->
+                                    
+                                    
+                                    <!--<xsl:copy-of select="$system_cache__dita__x3A__svg:cursor"/>-->
+                                    
+                                   
+                                    <!--<xsl:for-each select="$interested_row.relations-1415_000001/descendant-or-self::BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row">-->
+                                    <!-- pierw kowalscy jak powiazani-->
+                                    
+                                    <!-- pierw umowy na dol -->
+                                    <!--</xsl:for-each>-->
+                                    
                                     <!--<xsl:apply-templates mode="system_cache__dita__x3A__svg:openHiLoClose" select="$system_cache__dita__x3A__svg:data__x3A__assign">
                                         <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
                                         
@@ -485,17 +584,51 @@
                                         
                                     </xsl:apply-templates>-->
                                     
-                                    <xsl:comment>#1186-B EOF lower applying powiazania for hi low
+                                    <xsl:comment>#250 TODO POSSIBLE COPY copy-of select="$system_cache__dita__x3A__svg:data__x3A__assig to uncomment - context</xsl:comment>
+                                    <xsl:copy-of select="$system_cache__dita__x3A__svg:data__x3A__assign" copy-namespaces="yes"/>
+                                    
+                                    
+                                    
+                                    
+                                    <xsl:choose>
+                                        <xsl:when test="$DEVEL_FLAG_HI_LOW_FROM_POWIAZANIA">
+                                            
+                                            
+                                            
+                                            
+                                            
+                                            <xsl:comment>#1186-B EOF lower applying powiazania for hi low
                                  call to debug svg:g debug="svgu:openHiLoClose.x51"
                                  </xsl:comment>
-                                    
-                                    <xsl:comment>#310 task svg:g debug="svgu:openHiLoClose.3175</xsl:comment>
+                                            
+                                            <xsl:comment>#310 task svg:g debug="svgu:openHiLoClose.3175</xsl:comment>
+                                            
+                                        </xsl:when>
+                                        <xsl:otherwise>
+                                            <xsl:comment>#299 $DEVEL_FLAG_HI_LOW_FROM_POWIAZANIA  <xsl:value-of select="$DEVEL_FLAG_HI_LOW_FROM_POWIAZANIA"/></xsl:comment>
+                                        </xsl:otherwise>
+                                    </xsl:choose>
+                                   
                                     
                                 </xsl:when>
                                 <xsl:otherwise>
-                                    <xsl:comment>#299 $DEVEL_FLAG_HI_LOW_FROM_POWIAZANIA  <xsl:value-of select="$DEVEL_FLAG_HI_LOW_FROM_POWIAZANIA"/></xsl:comment>
+                                    <xsl:comment>#90 $DEVEL_FLAG_YAXIS_TOP_LEFT_90 disabled</xsl:comment>
                                 </xsl:otherwise>
                             </xsl:choose>
+                            
+                            <xsl:choose>
+                                <xsl:when test="$DEVEL_FLAG_HI_LOW_FROM_POWIAZANIA.TEMP_GEM">
+                                   
+                                </xsl:when>
+                                <xsl:otherwise>
+                                    <xsl:comment>#280 $DEVEL_FLAG_HI_LOW_FROM_POWIAZANIA.TEMP_GEM disabled</xsl:comment>
+                                </xsl:otherwise>
+                            </xsl:choose>
+                            
+                            
+                            
+                            
+                         
                         
                         </svg:g>
             

+ 190 - 1
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.xy.xsl

@@ -7,7 +7,196 @@
     xmlns:system_cache__dita__x3A__svg="http://biuro.biall-net.pl/WPS_Functions/system_cache__dita__x3A__p5gnuplot/system_cache__dita__x3A__svg.xsd"
     exclude-result-prefixes="svgu test">
     
-    
+    <xsl:template name="system_cache__dita__x3A__svg:xyPlot">
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.block" required="no"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.id"/>
+        <xsl:param name="dataX" required="yes" /> <!-- x values select="/.." -->
+        <xsl:param name="dataY" required="yes" /><!-- select="/.." -->
+       
+       
+        <xsl:param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" required="yes" /><!-- select="500" -->
+        
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" required="yes" />
+        
+        <!--<xsl:param name="height"  required="yes"/>--><!-- select="500" -->
+        <xsl:param name="boundingBox" select="false( )"/>
+         
+        
+        <xsl:param name="minX">
+            <xsl:call-template name="system_cache__dita__x3A__svg:emath.min">
+                <xsl:with-param name="nodes" select="$dataX"/>
+            </xsl:call-template>
+        </xsl:param>
+        
+        <xsl:param name="maxX">
+            <xsl:call-template name="system_cache__dita__x3A__svg:emath.max">
+                <xsl:with-param name="nodes" select="$dataX"/>
+            </xsl:call-template>
+        </xsl:param>
+        
+        <xsl:param name="minY">
+            <xsl:call-template name="system_cache__dita__x3A__svg:emath.min">
+                <xsl:with-param name="nodes" select="$dataY"/>
+            </xsl:call-template>
+        </xsl:param>
+        
+        <xsl:param name="maxY">
+            <xsl:call-template name="system_cache__dita__x3A__svg:emath.max">
+                <xsl:with-param name="nodes" select="$dataY"/>
+            </xsl:call-template>
+        </xsl:param>
+        
+        
+      
+        
+        <xsl:param name="system_cache__dita__x3A__svg:transform.cursor" />
+        
+        
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate + $system_cache__dita__x3A__svg:offsetX.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate - $system_cache__dita__x3A__svg:offsetY.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length - ( 2 * $system_cache__dita__x3A__svg:offsetY.default )"/>
+        
+        
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate + $system_cache__dita__x3A__svg:offsetY.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate - $system_cache__dita__x3A__svg:offsetY.default "/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length - ( 2 * $system_cache__dita__x3A__svg:offsetY.default )"/>
+        
+        
+        <xsl:if test="number($system_cache__dita__x3A__svg:debug.level) &gt; 10">
+            <svg:path debug="svgu:xyPlot.bounds"
+                d="M {$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate},{$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate} 
+                L {$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate},{$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate} 
+                L {$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate},{$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate} 
+                L {$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate},{$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate}
+                L {$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate},{$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate}
+                "
+                style="fill: none; stroke: red; stroke-width:1; vector-effect:non-scaling-stroke;"/>
+        </xsl:if>
+        
+        
+        <!-- transform=" translate(217.66666666666666,10)  translate(0,100)  scale(250,-0.0125)  translate(0,-4445)  translate(-500,0) " -->
+        <svg:path debug="svgu:xyPlot.48A $maxX={$maxX} $maxY={$maxY} width={$system_cache__dita__x3A__svg:data.x2.bounds.max.length}  ">
+            
+            <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds">
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$minX"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$maxX"/>
+                
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$minY"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$maxY"/>
+                
+            </xsl:call-template>
+            <xsl:attribute name="d">
+                <xsl:for-each select="$dataX">
+                    <xsl:variable name="pos" select="position( )"/>
+                    <xsl:variable name="x" select="current( ) "/>
+                    <xsl:variable name="y" select="$dataY[$pos]"/>
+                    <xsl:choose>
+                        <xsl:when test="$pos = 1">
+                            <xsl:text>M </xsl:text>
+                        </xsl:when>
+                        <xsl:otherwise> L </xsl:otherwise>
+                    </xsl:choose>  
+                    <xsl:value-of select="$x"/>,<xsl:value-of select="$y"/>
+                </xsl:for-each>
+            </xsl:attribute>
+            <!--<xsl:attribute name="transform.validate.y.{$dataY[1]}">
+                <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__height__x3A__limit__x3A__validate">
+                    <xsl:with-param name="yValue" select="$dataY[1]"/>
+                    <xsl:with-param name="xValue" select="1"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$minX"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$maxX"/>
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length"/>
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$minY"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$maxY"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length"/>
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+                </xsl:call-template>
+            </xsl:attribute>-->
+            <xsl:attribute name="transform.validate.y.{$dataY[2]}">
+                <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__height__x3A__limit__x3A__validate">
+                    <xsl:with-param name="yValue" select="$dataY[2]"/>
+                    <xsl:with-param name="xValue" select="2"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$minX"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$maxX"/>
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length"/>
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$minY"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$maxY"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length"/>
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+                </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="transform.validate.y.{$dataY[3]}">
+                <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__height__x3A__limit__x3A__validate">
+                    <xsl:with-param name="yValue" select="$dataY[3]"/>
+                    <xsl:with-param name="xValue" select="3"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$minX"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$maxX"/>
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length"/>
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$minY"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$maxY"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length"/>
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+                </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="transform.validate.y.{$dataY[4]}">
+                <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__height__x3A__limit__x3A__validate">
+                    <xsl:with-param name="yValue" select="$dataY[4]"/>
+                    <xsl:with-param name="xValue" select="4"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$minX"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$maxX"/>
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length"/>
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$minY"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$maxY"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length"/>
+                    
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+                </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="style">
+                <xsl:call-template name="svgu:xyPlotStyle">
+                    <xsl:with-param name="scale" select="1"/><!-- $scale -->
+                    
+                </xsl:call-template>
+            </xsl:attribute>
+            
+        </svg:path>
+    </xsl:template>
     
     <xsl:template name="svgu:xyPlot">
         <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.block" required="yes"/>

+ 230 - 11
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.cursor.region.xsl

@@ -21,6 +21,11 @@
     <xsl:output indent="yes"/>
     <xsl:strip-space elements="*"/>
     
+    <xsl:include href="system_cache__dita__x3A__svg.utils.cursor.region.plot.xsl"/>
+    
+    
+    
+    
     
     <xsl:template name="system_cache__dita__x3A__svg:cursor.commit.region">
         <xsl:param name="system_cache__dita__x3A__svg:cursor.current.width"/>
@@ -53,23 +58,42 @@
                 <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data( system_cache__dita__x3A__svg:resolution.coordinate.axis.x(), system_cache__dita__x3A__svg:resolution.coordinate.index.1() ,system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.min.coordinate() )}" select="0"/>
                 <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data( system_cache__dita__x3A__svg:resolution.coordinate.axis.x(), system_cache__dita__x3A__svg:resolution.coordinate.index.2() ,system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.max.length() )}" select="$system_cache__dita__x3A__svg:cursor.commit.region.start.extent"/>
                 
-                
+              <!--  
                 <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data(system_cache__dita__x3A__svg:resolution.coordinate.axis.y(),
                     system_cache__dita__x3A__svg:resolution.coordinate.index.1(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.min.coordinate())}" select="system_cache__dita__x3A__svg:cursor.lastY__x3A__calculate($system_cache__dita__x3A__svg:cursor)+$system_cache__dita__x3A__svg:increment"/>
+                
                 <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data(system_cache__dita__x3A__svg:resolution.coordinate.axis.y(),
                     system_cache__dita__x3A__svg:resolution.coordinate.index.2(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.max.length())}" select="system_cache__dita__x3A__svg:cursor.lastY__x3A__calculate($system_cache__dita__x3A__svg:cursor)"/>
-                
+                <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data(system_cache__dita__x3A__svg:resolution.coordinate.axis.y(),
+                    system_cache__dita__x3A__svg:resolution.coordinate.index.2(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.max.coordinate())}" select="system_cache__dita__x3A__svg:cursor.lastY__x3A__calculate($system_cache__dita__x3A__svg:cursor)"/>
+                -->
+                <xsl:call-template name="system_cache__dita__x3A__svg:cursor.nextY__x3A__assign">
+                    <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:increment" select="$system_cache__dita__x3A__svg:increment"/>
+                </xsl:call-template>
+                <xsl:call-template name="system_cache__dita__x3A__svg:cursor.increment__x3A__assign">
+                    <xsl:with-param name="system_cache__dita__x3A__svg:increment" select="$system_cache__dita__x3A__svg:increment"/>
+                </xsl:call-template>
             </xsl:element>
             <xsl:element name="{system_cache__dita__x3A__svg:resolution.coordinate.region(system_cache__dita__x3A__svg:resolution.coordinate.region.body())}">
                 <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data( system_cache__dita__x3A__svg:resolution.coordinate.axis.x(), system_cache__dita__x3A__svg:resolution.coordinate.index.1() ,system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.min.coordinate() )}" select="$system_cache__dita__x3A__svg:cursor.commit.region.start.extent"/>
-                <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data( system_cache__dita__x3A__svg:resolution.coordinate.axis.x(), system_cache__dita__x3A__svg:resolution.coordinate.index.2() ,system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.max.coordinate() )}" select="number($system_cache__dita__x3A__svg:cursor.current.width) - number($system_cache__dita__x3A__svg:cursor.commit.region.start.extent)"/><!-- chyba domyslnie jest 0 poczatkiem na razie todo -->
+                <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data( system_cache__dita__x3A__svg:resolution.coordinate.axis.x(), system_cache__dita__x3A__svg:resolution.coordinate.index.2() ,system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.max.coordinate() )}" select="number($system_cache__dita__x3A__svg:cursor.current.width) "/><!-- -number($system_cache__dita__x3A__svg:cursor.commit.region.start.extent) chyba domyslnie jest 0 poczatkiem na razie todo -->
+                <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data( system_cache__dita__x3A__svg:resolution.coordinate.axis.x(), system_cache__dita__x3A__svg:resolution.coordinate.index.2() ,system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.max.length() )}" select="(number($system_cache__dita__x3A__svg:cursor.current.width) - number($system_cache__dita__x3A__svg:cursor.commit.region.start.extent)) "/>
                 
-                <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data(system_cache__dita__x3A__svg:resolution.coordinate.axis.y(),
+              <!--  <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data(system_cache__dita__x3A__svg:resolution.coordinate.axis.y(),
                     system_cache__dita__x3A__svg:resolution.coordinate.index.1(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.min.coordinate())}" select="system_cache__dita__x3A__svg:cursor.lastY__x3A__calculate($system_cache__dita__x3A__svg:cursor)+$system_cache__dita__x3A__svg:increment"/>
                 <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data(system_cache__dita__x3A__svg:resolution.coordinate.axis.y(),
                     system_cache__dita__x3A__svg:resolution.coordinate.index.2(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.max.length())}" select="system_cache__dita__x3A__svg:cursor.lastY__x3A__calculate($system_cache__dita__x3A__svg:cursor)"/>
+                -->
                 
-                
+                <xsl:call-template name="system_cache__dita__x3A__svg:cursor.nextY__x3A__assign">
+                    <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:increment" select="$system_cache__dita__x3A__svg:increment"/>
+                </xsl:call-template>
+                <xsl:call-template name="system_cache__dita__x3A__svg:cursor.increment__x3A__assign">
+                    <xsl:with-param name="system_cache__dita__x3A__svg:increment" select="$system_cache__dita__x3A__svg:increment"/>
+                </xsl:call-template>
+                <!--<xsl:call-template name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object"/>-->
             </xsl:element>
         </xsl:if>
         
@@ -85,30 +109,225 @@
                 <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.extent()}" select="$system_cache__dita__x3A__svg:cursor.commit.region.end.extent"/>
                 <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data( system_cache__dita__x3A__svg:resolution.coordinate.axis.x(), system_cache__dita__x3A__svg:resolution.coordinate.index.1() ,system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.min.coordinate() )}" select="number($system_cache__dita__x3A__svg:cursor.current.width) - number($system_cache__dita__x3A__svg:cursor.commit.region.end.extent)"/>
                 <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data( system_cache__dita__x3A__svg:resolution.coordinate.axis.x(), system_cache__dita__x3A__svg:resolution.coordinate.index.2() ,system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.max.coordinate() )}" select="$system_cache__dita__x3A__svg:cursor.current.width"/>
+                <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data( system_cache__dita__x3A__svg:resolution.coordinate.axis.x(), system_cache__dita__x3A__svg:resolution.coordinate.index.2() ,system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.max.length() )}" select="abs( $system_cache__dita__x3A__svg:cursor.current.width - number($system_cache__dita__x3A__svg:cursor.current.width) - number($system_cache__dita__x3A__svg:cursor.commit.region.end.extent))"/>
                 
-                <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data(system_cache__dita__x3A__svg:resolution.coordinate.axis.y(),
-                    system_cache__dita__x3A__svg:resolution.coordinate.index.1(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.min.coordinate())}" select="system_cache__dita__x3A__svg:cursor.lastY__x3A__calculate($system_cache__dita__x3A__svg:cursor)+$system_cache__dita__x3A__svg:increment"/>
+                <!--<xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data(system_cache__dita__x3A__svg:resolution.coordinate.axis.y(),
+                    system_cache__dita__x3A__svg:resolution.coordinate.index.1(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.min.coordinate())}" select="system_cache__dita__x3A__svg:cursor.lastY__x3A__calculate($system_cache__dita__x3A__svg:cursor)+$system_cache__dita__x3A__svg:increment"/>-->
                 <!--<xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data(system_cache__dita__x3A__svg:resolution.coordinate.axis.y(),
                     system_cache__dita__x3A__svg:resolution.coordinate.index.2(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.max.length())}" select="system_cache__dita__x3A__svg:cursor.lastY__x3A__calculate($system_cache__dita__x3A__svg:cursor)"/>-->
-                
+                <xsl:call-template name="system_cache__dita__x3A__svg:cursor.nextY__x3A__assign">
+                    <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:increment" select="$system_cache__dita__x3A__svg:increment"/>
+                </xsl:call-template>
+                <xsl:call-template name="system_cache__dita__x3A__svg:cursor.increment__x3A__assign">
+                    <xsl:with-param name="system_cache__dita__x3A__svg:increment" select="$system_cache__dita__x3A__svg:increment"/>
+                </xsl:call-template>
                 
             </xsl:element>
             <xsl:element name="{system_cache__dita__x3A__svg:resolution.coordinate.region(system_cache__dita__x3A__svg:resolution.coordinate.region.body())}">
                 <!--<xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data( system_cache__dita__x3A__svg:resolution.coordinate.axis.x(), system_cache__dita__x3A__svg:resolution.coordinate.index.1() ,system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.min.coordinate() )}" select="$system_cache__dita__x3A__svg:cursor.commit.region.start.extent"/>-->
                 <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data( system_cache__dita__x3A__svg:resolution.coordinate.axis.x(), system_cache__dita__x3A__svg:resolution.coordinate.index.2() ,system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.max.coordinate() )}" select="number($system_cache__dita__x3A__svg:cursor.current.width) - number($system_cache__dita__x3A__svg:cursor.commit.region.end.extent)"/>
-                <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data( system_cache__dita__x3A__svg:resolution.coordinate.axis.x(), system_cache__dita__x3A__svg:resolution.coordinate.index.1() ,system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.min.coordinate() )}" select="1"/><!-- chyba domyslnie jest 0 poczatkiem na razie todo -->
-                
+                <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data( system_cache__dita__x3A__svg:resolution.coordinate.axis.x(), system_cache__dita__x3A__svg:resolution.coordinate.index.1() ,system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.min.coordinate() )}" select="number(0)"/><!-- chyba domyslnie jest 0 poczatkiem na razie todo -->
+                <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data( system_cache__dita__x3A__svg:resolution.coordinate.axis.x(), system_cache__dita__x3A__svg:resolution.coordinate.index.2() ,system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.max.length() )}" select="abs( $system_cache__dita__x3A__svg:cursor.current.width - number($system_cache__dita__x3A__svg:cursor.commit.region.end.extent))"/>
                <!-- <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data(system_cache__dita__x3A__svg:resolution.coordinate.axis.y(),
                     system_cache__dita__x3A__svg:resolution.coordinate.index.1(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.min.coordinate())}" select="system_cache__dita__x3A__svg:cursor.lastY__x3A__calculate($system_cache__dita__x3A__svg:cursor)+$system_cache__dita__x3A__svg:increment"/>
                 <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data(system_cache__dita__x3A__svg:resolution.coordinate.axis.y(),
                     system_cache__dita__x3A__svg:resolution.coordinate.index.2(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.max.length())}" select="system_cache__dita__x3A__svg:cursor.lastY__x3A__calculate($system_cache__dita__x3A__svg:cursor)"/>
                 -->
-                
+                <xsl:call-template name="system_cache__dita__x3A__svg:cursor.nextY__x3A__assign">
+                    <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:increment" select="$system_cache__dita__x3A__svg:increment"/>
+                </xsl:call-template>
+                <xsl:call-template name="system_cache__dita__x3A__svg:cursor.increment__x3A__assign">
+                    <xsl:with-param name="system_cache__dita__x3A__svg:increment" select="$system_cache__dita__x3A__svg:increment"/>
+                </xsl:call-template>
+                <!--<xsl:call-template name="system_cache__dita__x3A__svg:cursor.commit.region.body.instream-foreign-object"/>-->
             </xsl:element>
         </xsl:if>
         
     </xsl:template>
     
+    <xsl:template name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object">
+        <xsl:param name="system_cache__dita__x3A__svg:cursor" required="yes"/>
+        <xsl:param name="id"  required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.region"  required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Xdata" />
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Ydata" />
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.template"/>
+        
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.labelMajor"   />
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.openData" />            
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.hiData" />            
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.loData" />            
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.closeData" />
+        
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.apply-template.mode"  />
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.apply-template.select.param"  />
+        
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.name" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.value" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.label" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.name" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.value" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x.label" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x.name" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x.name.value" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x.value" />
+        
+        
+        
+        
+        <xsl:apply-templates mode="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object" select="$system_cache__dita__x3A__svg:cursor">
+            <xsl:with-param name="id"  select="$id" tunnel="yes"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.region" select="$system_cache__dita__x3A__svg:resolution.coordinate.region" tunnel="yes"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.template" select="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.template" tunnel="yes" />
+            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Xdata" select="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Xdata" tunnel="yes" />
+            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Ydata" select="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Ydata"  tunnel="yes"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.openData" select="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.openData" tunnel="yes"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.hiData" select="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.hiData" tunnel="yes"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.loData" select="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.loData" tunnel="yes"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.closeData" select="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.closeData" tunnel="yes"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.labelMajor" select="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.labelMajor" tunnel="yes"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.apply-template.mode" select="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.apply-template.mode"  tunnel="yes"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.apply-template.select.param" select="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.apply-template.select.param" tunnel="yes" />
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.name" select="$system_cache__dita__x3A__svg:data.y1.name" tunnel="yes"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.value" select="$system_cache__dita__x3A__svg:data.y1.value" tunnel="yes"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.label" select="$system_cache__dita__x3A__svg:data.y1.label" tunnel="yes"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.name" select="$system_cache__dita__x3A__svg:data.y2.name" tunnel="yes"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.value" select="$system_cache__dita__x3A__svg:data.y2.value" tunnel="yes"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.x.label" select="$system_cache__dita__x3A__svg:data.x.label" tunnel="yes"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.x.name" select="$system_cache__dita__x3A__svg:data.x.name" tunnel="yes"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.x.name.value" select="$system_cache__dita__x3A__svg:data.x.name.value" tunnel="yes"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:data.x.value" select="$system_cache__dita__x3A__svg:data.x.value" tunnel="yes"/>
+            
+            
+        </xsl:apply-templates>
+    </xsl:template>
+    
+    <xsl:template mode="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object" match="system_cache__dita__x3A__svg:cursor">
+        <xsl:copy>
+            <xsl:copy-of select="@*"/>
+            <xsl:apply-templates mode="#current"/>
+        </xsl:copy>
+    </xsl:template>
+    
+    <xsl:template mode="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object" match="*">
+        <xsl:param name="id" tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.region" tunnel="yes"/>
+        
+        <xsl:copy>
+            <xsl:copy-of select="@*"/>
+            <xsl:if test="parent::*/name() = $id">
+                <xsl:if test="name()=$system_cache__dita__x3A__svg:resolution.coordinate.region">
+                    <xsl:attribute name="debug193">tal</xsl:attribute>
+                </xsl:if>
+                <xsl:attribute name="debug182">parent::*/name()  <xsl:value-of select="parent::*/name() "/> = $id=<xsl:value-of select="$id"/></xsl:attribute>
+            </xsl:if>
+            
+            <xsl:choose>
+                <xsl:when test="parent::*/name() = $id and name()=$system_cache__dita__x3A__svg:resolution.coordinate.region">
+                    <xsl:call-template name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object__x3A__append"/>
+                </xsl:when>
+            </xsl:choose>
+            <xsl:apply-templates mode="#current"/>
+        </xsl:copy>
+    </xsl:template>
+    
+    <xsl:template name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object__x3A__append">
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Xdata" tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Ydata" tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.template" tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.labelMajor" tunnel="yes"  />
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.openData" tunnel="yes" />            
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.hiData" tunnel="yes" />            
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.loData" tunnel="yes" />            
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.closeData" tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.apply-template.mode"  tunnel="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.apply-template.select.param" tunnel="yes"  />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.name" tunnel="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.value"  tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.label"  tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.name"  tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.value"  tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.x.label"  tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.x.name"  tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.x.name.value"  tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.x.value"  tunnel="yes"/>
+        
+        <system_cache__dita__x3A__svg:cursor.commit.instream-foreign-object>
+              <xsl:if test="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Xdata">
+                  <xsl:attribute name="system_cache__dita__x3A__svg:Xdata" select="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Xdata"/>
+              </xsl:if>
+              <xsl:if test="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Ydata">
+                  <xsl:attribute name="system_cache__dita__x3A__svg:Ydata" select="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.Ydata"/>
+              </xsl:if>
+              <xsl:if test="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.template">
+                  <xsl:attribute name="system_cache__dita__x3A__svg:template" select="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.template"/>
+              </xsl:if>
+            
+            <xsl:if test="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.labelMajor">
+                <xsl:attribute name="system_cache__dita__x3A__svg:labelMajor" select="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.labelMajor"/>
+            </xsl:if>
+            
+            <xsl:if test="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.openData">
+                <xsl:attribute name="system_cache__dita__x3A__svg:openData" select="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.openData"/>
+            </xsl:if>
+            <xsl:if test="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.hiData">
+                <xsl:attribute name="system_cache__dita__x3A__svg:hiData" select="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.hiData"/>
+            </xsl:if>
+                        
+            <xsl:if test="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.loData">
+                <xsl:attribute name="system_cache__dita__x3A__svg:loData" select="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.loData"/>
+            </xsl:if>      
+            
+            <xsl:if test="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.closeData">
+                <xsl:attribute name="system_cache__dita__x3A__svg:closeData" select="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.closeData"/>
+            </xsl:if>           
+            
+            
+            
+            
+            <xsl:if test="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.apply-template.mode">
+                <xsl:attribute name="system_cache__dita__x3A__svg:apply-template.mode" select="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.apply-template.mode"/>
+            </xsl:if>
+            <xsl:if test="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.apply-template.select.param">
+                <xsl:attribute name="system_cache__dita__x3A__svg:apply-template.select.param" select="$system_cache__dita__x3A__svg:cursor.commit.region.instream-foreign-object.apply-template.select.param"/>
+            </xsl:if>
+            
+            
+            
+            
+            <xsl:if test="$system_cache__dita__x3A__svg:data.y1.name"  >
+                <xsl:attribute name="system_cache__dita__x3A__svg:data.y1.name" select="$system_cache__dita__x3A__svg:data.y1.name"/>
+            </xsl:if>
+            <xsl:if test="$system_cache__dita__x3A__svg:data.y1.value"  >
+                <xsl:attribute name="system_cache__dita__x3A__svg:data.y1.value" select="$system_cache__dita__x3A__svg:data.y1.value"/>
+            </xsl:if>
+            <xsl:if test="$system_cache__dita__x3A__svg:data.y1.label"  >
+                <xsl:attribute name="system_cache__dita__x3A__svg:data.y1.label" select="$system_cache__dita__x3A__svg:data.y1.label"/>
+            </xsl:if>
+            <xsl:if test="$system_cache__dita__x3A__svg:data.y2.name"  >
+                <xsl:attribute name="system_cache__dita__x3A__svg:data.y2.name" select="$system_cache__dita__x3A__svg:data.y2.name"/>
+            </xsl:if>
+            <xsl:if test="$system_cache__dita__x3A__svg:data.y2.value"  >
+                <xsl:attribute name="system_cache__dita__x3A__svg:data.y2.value" select="$system_cache__dita__x3A__svg:data.y2.value"/>
+            </xsl:if>
+            <xsl:if test="$system_cache__dita__x3A__svg:data.x.label"  >
+                <xsl:attribute name="system_cache__dita__x3A__svg:data.x.label" select="$system_cache__dita__x3A__svg:data.x.label"/>
+            </xsl:if>
+            <xsl:if test="$system_cache__dita__x3A__svg:data.x.name"  >
+                <xsl:attribute name="system_cache__dita__x3A__svg:data.x.name" select="$system_cache__dita__x3A__svg:data.x.name"/>
+            </xsl:if>
+            <xsl:if test="$system_cache__dita__x3A__svg:data.x.name.value"  >
+                <xsl:attribute name="system_cache__dita__x3A__svg:data.x.name.value" select="$system_cache__dita__x3A__svg:data.x.name.value"/>
+            </xsl:if>
+            <xsl:if test="$system_cache__dita__x3A__svg:data.x.value"  >
+                <xsl:attribute name="system_cache__dita__x3A__svg:data.x.value" select="$system_cache__dita__x3A__svg:data.x.value"/>
+            </xsl:if>
+            
+            
+        </system_cache__dita__x3A__svg:cursor.commit.instream-foreign-object>
+    </xsl:template>
     
     <xsl:template name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate">
         <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.region" required="yes"/>

+ 334 - 17
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.cursor.xsl

@@ -176,13 +176,18 @@
         <xsl:param name="system_cache__dita__x3A__svg:cursor.current.height"/>
         
         
-                <!--<xsl:variable name="system_cache__dita__x3A__svg:cursor__x3A__to_validate">-->
+                <xsl:variable name="system_cache__dita__x3A__svg:cursor__x3A__to_validate">
                         <system_cache__dita__x3A__svg:cursor>
                             <xsl:copy-of select="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*"/>
                             
                             <xsl:choose>
-                                <xsl:when test="">
+                                <xsl:when test="$id">
                                     <xsl:element name="{$id}">
+                                        <xsl:variable name="system_cache__dita__x3A__svg:cursor.current.width">
+                                            <xsl:call-template name="system_cache__dita__x3A__svg:cursor.current.width">
+                                                <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                                            </xsl:call-template>
+                                        </xsl:variable>
                                         <xsl:if test="$comment"><xsl:attribute name="comment" select="$comment"/></xsl:if>
                                         <xsl:call-template name="system_cache__dita__x3A__svg:cursor.increment__x3A__assign">
                                             <xsl:with-param name="system_cache__dita__x3A__svg:increment" select="$system_cache__dita__x3A__svg:increment"/>
@@ -207,11 +212,7 @@
                                             </xsl:call-template>
                                         </xsl:if>
                                         <xsl:attribute name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" select="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate($system_cache__dita__x3A__svg:cursor,$system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate,$system_cache__dita__x3A__svg:increment)"/>
-                                            <xsl:variable name="system_cache__dita__x3A__svg:cursor.current.width">
-                                                <xsl:call-template name="system_cache__dita__x3A__svg:cursor.current.width">
-                                                    <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
-                                                </xsl:call-template>
-                                            </xsl:variable>
+                                            
                                         <xsl:call-template name="system_cache__dita__x3A__svg:cursor.commit.region">
                                             <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.width" select="$system_cache__dita__x3A__svg:cursor.current.width"/>
                                             <xsl:with-param name="system_cache__dita__x3A__svg:increment" select="$system_cache__dita__x3A__svg:increment"/>
@@ -228,17 +229,45 @@
                             
                             
                         </system_cache__dita__x3A__svg:cursor>
-                <!--</xsl:variable>-->
-        <!--<xsl:apply-templates mode="system_cache__dita__x3A__svg:cursor__x3A__to_validate" select="$system_cache__dita__x3A__svg:cursor__x3A__to_validate"/>-->
+                </xsl:variable>
+            <!--<xsl:copy-of select="$system_cache__dita__x3A__svg:cursor__x3A__to_validate"/>-->
+        <xsl:apply-templates mode="system_cache__dita__x3A__svg:cursor__x3A__to_validate" select="$system_cache__dita__x3A__svg:cursor__x3A__to_validate"/>
     </xsl:template>
     
     <xsl:template mode="system_cache__dita__x3A__svg:cursor__x3A__to_validate" match="system_cache__dita__x3A__svg:cursor">
+        <!--<xsl:copy-of select="."></xsl:copy-of>-->
+        <xsl:copy>
+            <xsl:apply-templates mode="#current" select="@*"/>
+            <xsl:apply-templates mode="#current"/>
+        </xsl:copy>
+    </xsl:template>
+    
+    <xsl:template mode="system_cache__dita__x3A__svg:cursor__x3A__to_validate" match="*">
         <xsl:copy>
             <xsl:apply-templates mode="#current" select="@*"/>
             <xsl:apply-templates mode="#current"/>
         </xsl:copy>
     </xsl:template>
     
+    <xsl:template mode="system_cache__dita__x3A__svg:cursor__x3A__to_validate" match="@system_cache__dita__x3A__svg:data.x2.bounds.max.length">
+        <xsl:choose>
+            <xsl:when test="../@system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate - ../@system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate = .">
+                <xsl:copy-of select="."/>
+                <xsl:attribute name="system_cache__dita__x3A__svg:cursor__x3A__to_validate.data.x2.bounds.max.length" select="true()"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:copy-of select="."/>
+                <xsl:attribute name="system_cache__dita__x3A__svg:cursor__x3A__to_validate.data.x2.bounds.max.length" select="false()"/>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+    
+    
+    
+    
+    <xsl:template mode="system_cache__dita__x3A__svg:cursor__x3A__to_validate" match="@system_cache__dita__x3A__svg:cursor__x3A__to_validate.data.x2.bounds.max.length|@system_cache__dita__x3A__svg:cursor__x3A__to_validate.data.y2.bounds.max.length"/>
+        
+    
     
     <xsl:template mode="system_cache__dita__x3A__svg:cursor__x3A__to_validate" match="@*">
         <xsl:copy-of select="."/>
@@ -247,10 +276,14 @@
     
     
     <xsl:template mode="system_cache__dita__x3A__svg:cursor__x3A__to_validate" match="@system_cache__dita__x3A__svg:data.y2.bounds.max.length">
+        <xsl:copy-of select="."/>
         <xsl:choose>
             <xsl:when test="../@system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate - . = ../@system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate">
-                <xsl:attribute name="system_cache__dita__x3A__svg:data.y2.bounds.max.length.error" select="../@system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate - . - ../@system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                <xsl:attribute name="system_cache__dita__x3A__svg:cursor__x3A__to_validate.data.y2.bounds.max.length" select="true()"/>
             </xsl:when>
+            <xsl:otherwise>
+                <xsl:attribute name="system_cache__dita__x3A__svg:cursor__x3A__to_validate.data.y2.bounds.max.length" select="../@system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate - . - ../@system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+            </xsl:otherwise>
         </xsl:choose>
     </xsl:template>
     
@@ -304,6 +337,8 @@
         <xsl:value-of select="sum($system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*/@increment)"/>
     </xsl:function>
     
+    
+    
     <xsl:template name="system_cache__dita__x3A__svg:cursor.lastY__x3A__assign">
         <xsl:param name="system_cache__dita__x3A__svg:cursor" required="yes"/>
         <xsl:attribute name="lastY" select="system_cache__dita__x3A__svg:cursor.lastY__x3A__calculate($system_cache__dita__x3A__svg:cursor)"/>
@@ -319,7 +354,9 @@
         <xsl:attribute name="nextY" select="system_cache__dita__x3A__svg:cursor.lastY__x3A__calculate($system_cache__dita__x3A__svg:cursor)+$system_cache__dita__x3A__svg:increment"/>
         <!-- @nextY -->
         <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data(system_cache__dita__x3A__svg:resolution.coordinate.axis.y(),
-            system_cache__dita__x3A__svg:resolution.coordinate.index.1(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.min.coordinate())}" select="system_cache__dita__x3A__svg:cursor.lastY__x3A__calculate($system_cache__dita__x3A__svg:cursor)+$system_cache__dita__x3A__svg:increment"/>
+            system_cache__dita__x3A__svg:resolution.coordinate.index.1(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.min.coordinate())}" select="system_cache__dita__x3A__svg:cursor.lastY__x3A__calculate($system_cache__dita__x3A__svg:cursor)"/>
+        <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data(system_cache__dita__x3A__svg:resolution.coordinate.axis.y(),
+            system_cache__dita__x3A__svg:resolution.coordinate.index.2(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.max.coordinate())}" select="system_cache__dita__x3A__svg:cursor.lastY__x3A__calculate($system_cache__dita__x3A__svg:cursor)+$system_cache__dita__x3A__svg:increment"/>
         
     </xsl:template>
     
@@ -474,15 +511,28 @@
         <xsl:param name="system_cache__dita__x3A__svg:cursor"/>
         <xsl:choose>
             <xsl:when test="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[@system_cache__dita__x3A__svg:height__x3A__limit][1]/@system_cache__dita__x3A__svg:height__x3A__limit">
-                <xsl:value-of select="$system_cache__dita__x3A__svg:cursor//*[last() and @system_cache__dita__x3A__svg:height__x3A__limit]/@system_cache__dita__x3A__svg:height__x3A__limit"/>
+                <xsl:value-of select="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[last() and @system_cache__dita__x3A__svg:height__x3A__limit]/@system_cache__dita__x3A__svg:height__x3A__limit"/>
             </xsl:when>
             <xsl:otherwise>
                 <xsl:message terminate="yes">#355 CAMNNOT EXTRACT $system_cache__dita__x3A__svg:cursor//*[last() and @system_cache__dita__x3A__svg:height__x3A__limit]/@system_cache__dita__x3A__svg:height__x3A__limit </xsl:message>
             </xsl:otherwise>
         </xsl:choose>
-        
     </xsl:function>
     
+    <xsl:template name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__free_space__x3A__extract">
+        <xsl:param name="system_cache__dita__x3A__svg:cursor" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.region" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.block" required="yes"/>
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate">
+            <xsl:call-template name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate">
+                <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.block" select="$system_cache__dita__x3A__svg:resolution.coordinate.block"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.region" select="$system_cache__dita__x3A__svg:resolution.coordinate.region"/>
+            </xsl:call-template>
+        </xsl:variable>
+        <xsl:value-of select="system_cache__dita__x3A__svg:width__x3A__limit__x3A__extract($system_cache__dita__x3A__svg:cursor) - $system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+    </xsl:template>
+    
     <xsl:function name="system_cache__dita__x3A__svg:width__x3A__limit__x3A__extract">
         <xsl:param name="system_cache__dita__x3A__svg:cursor"/>
         <xsl:value-of select="$system_cache__dita__x3A__svg:cursor//*[last() and @system_cache__dita__x3A__svg:width__x3A__limit]/@system_cache__dita__x3A__svg:width__x3A__limit"/>
@@ -528,8 +578,8 @@
     <xsl:template name="system_cache__dita__x3A__svg:cursor.current.height">
         <xsl:param name="system_cache__dita__x3A__svg:cursor"/>
         <xsl:choose>
-            <xsl:when test="$system_cache__dita__x3A__svg:cursor//*[last()]/@increment/number()">
-                <xsl:value-of select="number($system_cache__dita__x3A__svg:cursor//*[last()]/@increment/number())"/>        
+            <xsl:when test="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[last()]/@increment/number()">
+                <xsl:value-of select="number($system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[last()]/@increment/number())"/>        
             </xsl:when>
           <!--  <xsl:when test="$system_cache__dita__x3A__svg:cursor//*[last()]/@nextY.height/number()">
                 <xsl:value-of select="number($system_cache__dita__x3A__svg:cursor//*[last()]/@nextY.height/number())"/>        
@@ -543,8 +593,8 @@
             </xsl:when>-->
             <xsl:otherwise>
                 <xsl:message terminate="no">#369B NOT COMMITED PARAM @nextY.height last time - should be this set -
-                    now guessed(<xsl:value-of select="$system_cache__dita__x3A__svg:cursor//*[position()=1 and @system_cache__dita__x3A__svg:height__x3A__limit]/@system_cache__dita__x3A__svg:height__x3A__limit/number() - (sum($system_cache__dita__x3A__svg:cursor//@increment/number()) + 100 )"/>)</xsl:message>
-                <xsl:value-of select="$system_cache__dita__x3A__svg:cursor//*[position()=1 and @system_cache__dita__x3A__svg:height__x3A__limit]/@system_cache__dita__x3A__svg:height__x3A__limit/number() - (sum($system_cache__dita__x3A__svg:cursor//@increment/number()) + 100 )"/>
+                    now guessed(<xsl:value-of select="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[position()=1 and @system_cache__dita__x3A__svg:height__x3A__limit]/@system_cache__dita__x3A__svg:height__x3A__limit/number() - (sum($system_cache__dita__x3A__svg:cursor//@increment/number()) + 100 )"/>)</xsl:message>
+                <xsl:value-of select="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[position()=1 and @system_cache__dita__x3A__svg:height__x3A__limit]/@system_cache__dita__x3A__svg:height__x3A__limit/number() - (sum($system_cache__dita__x3A__svg:cursor//@increment/number()) + 100 )"/>
             </xsl:otherwise>
         </xsl:choose>
     </xsl:template>
@@ -866,5 +916,272 @@
         
     </xsl:template>
     
+    
+    <xsl:template name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__height__x3A__limit__x3A__validate"><!-- to validate if fit in bounds -->
+        
+        <xsl:param name="yValue" required="yes"/>
+        <xsl:param name="xValue" />
+        <xsl:param name="system_cache__dita__x3A__svg:offsetX.minX" />
+        <xsl:param name="system_cache__dita__x3A__svg:offsetX.maxX" />
+        
+        <xsl:param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"   />
+      
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length"  />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"   />
+        
+        
+        <xsl:param name="system_cache__dita__x3A__svg:offsetY.minY" />
+        <xsl:param name="system_cache__dita__x3A__svg:offsetY.maxY" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/><!-- should be lower -->
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length"  /><!-- should be replaced by system_cache__dita__x3A__svg:data.y2.bounds.max.length -->
+        
+        
+        <xsl:param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:width__x3A__limit__x3A__validate" tunnel="yes"/>
+        
+       
+
+        <xsl:choose>
+            <xsl:when test="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate and
+                $system_cache__dita__x3A__svg:data.x2.bounds.max.length and
+                $system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate and
+                $system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate and
+                $system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate and
+                $system_cache__dita__x3A__svg:data.y2.bounds.max.length
+                
+                ">
+                
+                <xsl:variable name="yValue.simulated">
+                    <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug">
+                        <xsl:with-param name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug.y" select="true()"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug.write" select="false()"/>
+                        <xsl:with-param name="yValue"  select="$yValue"/>
+                        <xsl:with-param name="xValue" select="$xValue" />
+                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$system_cache__dita__x3A__svg:offsetX.minX" />
+                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$system_cache__dita__x3A__svg:offsetX.maxX" />
+                        
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"  select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"  />
+                        
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length"  />
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"  select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"  />
+                        
+                        
+                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$system_cache__dita__x3A__svg:offsetY.minY" />
+                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$system_cache__dita__x3A__svg:offsetY.maxY" />
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/><!-- should be lower -->
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length"  /><!-- should be replaced by system_cache__dita__x3A__svg:data.y2.bounds.max.length -->
+                        
+                        
+                        <xsl:with-param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" tunnel="yes"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:width__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:width__x3A__limit__x3A__validate" tunnel="yes"/>
+                    </xsl:call-template>
+                </xsl:variable>
+                
+                <xsl:variable name="xValue.simulated">
+                    <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug">
+                        <xsl:with-param name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug.x" select="true()"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug.write" select="false()"/>
+                        <xsl:with-param name="yValue"  select="$yValue"/>
+                        <xsl:with-param name="xValue" select="$xValue" />
+                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$system_cache__dita__x3A__svg:offsetX.minX" />
+                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$system_cache__dita__x3A__svg:offsetX.maxX" />
+                        
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"  select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"  />
+                        
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length"  />
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"  select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"  />
+                        
+                        
+                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$system_cache__dita__x3A__svg:offsetY.minY" />
+                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$system_cache__dita__x3A__svg:offsetY.maxY" />
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/><!-- should be lower -->
+                        <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length"  /><!-- should be replaced by system_cache__dita__x3A__svg:data.y2.bounds.max.length -->
+                        
+                        
+                        <xsl:with-param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" tunnel="yes"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:width__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:width__x3A__limit__x3A__validate" tunnel="yes"/>
+                    </xsl:call-template>
+                </xsl:variable>
+                
+                <xsl:choose>
+                    <xsl:when test="$system_cache__dita__x3A__svg:width__x3A__limit__x3A__validate">
+                        <xsl:choose>
+                            <xsl:when test="$xValue.simulated &gt; number($system_cache__dita__x3A__svg:width__x3A__limit__x3A__validate)">[ERR_X_TOO_BIG]</xsl:when>
+                            <xsl:when test="$xValue.simulated &lt; 0">[ERR_X_LESS_0]</xsl:when>
+                            <xsl:otherwise>[OK_X]</xsl:otherwise>
+                        </xsl:choose>
+                    </xsl:when>
+                    <xsl:otherwise>[WARN_X_UNKN_LIMIT]</xsl:otherwise>
+                </xsl:choose>
+                <xsl:text>/</xsl:text><xsl:value-of select="$yValue.simulated"/><xsl:choose>
+                    <xsl:when test="$system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate">
+                        <xsl:choose>
+                            <xsl:when test="$yValue.simulated &gt; number($system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate) or
+                                ($yValue.simulated &gt; number($system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate)) or 
+                                ($yValue.simulated &lt; number($system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate))"><xsl:text>[ERR_Y]</xsl:text>
+                                <xsl:choose>
+                                    <xsl:when test="number($yValue.simulated) &lt; 0">[ERR_Y_LESS_0]</xsl:when>
+                                    <xsl:when test="number($yValue.simulated) &gt; number($system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate) ">[ERR_Y_OVER_MAX_CURSOR=<xsl:value-of select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>]</xsl:when>
+                                    <xsl:when test="number($yValue.simulated) &lt; number($system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate) ">[ERR_Y_UNDER_MIN_CURSOR(<xsl:value-of select="$yValue.simulated"/>) LESS <xsl:value-of select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>]</xsl:when>
+                                </xsl:choose>
+                                <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug">
+                                    <xsl:with-param name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug.y" select="true()"/>
+                                    <xsl:with-param name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug.write" select="true()"/>
+                                    <xsl:with-param name="yValue"  select="$yValue"/>
+                                    <xsl:with-param name="xValue" select="$xValue" />
+                                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$system_cache__dita__x3A__svg:offsetX.minX" />
+                                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$system_cache__dita__x3A__svg:offsetX.maxX" />
+                                    
+                                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"  select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"  />
+                                    
+                                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length"  />
+                                    <xsl:with-param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"  select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"  />
+                                    
+                                    
+                                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="$system_cache__dita__x3A__svg:offsetY.minY" />
+                                    <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$system_cache__dita__x3A__svg:offsetY.maxY" />
+                                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+                                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/><!-- should be lower -->
+                                    <xsl:with-param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length"  /><!-- should be replaced by system_cache__dita__x3A__svg:data.y2.bounds.max.length -->
+                                    
+                                    
+                                    <xsl:with-param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" tunnel="yes"/>
+                                    <xsl:with-param name="system_cache__dita__x3A__svg:width__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:width__x3A__limit__x3A__validate" tunnel="yes"/>
+                                    
+                                </xsl:call-template>
+                            </xsl:when>
+                            <xsl:otherwise>[OK_Y]</xsl:otherwise>
+                        </xsl:choose>
+                    </xsl:when>
+                    <xsl:otherwise>[WARN_Y_UNKN_LIMIT]</xsl:otherwise>
+                </xsl:choose>
+                <xsl:choose>
+                    <xsl:when test="($system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate - $system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate ) = $system_cache__dita__x3A__svg:data.x2.bounds.max.length">
+                        <xsl:text>[X_BM_OK]</xsl:text>
+                    </xsl:when>
+                </xsl:choose>
+                <xsl:if test="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate">
+                    <xsl:choose>
+                        <xsl:when test="($system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate - $system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate ) = $system_cache__dita__x3A__svg:data.y2.bounds.max.length">
+                            <xsl:text>[Y_BM_OK=</xsl:text><xsl:value-of select="$system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate"/><xsl:text>]</xsl:text>
+                        </xsl:when>
+                    </xsl:choose>
+                </xsl:if>
+                
+            </xsl:when>
+        </xsl:choose>
+        
+    </xsl:template>
+    
+    <xsl:template name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug">
+        <xsl:param name="yValue" required="yes"/>
+        <xsl:param name="xValue" />
+        <xsl:param name="system_cache__dita__x3A__svg:offsetX.minX" />
+        <xsl:param name="system_cache__dita__x3A__svg:offsetX.maxX" />
+        
+        <xsl:param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"   />
+        
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.length"  required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"   />
+        
+        
+        <xsl:param name="system_cache__dita__x3A__svg:offsetY.minY" />
+        <xsl:param name="system_cache__dita__x3A__svg:offsetY.maxY" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/><!-- should be lower -->
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.length"  /><!-- should be replaced by system_cache__dita__x3A__svg:data.y2.bounds.max.length -->
+        
+        
+        <xsl:param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:width__x3A__limit__x3A__validate" tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug.x" select="false()"/>
+        <xsl:param name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug.y" select="false()"/>
+        <xsl:param name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug.write" select="false()"/>
+       
+        
+        <xsl:variable name="yValue.simulated" select="number($yValue)"/>
+        <xsl:variable name="xValue.simulated" select="number($xValue)"/>
+        
+        <xsl:variable name="xValue.simulated.debug" >[DEB.X(<xsl:value-of select="$xValue"/>)]</xsl:variable>
+        <xsl:variable name="yValue.simulated.debug" >[DEB.Y(<xsl:value-of select="$yValue"/>)]</xsl:variable>
+        
+        <!-- SCALE X --><!-- SCALE X --><!-- SCALE X --><!-- SCALE X -->
+        
+        
+        <xsl:variable name="Xrange" select="number($system_cache__dita__x3A__svg:offsetX.maxX) - number($system_cache__dita__x3A__svg:offsetX.minX)"/>
+        
+        <xsl:message>#1103 x2.bounds.max.length=<xsl:value-of select="$system_cache__dita__x3A__svg:data.x2.bounds.max.length"/>; minX=<xsl:value-of select="$system_cache__dita__x3A__svg:offsetX.minX"/>; $Xrange=<xsl:value-of select="$Xrange"/></xsl:message>
+        <xsl:variable name="Xscale" select="(number($system_cache__dita__x3A__svg:data.x2.bounds.max.length)) div number($Xrange)"/>
+        <!--<xsl:variable name="Xscale.min" select=""/>-->
+        
+        <xsl:variable name="x1.bounds.min.coordinate.scale" select="$system_cache__dita__x3A__svg:offsetX.minX * $Xscale"/>
+        
+        
+        <!-- SCALE Y --><!-- SCALE Y --><!-- SCALE Y --><!-- SCALE Y -->
+        
+        <xsl:variable name="Yrange" select="$system_cache__dita__x3A__svg:offsetY.maxY - $system_cache__dita__x3A__svg:offsetY.minY"/>
+        <xsl:variable name="Yscale" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length div $Yrange"/>
+        
+        
+        
+        <!--<xsl:variable name="xValue.simulated"><!-\- XMAX.7 -\->            
+            <xsl:value-of select="$xValue.simulated  - $system_cache__dita__x3A__svg:offsetX.maxX"/>
+        </xsl:variable>
+        <xsl:variable name="xValue.simulated.debug"><xsl:value-of select="$xValue.simulated.debug"/>[*XMAX.7(<xsl:value-of select="$system_cache__dita__x3A__svg:offsetX.maxX"/>)[[<xsl:value-of select="$xValue.simulated"/>]</xsl:variable>
+        -->
+        
+        
+        <xsl:variable name="yValue.simulated"><!-- YMAX.6 -->
+            <xsl:value-of select="$yValue.simulated - $system_cache__dita__x3A__svg:offsetY.maxY "/>
+        </xsl:variable>
+        <xsl:variable name="yValue.simulated.debug"><xsl:value-of select="$yValue.simulated.debug"/>[-YMAX6(<xsl:value-of select="$system_cache__dita__x3A__svg:offsetY.maxY"/>)[[<xsl:value-of select="$yValue.simulated"/>]</xsl:variable>
+        
+        <xsl:variable name="yValue.simulated"><!-- YSCALE.5 -->
+            <xsl:value-of select="$yValue.simulated * - $Yscale"/>
+        </xsl:variable>
+        <xsl:variable name="yValue.simulated.debug"><xsl:value-of select="$yValue.simulated.debug"/>[*YSCALE.5(<xsl:value-of select="- $Yscale"/>)[<xsl:value-of select="$yValue.simulated"/>]]</xsl:variable>
+        
+        <xsl:variable name="xValue.simulated"><!-- XSCALE.4 -->            
+            <xsl:value-of select="$xValue.simulated  * $Xscale"/>
+        </xsl:variable>
+        <xsl:variable name="xValue.simulated.debug"><xsl:value-of select="$xValue.simulated.debug"/>[*XSCALE.4(<xsl:value-of select="$Xscale"/>)[[<xsl:value-of select="$xValue.simulated"/>]</xsl:variable>
+        
+        
+        <xsl:variable name="xValue.simulated"><!-- XMIN.SCALE.3 -->
+            <xsl:value-of select="$xValue.simulated - $x1.bounds.min.coordinate.scale  "/>
+        </xsl:variable>
+        <xsl:variable name="xValue.simulated.debug"><xsl:value-of select="$xValue.simulated.debug"/>[-XMIN.SCALE.3(<xsl:value-of select="$x1.bounds.min.coordinate.scale"/>)[<xsl:value-of select="$xValue.simulated"/>]]</xsl:variable>
+        
+        <xsl:variable name="yValue.simulated"><!-- YMIN.2 -->
+            <xsl:value-of select="$yValue.simulated + $system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>
+        </xsl:variable>
+        <xsl:variable name="yValue.simulated.debug"><xsl:value-of select="$yValue.simulated.debug"/>[YMIN.2(<xsl:value-of select="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/>)[<xsl:value-of select="$yValue.simulated"/>]]</xsl:variable>
+        
+        <xsl:variable name="xValue.simulated"><!-- XMIN.1 -->
+            <xsl:value-of select="$xValue.simulated + $system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate "/>
+        </xsl:variable>
+        <xsl:variable name="xValue.simulated.debug"><xsl:value-of select="$xValue.simulated.debug"/>[XMIN.1(<xsl:value-of select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>)[<xsl:value-of select="$xValue.simulated"/>]]</xsl:variable>
+        
+        
+        <xsl:choose>
+            <xsl:when test="$system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug.x">
+                <xsl:value-of select="number($xValue.simulated)"/>
+                <xsl:if test="$system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug.write"><xsl:value-of select="$xValue.simulated.debug"/></xsl:if>
+            </xsl:when>
+        </xsl:choose>
+        <xsl:choose>
+            <xsl:when test="$system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug.y">
+                <xsl:value-of select="number($yValue.simulated)"/>
+                <xsl:if test="$system_cache__dita__x3A__svg:transform.translate.bounds__x3A__debug.write"><xsl:value-of select="$yValue.simulated.debug"/></xsl:if>
+            </xsl:when>
+        </xsl:choose>
+        
+        
+        
+    </xsl:template>
+    
   
 </xsl:stylesheet>

+ 89 - 7
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.data.xsl

@@ -43,11 +43,21 @@
                                 <xsl:copy-of select="@fid"/>
                             </xsl:copy>-->
             
-            <xsl:call-template name="system_cache__dita__x3A__svg:data__x3A__assign">
+            <!--<xsl:call-template name="system_cache__dita__x3A__svg:data__x3A__assign">
                 <xsl:with-param name="system_cache__dita__x3A__svg:data.class">system_cache__dita__x3A__svg:data.current-group</xsl:with-param>
                 <xsl:with-param name="system_cache__dita__x3A__svg:data.for-each-group.context" select="current-group()/ancestor-or-self::BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row[1]/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[relation_DateRangeElements[@*[name()='leadingTimeDate-From' or name()='leadingTimeDate-To']]]"/>
                 <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
-            </xsl:call-template>
+            </xsl:call-template>-->
+            <xsl:comment>#51 Rum Powiazania</xsl:comment>
+            <xsl:for-each-group select="current-group()/ancestor-or-self::BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row[1]/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[relation_DateRangeElements[@*[name()='leadingTimeDate-From' or name()='leadingTimeDate-To']]]" group-by="concat(@leadingTimeDate-From,'-',@leadingTimeDate-To)">
+                <xsl:call-template name="system_cache__dita__x3A__svg:data__x3A__assign">
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.class">system_cache__dita__x3A__svg:data.current-group</xsl:with-param>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:data.for-each-group.context" select="current-group()"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                </xsl:call-template>
+                
+                
+            </xsl:for-each-group>
             
             
             
@@ -108,24 +118,54 @@
                                 transform.validate.y="537.2136000000003">292.6</svg:text>-->
             
         </xsl:for-each-group>
+        
+        
+        <xsl:comment>#199 lower kontrahenci</xsl:comment>
+        <xsl:message terminate="no">#199 lower kontrahenci</xsl:message>
+        <!--<debug.130.umowy></debug.130.umowy>-->
+        <system_cache__dita__x3A__svg:data.current-group>
+            <xsl:attribute name="system_cache__dita__x3A__svg:data.name">BI_audit_ENERGA_RUM_UMOWY</xsl:attribute>
+            <xsl:for-each-group select="descendant-or-self::BI_audit_ENERGA_RUM_UMOWY" group-by="@fid"> <!-- @default_db__x3A__BI_audit_BENFORD:leadingTimeYear-quarter --><!-- [not(preceding-sibling::*)] -->
+                <!--<xsl:copy>
+                                    <xsl:copy-of select="@fid"/>
+                                </xsl:copy>-->
+                
+                <xsl:for-each-group select="current-group()" group-by="@default_db__x3A__BI_audit_BENFORD:leadingTimeYear-quarter">
+                    <!--<xsl:copy>-->
+                        <xsl:apply-templates mode="system_cache__dita__x3A__svg:data__x3A__assign" select=".">
+                            
+                        </xsl:apply-templates>
+                    <!--</xsl:copy>-->
+                        <!--<xsl:call-template name="system_cache__dita__x3A__svg:data__x3A__assign">
+                            <xsl:with-param name="system_cache__dita__x3A__svg:data.class">system_cache__dita__x3A__svg:data.current-group</xsl:with-param>
+                            <xsl:with-param name="system_cache__dita__x3A__svg:data.for-each-group.context" select="."/><!-\- current-group() -\-><!-\- /ancestor-or-self::BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row[1]/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[relation_DateRangeElements[@*[name()='leadingTimeDate-From' or name()='leadingTimeDate-To']]] -\->
+                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                        </xsl:call-template>-->
+                </xsl:for-each-group>
+                
+                
+            </xsl:for-each-group>
+        </system_cache__dita__x3A__svg:data.current-group>
+        
     </xsl:template>
 
     <xsl:template mode="system_cache__dita__x3A__svg:data__x3A__assign" match="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA">
         <xsl:param name="system_cache__dita__x3A__svg:cursor"/>
+        <debug.144_UNKNOWN></debug.144_UNKNOWN>
         <xsl:for-each-group select="descendant-or-self::BI_audit_ENERGA_PRACOWNICY[not(preceding-sibling::*)]" group-by="@fid">
             <!--<xsl:copy>
                                 <xsl:copy-of select="@fid"/>
                             </xsl:copy>-->
             
-            <xsl:call-template name="system_cache__dita__x3A__svg:data__x3A__assign">
+            <!--<xsl:call-template name="system_cache__dita__x3A__svg:data__x3A__assign">
                 <xsl:with-param name="system_cache__dita__x3A__svg:data.class">system_cache__dita__x3A__svg:data.current-group</xsl:with-param>
                 <xsl:with-param name="system_cache__dita__x3A__svg:data.for-each-group.context" select="current-group()/ancestor-or-self::BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row[1]/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[relation_DateRangeElements[@*[name()='leadingTimeDate-From' or name()='leadingTimeDate-To']]]"/>
                 <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
-            </xsl:call-template>
-            
+            </xsl:call-template>-->
             
             
         </xsl:for-each-group>
+      
     </xsl:template>
     
     
@@ -141,18 +181,46 @@
             <xsl:attribute name="system_cache__dita__x3A__svg:data.name" select="$system_cache__dita__x3A__svg:data.name"/>
             <xsl:attribute name="system_cache__dita__x3A__svg:data.id" select="$system_cache__dita__x3A__svg:data.id"/>
             <xsl:attribute name="system_cache__dita__x3A__svg:data.position" select="$system_cache__dita__x3A__svg:data.position"/>
+            
+            <xsl:choose>
+                <xsl:when test="current-group()/*[@ default_db__x3A__BI_audit_BENFORD:NameField][1]/@*">
+                    <xsl:attribute name="default_db__x3A__BI_audit_BENFORD:NameField" select="current-group()/*[@ default_db__x3A__BI_audit_BENFORD:NameField]/text()"/>
+                </xsl:when>
+                <xsl:when test="current-group()/parent::*/*[@ default_db__x3A__BI_audit_BENFORD:NameField][1]/@*">
+                    <xsl:attribute name="default_db__x3A__BI_audit_BENFORD:NameField" select="current-group()/parent::*/*[@ default_db__x3A__BI_audit_BENFORD:NameField]/text()"/>
+                </xsl:when>
+            </xsl:choose>
+            
+            <xsl:choose>
+                <xsl:when test="$system_cache__dita__x3A__svg:data.for-each-group.context/*[@default_db__x3A__BI_audit_BENFORD:NameField]">
+                <xsl:attribute name="default_db__x3A__BI_audit_BENFORD:NameField.foreign.value">
+                    <xsl:for-each select="$system_cache__dita__x3A__svg:data.for-each-group.context/*[@default_db__x3A__BI_audit_BENFORD:NameField]/text()">
+                        <xsl:value-of select="."/><xsl:text> </xsl:text>
+                    </xsl:for-each>
+                </xsl:attribute>
+                </xsl:when>
+                <xsl:when test="$system_cache__dita__x3A__svg:data.for-each-group.context/parent::*/*[@default_db__x3A__BI_audit_BENFORD:NameField]">
+                    <xsl:attribute name="default_db__x3A__BI_audit_BENFORD:NameField.foreign.value">
+                        <xsl:for-each select="$system_cache__dita__x3A__svg:data.for-each-group.context/*[@default_db__x3A__BI_audit_BENFORD:NameField]/text()">
+                            <xsl:value-of select="."/><xsl:text> </xsl:text>
+                        </xsl:for-each>
+                    </xsl:attribute>
+                </xsl:when>
+            </xsl:choose>
+            
             <xsl:apply-templates mode="system_cache__dita__x3A__svg:resolution__x3A__markup" select="@*"/>
             <!--<xsl:attribute name="system_cache__dita__x3A__svg:data.for-each-group.context.count" select="count($system_cache__dita__x3A__svg:data.for-each-group.context//*)"/>-->
             <!--<xsl:attribute name="system_cache__dita__x3A__svg:data.for-each-group.context.name" select="$system_cache__dita__x3A__svg:data.for-each-group.context/name()"/>-->
             <!--<xsl:variable name="system_cache__dita__x3A__svg:cursor">-->
             <xsl:choose>
                 <xsl:when test="number($system_cache__dita__x3A__svg:debug.level) &gt;3">
-                    <xsl:call-template name="system_cache__dita__x3A__svg:cursor.commit">
+                    <!--<xsl:call-template name="system_cache__dita__x3A__svg:cursor.commit">
                         <xsl:with-param name="id" select="$system_cache__dita__x3A__svg:data.id"/>
                         <xsl:with-param name="system_cache__dita__x3A__svg:increment" select="50"/>
                         <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
                         <xsl:with-param name="comment">#50 testing assign</xsl:with-param>
-                    </xsl:call-template>
+                    </xsl:call-template>-->
+                    <xsl:comment>#156 todo was call-template name="system_cache__dita__x3A__svg:cursor.commit</xsl:comment>
                 </xsl:when>
             </xsl:choose>
             
@@ -201,6 +269,20 @@
     </xsl:template>
     
     
+    <xsl:template mode="system_cache__dita__x3A__svg:data__x3A__assign" match="BI_audit_ENERGA_RUM_UMOWY">
+        <xsl:copy>
+            <!--<xsl:apply-templates mode="#current" select="@*"/>-->
+            <xsl:copy-of select="@default_db__x3A__BI_audit_BENFORD:leadingTimeYear-quarter"/>
+            <xsl:attribute name="default_db__x3A__BI_audit_BENFORD:CostField.sum" select="sum(number(@default_db__x3A__BI_audit_BENFORD:CostField))"/>
+            <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data(system_cache__dita__x3A__svg:resolution.coordinate.axis.x(),system_cache__dita__x3A__svg:resolution.coordinate.index(),'BI_audit_ENERGA_RUM_UMOWY.id')}" select="@fid"/>
+            <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data(system_cache__dita__x3A__svg:resolution.coordinate.axis.x(),system_cache__dita__x3A__svg:resolution.coordinate.index(),'BI_audit_ENERGA_RUM_UMOWY.leadingTimeYear-month.value')}" select="system_cache__dita:year-timestamp-day(concat(@default_db__x3A__BI_audit_BENFORD:leadingTimeYear-month,'-01'))"/>
+            <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data(system_cache__dita__x3A__svg:resolution.coordinate.axis.y(),system_cache__dita__x3A__svg:resolution.coordinate.index(),'BI_audit_ENERGA_RUM_UMOWY.count')}" select="count(current-group())"/>
+            <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data(system_cache__dita__x3A__svg:resolution.coordinate.axis.y(),system_cache__dita__x3A__svg:resolution.coordinate.index(),'BI_audit_ENERGA_RUM_UMOWY.current-grouping-key')}" select="current-grouping-key()"/>
+            <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data(system_cache__dita__x3A__svg:resolution.coordinate.axis.y(),system_cache__dita__x3A__svg:resolution.coordinate.index(),'BI_audit_ENERGA_RUM_UMOWY.data.name')}" select="name()"/>
+            
+        </xsl:copy>
+    </xsl:template>
+    
     <xsl:template mode="system_cache__dita__x3A__svg:data__x3A__assign" match="@*"/>
         
     

BIN
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.resolution.numbers


+ 1 - 1
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.resolution.xsl

@@ -495,7 +495,7 @@
     <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.block">block</xsl:function><!-- to name graph regions -->
     <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.block.total-volume">system_cache__dita__x3A__svg:total-volume</xsl:function>
     <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.block.horizontal-time-activity">system_cache__dita__x3A__svg:horizontal-time-activity</xsl:function>
-    
+    <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.block.hi-lo-chart-1">system_cache__dita__x3A__svg:hi-lo-chart-1</xsl:function>
     
     
     <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.diagnose">diagnose</xsl:function>

+ 184 - 12
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.translate.xsl

@@ -124,6 +124,105 @@
     </xsl:template>
     
     
+    <xsl:template name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__fix_text">
+        <xsl:param name="yValue" required="yes"/>
+        <xsl:param name="xValue" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:offsetX.minX" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:offsetX.maxX" required="yes" />
+        <!--<xsl:param name="system_cache__dita__x3A__svg:offsetX.width" />-->
+        
+        <xsl:param name="system_cache__dita__x3A__svg:offsetY.minY" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:offsetY.maxY" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" required="yes"/><!--<xsl:param name="system_cache__dita__x3A__svg:offsetY.height" />-->
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" required="yes"/>
+        <!--<xsl:param name="system_cache__dita__x3A__svg:cursor.current.Y"/>--><!-- ONLY ONE OFFSET PARAM -->
+        <!--<xsl:param name="system_cache__dita__x3A__svg:cursor.current.Y"/>-->
+        
+        <!-- SCALE X --><!-- SCALE X --><!-- SCALE X --><!-- SCALE X -->
+        <xsl:variable name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="number($system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate) - number($system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate)"/>
+        <xsl:variable name="Xrange" select="number($system_cache__dita__x3A__svg:offsetX.maxX) - number($system_cache__dita__x3A__svg:offsetX.minX)"/>
+        
+        <xsl:variable name="Xscale" select="(number($system_cache__dita__x3A__svg:data.x2.bounds.max.length)) div number($Xrange)"/><!--  - number($system_cache__dita__x3A__svg:offsetX.minX)  -->
+        <!--<xsl:variable name="Xscale.min" select=""/>-->
+        
+        <xsl:variable name="x1.bounds.min.coordinate.scale" select="number($system_cache__dita__x3A__svg:offsetX.minX) * number($Xscale)"/>
+        
+        <!-- SCALE Y --><!-- SCALE Y --><!-- SCALE Y --><!-- SCALE Y -->
+        <xsl:variable name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="number($system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate) - number($system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate)"/>
+        <xsl:variable name="Yrange" select="number($system_cache__dita__x3A__svg:offsetY.maxY) - number($system_cache__dita__x3A__svg:offsetY.minY)"/>
+        <xsl:variable name="Yscale" select="number($system_cache__dita__x3A__svg:data.y2.bounds.max.length) div number($Yrange)"/>
+        
+        
+        <xsl:variable name="X.bzyk.A" select="( $system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate - $system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate ) div ( $system_cache__dita__x3A__svg:offsetX.minX - $system_cache__dita__x3A__svg:offsetX.maxX  )"/>
+        <xsl:variable name="X.bzyk.B" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate - ( $X.bzyk.A * $system_cache__dita__x3A__svg:offsetX.maxX )"/>
+        
+        
+        
+        <xsl:attribute name="transform">
+           
+            <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.offset($xValue, $yValue)"/>    
+            
+            <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.scale_positive( 1 div $X.bzyk.A,1)"/>              
+            
+            
+            <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.scale_positive(1,- 1 div $Yscale)"/>
+            <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.offset(- $xValue, - $yValue)"/>
+            
+            
+        </xsl:attribute>
+    </xsl:template>
+    
+    
+    <xsl:template name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__extract__scale">
+        <xsl:param name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__extract__scale.x" />
+        <xsl:param name="system_cache__dita__x3A__svg:transform.translate.bounds__x3A__extract__scale.y" />
+        
+        <xsl:param name="system_cache__dita__x3A__svg:offsetX.minX" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:offsetX.maxX" required="yes" />
+        <!--<xsl:param name="system_cache__dita__x3A__svg:offsetX.width" />-->
+        
+        <xsl:param name="system_cache__dita__x3A__svg:offsetY.minY" required="no" />
+        <xsl:param name="system_cache__dita__x3A__svg:offsetY.maxY" required="no" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" required="yes"/><!--<xsl:param name="system_cache__dita__x3A__svg:offsetY.height" />-->
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" required="yes"/>
+        <xsl:choose>
+            <xsl:when test="number($system_cache__dita__x3A__svg:offsetX.maxX) or number($system_cache__dita__x3A__svg:offsetX.maxX) = 0 ">
+                
+                <xsl:variable name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="number($system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate) - number($system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate)"/>
+                <xsl:variable name="Xrange" select="number($system_cache__dita__x3A__svg:offsetX.maxX) - number($system_cache__dita__x3A__svg:offsetX.minX)"/>
+                
+                <xsl:variable name="Xscale" select="(number($system_cache__dita__x3A__svg:data.x2.bounds.max.length)) div number($Xrange)"/><!--  - number($system_cache__dita__x3A__svg:offsetX.minX)  -->
+                <!--<xsl:variable name="Xscale.min" select=""/>-->
+                
+                <xsl:variable name="x1.bounds.min.coordinate.scale" select="number($system_cache__dita__x3A__svg:offsetX.minX) * number($Xscale)"/>
+                
+                <!-- SCALE Y --><!-- SCALE Y --><!-- SCALE Y --><!-- SCALE Y -->
+                <xsl:variable name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="number($system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate) - number($system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate)"/>
+                <xsl:variable name="Yrange" select="number($system_cache__dita__x3A__svg:offsetY.maxY) - number($system_cache__dita__x3A__svg:offsetY.minY)"/>
+                <xsl:variable name="Yscale" select="number($system_cache__dita__x3A__svg:data.y2.bounds.max.length) div number($Yrange)"/>
+                
+                <xsl:variable name="X.bzyk.A" select="( $system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate - $system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate ) div ( $system_cache__dita__x3A__svg:offsetX.minX - $system_cache__dita__x3A__svg:offsetX.maxX  )"/>
+                <xsl:variable name="X.bzyk.B" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate - ( $X.bzyk.A * $system_cache__dita__x3A__svg:offsetX.maxX )"/>
+                <xsl:choose>
+                    <xsl:when test="$system_cache__dita__x3A__svg:transform.translate.bounds__x3A__extract__scale.x and $system_cache__dita__x3A__svg:transform.translate.bounds__x3A__extract__scale.y">
+                        <xsl:comment>[system_cache__dita__x3A__svg:transform.translate.bounds__x3A__extract__scale][ERROR][use only or X or Y param]</xsl:comment>
+                    </xsl:when>
+                    <xsl:when test="$system_cache__dita__x3A__svg:transform.translate.bounds__x3A__extract__scale.x">
+                        <xsl:value-of select="$X.bzyk.A"/>
+                    </xsl:when>
+                    <xsl:when test="$system_cache__dita__x3A__svg:transform.translate.bounds__x3A__extract__scale.y">
+                        <xsl:value-of select="$Yscale"/>
+                    </xsl:when>
+                </xsl:choose>
+                
+            </xsl:when>
+        </xsl:choose>
+        
+    </xsl:template>
     
     <xsl:template name="system_cache__dita__x3A__svg:transform.translate.bounds">
         
@@ -135,10 +234,78 @@
         <xsl:param name="system_cache__dita__x3A__svg:offsetY.maxY" required="yes" />
         <xsl:param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" required="yes"/>
         <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" required="yes"/>
-        <xsl:param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" required="yes"></xsl:param><!--<xsl:param name="system_cache__dita__x3A__svg:offsetY.height" />-->
-        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" required="yes"></xsl:param>
+        <xsl:param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" required="yes"/><!--<xsl:param name="system_cache__dita__x3A__svg:offsetY.height" />-->
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" required="yes"/>
         <!--<xsl:param name="system_cache__dita__x3A__svg:cursor.current.Y"/>--><!-- ONLY ONE OFFSET PARAM -->
         <!--<xsl:param name="system_cache__dita__x3A__svg:cursor.current.Y"/>-->
+      
+        <!-- SCALE X --><!-- SCALE X --><!-- SCALE X --><!-- SCALE X -->
+        
+        <xsl:choose>
+            <xsl:when test="number($system_cache__dita__x3A__svg:offsetX.maxX) or number($system_cache__dita__x3A__svg:offsetX.maxX) = 0 ">
+                
+                <xsl:variable name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="number($system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate) - number($system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate)"/>
+                <xsl:variable name="Xrange" select="number($system_cache__dita__x3A__svg:offsetX.maxX) - number($system_cache__dita__x3A__svg:offsetX.minX)"/>
+                
+                <xsl:variable name="Xscale" select="(number($system_cache__dita__x3A__svg:data.x2.bounds.max.length)) div number($Xrange)"/><!--  - number($system_cache__dita__x3A__svg:offsetX.minX)  -->
+                <!--<xsl:variable name="Xscale.min" select=""/>-->
+                
+                <xsl:variable name="x1.bounds.min.coordinate.scale" select="number($system_cache__dita__x3A__svg:offsetX.minX) * number($Xscale)"/>
+                
+                <!-- SCALE Y --><!-- SCALE Y --><!-- SCALE Y --><!-- SCALE Y -->
+                <xsl:variable name="system_cache__dita__x3A__svg:data.y2.bounds.max.length" select="number($system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate) - number($system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate)"/>
+                <xsl:variable name="Yrange" select="number($system_cache__dita__x3A__svg:offsetY.maxY) - number($system_cache__dita__x3A__svg:offsetY.minY)"/>
+                <xsl:variable name="Yscale" select="number($system_cache__dita__x3A__svg:data.y2.bounds.max.length) div number($Yrange)"/>
+                
+                <xsl:variable name="X.bzyk.A" select="( $system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate - $system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate ) div ( $system_cache__dita__x3A__svg:offsetX.minX - $system_cache__dita__x3A__svg:offsetX.maxX  )"/>
+                <xsl:variable name="X.bzyk.B" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate - ( $X.bzyk.A * $system_cache__dita__x3A__svg:offsetX.maxX )"/>
+                
+                <xsl:attribute name="transform">
+                    
+                    
+                    <!-- X.bzyk.A -->
+                    <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.offset($X.bzyk.B, 0)"/>
+                    
+                    <!-- X.bzyk.B -->
+                    <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.scale_positive($X.bzyk.A,1)"/>
+                    <!-- XMIN.1 -->
+                    <!--<xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.offset($system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate, 0)"/>-->
+                    <!-- YMIN.2 -->
+                    <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.offset(0, number($system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate))"/>
+                    <!-- XMIN.SCALE.3 -->
+                    <!--<xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.offset(- $x1.bounds.min.coordinate.scale,0)"/>-->    
+                    <!-- XSCALE.4 -->
+                    <!--<xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.scale_positive($Xscale,1)"/>-->              
+                    <xsl:message>#7701 debug $system_cache__dita__x3A__svg:offsetY.height=($system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate - $system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate )=(<xsl:value-of select="($system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate - $system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate )"/>) Ymax(<xsl:value-of select="$system_cache__dita__x3A__svg:offsetY.maxY"/>) --- $minY(<xsl:value-of select="$system_cache__dita__x3A__svg:offsetY.minY"/>) ;</xsl:message>
+                    <!-- YSCALE.5 -->
+                    <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.scale_positive(1,- number($Yscale))"/>
+                    <!-- YMAX.6 -->
+                    <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.offset(0,- $system_cache__dita__x3A__svg:offsetY.maxY)"/>
+                    
+                </xsl:attribute>
+                
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:attribute name="transform.error">#226 not all parameters typed</xsl:attribute>
+            </xsl:otherwise>
+        </xsl:choose>
+        
+    </xsl:template>
+    
+    <!--<xsl:template name="system_cache__dita__x3A__svg:transform.translate.bounds">
+        
+        <xsl:param name="system_cache__dita__x3A__svg:offsetX.minX" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:offsetX.maxX" required="yes" />
+        <!-\-<xsl:param name="system_cache__dita__x3A__svg:offsetX.width" />-\->
+        
+        <xsl:param name="system_cache__dita__x3A__svg:offsetY.minY" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:offsetY.maxY" required="yes" />
+        <xsl:param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" required="yes"/><!-\-<xsl:param name="system_cache__dita__x3A__svg:offsetY.height" />-\->
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" required="yes"/>
+        <!-\-<xsl:param name="system_cache__dita__x3A__svg:cursor.current.Y"/>-\-><!-\- ONLY ONE OFFSET PARAM -\->
+        <!-\-<xsl:param name="system_cache__dita__x3A__svg:cursor.current.Y"/>-\->
         
         
         
@@ -157,11 +324,11 @@
                 <xsl:when test="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate ">
                     <xsl:variable name="Xrange" select="$system_cache__dita__x3A__svg:offsetX.maxX - $system_cache__dita__x3A__svg:offsetX.minX"/>
                     <xsl:variable name="Xscale" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate div $Xrange"/>
-                    <!--<xsl:variable name="Xoffset" select="$system_cache__dita__x3A__svg:offsetX.width div $Xrange"/>-->
-                    <!-- np  x3 - min==2== 1 *scale600 =600 ok   x2 min2==0*600 ==0 -->
+                    <!-\-<xsl:variable name="Xoffset" select="$system_cache__dita__x3A__svg:offsetX.width div $Xrange"/>-\->
+                    <!-\- np  x3 - min==2== 1 *scale600 =600 ok   x2 min2==0*600 ==0 -\->
                     <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.scale_positive($Xscale,1)"/>
                     
-                    <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.offset(- $system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate,0)"/>
+                    <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.offset( $system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate,0)"/>
                     
                 </xsl:when>
             </xsl:choose>
@@ -170,11 +337,11 @@
             
             <xsl:choose>
                 <xsl:when test="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate">
-                    <xsl:message>#7701 debug $system_cache__dita__x3A__svg:offsetY.height=($system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate - $system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate )=(<xsl:value-of select="($system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate - $system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate )"/>) Ymax(<xsl:value-of select="$system_cache__dita__x3A__svg:offsetY.maxY"/>) --- $minY(<xsl:value-of select="$system_cache__dita__x3A__svg:offsetY.minY"/>) ;</xsl:message>
+                    <xsl:message>#7701 debug $system_cache__dita__x3A__svg:offsetY.height=($system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate - $system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate )=(<xsl:value-of select="($system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate - $system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate )"/>) Ymax(<xsl:value-of select="$system_cache__dita__x3A__svg:offsetY.maxY"/>) -\-\- $minY(<xsl:value-of select="$system_cache__dita__x3A__svg:offsetY.minY"/>) ;</xsl:message>
                     <xsl:variable name="Yrange" select="$system_cache__dita__x3A__svg:offsetY.maxY - $system_cache__dita__x3A__svg:offsetY.minY"/>
                     <xsl:variable name="Yscale" select="($system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate - $system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate ) div $Yrange"/>
-                    <!--<xsl:variable name="Yoffset" select="$system_cache__dita__x3A__svg:offsetY.height div $Yrange"/>-->
-                    <!-- np  x3 - min==2== 1 *scale600 =600 ok   x2 min2==0*600 ==0 -->
+                    <!-\-<xsl:variable name="Yoffset" select="$system_cache__dita__x3A__svg:offsetY.height div $Yrange"/>-\->
+                    <!-\- np  x3 - min==2== 1 *scale600 =600 ok   x2 min2==0*600 ==0 -\->
                     
                     <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.offset(0,($system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate - $system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate ) )"/>
                     
@@ -188,14 +355,13 @@
             
             
         </xsl:attribute>
-    </xsl:template>
-    
-    
+    </xsl:template>-->
     
     <xsl:function name="system_cache__dita__x3A__svg:transform.translate.major.offset">
         <xsl:param name="xMajor"/>
         <xsl:param name="yMajor"/>
-        <xsl:text> translate(</xsl:text><xsl:value-of select="$xMajor"/>,<xsl:value-of select="$yMajor"/><xsl:text>) </xsl:text>
+        
+        <xsl:text> translate(</xsl:text> <xsl:value-of select="$xMajor"/>, <xsl:value-of select="$yMajor"/><xsl:text>) </xsl:text>
     </xsl:function>
     
     <xsl:function name="system_cache__dita__x3A__svg:transform.translate.major.scale.initial">
@@ -231,5 +397,11 @@
     </xsl:function>
     
     
+    
+    
+    
+    
+  
+    
   
 </xsl:stylesheet>

+ 14 - 2
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.xsl

@@ -32,7 +32,7 @@
     <xsl:include href="system_cache__dita__x3A__svg.plot.label.xsl"/>
     <xsl:include href="system_cache__dita__x3A__svg.utils.translate.xsl"/>    
     <xsl:include href="system_cache__dita__x3A__svg.plot.Yaxis.xsl"/>
-    
+    <xsl:include href="system_cache__dita__x3A__svg.plot.ticks.xsl"/>
     
     <xsl:output indent="yes"/>
     <xsl:strip-space elements="*"/>
@@ -621,7 +621,19 @@
     
     <xsl:template name="system_cache__dita__x3A__svg:emath.max" >
         <xsl:param name="nodes" required="yes"/>
-        <xsl:value-of select="max($nodes/number())"/>
+        <xsl:param name="value" required="no"/>
+        <xsl:choose>
+            <xsl:when test="$value and max($nodes/number()) &gt; $value">
+                <xsl:value-of select="max($nodes/number())"/>
+            </xsl:when>
+            <xsl:when test="$value and max($nodes/number()) &lt; $value">
+                <xsl:value-of select="$value"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:value-of select="max($nodes/number())"/>
+            </xsl:otherwise>
+        </xsl:choose>
+        
     </xsl:template>
     
     <xsl:template name="system_cache__dita__x3A__svg:emath.min" >

+ 82 - 10
SE/se-lib/Route/UrlAction/UserContact.php

@@ -70,10 +70,11 @@ class Route_UrlAction_UserContact extends RouteBase {
 				]),
 				UI::h('div', [ 'class' => "col-md-3" ], [
 					UI::h('label', [], "Rodzaj spotkania"),
-					UI::h('select', [ 'class' => "form-control", 'name' => 'L_APPOITMENT_TYPE' ], [
+					UI::h('select', [ 'class' => "form-control", 'name' => 'L_APPOITMENT_TYPE', 'onChange' => "p5_addUserNote_handleChangeType(this)" ], [
 						UI::h('option', [ 'value' => "" ]),
 						UI::h('option', array_merge([ 'value' => 'LIVE' ], ('LIVE' === $args['L_APPOITMENT_TYPE']) ? [ 'selected' => "selected" ] : []), "LIVE"),
 						UI::h('option', array_merge([ 'value' => 'TEL' ], ('TEL' === $args['L_APPOITMENT_TYPE']) ? [ 'selected' => "selected" ] : []), "TEL"),
+						UI::h('option', array_merge([ 'value' => 'TEL_NIE_ODBIERA' ], ('TEL_NIE_ODBIERA' === $args['L_APPOITMENT_TYPE']) ? [ 'selected' => "selected" ] : []), "TEL_NIE_ODBIERA"),
 						UI::h('option', array_merge([ 'value' => 'MAIL' ], ('MAIL' === $args['L_APPOITMENT_TYPE']) ? [ 'selected' => "selected" ] : []), "MAIL"),
 						UI::h('option', array_merge([ 'value' => 'SMS' ], ('SMS' === $args['L_APPOITMENT_TYPE']) ? [ 'selected' => "selected" ] : []), "SMS"),
 						UI::h('option', array_merge([ 'value' => 'INNE' ], ('INNE' === $args['L_APPOITMENT_TYPE']) ? [ 'selected' => "selected" ] : []), "INNE"),
@@ -83,7 +84,10 @@ class Route_UrlAction_UserContact extends RouteBase {
 			UI::h('div', [ 'class' => "row", 'style' => "padding-bottom: 12px" ], [
 				UI::h('div', [ 'class' => "col-md-12" ], [
 					UI::h('label', [], "Notatka ze spotkania"),
-					UI::h('textarea', [ 'class' => "form-control", 'type' => "text", 'name' => 'L_APPOITMENT_INFO', 'rows' => 3 ], $args['L_APPOITMENT_INFO']),
+					UI::h('textarea', array_merge(
+						[ 'class' => "form-control", 'type' => "text", 'name' => 'L_APPOITMENT_INFO', 'rows' => 3],
+						('TEL_NIE_ODBIERA' === $args['L_APPOITMENT_TYPE']) ? [ 'disabled' => 'disabled' ] : []
+					), $args['L_APPOITMENT_INFO']),
 				]),
 			]),
 			UI::h('div', [ 'class' => "row", 'style' => "padding-bottom: 12px" ], [
@@ -170,6 +174,19 @@ class Route_UrlAction_UserContact extends RouteBase {
 				]),
 			]),
 		]);
+		echo UI::h('script', [], "
+			var DBG1 = true;
+			var DBG = false;
+
+			function p5_addUserNote_handleChangeType(n) {
+				DBG && console.log('DBG:p5_addUserNote_handleChangeType', { value: n.value, desc: n.form['L_APPOITMENT_INFO'] , n, form: n.form });
+				if ('TEL_NIE_ODBIERA' === n.value) {
+					n.form['L_APPOITMENT_INFO'].disabled = true
+				} else {
+					n.form['L_APPOITMENT_INFO'].disabled = false
+				}
+			}
+		");
 	}
 	function saveContactPostTask($idUser) {
 		$args = [];
@@ -188,7 +205,7 @@ class Route_UrlAction_UserContact extends RouteBase {
 			if (empty($args['L_APPOITMENT_USER'])) throw new Exception("Brak pracownika");
 			if (empty($args['L_APPOITMENT_DATE'])) throw new Exception("Brak daty spotkania");
 			if (empty($args['L_APPOITMENT_TYPE'])) throw new Exception("Brak rodzaju spotkania");
-			if (empty($args['L_APPOITMENT_INFO'])) throw new Exception("Brak treści notatki");
+			if (empty($args['L_APPOITMENT_INFO']) && 'TEL_NIE_ODBIERA' !== $args['L_APPOITMENT_TYPE']) throw new Exception("Brak treści notatki");
 			if ($args['change_windykacja_status']) {
 				if (empty($args['A_STATUS_INFO'])) throw new Exception("Brak statusu windykacji");
 			}
@@ -251,27 +268,28 @@ class Route_UrlAction_UserContact extends RouteBase {
 
 		Lib::loadClass('Windykacja_StatsModel');
 		$billDocs = Windykacja_StatsModel::getBillDocsByDate($idUser);
-		// DBG::nicePrint($billDocs, '$billDocs');
 
 		$lastHist = DB::getPDO()->fetchAll("
 			select t.ID
 				, t.ID_BILLING_USERS
-		--		, t.CLIENT_INFO
+			--	, t.CLIENT_INFO
 				, t.A_STATUS
-		--		, t.A_STATUS_INFO
+			--	, t.A_STATUS_INFO
 				, t.L_APPOITMENT_USER
 				, t.L_APPOITMENT_DATE
 				, t.L_APPOITMENT_TYPE
 				, t.L_APPOITMENT_INFO
-				, IF('0000-00-00 00:00:00' = t.A_RECORD_UPDATE_DATE, t.A_RECORD_CREATE_DATE, t.A_RECORD_UPDATE_DATE) as A_RECORD_UPDATE_DATE
+				, t.A_RECORD_CREATE_DATE
+			--	, IF('0000-00-00 00:00:00' = t.A_RECORD_UPDATE_DATE, t.A_RECORD_CREATE_DATE, t.A_RECORD_UPDATE_DATE) as A_RECORD_UPDATE_DATE
 			from USERS2_CONTACT t
 			where t.ID_BILLING_USERS = :id
+				and t.A_STATUS != 'DELETED'
 			limit 11
 		", [ ':id' => $idUser ]);
 		// DBG::nicePrint($lastHist, '$lastHist');
 		if (!empty($lastHist)) {
 			foreach ($lastHist as $bill_doc) {
-				$billDocs->add_event(substr($bill_doc['A_RECORD_UPDATE_DATE'], 0, 10), 'HIST_CONTACT', $bill_doc);
+				$billDocs->add_event(substr($bill_doc['A_RECORD_CREATE_DATE'], 0, 10), 'HIST_CONTACT', $bill_doc);
 			}
 		}
 
@@ -579,13 +597,14 @@ class Route_UrlAction_UserContact extends RouteBase {
 				`ID` int(11) NOT NULL AUTO_INCREMENT,
 				`ID_BILLING_USERS` int(11) NOT NULL DEFAULT '0',
 				`CLIENT_INFO` varchar(255) NOT NULL DEFAULT '',
+				`CLIENT_TEL` varchar(255) NOT NULL DEFAULT '',
 				`A_STATUS` enum('WAITING','NORMAL','DELETED') NOT NULL DEFAULT 'WAITING',
 				`A_STATUS_INFO` varchar(255) NOT NULL,
 				`L_APPOITMENT_DATE` date NOT NULL DEFAULT '0000-00-00',
 				`L_APPOITMENT_USER` varchar(20) NOT NULL DEFAULT '',
 				`L_APPOITMENT_PERIOD` varchar(4) NOT NULL,
 				`L_APPOITMENT_INFO` varchar(255) NOT NULL,
-				`L_APPOITMENT_TYPE` enum('','LIVE','TEL','MAIL','SMS','INNE') DEFAULT NULL,
+				`L_APPOITMENT_TYPE` enum('','LIVE','TEL','TEL_NIE_ODBIERA','MAIL','SMS','INNE') DEFAULT NULL,
 				`A_RECORD_CREATE_DATE` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
 				`A_RECORD_CREATE_AUTHOR` varchar(20) NOT NULL DEFAULT '',
 				`A_RECORD_UPDATE_DATE` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
@@ -613,6 +632,7 @@ class Route_UrlAction_UserContact extends RouteBase {
 				`ID_USERS2` int(11) NOT NULL,
 				`ID_BILLING_USERS` varchar(11) NOT NULL DEFAULT 'N/S;',
 				`CLIENT_INFO` varchar(255) NOT NULL DEFAULT 'N/S;',
+				`CLIENT_TEL` varchar(255) NOT NULL DEFAULT 'N/S;',
 				`A_STATUS` varchar(32) NOT NULL DEFAULT 'N/S;',
 				`A_STATUS_INFO` varchar(255) NOT NULL DEFAULT 'N/S;',
 				`L_APPOITMENT_DATE` varchar(20) NOT NULL DEFAULT 'N/S;',
@@ -672,7 +692,7 @@ from USERS2_WINDYKACJA_STATUS_HIST h
 where
     h.A_RECORD_UPDATE_DATE like '2019-08-%'
     and h.A_RECORD_UPDATE_AUTHOR not like '%update%'
-
+    and h.ID_KORESP = 'N/S;' -- params like 'rowzwiaanie umowy%'
 
 select sum(ILE_ODZYSKANO) from USERS2_CONTACT;
 
@@ -681,4 +701,56 @@ select count(DISTINCT ID_BILLING_USERS) from USERS2_CONTACT;
 
 
 select ID_BILLING_USERS, count(*) as cnt from USERS2_CONTACT group by ID_BILLING_USERS;
+
+
+ * fix rows order and HIST
+
+insert into USERS2_CONTACT_temp201909 (
+	ID_OLD,
+    A_RECORD_CREATE_DATE,
+    A_RECORD_CREATE_AUTHOR,
+    ID_BILLING_USERS,
+    CLIENT_INFO,
+    L_APPOITMENT_TYPE,
+    L_APPOITMENT_DATE,
+    L_APPOITMENT_USER,
+    L_APPOITMENT_INFO
+)
+select t.*
+from
+(
+select
+	0 as ID_OLD,
+    h.A_RECORD_UPDATE_DATE as A_RECORD_CREATE_DATE,
+    h.A_RECORD_UPDATE_AUTHOR as A_RECORD_CREATE_AUTHOR,
+    ( select w.ID_BILLING_USERS from USERS2_WINDYKACJA_STATUS w where w.ID = h.ID_USERS2 ) as ID_BILLING_USERS,
+    '' as CLIENT_INFO,
+	'TEL' as L_APPOITMENT_TYPE,
+    IF('N/S;' = h.L_APPOITMENT_DATE and h.LAST_PHONE_STATUS_DATE != 'N/S;', h.LAST_PHONE_STATUS_DATE, h.L_APPOITMENT_DATE) as L_APPOITMENT_DATE,
+    IF('N/S;' = h.L_APPOITMENT_DATE and h.LAST_PHONE_STATUS_DATE != 'N/S;', h.A_RECORD_UPDATE_AUTHOR, h.L_APPOITMENT_USER) as L_APPOITMENT_USER,
+    IF('N/S;' = h.L_APPOITMENT_DATE and h.LAST_PHONE_STATUS_DATE != 'N/S;', h.LAST_PHONE_STATUS, h.L_APPOITMENT_INFO) as L_APPOITMENT_INFO
+from USERS2_WINDYKACJA_STATUS_HIST h
+where
+    h.A_RECORD_UPDATE_DATE like '2019-09-%'
+    and h.A_RECORD_UPDATE_AUTHOR not like '%update%'
+    and h.ID_KORESP = 'N/S;' -- params like 'rowzwiaanie umowy%'
+union
+
+select
+	c.ID as ID_OLD,
+    c.A_RECORD_CREATE_DATE,
+    c.A_RECORD_CREATE_AUTHOR,
+    c.ID_BILLING_USERS,
+    c.CLIENT_INFO,
+    c.L_APPOITMENT_TYPE,
+    c.L_APPOITMENT_DATE,
+    c.L_APPOITMENT_USER,
+    c.L_APPOITMENT_INFO
+from USERS2_CONTACT c
+where c.ID >= 28
+) as t
+order by t.A_RECORD_CREATE_DATE
+
+
+
 */

+ 1 - 1
SE/se-lib/Route/UrlAction/UserSaldoAfterContact.php

@@ -142,7 +142,7 @@ class Route_UrlAction_UserSaldoAfterContact extends RouteBase {
 			return;
 		}
 
-		throw new AlertSuccessException("Wprowadzono zmiany " . UI::h('a', [ 'href' => $this->getLink('', [ 'id' => $id ]) ], "wróć"));
+		throw new AlertSuccessException("Wprowadzono zmiany " . UI::h('a', [ 'href' => $this->getLink('', [ 'ID' => $id ]) ], "wróć"));
 	}
 
 	function getContactInfo($id) {

+ 20 - 0
SE/se-lib/Route/UrlAction/WindykacjaUpdateStatus.php

@@ -13,6 +13,7 @@ class Route_UrlAction_WindykacjaUpdateStatus extends RouteBase {
 		$postTask = V::get('_postTask', '', $_POST);
 		switch ($postTask) { // PostTask outputs html; TODO: move to WPS functions
 			case 'updateSelected': return $this->updateSelectedPostTask();
+			case 'forceUpdateSelected': return $this->forceUpdateSelectedPostTask();
 			case 'updateAll': return $this->updateAllPostTask();
 		}
 
@@ -103,6 +104,18 @@ class Route_UrlAction_WindykacjaUpdateStatus extends RouteBase {
 		DBG::log("DBG:testSleep::END");
 	}
 
+	function forceUpdateSelectedPostTask() {
+		$sqlSelected = FeatureAttrSelected::getAllSelectedAsSqlSubQuery($typeName = "default_db/USERS2_WINDYKACJA_STATUS");
+		DB::getPDO()->execSql("
+			update USERS2_WINDYKACJA_STATUS t
+			set t.A_STATUS_UPDATE_DATE = :yesterday
+			where t.ID in ( {$sqlSelected} )
+		", [
+			':yesterday' => date("Y-m-d", mktime(0,0,0, date("m"), date("d") - 1, date("Y")))
+		]);
+
+		UI::layout([ $this, 'updateSelectedPostTaskView' ]);
+	}
 	function updateSelectedPostTask() { UI::layout([ $this, 'updateSelectedPostTaskView' ]); }
 	function updateSelectedPostTaskView() {
 		$totalSelected = FeatureAttrSelected::getTotalSelected($typeName = "default_db/USERS2_WINDYKACJA_STATUS");
@@ -158,6 +171,8 @@ class Route_UrlAction_WindykacjaUpdateStatus extends RouteBase {
 			'HTML_ID' => "p5-widget-windykacja-status-update",
 			'TOTAL' => $totalSelected,
 			'EXECUTE_SINGLE_TASK_URL' => $this->getLink("updateOneFromSelectedAjaxTask"),
+			'ALLOW_FORCE_UPDATE' => User::isAdmin(),
+			'FORCE_UPDATE_POST_DATA' => User::isAdmin() ? [ '_postTask' => 'forceUpdateSelected' ] : null,
 		]);
 
 		echo UI::h('div', [ 'style' => "font-size:14px" ], [
@@ -220,9 +235,14 @@ class Route_UrlAction_WindykacjaUpdateStatus extends RouteBase {
 				':today' => date("Y-m-d"),
 			]);
 			$user = Windykacja_StatsModel::get_user_by_id($toUpdateClientID);
+			DBG::log([ '$toUpdateClientID' => $toUpdateClientID, 'user' => $user ], 'array', "DBG:updateOneFromSelectedAjaxTask");
 			if ($user) {
 				$billing_docs = Windykacja_StatsModel::getBillDocsByDate($user->ID);
 				Windykacja_StatsHelper::update_stats($user, $billing_docs);
+			} else {
+				DB::getPDO()->update('USERS2_WINDYKACJA_STATUS', 'ID_BILLING_USERS', $toUpdateClientID, [
+					'A_STATUS_UPDATE_DATE' => date("Y-m-d"),
+				]);
 			}
 		}
 

+ 25 - 2
SE/se-lib/Route/UrlAction/WindykacjaUpdateStatus.php.view.js

@@ -7,6 +7,8 @@ if (!HTML_ID) throw "Missing HTML_ID";
 if (!TOTAL) throw "Missing TOTAL";
 if (!EXECUTE_SINGLE_TASK_URL) throw "Missing EXECUTE_SINGLE_TASK_URL";
 if (!global.p5VendorJs) throw "Missing vendor.js";
+var ALLOW_FORCE_UPDATE = ALLOW_FORCE_UPDATE || false;
+var FORCE_UPDATE_POST_DATA = FORCE_UPDATE_POST_DATA || [];
 
 var createReactClass = global.p5VendorJs.createReactClass;
 var h = global.p5VendorJs.React.createElement;
@@ -115,6 +117,10 @@ var P5UI__WindykacjaStatusUpdate = createReactClass({
 		event.preventDefault()
 		location.reload()
 	},
+	handleClickForceRestart: function (event) {
+		event.preventDefault()
+		
+	},
 	handleClickPause: function (event) {
 		event.preventDefault()
 		this.setState({ execAgain: false })
@@ -162,8 +168,8 @@ var P5UI__WindykacjaStatusUpdate = createReactClass({
 					]),
 
 					(this.state.responseBody)
-					? h('p', {}, "Wykonano " + this.state.responseBody.totalDone + " z " + this.state.responseBody.total)
-					: '',
+					?	h('p', {}, "Wykonano " + this.state.responseBody.totalDone + " z " + this.state.responseBody.total)
+					:	'',
 
 					(this.state.errorMsg) ? h('div', { className: "alert alert-danger" }, [
 						this.state.errorMsg,
@@ -171,15 +177,32 @@ var P5UI__WindykacjaStatusUpdate = createReactClass({
 						h('button', { className: "btn btn-primary", onClick: this.handleClickRestart }, "Uruchom ponownie")
 					]) : "",
 
+					(isDone && !this.state.errorMsg && this.props.allowForceUpdate)
+					?	h('div', { style: { float: "right" } }, [
+							h(P5UI__PostButton, { data: this.props.forceUpdatePostData, className: "btn btn-xs btn-warning", label: "Wymuś ponowne uruchomienie" })
+						])
+					:	'',
 				]),
 			]),
 		]);
 	}
 });
 
+var P5UI__PostButton = function (props) { // @props: { label: string, data: { key: value, ... } }
+	return h('form', { 'style' : { display : "inline" }, method: "POST" }, [
+		h('div', {}, Object.keys(props.data).map(function (key) {
+			return h('input', { type: "hidden", name: key, value: props.data[key] });
+		})),
+		h('button', { className: props.className || "btn btn-primary", type: "submit" }, props.label)
+	]);
+}
+
+
 ReactDOM.render(
 	h(P5UI__WindykacjaStatusUpdate, {
 		total: TOTAL,
+		allowForceUpdate: ALLOW_FORCE_UPDATE,
+		forceUpdatePostData: FORCE_UPDATE_POST_DATA,
 	}),
 	document.getElementById(HTML_ID)
 )

+ 99 - 73
SE/se-lib/TableAjax.php.TableAjax.js

@@ -31,7 +31,7 @@ if (!String.prototype.startsWith) { // TODO: to global js utils
 		return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
 	};
 }
-p5WfsRefFilter = (function () { // convert GET param key ogc filter for ref
+var p5WfsRefFilter = (function () { // convert GET param key ogc filter for ref
 	return {
 		parse: function (filterKey) {
 			if (filterKey.startsWith('Ref_From_')) return { type: 'From', idInstance: filterKey.substr('Ref_From_'.length) };
@@ -750,11 +750,11 @@ var TableAjax = function() {
 	};
 
 	var _reactUITableNode; // TODO: react table node
-	var _uiNodeCont; // container holding table
+	var _uiMainContainerNode; // container holding table
 	var _uiNodeSelectedInfo;
 	var _uiNodeSpecialFilters;
 	var _uiNodeFooterInfo;
-	var _uiNode$Table; // the table node
+	var _uiNode$Table; // the table jQuery node
 	var _head; // table header
 	var _headSort; // table header sorting row
 	var _headFilter; // table header columns filter row
@@ -785,15 +785,15 @@ var TableAjax = function() {
 	 initialize the plugin.
 	 */
 	priv.init = function() {
-		_uiNodeCont = priv.options.id; // <div id="{_htmlID}" style="..."><table class="AjaxTable...
+		_uiMainContainerNode = priv.options.mainContainerNode; // <div id="{_htmlID}" style="..."><table class="AjaxTable...
 		_state = {};// init state
 		_state.page = 1;
 		_state.specialFilters = {};
 		{ // init events
-			jQuery(_uiNodeCont).on('TableAjax:render', priv.onRender);
+			jQuery(_uiMainContainerNode).on('TableAjax:render', priv.onRender);
 			jQuery(window).on('resize', priv.onWindowResize)
 		}
-		priv.initialRender();// set up _uiNode$...
+		priv.initialRender();// set up _uiNode$Table, ...
 		priv.options.types.string = ((priv.options.types || {}).string || {});
 		priv.options.types.number = ((priv.options.types || {}).number || {});
 		priv.options.types.bool = ((priv.options.types || {}).bool || {});
@@ -1007,17 +1007,17 @@ var TableAjax = function() {
 		var stickyCol1Width = priv.getStickyCol1Width();
 		var stickyCol2Width = priv.getStickyCol2Width();
 		var stickyCol3Width = priv.getStickyCol3Width();
-		var contW = jQuery(_uiNodeCont).parent().width();
+		var contW = jQuery(_uiMainContainerNode).parent().width();
 		var colsW = stickyCol1Width + stickyCol2Width + stickyCol3Width;
-		jQuery(_uiNodeCont).css({width:'' + (contW - colsW) + 'px'})//, marginLeft:'' + colsW + 'px', overflowX:'scroll', overflowY:'visible', paddingBottom:'1px'});
+		jQuery(_uiMainContainerNode).css({width:'' + (contW - colsW) + 'px'})//, marginLeft:'' + colsW + 'px', overflowX:'scroll', overflowY:'visible', paddingBottom:'1px'});
 
 		var wh = jQuery(window).height(); // returns height of browser viewport
 		var dh = jQuery(document).height(); // returns height of HTML document (same as pageHeight in screenshot)
 		if (dh > wh) {
-			jQuery(_uiNodeCont).doubleScroll()
-			jQuery(_uiNodeCont).prev('.doubleScroll-scroll-wrapper').css({float: 'right', display:'block'})
+			jQuery(_uiMainContainerNode).doubleScroll()
+			jQuery(_uiMainContainerNode).prev('.doubleScroll-scroll-wrapper').css({float: 'right', display:'block'})
 		} else {
-			jQuery(_uiNodeCont).prev('.doubleScroll-scroll-wrapper').css({display:'none'})
+			jQuery(_uiMainContainerNode).prev('.doubleScroll-scroll-wrapper').css({display:'none'})
 		}
 	}
 	priv.uiFixStickyCols = function () {
@@ -1026,14 +1026,14 @@ var TableAjax = function() {
 		var stickyCol3Width = priv.getStickyCol3Width();
 		if (undefined === _tableWidth) {
 			_tableWidth = true;
-			var contW = jQuery(_uiNodeCont).width();
+			var contW = jQuery(_uiMainContainerNode).width();
 			var th1 = _uiNode$Table.find('.stickyCol1:first');
 			var th2 = th1.next();
 			var th1W = th1.innerWidth();
 			var th2W = 50 + 2 * 5;//th2.innerWidth();
 			// var colsW = stickyCol1Width + stickyCol2Width + stickyCol3Width;
 			var colsW = priv.getStickyColsSumWidth();
-			jQuery(_uiNodeCont).css({
+			jQuery(_uiMainContainerNode).css({
 				width: '' + (contW - colsW) + 'px',
 				marginLeft: '' + colsW + 'px',
 				minHeight:  '360px',
@@ -1084,7 +1084,7 @@ var TableAjax = function() {
 		_reactUITableNode = document.createElement('div')
 		if (!isVisible) _reactUITableNode.style.display = 'none';
 		_reactUITableNode.setAttribute('class', "TableAjax-reactUITableNode");
-		_uiNodeCont.parentNode.appendChild(_reactUITableNode);
+		_uiMainContainerNode.parentNode.appendChild(_reactUITableNode);
 		ReactDOM.render(
 			h(p5UI__TableAjaxWidget, {
 				namespace: priv.options.namespace,
@@ -1100,24 +1100,44 @@ var TableAjax = function() {
 	};
 
 	priv.initialRender = function() {
-		_uiNode$Table = $('<table class="AjaxTable table table-striped table-hover table-bordered table-condensed"></table>').appendTo(_uiNodeCont);
+		/**
+			 <topWrap /> <!-- @selected | filters -->
+			 <afterTopWrap /> <!-- for clear:both, border and padding -->
+			 <_uiMainContainerNode>
+				<_uiNode$Table>
+					<_head>
+						<_headSort />
+						<_headFilter />
+					</_head>
+					<_bodyNode />
+					<tfoot /> <!-- @todo: empty? not used? -->
+				</_uiNode$Table>
+			</_uiMainContainerNode>
+			<_foot /> <!-- @class="foot tblAjax__footer": total | pagination | ui table functions -->
+			<tblAjax__inlineEditBox/>
+			<_mapEditorWrap />
+			<_popoverCell />
+		 */
+		_uiNode$Table = $('<table class="AjaxTable table table-striped table-hover table-bordered table-condensed"></table>').appendTo(_uiMainContainerNode);
 			_head = $('<thead></thead>').prependTo(_uiNode$Table);
 				_headSort = $('<tr class="sort tblAjax__head__sort"></tr>').prependTo(_head);
 				_headFilter = $('<tr class="filter tblAjax__head__filter"></tr>').appendTo(_head);
 			_bodyNode = $('<tbody></tbody>').insertAfter(_head);
 		$('<tfoot></tfoot>').insertAfter(_bodyNode);
-		_foot = $('<div class="foot tblAjax__footer" style="margin:0; padding:12px; border-top:1px solid #ddd; border-bottom:1px solid #ddd"></div>').insertAfter(_uiNodeCont);
-		var footToolbar = $('<div class="btn-toolbar tblAjax__footer__toolbar" style="margin:0"></div>').appendTo(_foot);
-		_uiNodeFooterInfo = document.createElement('div') // .tblAjax__head__specialFilter
-		_uiNodeFooterInfo.setAttribute('class', "tblAjax__footer__toolbar__info foot-info");
-		_uiNodeFooterInfo.style.float = "left";
-		_uiNodeFooterInfo.style.padding = "0 20px 0 0";
-		$(_uiNodeFooterInfo).appendTo(footToolbar);
-		$('<span class="tblAjax__footer__toolbar__pagination"></span>').appendTo(footToolbar);
-		$('<span class="tblAjax__footer__toolbar__pagesizes"></span>').appendTo(footToolbar);
-		$('<span class="tblAjax__footer__toolbar__columnPicker"></span>').appendTo(footToolbar);
-		$('<span class="tblAjax__footer__toolbar__functions"></span>').appendTo(footToolbar);
-		$('<span class="tblAjax__footer__toolbar__export"></span>').appendTo(footToolbar);
+		_foot = $('<div class="foot tblAjax__footer" style="margin:0; padding:12px; border-top:1px solid #ddd; border-bottom:1px solid #ddd"></div>').insertAfter(_uiMainContainerNode);
+		{
+			var footToolbar = $('<div class="btn-toolbar tblAjax__footer__toolbar" style="margin:0"></div>').appendTo(_foot);
+			_uiNodeFooterInfo = document.createElement('div') // .tblAjax__head__specialFilter
+			_uiNodeFooterInfo.setAttribute('class', "tblAjax__footer__toolbar__info foot-info");
+			_uiNodeFooterInfo.style.float = "left";
+			_uiNodeFooterInfo.style.padding = "0 20px 0 0";
+			$(_uiNodeFooterInfo).appendTo(footToolbar);
+			$('<span class="tblAjax__footer__toolbar__pagination"></span>').appendTo(footToolbar);
+			$('<span class="tblAjax__footer__toolbar__pagesizes"></span>').appendTo(footToolbar);
+			$('<span class="tblAjax__footer__toolbar__columnPicker"></span>').appendTo(footToolbar);
+			$('<span class="tblAjax__footer__toolbar__functions"></span>').appendTo(footToolbar);
+			$('<span class="tblAjax__footer__toolbar__export"></span>').appendTo(footToolbar);
+		}
 		_mapEditorWrap = $('<div class="mapEditor" style="display:none"></div>').insertAfter(_foot);
 			_mapEditor = $('<div class="mapEditor-map"></div>').appendTo(_mapEditorWrap);
 		_popoverCell = $('<div class="popoverCell" style="display:none"></div>').insertAfter(_foot);
@@ -1125,25 +1145,31 @@ var TableAjax = function() {
 		_uiNodeSelectedInfo = document.createElement('div')
 		_uiNodeSpecialFilters = document.createElement('div') // .tblAjax__head__specialFilter
 		var topWrap = document.createElement('div')
-		var topLeftWrap = document.createElement('div')
-		var topRightWrap = document.createElement('div')
-		topWrap.appendChild(topLeftWrap)
-		topWrap.appendChild(topRightWrap)
-		topWrap.style.padding = '12px 0'
-		topWrap.style.borderTop = '1px solid #ddd'
-		topLeftWrap.style.width = '' + priv.getStickyColsSumWidth() + 'px'
-		topLeftWrap.style.float = 'left'
-		topLeftWrap.style.fontSize = '12px'
-		topLeftWrap.style.lineHeight = '22px'
-		topRightWrap.style.float = 'left'
-		topLeftWrap.appendChild(_uiNodeSelectedInfo)
-		topRightWrap.appendChild(_uiNodeSpecialFilters)
-		_uiNodeCont.parentNode.insertBefore(topWrap, _uiNodeCont)
+		{
+			var topLeftWrap = document.createElement('div')
+			var topRightWrap = document.createElement('div')
+			topWrap.setAttribute('p5_node_name', "topWrap")
+			topWrap.appendChild(topLeftWrap)
+			topWrap.appendChild(topRightWrap)
+			topWrap.style.padding = '12px 0'
+			topWrap.style.borderTop = '1px solid #ddd'
+			topLeftWrap.style.width = '' + priv.getStickyColsSumWidth() + 'px'
+			topLeftWrap.style.float = 'left'
+			topLeftWrap.style.fontSize = '12px'
+			topLeftWrap.style.lineHeight = '22px'
+			topRightWrap.style.float = 'left'
+			topLeftWrap.appendChild(_uiNodeSelectedInfo)
+			topRightWrap.appendChild(_uiNodeSpecialFilters)
+		}
+		_uiMainContainerNode.parentNode.insertBefore(topWrap, _uiMainContainerNode)
 		var afterTopWrap = document.createElement('div')
-		afterTopWrap.style.paddingTop = '12px'
-		afterTopWrap.style.borderBottom = '1px solid #ddd'
-		afterTopWrap.style.clear = 'both'
-		_uiNodeCont.parentNode.insertBefore(afterTopWrap, _uiNodeCont)
+		{
+			afterTopWrap.setAttribute('p5_node_name', "afterTopWrap")
+			afterTopWrap.style.paddingTop = '12px'
+			afterTopWrap.style.borderBottom = '1px solid #ddd'
+			afterTopWrap.style.clear = 'both'
+		}
+		_uiMainContainerNode.parentNode.insertBefore(afterTopWrap, _uiMainContainerNode)
 
 		priv.renderInlineEditBox();// .tblAjax__inlineEditBox
 
@@ -1197,7 +1223,7 @@ var TableAjax = function() {
 			priv.renderTableTfoot();
 			priv.renderFooter();
 		}
-		_foot = $(_uiNodeCont).next('.foot');
+		_foot = $(_uiMainContainerNode).next('.foot');
 
 		priv.uiFixStickyCols();
 
@@ -2137,7 +2163,7 @@ var TableAjax = function() {
 	priv.renderTableTfoot = function() {
 		_uiNode$Table.find('tfoot').remove();
 		_foot = $('<tfoot></tfoot>').insertAfter(_bodyNode);
-		//$(_uiNodeCont).next('.foot').replaceWith(_foot);
+		//$(_uiMainContainerNode).next('.foot').replaceWith(_foot);
 	};
 
 	priv.renderFooter = function() {
@@ -2184,7 +2210,7 @@ var TableAjax = function() {
 	};
 	priv.renderFooterPagination = function() {
 		var nodeClass = 'tblAjax__' + 'footer__toolbar__pagination',
-				currentNode = $(_uiNodeCont).next('.foot').find('.' + nodeClass),
+				currentNode = $(_uiMainContainerNode).next('.foot').find('.' + nodeClass),
 				node;
 		var currPage = _state.page;
 		if (priv.options.debug || DBG) console.log('Render: ', nodeClass, '_data.total', _data.total, 'currPage', currPage);
@@ -2248,7 +2274,7 @@ var TableAjax = function() {
 	};
 	priv.renderFooterPageSizes = function() {
 		var nodeClass = 'tblAjax__' + 'footer__toolbar__pagesizes',
-				currentNode = $(_uiNodeCont).next('.foot').find('.' + nodeClass),
+				currentNode = $(_uiMainContainerNode).next('.foot').find('.' + nodeClass),
 				node;
 		if (priv.options.debug || DBG) console.log('Render: ', nodeClass);
 		if (priv.options.pageSizes.length > 0) {
@@ -2273,7 +2299,7 @@ var TableAjax = function() {
 	};
 	priv.renderFooterColumnPicker = function() {
 		var nodeClass = 'tblAjax__' + 'footer__toolbar__columnPicker',
-				currentNode = $(_uiNodeCont).next('.foot').find('.' + nodeClass),
+				currentNode = $(_uiMainContainerNode).next('.foot').find('.' + nodeClass),
 				node;
 		if (priv.options.debug || DBG) console.log('Render: ', nodeClass);
 		if (priv.options.columnPicker) {
@@ -2317,7 +2343,7 @@ var TableAjax = function() {
 	};
 	priv.renderFooterFunctions = function() {
 		var nodeClass = 'tblAjax__' + 'footer__toolbar__functions',
-				currentNode = $(_uiNodeCont).next('.foot').find('.' + nodeClass),
+				currentNode = $(_uiMainContainerNode).next('.foot').find('.' + nodeClass),
 				node;
 		if (priv.options.debug || DBG) console.log('Render: ', nodeClass);
 		if (priv.options.tblFunctions) {
@@ -2342,7 +2368,7 @@ var TableAjax = function() {
 	};
 	priv.renderFooterExport = function() {
 		var nodeClass = 'tblAjax__' + 'footer__toolbar__export',
-				currentNode = $(_uiNodeCont).next('.foot').find('.' + nodeClass),
+				currentNode = $(_uiMainContainerNode).next('.foot').find('.' + nodeClass),
 				node;
 		if (priv.options.debug || DBG) console.log('Render: ', nodeClass);
 		if (priv.options.exportFields && priv.options.exportFields.length) {
@@ -2383,7 +2409,7 @@ var TableAjax = function() {
 
 	priv.renderInlineEditBox = function() {
 		var nodeClass = 'tblAjax__' + 'inlineEditBox',
-				currentNode = $(_uiNodeCont).parent().children('.' + nodeClass),
+				currentNode = $(_uiMainContainerNode).parent().children('.' + nodeClass),
 				node;
 		var node = $('<div class="' + nodeClass + ' modal fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div>');
 		var modalWrap = $('<div class="modal-dialog"></div>').appendTo(node);
@@ -2402,7 +2428,7 @@ var TableAjax = function() {
 		var iebBtnSave = $('<input type="submit" value="Zapisz" class="btn btn-primary btn-save">').appendTo(iebFoot);
 
 		frmInlineEdit.on('submit', function() {
-			var inlineEditBox$Node = $(_uiNodeCont).parent().children('.tblAjax__inlineEditBox');
+			var inlineEditBox$Node = $(_uiMainContainerNode).parent().children('.tblAjax__inlineEditBox');
 			var data = inlineEditBox$Node.find('form').serialize();
 			inlineEditBox$Node.find('.inlineEditBox-cnt').html('<span class="loading-info"> loading ...</span>');
 			function notifyAjaxCallback(data) {
@@ -2558,7 +2584,7 @@ var TableAjax = function() {
 			'Jeśli problem się powtarza, spróbuj ' +
 		'</div>')
 		msgNode.append(clearAllFiltersBtn);
-		jQuery(_uiNodeCont).prepend(msgNode);
+		jQuery(_uiMainContainerNode).prepend(msgNode);
 	}
 
 	/*
@@ -2663,7 +2689,7 @@ var TableAjax = function() {
 
 		if (renderParts.length > 0) {
 			DBG && console.log('DBG::trigger(TableAjax:render): ', renderParts);
-			jQuery(_uiNodeCont).trigger('TableAjax:render', renderParts);
+			jQuery(_uiMainContainerNode).trigger('TableAjax:render', renderParts);
 		}
 	};
 
@@ -2706,7 +2732,7 @@ var TableAjax = function() {
 				})
 			: []
 		;
-		jQuery(_uiNodeCont).trigger('TableAjax:updateRows', { primaryKeys: listPrimaryKeys });
+		jQuery(_uiMainContainerNode).trigger('TableAjax:updateRows', { primaryKeys: listPrimaryKeys });
 		if (priv.options.checkboxes) {
 			priv.options.selectedStore.dispatch( priv.options.selectedActions.setPrimaryKeys(priv.options.namespace, listPrimaryKeys) );
 		}
@@ -2857,7 +2883,7 @@ var TableAjax = function() {
 		if ('window' == priv.options.mapEditorContainer) {
 			var mapEditor = _mapEditorWrap.children('.mapEditor-map');
 			if (!mapEditor || !mapEditor.length) {
-				var tblCont = jQuery(_uiNodeCont).parent('.AjaxTableCont');
+				var tblCont = jQuery(_uiMainContainerNode).parent('.AjaxTableCont');
 				var mapEditor = tblCont.children('.AjaxTableCont-mapEditorContainer').children('.mapEditor-map');
 				if (!mapEditor || !mapEditor.length) {
 					// TODO: create new map
@@ -2917,7 +2943,7 @@ var TableAjax = function() {
 			var mapEditor = _mapEditorWrap.children('.mapEditor-map');
 			if (mapEditor && mapEditor.length) {// map is inside _mapEditorWrap (window)
 				var mapDockNode = jQuery('<div class="AjaxTableCont-mapEditorContainer"></div>');
-				var tblCont = jQuery(_uiNodeCont).parent('.AjaxTableCont');
+				var tblCont = jQuery(_uiMainContainerNode).parent('.AjaxTableCont');
 				tblCont.children('.AjaxTableCont-mapEditorContainer').remove();
 				var breadcrumb = tblCont.children('.breadcrumb');
 				if (!breadcrumb || !breadcrumb.length) {
@@ -2942,7 +2968,7 @@ var TableAjax = function() {
 				ui.element.children(":first").children(":first").css({display:'block', height: ui.element.height()});
 			});
 		} else if ('destroy' == task) {
-			var mapDockResizable = jQuery(_uiNodeCont).parent('.AjaxTableCont').children('.AjaxTableCont-mapEditorContainer');
+			var mapDockResizable = jQuery(_uiMainContainerNode).parent('.AjaxTableCont').children('.AjaxTableCont-mapEditorContainer');
 			mapDockResizable.resizable('destroy');
 			mapDockResizable.remove();
 		}
@@ -3003,7 +3029,7 @@ var TableAjax = function() {
 
 		publ.loadPage(1, priv.options.pageSize);
 
-		jQuery(_uiNodeCont).trigger('TableAjax:render', ['body', 'foot_pagination']);
+		jQuery(_uiMainContainerNode).trigger('TableAjax:render', ['body', 'foot_pagination']);
 
 		priv.saveProfilePageSize(priv.options.pageSize);
 	};
@@ -3085,7 +3111,7 @@ var TableAjax = function() {
 		priv.saveHiddenCols();
 
 		//_data.cols[column].index = new priv.ext.XDate();
-		jQuery(_uiNodeCont).trigger('TableAjax:render', ['head', 'body']);
+		jQuery(_uiMainContainerNode).trigger('TableAjax:render', ['head', 'body']);
 	};
 
 	priv.modelColFilter_init = function() {// run only once, set _state._modelColFilter {selected, filters: [ {name, label, visibleCols} ]}
@@ -3144,7 +3170,7 @@ var TableAjax = function() {
 								visibleCols: result.data[fltr].split(',')
 							}
 						}))
-						jQuery(_uiNodeCont).trigger('TableAjax:render', ['foot__columnPicker']);
+						jQuery(_uiMainContainerNode).trigger('TableAjax:render', ['foot__columnPicker']);
 					} else {
 						p5UI__notifyAjaxCallback(result)
 					}
@@ -3184,7 +3210,7 @@ var TableAjax = function() {
 						visibleCols: userTableFilters[fltr].split(',')
 					}
 				}))
-				jQuery(_uiNodeCont).trigger('TableAjax:render', ['foot__columnPicker']);
+				jQuery(_uiMainContainerNode).trigger('TableAjax:render', ['foot__columnPicker']);
 			} else {
 				p5UI__notifyAjaxCallback(result)
 			}
@@ -3257,7 +3283,7 @@ var TableAjax = function() {
 					visibleCols: userTableFilters[fltr].split(',')
 				}
 			}))
-			jQuery(_uiNodeCont).trigger('TableAjax:render', ['head', 'body', 'foot__columnPicker']);
+			jQuery(_uiMainContainerNode).trigger('TableAjax:render', ['head', 'body', 'foot__columnPicker']);
 		}).catch(function(e) {
 			// eg. hit Cancel
 		})
@@ -3302,13 +3328,13 @@ var TableAjax = function() {
 	};
 	priv.modelColFilter_uiUncheckAllColFilters = function() {
 		var nodeClass = 'tblAjax__' + 'footer__toolbar__columnPicker',
-				currentNode = $(_uiNodeCont).next('.foot').find('.' + nodeClass)
+				currentNode = $(_uiMainContainerNode).next('.foot').find('.' + nodeClass)
 		;
 		currentNode.find('input[type="radio"]').prop("checked", false);
 	};
 	priv.modelColFilter_uiCheckColFilter = function(filterKey) {
 		var nodeClass = 'tblAjax__' + 'footer__toolbar__columnPicker',
-				currentNode = $(_uiNodeCont).next('.foot').find('.' + nodeClass)
+				currentNode = $(_uiMainContainerNode).next('.foot').find('.' + nodeClass)
 		;
 		currentNode.find('input[type="radio"]').each(function(idx, input) {
 			var input$ = jQuery(input);
@@ -3341,7 +3367,7 @@ var TableAjax = function() {
 			});
 			priv.modelColFilter_setFilter(col_filter);
 			priv.saveHiddenCols();
-			jQuery(_uiNodeCont).trigger('TableAjax:render', ['head', 'body', 'foot__columnPicker']);
+			jQuery(_uiMainContainerNode).trigger('TableAjax:render', ['head', 'body', 'foot__columnPicker']);
 		} else {
 			e.preventDefault();
 			if (input$.length != 1) return;
@@ -3352,7 +3378,7 @@ var TableAjax = function() {
 			input$.prop("checked", !input$.is(':checked'));// update view
 			priv.saveHiddenCols();
 			//_data.cols[column].index = new priv.ext.XDate();
-			jQuery(_uiNodeCont).trigger('TableAjax:render', ['head', 'body']);
+			jQuery(_uiMainContainerNode).trigger('TableAjax:render', ['head', 'body']);
 		}
 	};
 
@@ -3372,7 +3398,7 @@ var TableAjax = function() {
 		priv.saveHiddenCols();
 
 		//_data.cols[column].index = new priv.ext.XDate();
-		jQuery(_uiNodeCont).trigger('TableAjax:render', ['head', 'body', 'foot__columnPicker']);
+		jQuery(_uiMainContainerNode).trigger('TableAjax:render', ['head', 'body', 'foot__columnPicker']);
 	};
 
 	/*
@@ -3407,7 +3433,7 @@ var TableAjax = function() {
 	 * Inline edit.
 	 */
 	priv.rowDblClicked = function(e) { // TODO: export outside (handle in table router file)
-		var inlineEditBox$Node = $(_uiNodeCont).parent().children('.tblAjax__inlineEditBox');
+		var inlineEditBox$Node = $(_uiMainContainerNode).parent().children('.tblAjax__inlineEditBox');
 
 		// hide popover for typespecial fld on click
 		if (_popoverCellCurrent) {
@@ -3651,7 +3677,7 @@ var TableAjax = function() {
 				DBG && console.log('DBG:priv.asyncFetchTotal fetch success', { reqId: this__asyncFetchTotal__reqId, data: data })
 				if (SKIP_TOTAL) _state.asyncFetchTotal__lastReceivedId = this__asyncFetchTotal__reqId;
 				if (SKIP_TOTAL) _state.isLoadingTotal = (_state.asyncFetchTotal__lastReceivedId < _state.asyncFetchTotal__lastSentReqId);
-				jQuery(_uiNodeCont).trigger('TableAjax:render', [ 'foot_pagination' ]);
+				jQuery(_uiMainContainerNode).trigger('TableAjax:render', [ 'foot_pagination' ]);
 			} else {
 				p5UI__notifyAjaxCallback(data);
 				// priv.showFailFetchDataMsg();
@@ -3728,7 +3754,7 @@ var TableAjax = function() {
 $.fn.TableAjax = function(options) {
 	options = options || {};
 	return this.each(function() {
-		options.id = this;
+		options.mainContainerNode = this;
 		$(this).data('TableAjax', new TableAjax().init(options));
 	});
 };

+ 2 - 2
SE/se-lib/TableAjax.php.p5UI__selected.js

@@ -187,7 +187,7 @@ var P5UI__TableAjaxSelectedInfo = createReactClass({
 	renderToolsBtn: function () {
 		if (!this.state.totalSelected) return null;
 		if (!this.props.tools || !Object.keys(this.props.tools).length) return null;
-		DBG1 && console.log('DBG::P5UI__TableAjaxSelectedInfo::renderTools (ns:' + this.props.namespace + ')', { props: this.props, state: this.state });
+		DBG && console.log('DBG::P5UI__TableAjaxSelectedInfo::renderTools (ns:' + this.props.namespace + ')', { props: this.props, state: this.state });
 		return h('a', {
 			className: "btn btn-xs btn-default dropdown-toggle",
 			onClick: this.handleToggle,
@@ -211,7 +211,7 @@ var P5UI__TableAjaxSelectedInfo = createReactClass({
 
 		return h('ul', { ref: this.makeDropdownRef, className: "dropdown-menu" }, Object.keys(tools).map(function (idTool) {
 			var func = tools[idTool];
-			console.log('DBG: render tool', { func });
+			DBG && console.log('DBG: render tool', { func });
 			// baseLink: "index.php?_route=UrlAction_BiallProduktyPlikiSyncSelected"
 			// cell_id_params: []
 			// ico: "glyphicon glyphicon-share"

+ 80 - 2
SE/se-lib/Windykacja/StatsHelper.php

@@ -78,10 +78,10 @@ class Windykacja_StatsHelper {
 	 * 
 	 * save HIST at status change to WAITING
 	 */
-	public static function update_stats(&$user, &$billing_docs) {
+	public static function update_stats(&$user, &$billing_docs, $force = false) {
 		$data_arr = array();
 		if (!V::get('DBG_LAST_FVAT_PAY_TERM', '', $_GET)) {
-			if ($user->A_STATUS_UPDATE_DATE >= date("Y-m-d")) {
+			if ($user->A_STATUS_UPDATE_DATE >= date("Y-m-d") && !$force) {
 				return;
 			}
 		}
@@ -108,6 +108,12 @@ class Windykacja_StatsHelper {
 				left join `BILLING_USERS` as bu on ( bu.`ID` = bua.`id_users` )
 			where bua.`id_users` = :id_user
 		", [ ':id_user' => $user->ID_BILLING_USERS ]);
+		$data_arr["BILLING_USER_TEL"] = DB::getPDO()->fetchValue("
+			select c.P_PHONE
+			from `COMPANIES` as c
+			where c.ID = :id_user
+		", [ ':id_user' => $user->ID_BILLING_USERS ]);
+		$data_arr["BILLING_USER_TEL"] = self::fixPhoneNumberFieldFormat($data_arr["BILLING_USER_TEL"]);
 		$data_arr["BILLING_USER_ADRES"] = DB::getPDO()->fetchValue("
 			select concat(bua.P_ADDRESS_POST_CODE, ' ', bua.P_ADDRESS_CITY, ' ', bua.P_ADDRESS_STREET, ' ', bua.P_ADDRESS_HOME, '/', bua.P_ADDRESS_HOUSE) as P_NAME
 			from `BILLING_USERS_ADD` as bua
@@ -289,6 +295,78 @@ class Windykacja_StatsHelper {
 		}
 	}
 
+	static function fixPhoneNumberFieldFormat($tel) {
+		// @see https://pl.wikipedia.org/wiki/Numer_telefonu
+		$tel = trim(str_replace(["/"], " ", $tel));
+		$tel = str_replace([ "-" ], "", $tel);
+		$tel = str_replace("  ", " ", $tel);
+
+		if (preg_match_all("/^\d{3} \d{3} \d{3}\$/", $tel, $matches) > 0) {
+			return str_replace([ " " ], "", $tel);
+		}
+		if (preg_match_all("/^\+48 \d{3} \d{2} \d{2}\$/", $tel, $matches) > 0) {
+			return "+48 " . str_replace(" ", "", substr($tel, strlen("+48")));
+		}
+		if (preg_match_all("/^\+48 \d{2} \d{3} \d{2} \d{2}\$/", $tel, $matches) > 0) {
+			return "+48 " . str_replace(" ", "", substr($tel, strlen("+48")));
+		}
+		if (preg_match_all("/^\+48 \(\d{2}\) \d{3} \d{2} \d{2}\$/", $tel, $matches) > 0) {
+			return "+48 " . str_replace([" ", "(", ")"], "", substr($tel, strlen("+48")));
+		}
+		if (preg_match_all("/^\(\+48\) \(?\d{2}\)? \d{3} \d{2} \d{2}\$/", $tel, $matches) > 0) {
+			return "+48 " . str_replace([" ", "(", ")"], "", substr($tel, strlen("(+48)")));
+		}
+		if (preg_match_all("/^48 \(\d{2}\) \d{3} \d{2} \d{2}\$/", $tel, $matches) > 0) {
+			return "+48 " . str_replace([" ", "(", ")"], "", substr($tel, strlen("48")));
+		}
+		if (preg_match_all("/^\d{2} \d{7}\$/", $tel, $matches) > 0) {
+			return "+48 " . str_replace(" ", "", $tel);
+		}
+		if (preg_match_all("/^\+48\d{9}\$/", $tel, $matches) > 0) {
+			return "+48 " . substr($tel, strlen("+48"));
+		}
+		// if (preg_match_all("/^(58)?[ ]?\d{3}[ ]?\d{2}[ ]?\d{2}\$/", $tel, $matches) > 0) {
+		// 	$tel = str_replace("  ", " ", $tel);
+		// 	return str_replace([ " " ], "", $tel);
+		// }
+		if (preg_match_all("/^\d{9} \d{9}\$/", $tel, $matches) > 0) {
+			return str_replace(" ", ", ", $tel);
+		}
+
+		return $tel;
+	}
+	static function test__fixPhoneNumberFieldFormat() {
+		$examples = [];
+		$examples[] = [ "+48 58 325 42 74", "+48 583254274" ];
+		$examples[] = [ "+48607451902", "+48 607451902" ];
+		$examples[] = [ "502 757 004", "502757004" ];
+		$examples[] = [ "695250652, 223803000", "695250652, 223803000" ];
+		$examples[] = [ "660747288 586825221", "660747288, 586825221" ];
+		$examples[] = [ "694-110-000", "694110000" ];
+		$examples[] = [ "+420 603158417", "+420 603158417" ]; // +420 Czechy
+		$examples[] = [ "58/ 30-40-050", "+48 583040050" ];
+		$examples[] = [ "58/326-01-00", "+48 583260100" ];
+		$examples[] = [ "48 (22) 555 56 01", "+48 225555601" ];
+		$examples[] = [ "(+48) 58 341 40 11", "+48 583414011" ];
+		$examples[] = [ "(22) 782 35 20 (30)", "+48 227823520 (30)" ]; // ??
+		$examples[] = [ "95 7336200", "+48 957336200" ];
+
+		UI::table([
+			'rows' => array_map(function ($test) {
+				$tel = $test[0];
+				$expected = $test[1];
+				$result = self::fixPhoneNumberFieldFormat($tel);
+				return [
+					'in' => $tel,
+					'out' => $result,
+					'passed' => ($result === $expected) ? "OK" : "ERR",
+					'expected' => $expected,
+				];
+			}, $examples),
+		]);
+	}
+
+
 	public static function updateUserKoresp($user) {
 		DB::getPDO()->execSql("
 			insert into `USERS2_WINDYKACJA_STATUS_HIST` (

+ 172 - 12
SE/static/p5UI/initP5MainMenuDropdown.js

@@ -2,6 +2,8 @@ if (!global.p5UI__MenuStore) throw 'Missing global.p5UI__MenuStore'
 var DBG = DBG || 0
 var DBG1 = 1
 
+// TODO: mv to React: { state: { menu items, query } }
+
 function renderLabel(item) {
 	return (item.short_label !== item.desc)
 		? item.short_label + ' <em>' + item.desc + '</em>'
@@ -38,7 +40,7 @@ function makeRenderDropdownListItem(grouped, data) {
 					'<ul class="dropdown-menu">' +
 						grouped.menuTreeNs[baseNs].map(function (subItemNs) {
 							var subItem = data.objects[ grouped.mapNsToIdx[subItemNs] ]
-							return '<li>' +
+							return '<li data-id="' + subItem.id + '">' +
 									'<a href=\"index.php?_route=ViewTableAjax&namespace=' + subItem.namespace + '\" title="' + renderTitle(subItem) + '">' +
 										renderStar(subItem.id, data.idsBookmarks) +
 										' ' + renderLabel(subItem) +
@@ -48,7 +50,7 @@ function makeRenderDropdownListItem(grouped, data) {
 						}).join("\n") +
 					'</ul>' +
 				'</li>' + "\n"
-			:	'<li>' +
+			:	'<li data-id="' + item.id + '">' +
 					'<a href=\"index.php?_route=ViewTableAjax&namespace=' + item.namespace + '\" title="' + renderTitle(item) + '">' +
 						renderStar(item.id, data.idsBookmarks) +
 						' ' + renderLabel(item) +
@@ -58,7 +60,7 @@ function makeRenderDropdownListItem(grouped, data) {
 	}
 }
 
-function renderP5MainMenuDropdown(data, idSubMenu) {
+function renderP5MainMenuDropdown(data) {
 	DBG && console.log('DBG:renderP5MainMenuDropdown data.objects', data.objects)
 	var grouped = data.objects.reduce(function (ret, item, idx) {
 		ret.mapNsToIdx[ item.namespace ] = idx
@@ -136,10 +138,13 @@ function renderP5MainMenuDropdown(data, idSubMenu) {
 
 	DBG && console.log('DBG:renderP5MainMenuDropdown grouped', { grouped, labels, groupeByLabel })
 
+	return nodesGroupedByLabel;
+
+	// var jqDropdownMenu = jQuery('#' + idSubMenu)
+	// jqDropdownMenu.empty()
+	// jqDropdownMenu.append(searchBox);
+	// jqDropdownMenu.append(nodesGroupedByLabel);
 
-	var jqDropdownMenu = jQuery('#' + idSubMenu)
-	jqDropdownMenu.empty()
-	jqDropdownMenu.append(nodesGroupedByLabel);
 	// var liNodes = Object.keys(grouped.menuTreeNs).map(function (baseNs) {
 	// 	var item = (baseNs in grouped.mapNsToIdx)
 	// 		?	data.objects[ grouped.mapNsToIdx[baseNs] ]
@@ -177,29 +182,184 @@ function renderP5MainMenuDropdown(data, idSubMenu) {
 	// jqDropdownMenu.append(liNodes);
 }
 
-function initP5MainMenuDropdown( btnNode, idSubMenu ) {
+function initP5MainMenuDropdown( btnNode, idSubMenu ) { // @usage: onClick="return initP5MainMenuDropdown(this, 'SE-menu-tables')"
 	DBG && console.log('DBG:initP5MainMenuDropdown({idSubMenu: '+idSubMenu+'})');
 	if (!btnNode._initialized) {
 		var jqDropdownTrigger = jQuery(btnNode)
 		var jqDropdownMenu = jQuery('#' + idSubMenu)
 		var jqDropdownParent = jqDropdownMenu.parent()
-		var rerenderDropdown = (function (global, idSubMenu) {
+		var idSearchBoxNode = 'idSubMenu_searchBox';
+		var rerenderDropdown = (function (global, idSubMenu, jqDropdownMenu, jqDropdownTrigger) {
 			return function (data) {
 				DBG && console.log('DBG renderP5MainMenuDropdown', {data, idSubMenu});
-				renderP5MainMenuDropdown(data, idSubMenu);
+
+				var mainMenuFilterCallback = makeMainMenuFilterCallback(jqDropdownMenu, idSearchBoxNode);
+				var searchBox = document.createElement('div')
+				searchBox.setAttribute('style', "padding:12px 20px; min-width:200px");
+				{
+					var searchBox_group = document.createElement('div')
+					searchBox_group.setAttribute('class', "input-group");
+					{
+						searchBox_group_icon = document.createElement('span')
+						searchBox_group_icon.setAttribute('class', "input-group-addon");
+						searchBox_group_icon.innerHTML = '<i class="glyphicon glyphicon-search" title="Szukaj"></i>';
+						searchBox_group.appendChild(searchBox_group_icon)
+					}
+					{
+						searchBox_group_input = document.createElement('input')
+						searchBox_group_input.setAttribute('type', "text");
+						searchBox_group_input.setAttribute('class', "form-control");
+						searchBox_group_input.setAttribute('value', "");
+						searchBox_group_input.setAttribute('id', idSearchBoxNode);
+						searchBox_group_input.setAttribute('autofocus', "autofocus");
+						// onChange: function (fieldName, value) {
+						// 	priv.options.filterStore.dispatch(priv.options.filterActions.searchBox_delayFilter(fieldName, value));
+						// }
+						jQuery(searchBox_group_input).on('keyup', function (event) {
+							event.preventDefault()
+							event.stopPropagation()
+							searchBox_delayFilter(mainMenuFilterCallback, event.target.value)
+						})
+						searchBox_group.appendChild(searchBox_group_input)
+					}
+					{
+						searchBox_group_clear = document.createElement('span')
+						searchBox_group_clear.setAttribute('class', "input-group-addon");
+						searchBox_group_clear.style.display = "none";
+						searchBox_group_clear.style.cursor = "pointer";
+						searchBox_group_clear.innerHTML = '<i class="glyphicon glyphicon-remove" title="Kasuj filtr"></i>';
+						jQuery(searchBox_group_clear).on('click', function (event) {
+							event.preventDefault()
+							event.stopPropagation()
+							DBG && console.log("DBG:searchBox:clear", { value: jQuery('#' + idSearchBoxNode).value, node: jQuery('#' + idSearchBoxNode) })
+							jQuery('#' + idSearchBoxNode).val('');
+							mainMenuFilterCallback('')
+						})
+						searchBox_group.appendChild(searchBox_group_clear)
+					}
+					searchBox.appendChild(searchBox_group)
+
+					jQuery(searchBox).on('click', function (event) {
+						DBG && console.log("DBG:searchBox.on(click) ...")
+						event.preventDefault()
+						event.stopPropagation()
+					})
+				}
+
+				jqDropdownMenu.empty()
+				jqDropdownMenu.append(searchBox);
+				jqDropdownMenu.append(renderP5MainMenuDropdown(data));
 			}
-		})(global, idSubMenu);
+		})(global, idSubMenu, jqDropdownMenu, jqDropdownTrigger);
 
 		global.p5UI__MenuStore.subscribe(rerenderDropdown)
 
-		jqDropdownTrigger.attr('data-toggle', 'dropdown') // is required by bootstrap dorpdown.js evenf if is called via js
+		jqDropdownTrigger.attr('data-toggle', 'dropdown') // is required by bootstrap dorpdown.js even if is called via js
+		jqDropdownParent.on('shown.bs.dropdown', function () {
+			// DBG && console.log("DBG:Main menu:shown.bs.dropdown")
+			jQuery('#' + idSearchBoxNode).focus()
+		})
+		jqDropdownParent.on('hidden.bs.dropdown', function () {
+			// DBG && console.log("DBG:Main menu:hidden.bs.dropdown")
+		})
 
 		global.p5UI__MenuStore.forceUpdate()
 
 		jQuery(btnNode).dropdown()
 	}
-	// btnNode._initialized = true // TODO: DBG TEST
+	btnNode._initialized = true // TODO: DBG TEST
 	return true;
 }
 
+function menuStore__getObjectById(id) {
+	var allData = global.p5UI__MenuStore.getData()
+	if (!allData || !allData.objects) return null;
+	for (var i = 0, l = allData.objects.length; i < l; i++) {
+		var itemObj = allData.objects[i]
+		if (itemObj.id === id) return itemObj;
+	}
+	return null;
+}
+function searchBox__isStringMatch(str, query) {
+	// TODO: split query for words
+	return (-1 !== str.toLowerCase().search(query.toLowerCase()));
+}
+function searchBox__isMenuObjectMatch(itemObj, query) {
+	if (!itemObj) return false;
+	if (itemObj.label && searchBox__isStringMatch(itemObj.label, query)) return true;
+	if (itemObj.name && searchBox__isStringMatch(itemObj.name, query)) return true;
+	if (itemObj.opis && searchBox__isStringMatch(itemObj.opis, query)) return true;
+	if (itemObj.namespace && searchBox__isStringMatch(itemObj.namespace, query)) return true;
+	// if (itemObj.desc && searchBox__isStringMatch(itemObj.desc, query)) return true;
+	// if (itemObj.short_label && searchBox__isStringMatch(itemObj.short_label, query)) return true;
+	// if (itemObj.id && searchBox__isStringMatch(itemObj.id, query)) return true;
+	return false;
+}
+function searchBox__isMenuItemMatch(node, query) {
+	DBG && console.log("DBG:Main menu:searchBox__isMenuItemMatch", { query: query, label: jQuery(node).children('a').text(), node: node })
+	if (node.hasAttribute('data-id')) {
+		var id = parseInt(node.getAttribute('data-id'));
+		var itemObj = menuStore__getObjectById(id);
+		return searchBox__isMenuObjectMatch(itemObj, query);
+	}
+	if (node.hasChildNodes()) {
+		{
+			var groupItemLabel = jQuery(node).children('a').text()
+			if (searchBox__isStringMatch(groupItemLabel, query)) return true;
+		}
+
+		// DBG && console.log("DBG:Main menu:searchBox__isMenuItemMatch: loop start...", { query: query, label: jQuery(node).children('a').text(), node: node })
+		for (var i = 0, l = node.childNodes.length; i < l; i++) {
+			if ("UL" === node.childNodes[i].tagName) {
+				// DBG && console.log("DBG:Main menu:searchBox__isMenuItemMatch: loop UL ", { query: query, label: jQuery(node).children('a').text(), node: node })
+				for (var j = 0, l = node.childNodes[i].childNodes.length; j < l; j++) {
+					if ("LI" === node.childNodes[i].childNodes[j].tagName) {
+						// DBG && console.log("DBG:Main menu:searchBox__isMenuItemMatch: loop UL > LI ", { query: query, label: jQuery(node).children('a').text(), node: node })
+						if (searchBox__isMenuItemMatch(node.childNodes[i].childNodes[j], query)) {
+							return true;
+						}
+					}
+				}
+				break;
+			}
+		}
+	}
+	return false;
+}
+
+function makeMainMenuFilterCallback(jqDropdownMenu, idSearchBoxNode) {
+	return function (query) {
+		DBG && console.log("DBG:Main menu:makeMainMenuFilterCallback", { query: query, jqDropdownMenu, idSearchBoxNode })
+
+		jQuery('#' + idSearchBoxNode).next('span').get(0).style.display = query ? 'table-cell' : 'none';
+
+		jqDropdownMenu.children('li').each(function (idx, node) {
+			node.style.display = "list-item";
+		})
+		if (!query || query.length < 3) return;
+
+		jqDropdownMenu.children('li').each(function (idx, node) {
+			// if (node.style.display === "none") node.style.display = "";
+			var id = (node.hasAttribute('data-id')) ? parseInt(node.getAttribute('data-id')) : null;
+			var itemObj = (id) ? menuStore__getObjectById(id) : null;
+			var isMatch = searchBox__isMenuItemMatch(node, query)
+			DBG && console.log("DBG:Main menu:makeMainMenuFilterCallback:loop", { isMatch: isMatch, id: id, itemObj: itemObj, display: node.style.display, node: node })
+
+			node.style.display = isMatch ? "list-item" : "none";
+		})
+	}
+}
+
+var _config_delay_value = 450;
+var _config_delay_timeout = null;
+function searchBox_delayFilter(callback, value) {
+	// DBG && console.log('DBG:searchBox:delayFilter', { value });
+	if (_config_delay_timeout) clearTimeout(_config_delay_timeout)
+
+	_config_delay_timeout = setTimeout(function () {
+		DBG && console.log("DBG:Main menu:delayFilter", { value: value })
+		callback(value)
+	}, _config_delay_value)
+}
+
 global.initP5MainMenuDropdown = initP5MainMenuDropdown

Some files were not shown because too many files changed in this diff