浏览代码

Merge branch 'master' of bn.git:plabudda/se

Piotr Labudda 6 年之前
父节点
当前提交
2f33600195
共有 28 个文件被更改,包括 7625 次插入3186 次删除
  1. 3 2
      SE/schema/WPS_Functions/apache_fop/fop-2.3/fop/examples/embedding/xml/fo/helloworld.fo
  2. 22 24
      SE/schema/WPS_Functions/apache_fop/fop-2.3/fop/examples/embedding/xml/svg/helloworld.svg
  3. 9 5
      SE/schema/WPS_Functions/apache_fop/fop-2.3/fop/examples/embedding/xml/xslt/projectteam2fo.xsl
  4. 155 154
      SE/schema/WPS_Functions/apache_fop/fop-2.3/fop/examples/fo/basic/images.fo
  5. 493 452
      SE/schema/WPS_Functions/apache_fop/fop-2.3/fop/examples/fo/basic/table.fo
  6. 2 1
      SE/schema/WPS_Functions/apache_fop/fop-2.3/fop/examples/fo/build.xml
  7. 924 1289
      SE/schema/WPS_Functions/apache_fop/fop-2.3/fop/examples/fo/tables/borders.fo
  8. 192 295
      SE/schema/WPS_Functions/apache_fop/fop-2.3/fop/examples/fo/tables/break.fo
  9. 二进制
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/examle.xslt2_1114.jpg
  10. 349 0
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.defaults.param.fo.xsl
  11. 33 18
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.defaults.param.xsl
  12. 688 95
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.Hi-Lo-Close.xsl
  13. 248 0
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.Yaxis.xsl
  14. 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
  15. 371 2
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.bar.xsl
  16. 103 145
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.complex.test.305.xsl
  17. 834 110
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.complex.test.svg
  18. 502 166
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.complex.test.xsl
  19. 156 0
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.ticks.xsl
  20. 233 19
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.xy.xsl
  21. 402 0
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.cursor.region.plot.xsl
  22. 440 0
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.cursor.region.xsl
  23. 652 125
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.cursor.xsl
  24. 89 7
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.data.xsl
  25. 二进制
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.resolution.numbers
  26. 61 6
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.resolution.xsl
  27. 407 0
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.translate.xsl
  28. 255 269
      SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.xsl

+ 3 - 2
SE/schema/WPS_Functions/apache_fop/fop-2.3/fop/examples/embedding/xml/fo/helloworld.fo

@@ -18,13 +18,14 @@
 <!-- $Id$ -->
 <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
   <fo:layout-master-set>
-    <fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="2cm" margin-bottom="2cm" margin-left="2cm" margin-right="2cm">
+    <fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm"
+      margin-top="2cm" margin-bottom="2cm" margin-left="2cm" margin-right="2cm">
       <fo:region-body/>
     </fo:simple-page-master>
   </fo:layout-master-set>
   <fo:page-sequence master-reference="simpleA4">
     <fo:flow flow-name="xsl-region-body">
-      <fo:block>Hello World!</fo:block>
+      <fo:block>Hello World! oh yeah222</fo:block>
     </fo:flow>
   </fo:page-sequence>
 </fo:root>

+ 22 - 24
SE/schema/WPS_Functions/apache_fop/fop-2.3/fop/examples/embedding/xml/svg/helloworld.svg

@@ -1,26 +1,24 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<!-- $Id$ -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN" "http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-stylable.dtd">
-<svg xml:space="preserve" x="-1.70458in" y="0.198315in" width="2.6622in" height="1.89672in" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality"
+<!DOCTYPE svg:svg
+  PUBLIC "-//W3C//DTD SVG 1.0/EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<!--<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN" "http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-stylable.dtd">-->
+<svg:svg xmlns:svg="http://www.w3.org/2000/svg"
+         xmlns:svgu="http://www.ora.com/XSLTCookbook/ns/svg-utils"
+         xmlns:emath="http://www.exslt.org/math"
+         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:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+         xmlns:system_cache__dita__x3A__p5gnuplot="http://biuro.biall-net.pl/WPS_Functions/system_cache__dita__x3A__p5gnuplot/system_cache__dita__x3A__p5gnuplot.xsd"
+         xmlns:p5gnuplot__x3A__system_cache__dita="http://biuro.biall-net.pl/WPS_Functions/p5gnuplot__x3A__system_cache__dita/p5gnuplot__x3A__system_cache__dita.xsd"
+         xmlns:p5gnuplot="http://biuro.biall-net.pl/WPS_Functions/graph_gnuplot"
+         xmlns:system_cache__dita="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/dita.xsd"
+         xmlns:default_db__x3A__BI_audit_ENERGA_RUM_UMOWY="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_UMOWY"
+         xmlns:default_db__x3A__BI_audit_BENFORD="https://biuro.biall-net.pl/wfs/default_db/BI_audit_BENFORD"
+  
+  xml:space="preserve" x="-1.70458in" y="0.198315in" width="2.6622in" height="1.89672in" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality"
      viewBox="-4330 0 6762 4818">
-  <rect style="fill:none;stroke:#009BE1;stroke-width:35" x="-4312" y="18" width="6727" height="4782"/>
-  <text x="-3653" y="841" style="fill:#1F1A17;font-weight:normal;font-size:639;font-family:Helvetica">Hello World!</text>
-  <ellipse style="fill:#E77919" cx="-2697" cy="2934" rx="925" ry="925"/>
-  <path style="fill:none;stroke:#A3D01C;stroke-width:35" d="M209 1102l799 239 798 239 191 811 192 811 -606 572 -607 571 -798 -239 -798 -240 -192 -810 -192 -811 607 -572 606 -571z"/>
-</svg>
+  <svg:rect style="fill:none;stroke:#009BE1;stroke-width:35" x="-4312" y="18" width="6727" height="4782"/>
+  <svg:text x="-3653" y="841" style="fill:#1F1A17;font-weight:normal;font-size:639;font-family:Helvetica">Hello World!</svg:text>
+  <svg:ellipse style="fill:#E77919" cx="-2697" cy="2934" rx="925" ry="925"/>
+  <svg:path style="fill:none;stroke:#A3D01C;stroke-width:35" d="M209 1102l799 239 798 239 191 811 192 811 -606 572 -607 571 -798 -239 -798 -240 -192 -810 -192 -811 607 -572 606 -571z"/>
+</svg:svg>

+ 9 - 5
SE/schema/WPS_Functions/apache_fop/fop-2.3/fop/examples/embedding/xml/xslt/projectteam2fo.xsl

@@ -16,24 +16,28 @@
   limitations under the License.
 -->
 <!-- $Id$ -->
-<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
+<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
   <xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/>
-  <xsl:param name="versionParam" select="'1.0'"/> 
+  <xsl:param name="versionParam" select="'1.0'"/>
   <!-- ========================= -->
   <!-- root element: projectteam -->
   <!-- ========================= -->
   <xsl:template match="projectteam">
     <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
       <fo:layout-master-set>
-        <fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="2cm" margin-bottom="2cm" margin-left="2cm" margin-right="2cm">
+        <fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm"
+          margin-top="2cm" margin-bottom="2cm" margin-left="2cm" margin-right="2cm">
           <fo:region-body/>
         </fo:simple-page-master>
       </fo:layout-master-set>
       <fo:page-sequence master-reference="simpleA4">
         <fo:flow flow-name="xsl-region-body">
-          <fo:block font-size="16pt" font-weight="bold" space-after="5mm">Project: <xsl:value-of select="projectname"/>
+          <fo:block font-size="16pt" font-weight="bold" space-after="5mm">Project: <xsl:value-of
+              select="projectname"/>
           </fo:block>
-          <fo:block font-size="12pt" space-after="5mm">Version <xsl:value-of select="$versionParam"/>
+          <fo:block font-size="12pt" space-after="5mm">Version <xsl:value-of select="$versionParam"
+            />
           </fo:block>
           <fo:block font-size="10pt">
             <fo:table table-layout="fixed" width="100%" border-collapse="separate">

+ 155 - 154
SE/schema/WPS_Functions/apache_fop/fop-2.3/fop/examples/fo/basic/images.fo

@@ -1,168 +1,169 @@
 <?xml version="1.0" encoding="utf-8"?>
-
 <fo:root font-family="Times Roman" font-size="12pt" text-align="center"
-    xmlns:fo="http://www.w3.org/1999/XSL/Format"
-    xmlns:fox="http://xml.apache.org/fop/extensions">
-
-<fo:layout-master-set>
-    <fo:simple-page-master master-name="right"
-            margin-top="75pt"
-            margin-bottom="25pt"
-            margin-left="100pt"
-            margin-right="50pt">
+  xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xml.apache.org/fop/extensions">
+  <fo:layout-master-set>
+    <fo:simple-page-master master-name="right" margin-top="75pt" margin-bottom="25pt"
+      margin-left="100pt" margin-right="50pt">
       <fo:region-body margin-bottom="50pt"/>
       <fo:region-after extent="25pt"/>
     </fo:simple-page-master>
-    
-    <fo:simple-page-master master-name="left"
-            margin-top="75pt"
-            margin-bottom="25pt"
-            margin-left="50pt"
-            margin-right="100pt">
+    <fo:simple-page-master master-name="left" margin-top="75pt" margin-bottom="25pt"
+      margin-left="50pt" margin-right="100pt">
       <fo:region-body margin-bottom="50pt"/>
       <fo:region-after extent="25pt"/>
     </fo:simple-page-master>
     
-    <fo:page-sequence-master master-name="psmOddEven" >
+    <fo:page-sequence-master master-name="psmOddEven">
       <fo:repeatable-page-master-alternatives>
-        <fo:conditional-page-master-reference master-reference="right"
-          page-position="first" />
-        <fo:conditional-page-master-reference master-reference="left"
-          odd-or-even="even" />
-        <fo:conditional-page-master-reference master-reference="right"
-          odd-or-even="odd" />
+        <fo:conditional-page-master-reference master-reference="right" page-position="first"/>
+        <fo:conditional-page-master-reference master-reference="left" odd-or-even="even"/>
+        <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">
-  <fo:block text-align-last="center" font-size="10pt">
-    <fo:page-number/>
-  </fo:block>
-</fo:static-content>
-
-<fo:flow flow-name="xsl-region-body">
-<fo:block font-size="18pt" font-weight="bold">1. FOP test for images</fo:block>
-<fo:block id="N2531">
-
-  <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">A GIF image in FOP</fo:block>
-  <fo:block>
-    <fo:external-graphic src="../graphics/xml_feather.gif"/>
-  </fo:block>
-</fo:block>
-<fo:block id="N2535">
-  <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">A transparent GIF image in FOP</fo:block>
-  <fo:block>
-    <fo:external-graphic src="../graphics/xml_feather_transparent.gif"/>
-  </fo:block>
-</fo:block>
-<fo:block id="N2545">
-  <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">A JPEG image in FOP</fo:block>
-  <fo:block>
-    <fo:external-graphic src="../graphics/fop.jpg"/>
-  </fo:block>
-</fo:block>
-<fo:block id="N2550">
-  <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">A BMP image in FOP</fo:block>
-  <fo:block>
-    <fo:external-graphic src="../graphics/linux.bmp"/>
-  </fo:block>
-</fo:block>
-<fo:block id="N2555">
-  <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">A PNG image in FOP</fo:block>
-  <fo:block>
-    <fo:external-graphic src="../graphics/asf-logo.png"/>
-  </fo:block>
-</fo:block>
-<fo:block id="N2556">
-  <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">A TIFF image in FOP</fo:block>
-  <fo:block>
-    <fo:external-graphic src="../graphics/asf-logo.tif"/>
-  </fo:block>
-</fo:block>
-<fo:block id="N2559">
-  <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em"/>
-  This section is only required to show that the layout still works.
-</fo:block>
-</fo:flow>
-
-</fo:page-sequence>
-
-<fo:page-sequence id="N2561" master-reference="psmOddEven">
-
-<fo:static-content flow-name="xsl-region-after">
-  <fo:block text-align-last="center" font-size="10pt">
-    <fo:page-number/>
-  </fo:block>
-</fo:static-content>
-
-<fo:flow flow-name="xsl-region-body" text-align="start" font-size="10pt">
-  <fo:block id="e-g-use" font-size="18pt" font-weight="bold">A. The usage of fo:external-graphic</fo:block>
-  <fo:block>
-    <fo:block>The image used in these examples has the following properties:</fo:block>
-    <fo:block start-indent="1cm">
-      <fo:block>169 x 51 px, 96 dpi, results in an intrinsic size of 44.715 x 13.494 mm</fo:block>
-    </fo:block>
-    <fo:block>
-      All the examples here will have a border="solid 0.1pt" to show the size of the viewport generated by the 
-      external-graphic element and a background-color="yellow" to show what parts of the viewport are painted 
-      upon by the image in the reference area. The image used is the non-transparent version of asf-logo.png:
-      file:../graphics/asf-logo-nt.png (nt=non-transparent)
-    </fo:block>
-    
-    <fo:block keep-with-next.within-column="always">Properties: [none]</fo:block>
-    <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" border="solid 0.1pt" background-color="yellow"/></fo:block>
-    
-    <fo:block keep-with-next.within-column="always">Properties: width="60mm" height="20mm"</fo:block>
-    <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="60mm" height="20mm" border="solid 0.1pt" background-color="yellow"/></fo:block>
-    
-    <fo:block keep-with-next.within-column="always">Properties: inline-progression-dimension="60mm" block-progression-dimension="20mm"</fo:block>
-    <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" inline-progression-dimension="60mm" block-progression-dimension="20mm" border="solid 0.1pt" background-color="yellow"/></fo:block>
-    
-    <fo:block keep-with-next.within-column="always">Properties: width="30mm" height="20mm"</fo:block>
-    <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="30mm" height="20mm" border="solid 0.1pt" background-color="yellow"/></fo:block>
-    
-    <fo:block keep-with-next.within-column="always">Properties: width="30mm" height="20mm" overflow="hidden"</fo:block>
-    <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="30mm" height="20mm" overflow="hidden" border="solid 0.1pt" background-color="yellow"/></fo:block>
-    
-    <fo:block keep-with-next.within-column="always">Properties: width="60mm" height="20mm" text-align="center" display-align="center"</fo:block>
-    <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="60mm" height="20mm" text-align="center" display-align="center" border="solid 0.1pt" background-color="yellow"/></fo:block>
-    
-    <fo:block keep-with-next.within-column="always">Properties: content-height="20mm"</fo:block>
-    <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" content-height="20mm" border="solid 0.1pt" background-color="yellow"/></fo:block>
     
-    <fo:block keep-with-next.within-column="always">Properties: content-width="60mm" content-height="40mm"</fo:block>
-    <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" content-width="60mm" content-height="40mm" border="solid 0.1pt" background-color="yellow"/></fo:block>
-
-    <fo:block keep-with-next.within-column="always">Properties: content-width="60mm" content-height="40mm" scaling="non-uniform"</fo:block>
-    <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" content-width="60mm" content-height="40mm" scaling="non-uniform" border="solid 0.1pt" background-color="yellow"/></fo:block>
-
-    <fo:block keep-with-next.within-column="always">Properties: width="60mm" height="20mm" content-width="scale-to-fit"</fo:block>
-    <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="60mm" height="20mm" content-width="scale-to-fit" border="solid 0.1pt" background-color="yellow"/></fo:block>
-
-    <fo:block keep-with-next.within-column="always">Properties: width="60mm" content-width="scale-to-fit"</fo:block>
-    <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="60mm" content-width="scale-to-fit" border="solid 0.1pt" background-color="yellow"/></fo:block>
-
-    <fo:block break-before="page"/> 
-    <fo:block keep-with-next.within-column="always">Properties: width="100%" content-width="scale-to-fit"</fo:block>
-    <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="100%" content-width="scale-to-fit" border="solid 0.1pt" background-color="yellow"/></fo:block>
-    <fo:block space-before="0.5em">
-      The following example shows how to fit an oversized image into the 
-      available width, but not scale smaller images up. This is a work-around
-      until "scale-down-to-fit" is supported. The second feather below is in
-      a block-container with a width of 40mm to simulate an oversized image.
-    </fo:block>  
-    <fo:block keep-with-next.within-column="always">Properties: width="100%" content-width="scale-to-fit" content-height="100%"</fo:block>
-    <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="100%" content-width="scale-to-fit" content-height="100%" border="solid 0.1pt" background-color="yellow"/></fo:block>
-    <fo:block-container width="40mm" background-color="lightgray">
-      <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="100%" content-width="scale-to-fit" content-height="100%" border="solid 0.1pt" background-color="yellow"/></fo:block>
-    </fo:block-container>
-  </fo:block>
-</fo:flow>
-
-</fo:page-sequence>
-
+  </fo:layout-master-set>
+  <fo:page-sequence id="N2528" master-reference="psmOddEven">
+    <fo:static-content flow-name="xsl-region-after">
+      <fo:block text-align-last="center" font-size="10pt">
+        <fo:page-number/>
+      </fo:block>
+    </fo:static-content>
+    <fo:flow flow-name="xsl-region-body">
+      <fo:block font-size="18pt" font-weight="bold">1. FOP test for images</fo:block>
+      <fo:block id="N2531">
+        <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em"
+          space-before.optimum="1.5em" space-before.maximum="2em">A GIF image in FOP</fo:block>
+        <fo:block>
+          <fo:external-graphic src="../graphics/xml_feather.gif"/>
+        </fo:block>
+      </fo:block>
+      <fo:block id="N2535">
+        <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em"
+          space-before.optimum="1.5em" space-before.maximum="2em">A transparent GIF image in
+          FOP</fo:block>
+        <fo:block>
+          <fo:external-graphic src="../graphics/xml_feather_transparent.gif"/>
+        </fo:block>
+      </fo:block>
+      <fo:block id="N2545">
+        <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em"
+          space-before.optimum="1.5em" space-before.maximum="2em">A JPEG image in FOP</fo:block>
+        <fo:block>
+          <fo:external-graphic src="../graphics/fop.jpg"/>
+        </fo:block>
+      </fo:block>
+      <fo:block id="N2550">
+        <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em"
+          space-before.optimum="1.5em" space-before.maximum="2em">A BMP image in FOP</fo:block>
+        <fo:block>
+          <fo:external-graphic src="../graphics/linux.bmp"/>
+        </fo:block>
+      </fo:block>
+      <fo:block id="N2555">
+        <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em"
+          space-before.optimum="1.5em" space-before.maximum="2em">A PNG image in FOP</fo:block>
+        <fo:block>
+          <fo:external-graphic src="../graphics/asf-logo.png"/>
+        </fo:block>
+      </fo:block>
+      <fo:block id="N2556">
+        <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em"
+          space-before.optimum="1.5em" space-before.maximum="2em">A TIFF image in FOP</fo:block>
+        <fo:block>
+          <fo:external-graphic src="../graphics/asf-logo.tif"/>
+        </fo:block>
+      </fo:block>
+      <fo:block id="N2559">
+        <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em"
+          space-before.optimum="1.5em" space-before.maximum="2em"/> This section is only required to
+        show that the layout still works. </fo:block>
+    </fo:flow>
+  </fo:page-sequence>
+  <fo:page-sequence id="N2561" master-reference="psmOddEven">
+    <fo:static-content flow-name="xsl-region-after">
+      <fo:block text-align-last="center" font-size="10pt">
+        <fo:page-number/>
+      </fo:block>
+    </fo:static-content>
+    <fo:flow flow-name="xsl-region-body" text-align="start" font-size="10pt">
+      <fo:block id="e-g-use" font-size="18pt" font-weight="bold">A. The usage of
+        fo:external-graphic</fo:block>
+      <fo:block>
+        <fo:block>The image used in these examples has the following properties:</fo:block>
+        <fo:block start-indent="1cm">
+          <fo:block>169 x 51 px, 96 dpi, results in an intrinsic size of 44.715 x 13.494
+            mm</fo:block>
+        </fo:block>
+        <fo:block> All the examples here will have a border="solid 0.1pt" to show the size of the
+          viewport generated by the external-graphic element and a background-color="yellow" to show
+          what parts of the viewport are painted upon by the image in the reference area. The image
+          used is the non-transparent version of asf-logo.png: file:../graphics/asf-logo-nt.png
+          (nt=non-transparent) </fo:block>
+        <fo:block keep-with-next.within-column="always">Properties: [none]</fo:block>
+        <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" border="solid 0.1pt"
+            background-color="yellow"/></fo:block>
+        <fo:block keep-with-next.within-column="always">Properties: width="60mm"
+          height="20mm"</fo:block>
+        <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="60mm" height="20mm"
+            border="solid 0.1pt" background-color="yellow"/></fo:block>
+        <fo:block keep-with-next.within-column="always">Properties:
+          inline-progression-dimension="60mm" block-progression-dimension="20mm"</fo:block>
+        <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png"
+            inline-progression-dimension="60mm" block-progression-dimension="20mm"
+            border="solid 0.1pt" background-color="yellow"/></fo:block>
+        <fo:block keep-with-next.within-column="always">Properties: width="30mm"
+          height="20mm"</fo:block>
+        <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="30mm" height="20mm"
+            border="solid 0.1pt" background-color="yellow"/></fo:block>
+        <fo:block keep-with-next.within-column="always">Properties: width="30mm" height="20mm"
+          overflow="hidden"</fo:block>
+        <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="30mm" height="20mm"
+            overflow="hidden" border="solid 0.1pt" background-color="yellow"/></fo:block>
+        <fo:block keep-with-next.within-column="always">Properties: width="60mm" height="20mm"
+          text-align="center" display-align="center"</fo:block>
+        <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="60mm" height="20mm"
+            text-align="center" display-align="center" border="solid 0.1pt"
+            background-color="yellow"/></fo:block>
+        <fo:block keep-with-next.within-column="always">Properties: content-height="20mm"</fo:block>
+        <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" content-height="20mm"
+            border="solid 0.1pt" background-color="yellow"/></fo:block>
+        <fo:block keep-with-next.within-column="always">Properties: content-width="60mm"
+          content-height="40mm"</fo:block>
+        <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" content-width="60mm"
+            content-height="40mm" border="solid 0.1pt" background-color="yellow"/></fo:block>
+        <fo:block keep-with-next.within-column="always">Properties: content-width="60mm"
+          content-height="40mm" scaling="non-uniform"</fo:block>
+        <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" content-width="60mm"
+            content-height="40mm" scaling="non-uniform" border="solid 0.1pt"
+            background-color="yellow"/></fo:block>
+        <fo:block keep-with-next.within-column="always">Properties: width="60mm" height="20mm"
+          content-width="scale-to-fit"</fo:block>
+        <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="60mm" height="20mm"
+            content-width="scale-to-fit" border="solid 0.1pt" background-color="yellow"/></fo:block>
+        <fo:block keep-with-next.within-column="always">Properties: width="60mm"
+          content-width="scale-to-fit"</fo:block>
+        <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="60mm"
+            content-width="scale-to-fit" border="solid 0.1pt" background-color="yellow"/></fo:block>
+        <fo:block break-before="page"/>
+        <fo:block keep-with-next.within-column="always">Properties: width="100%"
+          content-width="scale-to-fit"</fo:block>
+        <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="100%"
+            content-width="scale-to-fit" border="solid 0.1pt" background-color="yellow"/></fo:block>
+        <fo:block space-before="0.5em"> The following example shows how to fit an oversized image
+          into the available width, but not scale smaller images up. This is a work-around until
+          "scale-down-to-fit" is supported. The second feather below is in a block-container with a
+          width of 40mm to simulate an oversized image. </fo:block>
+        <fo:block keep-with-next.within-column="always">Properties: width="100%"
+          content-width="scale-to-fit" content-height="100%"</fo:block>
+        <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="100%"
+            content-width="scale-to-fit" content-height="100%" border="solid 0.1pt"
+            background-color="yellow"/></fo:block>
+        <fo:block-container width="40mm" background-color="lightgray">
+          <fo:block><fo:external-graphic src="../graphics/asf-logo-nt.png" width="100%"
+              content-width="scale-to-fit" content-height="100%" border="solid 0.1pt"
+              background-color="yellow"/></fo:block>
+        </fo:block-container>
+      </fo:block>
+    </fo:flow>
+  </fo:page-sequence>
 </fo:root>
-

+ 493 - 452
SE/schema/WPS_Functions/apache_fop/fop-2.3/fop/examples/fo/basic/table.fo

@@ -1,502 +1,543 @@
 <?xml version="1.0" encoding="utf-8"?>
-
 <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
-
-
   <!-- defines the layout master -->
   <fo:layout-master-set>
-    <fo:simple-page-master master-name="first"
-                           page-height="29.7cm"
-                           page-width="21cm"
-                           margin-top="1cm"
-                           margin-bottom="2cm"
-                           margin-left="2.5cm"
-                           margin-right="2.5cm">
+    <fo:simple-page-master master-name="first" page-height="29.7cm" page-width="21cm"
+      margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
       <fo:region-body margin-top="3cm"/>
       <fo:region-before extent="3cm"/>
       <fo:region-after extent="1.5cm"/>
     </fo:simple-page-master>
   </fo:layout-master-set>
-
   <!-- starts actual layout -->
   <fo:page-sequence master-reference="first">
-
-  <fo:flow flow-name="xsl-region-body">
-
+    <fo:flow flow-name="xsl-region-body">
       <!-- this defines a title level 1-->
-      <fo:block font-size="18pt"
-            font-family="sans-serif"
-            line-height="24pt"
-            space-after.optimum="15pt"
-            background-color="blue"
-            color="white"
-            text-align="center"
-            padding-top="3pt">
-        How to use table elements
-      </fo:block>
-
+      <fo:block font-size="18pt" font-family="sans-serif" line-height="24pt"
+        space-after.optimum="15pt" background-color="blue" color="white" text-align="center"
+        padding-top="3pt"> How to use table elements </fo:block>
       <!-- this defines a title level 2-->
-      <fo:block font-size="16pt"
-            font-family="sans-serif"
-            space-after.optimum="15pt"
-            text-align="center">
-        A simple table, 3 columns, 4 rows
-      </fo:block>
-
-    <!-- normal text -->
-    <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
-                                 this is normal text. this is normal text. this is normal text.
-    </fo:block>
-
-    <!-- table start -->
-    <fo:table table-layout="fixed" width="100%" border-collapse="separate">
-      <fo:table-column column-width="50mm"/>
-      <fo:table-column column-width="50mm"/>
-      <fo:table-column column-width="50mm"/>
-      <fo:table-body>
-        <fo:table-row>
-          <fo:table-cell ><fo:block>good</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>bad</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>ugly</fo:block></fo:table-cell>
-        </fo:table-row>
-        <fo:table-row>
-          <fo:table-cell ><fo:block>nice</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>dice</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>vice</fo:block></fo:table-cell>
-        </fo:table-row>
-        <fo:table-row>
-          <fo:table-cell ><fo:block>literature</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>music</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>art</fo:block></fo:table-cell>
-        </fo:table-row>
-        <fo:table-row>
-          <fo:table-cell ><fo:block>java</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>perl</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>python</fo:block></fo:table-cell>
-        </fo:table-row>
-      </fo:table-body>
-    </fo:table>
-    <!-- table end -->
-
-    <!-- normal text -->
-    <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
-                                 this is normal text. this is normal text. this is normal text.
-    </fo:block>
-
-<!-- **************************** NEW PAGE ************************************* -->
-
+      <fo:block font-size="16pt" font-family="sans-serif" space-after.optimum="15pt"
+        text-align="center"> A simple table, 3 columns, 4 rows </fo:block>
+      <!-- normal text -->
+      <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
+        this is normal text. this is normal text. this is normal text. </fo:block>
+      <!-- table start -->
+      <fo:table table-layout="fixed" width="100%" border-collapse="separate">
+        <fo:table-column column-width="50mm"/>
+        <fo:table-column column-width="50mm"/>
+        <fo:table-column column-width="50mm"/>
+        <fo:table-body>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block>good</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>bad</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>ugly</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block>nice</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>dice</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>vice</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block>literature</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>music</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>art</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block>java</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>perl</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>python</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
+      </fo:table>
+      <!-- table end -->
+      <!-- normal text -->
+      <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
+        this is normal text. this is normal text. this is normal text. </fo:block>
+      <!-- **************************** NEW PAGE ************************************* -->
       <!-- this defines a title level 2-->
-      <fo:block font-size="16pt"
-            font-family="sans-serif"
-            space-after.optimum="15pt"
-            text-align="center"
-            break-before="page">
-        A table with borders
-      </fo:block>
-
-
-    <!-- normal text -->
-    <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
-                                 this is normal text. this is normal text. this is normal text.
-    </fo:block>
-
-
-    <!-- table start -->
-    <fo:table border-width="0.5mm" border-style="solid" background-color="yellow" table-layout="fixed" width="100%" border-collapse="separate">
-      <fo:table-column column-width="50mm"/>
-      <fo:table-column column-width="50mm"/>
-      <fo:table-column column-width="50mm"/>
-      <fo:table-body>
-        <fo:table-row>
-          <fo:table-cell ><fo:block>good</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>bad</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>ugly</fo:block></fo:table-cell>
-        </fo:table-row>
-        <fo:table-row>
-          <fo:table-cell ><fo:block>nice</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>dice</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>vice</fo:block></fo:table-cell>
-        </fo:table-row>
-        <fo:table-row>
-          <fo:table-cell ><fo:block>literature</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>music</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>art</fo:block></fo:table-cell>
-        </fo:table-row>
-        <fo:table-row>
-          <fo:table-cell ><fo:block>java</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>perl</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>python</fo:block></fo:table-cell>
-        </fo:table-row>
-      </fo:table-body>
-    </fo:table>
-    <!-- table end -->
-
-    <!-- normal text -->
-    <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
-                                 this is normal text. this is normal text. this is normal text.
-    </fo:block>
-
-
-<!-- **************************** NEW PAGE ************************************* -->
-
+      <fo:block font-size="16pt" font-family="sans-serif" space-after.optimum="15pt"
+        text-align="center" break-before="page"> A table with borders </fo:block>
+      <!-- normal text -->
+      <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
+        this is normal text. this is normal text. this is normal text. </fo:block>
+      <!-- table start -->
+      <fo:table border-width="0.5mm" border-style="solid" background-color="yellow"
+        table-layout="fixed" width="100%" border-collapse="separate">
+        <fo:table-column column-width="50mm"/>
+        <fo:table-column column-width="50mm"/>
+        <fo:table-column column-width="50mm"/>
+        <fo:table-body>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block>good</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>bad</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>ugly</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block>nice</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>dice</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>vice</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block>literature</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>music</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>art</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block>java</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>perl</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>python</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
+      </fo:table>
+      <!-- table end -->
+      <!-- normal text -->
+      <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
+        this is normal text. this is normal text. this is normal text. </fo:block>
+      <!-- **************************** NEW PAGE ************************************* -->
       <!-- this defines a title level 2-->
-      <fo:block font-size="16pt"
-            font-family="sans-serif"
-            space-after.optimum="15pt"
-            text-align="center"
-            break-before="page">
-        A table with thick borders
-      </fo:block>
-
-
-    <!-- normal text -->
-    <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
-                                 this is normal text. this is normal text. this is normal text.
-    </fo:block>
-
-
-    <!-- table start -->
-    <fo:table border-width="3mm" border-style="solid" background-color="yellow" table-layout="fixed" width="100%" border-collapse="separate">
-      <fo:table-column column-width="50mm"/>
-      <fo:table-column column-width="50mm"/>
-      <fo:table-column column-width="50mm"/>
-      <fo:table-body>
-        <fo:table-row>
-          <fo:table-cell ><fo:block>good</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>bad</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>ugly</fo:block></fo:table-cell>
-        </fo:table-row>
-        <fo:table-row>
-          <fo:table-cell ><fo:block>nice</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>dice</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>vice</fo:block></fo:table-cell>
-        </fo:table-row>
-        <fo:table-row>
-          <fo:table-cell ><fo:block>literature</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>music</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>art</fo:block></fo:table-cell>
-        </fo:table-row>
-        <fo:table-row>
-          <fo:table-cell ><fo:block>java</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>perl</fo:block></fo:table-cell>
-          <fo:table-cell ><fo:block>python</fo:block></fo:table-cell>
-        </fo:table-row>
-      </fo:table-body>
-    </fo:table>
-    <!-- table end -->
-
-    <!-- normal text -->
-    <fo:block text-align="start" start-indent="-3mm">this is normal text. this is normal text. this is normal text.
-                                 this is normal text. this is normal text. this is normal text.
-    </fo:block>
-
-
-<!-- **************************** NEW PAGE ************************************* -->
-
+      <fo:block font-size="16pt" font-family="sans-serif" space-after.optimum="15pt"
+        text-align="center" break-before="page"> A table with thick borders </fo:block>
+      <!-- normal text -->
+      <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
+        this is normal text. this is normal text. this is normal text. </fo:block>
+      <!-- table start -->
+      <fo:table border-width="3mm" border-style="solid" background-color="yellow"
+        table-layout="fixed" width="100%" border-collapse="separate">
+        <fo:table-column column-width="50mm"/>
+        <fo:table-column column-width="50mm"/>
+        <fo:table-column column-width="50mm"/>
+        <fo:table-body>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block>good</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>bad</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>ugly</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block>nice</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>dice</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>vice</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block>literature</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>music</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>art</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block>java</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>perl</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block>python</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
+      </fo:table>
+      <!-- table end -->
+      <!-- normal text -->
+      <fo:block text-align="start" start-indent="-3mm">this is normal text. this is normal text.
+        this is normal text. this is normal text. this is normal text. this is normal text. </fo:block>
+      <!-- **************************** NEW PAGE ************************************* -->
       <!-- this defines a title level 2-->
-      <fo:block font-size="16pt"
-            font-family="sans-serif"
-            space-after.optimum="15pt"
-            text-align="center"
-            break-before="page">
-        A table with borders around the cells
-      </fo:block>
-
-
-    <!-- normal text -->
-    <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
-                                 this is normal text. this is normal text. this is normal text.
-    </fo:block>
-
-
-    <!-- table start -->
-    <fo:table table-layout="fixed" width="100%" border-collapse="separate">
-      <fo:table-column column-width="50mm"/>
-      <fo:table-column column-width="50mm"/>
-      <fo:table-column column-width="50mm"/>
-      <fo:table-body>
-        <fo:table-row>
-          <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>good</fo:block></fo:table-cell>
-          <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>bad</fo:block></fo:table-cell>
-          <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>ugly</fo:block></fo:table-cell>
-        </fo:table-row>
-        <fo:table-row>
-          <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>nice</fo:block></fo:table-cell>
-          <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>dice</fo:block></fo:table-cell>
-          <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>vice</fo:block></fo:table-cell>
-        </fo:table-row>
-        <fo:table-row>
-          <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>literature</fo:block></fo:table-cell>
-          <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>music</fo:block></fo:table-cell>
-          <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>art</fo:block></fo:table-cell>
-        </fo:table-row>
-        <fo:table-row>
-          <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>java</fo:block></fo:table-cell>
-          <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>perl</fo:block></fo:table-cell>
-          <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow"><fo:block>python</fo:block></fo:table-cell>
-        </fo:table-row>
-      </fo:table-body>
-    </fo:table>
-    <!-- table end -->
-
-    <!-- normal text -->
-    <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
-                                 this is normal text. this is normal text. this is normal text.
-    </fo:block>
-
-<!-- **************************** NEW PAGE ************************************* -->
-
+      <fo:block font-size="16pt" font-family="sans-serif" space-after.optimum="15pt"
+        text-align="center" break-before="page"> A table with borders around the cells </fo:block>
+      <!-- normal text -->
+      <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
+        this is normal text. this is normal text. this is normal text. </fo:block>
+      <!-- table start -->
+      <fo:table table-layout="fixed" width="100%" border-collapse="separate">
+        <fo:table-column column-width="50mm"/>
+        <fo:table-column column-width="50mm"/>
+        <fo:table-column column-width="50mm"/>
+        <fo:table-body>
+          <fo:table-row>
+            <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow">
+              <fo:block>good</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow">
+              <fo:block>bad</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow">
+              <fo:block>ugly</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow">
+              <fo:block>nice</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow">
+              <fo:block>dice</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow">
+              <fo:block>vice</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow">
+              <fo:block>literature</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow">
+              <fo:block>music</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow">
+              <fo:block>art</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow">
+              <fo:block>java</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow">
+              <fo:block>perl</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="0.5mm" border-style="solid" background-color="yellow">
+              <fo:block>python</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
+      </fo:table>
+      <!-- table end -->
+      <!-- normal text -->
+      <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
+        this is normal text. this is normal text. this is normal text. </fo:block>
+      <!-- **************************** NEW PAGE ************************************* -->
       <!-- this defines a title level 2-->
-      <fo:block font-size="16pt"
-            font-family="sans-serif"
-            space-after.optimum="15pt"
-            text-align="center"
-            break-before="page">
-        2 tables with thick borders around the cells
-      </fo:block>
-
-
-    <!-- normal text -->
-    <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
-                                 this is normal text. this is normal text. this is normal text.
-    </fo:block>
-
-
-    <!-- table start -->
-    <fo:table table-layout="fixed" width="100%" border-collapse="separate">
-      <fo:table-column column-width="50mm"/>
-      <fo:table-column column-width="50mm"/>
-      <fo:table-column column-width="50mm"/>
-      <fo:table-body>
-        <fo:table-row>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>good</fo:block></fo:table-cell>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>bad</fo:block></fo:table-cell>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>ugly</fo:block></fo:table-cell>
-        </fo:table-row>
-        <fo:table-row>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>nice</fo:block></fo:table-cell>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>dice</fo:block></fo:table-cell>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>vice</fo:block></fo:table-cell>
-        </fo:table-row>
-        <fo:table-row>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>literature</fo:block></fo:table-cell>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>music</fo:block></fo:table-cell>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>art</fo:block></fo:table-cell>
-        </fo:table-row>
-        <fo:table-row>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>java</fo:block></fo:table-cell>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>perl</fo:block></fo:table-cell>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>python</fo:block></fo:table-cell>
-        </fo:table-row>
-      </fo:table-body>
-    </fo:table>
-    <!-- table end -->
-
-    <!-- normal text -->
-    <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
-                                 this is normal text. this is normal text. this is normal text.
-    </fo:block>
-
-    <!-- table start -->
-    <fo:table table-layout="fixed" width="100%" border-collapse="separate">
-      <fo:table-column column-width="50mm"/>
-      <fo:table-column column-width="50mm"/>
-      <fo:table-column column-width="50mm"/>
-      <fo:table-body>
-        <fo:table-row>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>good</fo:block></fo:table-cell>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>bad</fo:block></fo:table-cell>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>ugly</fo:block></fo:table-cell>
-        </fo:table-row>
-        <fo:table-row>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>nice</fo:block></fo:table-cell>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>dice</fo:block></fo:table-cell>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>vice</fo:block></fo:table-cell>
-        </fo:table-row>
-        <fo:table-row>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>literature</fo:block></fo:table-cell>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>music</fo:block></fo:table-cell>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>art</fo:block></fo:table-cell>
-        </fo:table-row>
-        <fo:table-row>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>java</fo:block></fo:table-cell>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>perl</fo:block></fo:table-cell>
-          <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow"><fo:block>python</fo:block></fo:table-cell>
-        </fo:table-row>
-      </fo:table-body>
-    </fo:table>
-    <!-- table end -->
-
-    <!-- normal text -->
-    <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
-                                 this is normal text. this is normal text. this is normal text.
-    </fo:block>
-
-<!-- **************************** NEW PAGE ************************************* -->
-
+      <fo:block font-size="16pt" font-family="sans-serif" space-after.optimum="15pt"
+        text-align="center" break-before="page"> 2 tables with thick borders around the cells </fo:block>
+      <!-- normal text -->
+      <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
+        this is normal text. this is normal text. this is normal text. </fo:block>
+      <!-- table start -->
+      <fo:table table-layout="fixed" width="100%" border-collapse="separate">
+        <fo:table-column column-width="50mm"/>
+        <fo:table-column column-width="50mm"/>
+        <fo:table-column column-width="50mm"/>
+        <fo:table-body>
+          <fo:table-row>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>good</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>bad</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>ugly</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>nice</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>dice</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>vice</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>literature</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>music</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>art</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>java</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>perl</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>python</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
+      </fo:table>
+      <!-- table end -->
+      <!-- normal text -->
+      <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
+        this is normal text. this is normal text. this is normal text. </fo:block>
+      <!-- table start -->
+      <fo:table table-layout="fixed" width="100%" border-collapse="separate">
+        <fo:table-column column-width="50mm"/>
+        <fo:table-column column-width="50mm"/>
+        <fo:table-column column-width="50mm"/>
+        <fo:table-body>
+          <fo:table-row>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>good</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>bad</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>ugly</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>nice</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>dice</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>vice</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>literature</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>music</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>art</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>java</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>perl</fo:block>
+            </fo:table-cell>
+            <fo:table-cell border-width="2mm" border-style="solid" background-color="yellow">
+              <fo:block>python</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
+      </fo:table>
+      <!-- table end -->
+      <!-- normal text -->
+      <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
+        this is normal text. this is normal text. this is normal text. </fo:block>
+      <!-- **************************** NEW PAGE ************************************* -->
       <!-- this defines a title level 2-->
-      <fo:block font-size="16pt"
-            font-family="sans-serif"
-            space-after.optimum="15pt"
-            text-align="center"
-            break-before="page">
-        5 tables with borders
-      </fo:block>
-
-
-    <!-- normal text -->
-    <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
-                                 this is normal text. this is normal text. this is normal text.
-    </fo:block>
-
-
-      <fo:table border-width="1.5mm" border-style="solid" background-color="rgb(100,210,250)" table-layout="fixed" width="100%" border-collapse="separate">
+      <fo:block font-size="16pt" font-family="sans-serif" space-after.optimum="15pt"
+        text-align="center" break-before="page"> 5 tables with borders </fo:block>
+      <!-- normal text -->
+      <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
+        this is normal text. this is normal text. this is normal text. </fo:block>
+      <fo:table border-width="1.5mm" border-style="solid" background-color="rgb(100,210,250)"
+        table-layout="fixed" width="100%" border-collapse="separate">
         <fo:table-column column-width="150mm"/>
         <fo:table-body>
           <fo:table-row>
-            <fo:table-cell><fo:block>bad</fo:block></fo:table-cell>
+            <fo:table-cell>
+              <fo:block>bad</fo:block>
+            </fo:table-cell>
           </fo:table-row>
         </fo:table-body>
       </fo:table>
-
-
-      <fo:table border-width="1.5mm" border-style="solid" background-color="rgb(100,210,250)" table-layout="fixed" width="100%" border-collapse="separate">
+      <fo:table border-width="1.5mm" border-style="solid" background-color="rgb(100,210,250)"
+        table-layout="fixed" width="100%" border-collapse="separate">
         <fo:table-column column-width="150mm"/>
         <fo:table-body>
           <fo:table-row>
-            <fo:table-cell><fo:block>bad</fo:block></fo:table-cell>
+            <fo:table-cell>
+              <fo:block>bad</fo:block>
+            </fo:table-cell>
           </fo:table-row>
         </fo:table-body>
       </fo:table>
-
-
-      <fo:table border-width="1.5mm" border-style="solid" background-color="rgb(100,210,250)" table-layout="fixed" width="100%" border-collapse="separate">
+      <fo:table border-width="1.5mm" border-style="solid" background-color="rgb(100,210,250)"
+        table-layout="fixed" width="100%" border-collapse="separate">
         <fo:table-column column-width="150mm"/>
         <fo:table-body>
           <fo:table-row>
-            <fo:table-cell><fo:block>bad</fo:block></fo:table-cell>
+            <fo:table-cell>
+              <fo:block>bad</fo:block>
+            </fo:table-cell>
           </fo:table-row>
         </fo:table-body>
       </fo:table>
-
-      <fo:table border-width="1.5mm" border-style="solid" background-color="rgb(100,210,250)" table-layout="fixed" width="100%" border-collapse="separate">
+      <fo:table border-width="1.5mm" border-style="solid" background-color="rgb(100,210,250)"
+        table-layout="fixed" width="100%" border-collapse="separate">
         <fo:table-column column-width="150mm"/>
         <fo:table-body>
           <fo:table-row>
-            <fo:table-cell><fo:block>bad</fo:block></fo:table-cell>
+            <fo:table-cell>
+              <fo:block>bad</fo:block>
+            </fo:table-cell>
           </fo:table-row>
         </fo:table-body>
       </fo:table>
-
-    <!-- normal text -->
-    <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
-                                 this is normal text. this is normal text. this is normal text.
-    </fo:block>
-
-
-<!-- **************************** NEW PAGE ************************************* -->
-      <fo:block font-size="16pt"
-                font-family="sans-serif"
-                line-height="20pt"
-                space-after.optimum="3pt"
-                break-before="page"
-                text-align="justify">
-          A Contents table
-      </fo:block>
-
+      <!-- normal text -->
+      <fo:block text-align="start">this is normal text. this is normal text. this is normal text.
+        this is normal text. this is normal text. this is normal text. </fo:block>
+      <!-- **************************** NEW PAGE ************************************* -->
+      <fo:block font-size="16pt" font-family="sans-serif" line-height="20pt"
+        space-after.optimum="3pt" break-before="page" text-align="justify"> A Contents table </fo:block>
       <!-- Here starts the table -->
       <fo:table table-layout="fixed" width="100%" border-collapse="separate">
         <fo:table-column column-width="1cm"/>
         <fo:table-column column-width="15cm"/>
         <fo:table-body font-size="10pt" font-family="sans-serif">
-        <fo:table-row line-height="12pt">
-        <fo:table-cell>
-          <fo:block text-align="end">A) </fo:block>
-        </fo:table-cell>
-        <fo:table-cell>
-        <fo:block text-align="start">What is FOP?</fo:block>
-        </fo:table-cell>
-        </fo:table-row>
-        <fo:table-row line-height="12pt">
-        <fo:table-cell>
-        <fo:block text-align="end">B) </fo:block>
-        </fo:table-cell>
-        <fo:table-cell>
-        <fo:block text-align="start">Downloading FOP</fo:block>
-        </fo:table-cell>
-        </fo:table-row>
-        <fo:table-row line-height="12pt">
-        <fo:table-cell>
-        <fo:block text-align="end">C) </fo:block>
-        </fo:table-cell>
-        <fo:table-cell>
-        <fo:block text-align="start">Running FOP</fo:block>
-        </fo:table-cell>
-        </fo:table-row>
-        <fo:table-row line-height="12pt">
-        <fo:table-cell>
-        <fo:block text-align="end">D) </fo:block>
-        </fo:table-cell>
-        <fo:table-cell>
-        <fo:block text-align="start">Embedding FOP </fo:block>
-        </fo:table-cell>
-        </fo:table-row>
-        <fo:table-row line-height="12pt">
-        <fo:table-cell>
-        <fo:block text-align="end">E) </fo:block>
-        </fo:table-cell>
-        <fo:table-cell>
-        <fo:block text-align="start">What's Implemented?</fo:block>
-        </fo:table-cell>
-        </fo:table-row>
-        <fo:table-row line-height="12pt">
-        <fo:table-cell>
-        <fo:block text-align="end">F) </fo:block>
-        </fo:table-cell>
-        <fo:table-cell>
-        <fo:block text-align="start">Limitations</fo:block>
-        </fo:table-cell>
-        </fo:table-row>
-        <fo:table-row line-height="12pt">
-        <fo:table-cell>
-        <fo:block text-align="end">G) </fo:block>
-        </fo:table-cell>
-        <fo:table-cell>
-        <fo:block text-align="start">Bugs</fo:block>
-        </fo:table-cell>
-        </fo:table-row>
-        <fo:table-row line-height="12pt">
-        <fo:table-cell>
-        <fo:block text-align="end">H) </fo:block>
-        </fo:table-cell>
-        <fo:table-cell>
-        <fo:block text-align="start">Compiling FOP</fo:block>
-        </fo:table-cell>
-        </fo:table-row>
-        <fo:table-row line-height="12pt">
-        <fo:table-cell>
-        <fo:block text-align="end">I) </fo:block>
-        </fo:table-cell>
-        <fo:table-cell>
-        <fo:block text-align="start">Getting involved</fo:block>
-        </fo:table-cell>
-        </fo:table-row>
-        <fo:table-row line-height="12pt">
-        <fo:table-cell>
-        <fo:block text-align="end">J) </fo:block>
-        </fo:table-cell>
-        <fo:table-cell>
-        <fo:block text-align="start">FOP Relevant Specifications</fo:block>
-        </fo:table-cell>
-        </fo:table-row>
-        <fo:table-row line-height="12pt">
-        <fo:table-cell>
-        <fo:block text-align="end">K) </fo:block>
-        </fo:table-cell>
-        <fo:table-cell>
-        <fo:block text-align="start">Licence</fo:block>
-        </fo:table-cell>
-        </fo:table-row>
+          <fo:table-row line-height="12pt">
+            <fo:table-cell>
+              <fo:block text-align="end">A) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="start">What is FOP?</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row line-height="12pt">
+            <fo:table-cell>
+              <fo:block text-align="end">B) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="start">Downloading FOP</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row line-height="12pt">
+            <fo:table-cell>
+              <fo:block text-align="end">C) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="start">Running FOP</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row line-height="12pt">
+            <fo:table-cell>
+              <fo:block text-align="end">D) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="start">Embedding FOP </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row line-height="12pt">
+            <fo:table-cell>
+              <fo:block text-align="end">E) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="start">What's Implemented?</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row line-height="12pt">
+            <fo:table-cell>
+              <fo:block text-align="end">F) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="start">Limitations</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row line-height="12pt">
+            <fo:table-cell>
+              <fo:block text-align="end">G) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="start">Bugs</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row line-height="12pt">
+            <fo:table-cell>
+              <fo:block text-align="end">H) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="start">Compiling FOP</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row line-height="12pt">
+            <fo:table-cell>
+              <fo:block text-align="end">I) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="start">Getting involved</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row line-height="12pt">
+            <fo:table-cell>
+              <fo:block text-align="end">J) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="start">FOP Relevant Specifications</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row line-height="12pt">
+            <fo:table-cell>
+              <fo:block text-align="end">K) </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="start">Licence</fo:block>
+            </fo:table-cell>
+          </fo:table-row>
         </fo:table-body>
       </fo:table>
     </fo:flow>

+ 2 - 1
SE/schema/WPS_Functions/apache_fop/fop-2.3/fop/examples/fo/build.xml

@@ -45,7 +45,7 @@
   <!-- Produces new test files (function)                                  -->
   <!-- =================================================================== -->
   <target name="newTestFiles">
-    <fop format="${mimetype}" outdir="${outDir}" messagelevel="${msglevel}" relativebase="true" throwexceptions="false">
+    <fop format="${mimetype}" outdir="${outDir}" messagelevel="${msglevel}" force="true" relativebase="true" throwexceptions="false">
       <fileset dir="basic">
         <include name="**/*.fo"/>
       </fileset>
@@ -72,6 +72,7 @@
       </fileset>
       <fileset dir="advanced">
         <include name="**/giro.fo"/>
+        <include name="**/bleed-and-crop-marks.fo"/>
       </fileset>
     </fop>
   </target>

+ 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>

+ 192 - 295
SE/schema/WPS_Functions/apache_fop/fop-2.3/fop/examples/fo/tables/break.fo

@@ -1,321 +1,218 @@
 <?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="17cm">
+    <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="17cm">
       <fo:region-body margin-top="1cm"/>
-      <fo:region-before extent="1cm"/>
+      <fo:region-before extent="1cm" /><!-- precedence="true" -->
       <fo:region-after extent="1.5cm"/>
+      <fo:region-start extent="1.5cm"  background-color="lightgreen" 
+        />
     </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-start">
+      <fo:block line-height="14pt" font-size="10pt" text-align="end">left</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">
-      Tests for breaks on table rows.
-      </fo:block>
-
-      <fo:block space-before.optimum="80pt" space-after.optimum="15pt">
-      Table 1: basic break after with next
-      </fo:block>
-
+      <fo:block space-before.optimum="3pt" space-after.optimum="15pt"> Tests for breaks on table
+        rows. </fo:block>
+      <fo:block space-before.optimum="80pt" space-after.optimum="15pt"> Table 1: basic break after
+        with next </fo:block>
       <fo:table border-width="0.5pt" border-color="red" 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 border-width="0.5pt" break-after="page">
-      <fo:table-cell>
-        <fo:block text-align="center">
-        first row
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        new page
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        for next
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row border-width="0.5pt">
-      <fo:table-cell>
-        <fo:block text-align="center">
-        second row
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        normal
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        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-body>
+          <fo:table-row border-width="0.5pt" break-after="page">
+            <fo:table-cell>
+              <fo:block text-align="center"> first row </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> new page </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> for next </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row border-width="0.5pt">
+            <fo:table-cell>
+              <fo:block text-align="center"> second row </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> normal </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
-      <fo:block space-before.optimum="80pt" space-after.optimum="15pt">
-      Table 2: basic break before with next
-      </fo:block>
-
+      <fo:block space-before.optimum="80pt" space-after.optimum="15pt"> Table 2: basic break before
+        with next </fo:block>
       <fo:table border-width="0.5pt" border-color="red" 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 border-width="0.5pt">
-      <fo:table-cell>
-        <fo:block text-align="center">
-        first row
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        new page
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        for next
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row border-width="0.5pt" break-before="page">
-      <fo:table-cell>
-        <fo:block text-align="center">
-        second row
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        break before
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        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-body>
+          <fo:table-row border-width="0.5pt">
+            <fo:table-cell>
+              <fo:block text-align="center"> first row </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> new page </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> for next </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row border-width="0.5pt" break-before="page">
+            <fo:table-cell>
+              <fo:block text-align="center"> second row </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> break before </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
-      <fo:block space-before.optimum="80pt" space-after.optimum="15pt">
-      Table 3: basic break before a keep with next
-      </fo:block>
-
+      <fo:block space-before.optimum="80pt" space-after.optimum="15pt"> Table 3: basic break before
+        a keep with next </fo:block>
       <fo:table border-width="0.5pt" border-color="red" 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 border-width="0.5pt" keep-with-next="always">
-      <fo:table-cell>
-        <fo:block text-align="center">
-        first row
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        new page
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        for next
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row border-width="0.5pt" break-before="page">
-      <fo:table-cell>
-        <fo:block text-align="center">
-        second row
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        break before
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        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-body>
+          <fo:table-row border-width="0.5pt" keep-with-next="always">
+            <fo:table-cell>
+              <fo:block text-align="center"> first row </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> new page </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> for next </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row border-width="0.5pt" break-before="page">
+            <fo:table-cell>
+              <fo:block text-align="center"> second row </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> break before </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
-      <fo:block space-before.optimum="80pt" space-after.optimum="15pt">
-      Table 4: basic break after a keep with previous
-      </fo:block>
-
+      <fo:block space-before.optimum="80pt" space-after.optimum="15pt"> Table 4: basic break after a
+        keep with previous </fo:block>
       <fo:table border-width="0.5pt" border-color="red" 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 border-width="0.5pt" break-after="page">
-      <fo:table-cell>
-        <fo:block text-align="center">
-        first row
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        new page
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        for next
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row border-width="0.5pt" keep-with-previous="always">
-      <fo:table-cell>
-        <fo:block text-align="center">
-        second row
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        break before
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        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-body>
+          <fo:table-row border-width="0.5pt" break-after="page">
+            <fo:table-cell>
+              <fo:block text-align="center"> first row </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> new page </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> for next </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row border-width="0.5pt" keep-with-previous="always">
+            <fo:table-cell>
+              <fo:block text-align="center"> second row </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> break before </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> row </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
-      <fo:block space-before.optimum="80pt" space-after.optimum="15pt">
-      Table 5: basic break after a keep with previous
-      </fo:block>
-
+      <fo:block space-before.optimum="80pt" space-after.optimum="15pt"> Table 5: basic break after a
+        keep with previous </fo:block>
       <fo:table border-width="0.5pt" border-color="red" 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 border-width="0.5pt">
-      <fo:table-cell>
-        <fo:block text-align="center">
-        normal
-        </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">
-        with text
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row border-width="0.5pt">
-      <fo:table-cell>
-        <fo:block text-align="center">
-        normal
-        </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">
-        with text
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row border-width="0.5pt" keep-with-next="always">
-      <fo:table-cell>
-        <fo:block text-align="center">
-        normal
-        </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">
-        with text
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row border-width="0.5pt" keep-with-next="always" break-after="page">
-      <fo:table-cell>
-        <fo:block text-align="center">
-        break after
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        and
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell>
-        <fo:block text-align="center">
-        keep with next
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-    <fo:table-row border-width="0.5pt" keep-with-next="always">
-      <fo:table-cell>
-        <fo:block text-align="center">
-        keep
-        </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">
-        next
-        </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-body>
+          <fo:table-row border-width="0.5pt">
+            <fo:table-cell>
+              <fo:block text-align="center"> normal </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"> with text </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row border-width="0.5pt">
+            <fo:table-cell>
+              <fo:block text-align="center"> normal </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"> with text </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row border-width="0.5pt" keep-with-next="always">
+            <fo:table-cell>
+              <fo:block text-align="center"> normal </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"> with text </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row border-width="0.5pt" keep-with-next="always" break-after="page">
+            <fo:table-cell>
+              <fo:block text-align="center"> break after </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> and </fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block text-align="center"> keep with next </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <fo:table-row border-width="0.5pt" keep-with-next="always">
+            <fo:table-cell>
+              <fo:block text-align="center"> keep </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"> next </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </fo:table-body>
       </fo:table>
-
     </fo:flow>
   </fo:page-sequence>
 </fo:root>

二进制
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/examle.xslt2_1114.jpg


+ 349 - 0
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.defaults.param.fo.xsl

@@ -0,0 +1,349 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+    xmlns:system_cache__dita="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/dita.xsd"
+    xmlns:system_cache__dita__x3A__p5gnuplot="http://biuro.biall-net.pl/WPS_Functions/system_cache__dita__x3A__p5gnuplot/system_cache__dita__x3A__p5gnuplot.xsd"
+    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:p5gnuplot__x3A__system_cache__dita="http://biuro.biall-net.pl/WPS_Functions/p5gnuplot__x3A__system_cache__dita/p5gnuplot__x3A__system_cache__dita.xsd"
+    xmlns:p5gnuplot="http://biuro.biall-net.pl/WPS_Functions/graph_gnuplot"
+    xmlns:svg="http://www.w3.org/2000/svg"
+    xmlns:default_db__x3A__BI_audit_ENERGA_RUM_UMOWY="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_UMOWY"
+    xmlns:default_db__x3A__BI_audit_BENFORD="https://biuro.biall-net.pl/wfs/default_db/BI_audit_BENFORD"
+    xmlns:xp5r="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache.public/xinclude_p5_recurse/xinclude_p5_recurse.xsd"
+    xmlns:svgu="http://www.ora.com/XSLTCookbook/ns/svg-utils"
+    xmlns:test="http://www.ora.com/XSLTCookbook/ns/test"
+    exclude-result-prefixes="xs"
+    version="2.0">
+    
+    
+    
+    <xsl:output indent="yes"/>
+    <xsl:strip-space elements="*"/>
+    
+    <!-- case naglowek na kazdej stronie example break.fo
+        fo:layout-master-set
+            fo:simple-page-master master-name="first"
+            fo:region-body 
+            fo:region-before
+            fo:region-after 
+      
+        fo:page-sequence master-reference="first"
+            fo:static-content flow-name="xsl-region-before"
+                "NAGLOWEK"
+            fo:static-content flow-name="xsl-region-after"
+                fo:block line-height="14pt" font-size="10pt" text-align="end"
+                    Page <fo:page-number/>
+            
+        fo:flow flow-name="xsl-region-body"
+    -->
+    
+    
+    <xsl:param name="system_cache__dita__x3A__svg:default.complex.fo">
+        <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+            <!-- defines the layout master -->
+            <fo:layout-master-set>
+                <fo:simple-page-master master-name="system_cache__dita__x3A__svg.plot.complex" 
+                    page-height="{$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate.default}" 
+                    page-width="{$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate.default}"
+                    margin-top="5px" margin-bottom="5px" margin-left="5px" margin-right="5px">
+                    <fo:region-body margin-top="5px"/>
+                    <fo:region-before extent="5px"/>
+                    <fo:region-after extent="5px"/>
+                </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" />
+                        <fo:conditional-page-master-reference master-reference="left"
+                            odd-or-even="even" />
+                        <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:simple-page-master master-name="all-pages" page-width="8.5in" page-height="11in">
+                        <fo:region-body padding="6pt" margin="0.7in" region-name="xsl-region-body" column-gap="0.25in"/>
+                        <fo:region-before padding="6pt" region-name="xsl-region-before" display-align="after" extent="0.7in"/>
+                        <fo:region-after padding="6pt" region-name="xsl-region-after" display-align="before" extent="0.7in"/>
+                    </fo:simple-page-master>
+                    <fo:page-sequence-master master-name="default-sequence">
+                        <fo:repeatable-page-master-reference master-reference="all-pages"/>
+                    </fo:page-sequence-master>
+                </fo:layout-master-set>
+                <fo:page-sequence master-reference="default-sequence">
+                    <fo:static-content flow-name="xsl-region-before" font-size="12pt" font-family="Times New Roman">
+                        <fo:block>sample header</fo:block>
+                    </fo:static-content>
+                    <fo:flow flow-name="xsl-region-body" font-size="12pt" font-family="Times New Roman">
+                        <fo:block>sample text</fo:block>
+                    </fo:flow>
+                    <fo:static-content flow-name="xsl-region-after" font-size="12pt" font-family="Times New Roman">
+                        <fo:block>sample footer</fo:block>
+                    </fo:static-content>
+                </fo:page-sequence>-->
+                
+                <!--Definition and Usage
+                
+                The <fo:region-after> object defines the bottom region of a page (footer).
+                    
+                    XSL-FO uses the following elements to define the regions of a page:
+                    
+                    <fo:region-body> defines the body region
+                    <fo:region-before precedence="true"> defines the top region (header) precedence makes that takes wull widht of start/end
+                    <fo:region-after> defines the bottom region (footer)
+                    <fo:region-start> defines the left region (left sidebar)
+                    <fo:region-end> defines the right region (right sidebar)
+                    -->                    
+                
+                <!--<fo:simple-page-master master-name="first"
+                    page-width="21cm" 
+                    page-height="29.7cm"
+                    margin-top="5mm">
+                    <fo:region-body 
+                        margin-bottom="4.5in" 
+                        margin-right="5mm" 
+                        margin-left="5mm" 
+                        margin-top="5mm"/>
+                    <fo:region-after 
+                        extent="4in" />
+                </fo:simple-page-master>
+                
+                <fo:simple-page-master master-name="rest"
+                    page-width="21cm" 
+                    page-height="29.7cm"  
+                    margin-right="5mm" 
+                    margin-left="5mm" 
+                    margin-top="5mm" 
+                    margin-bottom="5mm">
+                    <fo:region-body/>
+                </fo:simple-page-master>
+                
+                <fo:page-sequence-master master-name="A4">
+                    <fo:repeatable-page-master-alternatives>
+                        <fo:conditional-page-master-reference master-reference="first" page-position="first"/>
+                        <fo:conditional-page-master-reference master-reference="rest" page-position="rest"/>
+                        <fo:conditional-page-master-reference master-reference="rest"/>
+                    </fo:repeatable-page-master-alternatives>
+                </fo:page-sequence-master>-->
+                
+                
+                
+            </fo:layout-master-set>
+            <!--<fo:flow-map flow-map-name="E1">
+                <fo:flow-assignment>
+                    <fo:flow-source-list>
+                        <fo:flow-name-specifier flow-name-reference="A"/>
+                    </fo:flow-source-list>
+                    <fo:flow-target-list>
+                        <fo:region-name-specifier region-name-reference="R"/>
+                    </fo:flow-target-list>
+                </fo:flow-assignment>
+                <fo:flow-assignment>
+                    <fo:flow-source-list>
+                        <fo:flow-name-specifier flow-name-reference="B"/>
+                    </fo:flow-source-list>
+                    <fo:flow-target-list>
+                        <fo:region-name-specifier region-name-reference="S"/>
+                    </fo:flow-target-list>
+                </fo:flow-assignment>
+            </fo:flow-map>-->
+            
+            <fo:page-sequence master-reference="system_cache__dita__x3A__svg.plot.complex">
+                
+                <!--<fo:static-content flow-name="xsl-region-before">
+                    <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:static-content>-->
+                <fo:static-content flow-name="xsl-region-before"><!-- header -->
+                    <fo:block-container height="{$system_cache__dita__x3A__svg:title.font-size.default}"
+                        width="{$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate.default}" 
+                        top="3" left="5" position="absolute"><!-- left="8in - 5mm" -->
+                        
+                        <fo:block text-align="center" font-size="{$system_cache__dita__x3A__svg:title.font-size.default}" 
+                            font-weight="bold">
+                            Zintegrowany widok powiązań osób i transakcji
+                        </fo:block>
+                        <fo:block>
+                            <!--<fo:instream-foreign-object>-->
+                                Od<!--<xsl:value-of select="descendant-or-self::@DATA_RAPORTU"/>--> do
+                                <!--<xp5r:apply-template></xp5r:apply-template>-->
+                            <!--</fo:instream-foreign-object>-->
+                            <!--<svgu:xyPlot></svgu:xyPlot>-->
+                        </fo:block>
+                        <!--<fo:block>
+                            <fo:external-graphic src="file:mk1logo.tif"/>
+                        </fo:block>-->
+                    </fo:block-container>
+                </fo:static-content>
+                
+                
+                <fo:flow flow-name="xsl-region-body">
+                    
+                    
+                    <!--<fo:instream-foreign-object>-->
+                    
+                    <fo:block id="crop-marks">
+                        This is a normal block container within the flow layout.
+                        <fo:block-container>
+                            <fo:block>
+                                BC:A
+                            </fo:block>
+                        </fo:block-container>
+                    </fo:block>
+                    
+                    <fo:block>
+                        This block container has a different reference orientation.
+                        <fo:block-container reference-orientation="90" inline-progression-dimension="100pt">
+                            <fo:block>
+                                BC:B
+                            </fo:block>
+                            <fo:block>
+                                The areas are stacked normally but the orientation of the
+                                area is rotated 90 degrees anti-clockwise.
+                            </fo:block>
+                            <fo:block>
+                                The blocks continue until exhausted as the layout
+                                height of this container is fixed in the parent
+                                block progression dimension. The clipping of the result
+                                is determined by the overflow property. The block
+                                progression dimension of this container is effectively
+                                infinite.
+                            </fo:block>
+                        </fo:block-container>
+                    </fo:block>
+                    
+                    <fo:block>
+                        This block container has a different reference orientation.
+                        <fo:block-container reference-orientation="270" inline-progression-dimension="100pt">
+                            <fo:block>
+                                BC:B II
+                            </fo:block>
+                            <fo:block>
+                                The areas are stacked normally but the orientation of the
+                                area is rotated 90 degrees clockwise.
+                            </fo:block>
+                            <fo:block>
+                                The blocks continue until exhausted as the layout
+                                height of this container is fixed in the parent
+                                block progression dimension. The clipping of the result
+                                is determined by the overflow property.
+                            </fo:block>
+                        </fo:block-container>
+                    </fo:block>
+                    
+                    <fo:block>
+                        This block container has a different reference orientation.
+                        <fo:block-container reference-orientation="180" inline-progression-dimension="100pt">
+                            <fo:block>
+                                BC:B III
+                            </fo:block>
+                            <fo:block>
+                                The areas are stacked normally but the orientation of the
+                                area is rotated 180 degrees clockwise.
+                            </fo:block>
+                            <fo:block>
+                                This block container behaves as part of the flow except
+                                the contents are drawn rotated within the viewport by
+                                180 degrees.
+                            </fo:block>
+                        </fo:block-container>
+                    </fo:block>
+                    
+                    <fo:block>
+                        different writing mode
+                        <fo:block-container writing-mode="rl">
+                            <fo:block>
+                                BC:C
+                            </fo:block>
+                            <fo:block>
+                                The areas in this block are stacked according to the rl (tb)
+                                writing mode.
+                            </fo:block>
+                        </fo:block-container>
+                    </fo:block>
+                    
+                    <fo:block>
+                        The next block-container has an absolute position. It does
+                        not affect the flow layout of other blocks.
+                        <fo:block-container absolute-position="absolute"
+                            left="20pt" top="400pt" right="220pt" bottom="550pt">
+                            <fo:block>
+                                BC:D
+                            </fo:block>
+                            <fo:block>
+                                This is a normal block that is confined to the
+                                block container.
+                            </fo:block>
+                        </fo:block-container>
+                    </fo:block>
+                    
+                    <fo:block>
+                        The next block-container has an absolute position. It does
+                        not affect the flow layout of other blocks. This time with
+                        the reference-orientation set.
+                        <fo:block-container reference-orientation="270" absolute-position="absolute"
+                            left="400pt" top="370pt" right="500pt" bottom="270pt">
+                            <fo:block>
+                                BC:E
+                            </fo:block>
+                            <fo:block>
+                                This is a normal block that is confined to the
+                                block container.
+                            </fo:block>
+                        </fo:block-container>
+                    </fo:block>
+                    
+                    <fo:block break-after="page">
+                        End of page.
+                    </fo:block>
+                    
+                    <fo:block>
+                        The next block-container tests the clipping.
+                        <fo:block-container reference-orientation="180" absolute-position="absolute"
+                            right="100pt" bottom="550pt" left="200pt" top="700pt"
+                            overflow="hidden">
+                            <fo:block>
+                                BC:F
+                            </fo:block>
+                            <fo:block>
+                                This is a normal block that is confined to the
+                                block container. It also has contents that are
+                                larger than the block-container so that this text
+                                will be clipped to the viewport.
+                            </fo:block>
+                        </fo:block-container>
+                    </fo:block>
+                    
+                    <fo:block>
+                        The next block-container tests error-if-overflow.
+                        <fo:block-container reference-orientation="90" absolute-position="absolute"
+                            bottom="220pt" left="600pt" top="320pt" right="700pt"
+                            overflow="error-if-overflow">
+                            <fo:block>
+                                BC:G
+                            </fo:block>
+                            <fo:block>
+                                This is a normal block that is confined to the
+                                block container. It also has contents that are
+                                larger than the block-container so that this text
+                                will be clipped to the viewport.
+                            </fo:block>
+                        </fo:block-container>
+                    </fo:block>
+                    
+                </fo:flow>
+            </fo:page-sequence>
+        </fo:root>
+    </xsl:param>
+    
+    
+    
+  
+</xsl:stylesheet>

+ 33 - 18
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,11 +80,14 @@
         <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>
     
     
-    <xsl:param name="system_cache__dita__x3A__svg:debug.level" select="0"/>
+    <xsl:param name="system_cache__dita__x3A__svg:debug.level" select="6"/>
     
     <xsl:function name="system_cache__dita__x3A__svg:spacing">
         <xsl:param name="system_cache__dita__x3A__svg:pwidth"/>
@@ -98,10 +103,20 @@
     
     
     
+    
+    
+    <xsl:include href="system_cache__dita__x3A__svg.defaults.param.fo.xsl"/>
+    
     <xsl:template name="system_cache__dita__x3A__svg:default.param.plot"><!-- to control plot values -->
         <xsl:param name="system_cache__dita__x3A__svg:width" select="$system_cache__dita__x3A__svg:width.default"/>
         <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">
@@ -113,17 +128,17 @@
             id="width.default.top"
             style="stroke-width: 5; stroke: red"/>-->
                 <svg:line 
-                    x1="0"
-                    y1="0"
-                    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="0"
+                    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>

+ 688 - 95
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,24 +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" select="system_cache__dita__x3A__svg:cursor.current.height($system_cache__dita__x3A__svg:cursor)"/>
+        
+        <!--<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)" />
@@ -33,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" />
                     
                     
@@ -95,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"/>
             -->
                     
@@ -104,9 +279,9 @@
                     
                     <xsl:attribute name="system_cache__dita__x3A__svg:range.y" select="$system_cache__dita__x3A__svg:range.y"/>
                     
-                    
-                    
-                    
+                    <DEBUG107>
+                    <xsl:copy-of select="."/>
+                    </DEBUG107>
                 </xsl:copy>
             </xsl:when>
         </xsl:choose>
@@ -115,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>-->
             
@@ -154,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>        
         
@@ -189,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"
@@ -330,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>-->
             
             
@@ -352,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"/>
@@ -369,36 +571,143 @@
                 <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.data.position__x3A__limit" select="1" tunnel="yes"/>
                 
             </xsl:apply-templates>-->
+            
         </svg:g>        
         
     </xsl:template>
     
   
     <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: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()"/></xsl:comment>
+        <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}"-->
@@ -407,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">
@@ -435,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()"/>
@@ -524,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>
@@ -548,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)"/>
@@ -564,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( )"/>
                 
@@ -597,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}" 
@@ -604,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>         
@@ -628,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>         
@@ -640,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"/>

+ 248 - 0
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.Yaxis.xsl

@@ -0,0 +1,248 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="2.0"  
+        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+        xmlns:svg="http://www.w3.org/2000/svg"    
+        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"
+        exclude-result-prefixes="svgu test">
+        
+        
+    <xsl:output indent="yes"/>
+    <xsl:strip-space elements="*"/>
+    
+    
+    <xsl:template name="system_cache__dita__x3A__svg:yAxis">
+        <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="maxX" select="(number($system_cache__dita__x3A__svg:data.x2.bounds.max.length) div (count($dataY) + 1)) * count($dataY)"/>
+        
+        
+        
+        
+        
+        <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: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="rangeY" select="$maxY - $minY"/>
+        <xsl:variable name="scaleY" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.length div $rangeY"/>
+        
+        <xsl:variable name="nTicks"    select="$majorTicks * $minorTicks + 1"/>
+        <xsl:variable name="yIncr"  select="($maxY - $minY) div ($majorTicks * $minorTicks)"/>
+        
+        
+        <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="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="$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: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>
+                    
+                    
+                    <!-- 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
+                        -->
+                    
+                    
+                    <xsl:comment>#246 call ticks with $yMajor1=$min <xsl:value-of select="$minY"/>; 
+                        
+                            
+                        </xsl:comment>
+                         <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>#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>
+        
+        
+    </xsl:template>
+     
+     
+</xsl:stylesheet>

+ 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"

+ 371 - 2
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.bar.xsl

@@ -19,9 +19,378 @@
     </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" select="$system_cache__dita__x3A__svg:width.default"/>
+        <xsl:param name="width" required="yes"/>
         <xsl:param name="system_cache__dita__x3A__svg:cursor.current.height" required="yes"/>
         <xsl:param name="orientation" select="0"/>
         <xsl:param name="barWidth" select="5"/> 
@@ -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">

+ 103 - 145
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.complex.test.305.xsl

@@ -15,153 +15,111 @@
     xmlns:default_db__x3A__BI_audit_BENFORD="https://biuro.biall-net.pl/wfs/default_db/BI_audit_BENFORD"
     >
     
-    <!--
-            <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:pwidth"/> 
-                <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: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: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:comment>#2227svgu:yAxis 90 gorna lewa os, razem z poziomicami ktore szly za szeroko</xsl:comment>
-            <xsl:copy-of select="$system_cache__dita__x3A__svg:cursor"/>
-            <xsl:call-template name="svgu: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="width" select="$system_cache__dita__x3A__svg:pwidth"/>
-                <xsl:with-param name="height" select="$system_cache__dita__x3A__svg:pheight"/>
-                <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="context" select=" 'price' "/>
-                <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:cursor.current.Y" select="$system_cache__dita__x3A__svg:cursor.current.Y"/>
-            </xsl:call-template>
-            
-            
-            <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="system_cache__dita__x3A__svg:pheight" select="$system_cache__dita__x3A__svg:pheight"/>
-                    <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</xsl:with-param>
-                    <xsl:with-param name="nextY.height" select="$system_cache__dita__x3A__svg:vheight"/>
-                </xsl:call-template>
-            </xsl:variable>
-            
-            
-            
-            <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)"/>
-            
-            
-           <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__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"/> $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"/>) </xsl:comment>
-            
-            <xsl:copy-of select="$system_cache__dita__x3A__svg:cursor"></xsl:copy-of>
-            
-            
-            <xsl:call-template name="svgu:bars">
-                <xsl:with-param name="data" select="//Volume"/>
-                <xsl:with-param name="width" select="$system_cache__dita__x3A__svg:pwidth"/> 
-                <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"/>
-            </xsl:call-template>
-            -->
-    
-    
-    
-    
-    <!--
-            <xsl:comment>#361 svgu:xyPlot 118 $spacing="<xsl:value-of select="$system_cache__dita__x3A__svg:spacing"/>"</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="dataX" select="//dataX"/>
-                <xsl:with-param name="dataY" select="//Vol10MA"/>  
-                <xsl:with-param name="width" select="$system_cache__dita__x3A__svg:pwidth"/><!-\- $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.Y" select="$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:variable name="system_cache__dita__x3A__svg:DEVELOPMENT__x3A__CONFIG">
+        <system_cache__dita__x3A__svg:DEVELOPMENT__x3A__CONFIG>
+            <system_cache__dita__x3A__svg:cursor hash="system_cache__dita__x3A__svg:cursor#110"/>
+            <system_cache__dita__x3A__svg:cursor/>
+            <comment>
+                #93 
+                $system_cache__dita__x3A__svg:offsetY.default =
+            </comment>
+            <system_cache__dita__x3A__svg:cursor.current/>
+            <hash>svg:text hash="#152" x="{$system_cache__d</hash>
+            <DISABLE153>
                 
-            </xsl:call-template>
-           
-            
-            
-            
-            <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"/>
-                $offsetY = <xsl:value-of select="$system_cache__dita__x3A__svg:offsetY"/>
-                $system_cache__dita__x3A__svg:vheight = <xsl:value-of select="$system_cache__dita__x3A__svg:vheight"/>
-                $width = $system_cache__dita__x3A__svg:pwidth = <xsl:value-of select="$system_cache__dita__x3A__svg:pwidth"/>
-                svg width="{<xsl:value-of select="$system_cache__dita__x3A__svg:width"/>}" height="{<xsl:value-of select="$system_cache__dita__x3A__svg:height"/>}
+            </DISABLE153>
+            <call>
+                system_cache__dita__x3A__svg:default.param.plot
+            </call>
+            <hash>#171 tytul od do </hash>
+            <comment>#174 applying for powiazania rows lowe</comment>
+            <system_cache__dita__x3A__svg:data__x3A__assign>
+                apply-templates mode="system_cache__dita__x3A__svg:data__x3A__assign" sel
+            </system_cache__dita__x3A__svg:data__x3A__assign>
+            <comment hash="1186">
+                akcja z danuymi ENSA
+                <variable>
+                    variable name="system_cache__dita__x3A__svg:data__x3A__assign
+                    <apply>
+                        apply-templates mode="system_cache__dita__x3A__svg:data__x3A__assign" select="doc('file:/opt/local/pl.procesy5/p5build_SE/temp/WP
+                        <with-param>system_cache__dita__x3A__svg:cursor</with-param>
+                    </apply>
+                </variable>
+                <copy>
+                    copy-of select="$system_cache__dita__x3A__svg:data__x3A__assign
+                </copy>
+                <hash id="1186">
+                    #1186 lower applying powiazania for hi low ( + $system_cache__dita__x3A__svg:height 
+                </hash>
+                <apply>
+                    mode="system_cache__dita__x3A__svg:openHiLoClose" 
+                    select="$system_cache__dita__x3A__svg:data__x3A__assign"
+                    ith-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor
+                    :with-param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:height"
+                    with-param name="system_cache__dita__x3A__svg:width__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:width" tunnel="yes
+                </apply>
+                <hash id="1186-B">
+                    comment>#1186-B EOF lower applying powiazania for hi low
+                </hash>
+            </comment>
+            <call>
+                all-template name="svgu:openHiLoClose
+            </call>
+            <hash id="#2227svgu">
+                comment>#2227svgu:yAxis 90 gorna lewa os, razem z poziomicami ktore szly za szeroko
+            </hash>
+            <copy>opy-of select="$system_cache__dita__x3A__svg:cursor</copy>
+            <call>
+                all-template name="svgu:yAxis"
+            </call>
+            <variable>
+                variable name="system_cache__dita__x3A__svg:cursor
+                call-template name="system_cache__dita__x3A__svg:cursor.commi
+            </variable>
+            <variable>
+                :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)
+                :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
+            </variable>
+            <hash id="3227">
+                svgu:bars 100 VOLUME 
+                domyslna wysokosc $system_cache__dita__x3A__svg:hei "$system_cache__dita__x3A__svg:heigh 
+                $system_cache__dita__x3A__svg:cursor.current.heigh stem_cache__dita__x3A__svg:cursor.current.hei 
+                system_cache__dita__x3A__svg:cursor.curren em_cache__dita__x3A__svg:cursor.cu  $offsetY=$sy
+            </hash>
+            <call>
+                :call-template name="svgu:bars"
+            </call>
+            <hash id="361">
+                #361 svgu:xyPlot 118 $spacing system_cache__dita__x3A__svg:spacing
+            </hash>
+            <copy>of select="$system_cache__dita__x3A__svg:curso</copy>
+            <call>
+                call-template name="svgu:xyPlot
+            </call>
+            <hash id="400">
+                #400 svgu:yAxis 130 mala skala po prawej na dole  
+                $system_cache__dita__x3A__svg:vh lect="$system_cache__dita__x3A__svg:vheight"/>
+                $width = $system_cache__dita__x3A__svg -of select="$system_cache__dita__x3A__svg:pwidth"/>
+                svg width "$system_cache__dita__x3A__svg:width" f select="$system_cache__dita__x3A__sv 
                 
-            </xsl:comment>
-            <xsl:call-template name="svgu: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:pwidth"/>
-                <xsl:with-param name="height" select="$system_cache__dita__x3A__svg:vheight"/>
-                <xsl:with-param name="min" select="0"/>
-                <xsl:with-param name="max" select="10000"/>
-                <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:call-template>
-          -->
-    
-    
-    
-    
-    <!--  <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="system_cache__dita__x3A__svg:vheight" select="$system_cache__dita__x3A__svg:vheight"/>
-                    <xsl:with-param name="comment">#225 after volumes</xsl:with-param>
-                    <xsl:with-param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:height"/>
-                </xsl:call-template>
-            </xsl:variable>
-            <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:comment>#235 $system_cache__dita__x3A__svg:cursor.current.Y=<xsl:value-of select="$system_cache__dita__x3A__svg:cursor.current.Y"/></xsl:comment>
-          -->
+            </hash>
+            <call>:call-template name="svgu:yAxis</call>
+            <copy>copy-of select="$sy</copy>
+        </system_cache__dita__x3A__svg:DEVELOPMENT__x3A__CONFIG>
+    </xsl:variable>
+    
+    
+    
     
     
     

文件差异内容过多而无法显示
+ 834 - 110
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.complex.test.svg


+ 502 - 166
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">
@@ -99,98 +99,13 @@
     <xsl:variable name="system_cache__dita__x3A__svg:spacing" select="system_cache__dita__x3A__svg:spacing($system_cache__dita__x3A__svg:pwidth,count(//High))"/>
     
     
-    <xsl:variable name="system_cache__dita__x3A__svg:DEVELOPMENT__x3A__CONFIG">
-        <system_cache__dita__x3A__svg:DEVELOPMENT__x3A__CONFIG>
-            <system_cache__dita__x3A__svg:cursor hash="system_cache__dita__x3A__svg:cursor#110"/>
-            <system_cache__dita__x3A__svg:cursor/>
-            <comment>
-                #93 
-                $system_cache__dita__x3A__svg:offsetY.default =
-            </comment>
-            <system_cache__dita__x3A__svg:cursor.current/>
-            <hash>svg:text hash="#152" x="{$system_cache__d</hash>
-            <DISABLE153>
-                
-            </DISABLE153>
-            <call>
-                system_cache__dita__x3A__svg:default.param.plot
-            </call>
-            <hash>#171 tytul od do </hash>
-            <comment>#174 applying for powiazania rows lowe</comment>
-            <system_cache__dita__x3A__svg:data__x3A__assign>
-                apply-templates mode="system_cache__dita__x3A__svg:data__x3A__assign" sel
-            </system_cache__dita__x3A__svg:data__x3A__assign>
-            <comment hash="1186">
-                akcja z danuymi ENSA
-                <variable>
-                    variable name="system_cache__dita__x3A__svg:data__x3A__assign
-                    <apply>
-                        apply-templates mode="system_cache__dita__x3A__svg:data__x3A__assign" select="doc('file:/opt/local/pl.procesy5/p5build_SE/temp/WP
-                        <with-param>system_cache__dita__x3A__svg:cursor</with-param>
-                    </apply>
-                </variable>
-                <copy>
-                    copy-of select="$system_cache__dita__x3A__svg:data__x3A__assign
-                </copy>
-                <hash id="1186">
-                    #1186 lower applying powiazania for hi low ( + $system_cache__dita__x3A__svg:height 
-                </hash>
-                <apply>
-                    mode="system_cache__dita__x3A__svg:openHiLoClose" 
-                    select="$system_cache__dita__x3A__svg:data__x3A__assign"
-                    ith-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor
-                     :with-param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:height"
-                     with-param name="system_cache__dita__x3A__svg:width__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:width" tunnel="yes
-                </apply>
-                <hash id="1186-B">
-                    comment>#1186-B EOF lower applying powiazania for hi low
-                </hash>
-            </comment>
-            <call>
-                all-template name="svgu:openHiLoClose
-            </call>
-            <hash id="#2227svgu">
-                comment>#2227svgu:yAxis 90 gorna lewa os, razem z poziomicami ktore szly za szeroko
-            </hash>
-            <copy>opy-of select="$system_cache__dita__x3A__svg:cursor</copy>
-            <call>
-                all-template name="svgu:yAxis"
-            </call>
-            <variable>
-                variable name="system_cache__dita__x3A__svg:cursor
-                call-template name="system_cache__dita__x3A__svg:cursor.commi
-            </variable>
-            <variable>
-                :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)
-                :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
-            </variable>
-            <hash id="3227">
-                svgu:bars 100 VOLUME 
-                domyslna wysokosc $system_cache__dita__x3A__svg:hei "$system_cache__dita__x3A__svg:heigh 
-                $system_cache__dita__x3A__svg:cursor.current.heigh stem_cache__dita__x3A__svg:cursor.current.hei 
-                system_cache__dita__x3A__svg:cursor.curren em_cache__dita__x3A__svg:cursor.cu  $offsetY=$sy
-            </hash>
-            <call>
-                :call-template name="svgu:bars"
-            </call>
-            <hash id="361">
-                #361 svgu:xyPlot 118 $spacing system_cache__dita__x3A__svg:spacing
-            </hash>
-            <copy>of select="$system_cache__dita__x3A__svg:curso</copy>
-            <call>
-                call-template name="svgu:xyPlot
-            </call>
-            <hash id="400">
-                #400 svgu:yAxis 130 mala skala po prawej na dole  
-                $system_cache__dita__x3A__svg:vh lect="$system_cache__dita__x3A__svg:vheight"/>
-                $width = $system_cache__dita__x3A__svg -of select="$system_cache__dita__x3A__svg:pwidth"/>
-                svg width "$system_cache__dita__x3A__svg:width" f select="$system_cache__dita__x3A__sv 
-                
-            </hash>
-            <call>:call-template name="svgu:yAxis</call>
-            <copy>copy-of select="$sy</copy>
-        </system_cache__dita__x3A__svg:DEVELOPMENT__x3A__CONFIG>
-    </xsl:variable>
+    
+    
+    
+    <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="/">
         <!-- preserveAspectRatio="xMinYMin" -->
@@ -216,99 +131,520 @@
             <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="system_cache__dita__x3A__svg:font-size" select="$system_cache__dita__x3A__svg:title.font-size.default"/>
+                    <xsl:with-param name="id" select="'system_cache__dita__x3A__svg:title.font-size.default'"/>
+                    <xsl:with-param name="system_cache__dita__x3A__svg:increment" select="$system_cache__dita__x3A__svg:title.font-size.default"/>
                     <xsl:with-param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:height" tunnel="yes"/>
                 </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>
+                        #93 
+                        $system_cache__dita__x3A__svg:offsetY.default = <xsl:value-of select="$system_cache__dita__x3A__svg:offsetY.default"/>
+                        system_cache__dita__x3A__svg:spacing = <xsl:value-of select="$system_cache__dita__x3A__svg:spacing"/>
+                        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)"/>
+                        $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:message>#155 test co jest zle $system_cache__dita__x3A__svg:width=[<xsl:value-of select="$system_cache__dita__x3A__svg:width"/>];
+                 
+                 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)"/>]
+                $system_cache__dita__x3A__svg:cursor.current.height[<xsl:value-of select="$system_cache__dita__x3A__svg:cursor.current.height"/>]
+            </xsl:message>
+            <svg:text hash="#246" 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}" ><!-- 2 * $system_cache__dita__x3A__svg:offsetY -->
+                                        <xsl:call-template name="system_cache__dita__x3A__svg:style">
+                                            <xsl:with-param name="text-anchor.middle" select="true()"/>
+                                            <xsl:with-param name="font-size" select="$system_cache__dita__x3A__svg:title.font-size.default"/>
+                                        </xsl:call-template>
+                                        Zintegrowany widok powiązań osób i transakcji</svg:text>
+                        <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:shortdesc.font-size.default'"/>
+                                <xsl:with-param name="system_cache__dita__x3A__svg:increment" select="$system_cache__dita__x3A__svg:shortdesc.font-size.default"/>
+                                <xsl:with-param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:height" tunnel="yes"/>
+                            </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: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:comment>#93 
-                $system_cache__dita__x3A__svg:offsetY.default = <xsl:value-of select="$system_cache__dita__x3A__svg:offsetY.default"/>
-                system_cache__dita__x3A__svg:spacing = <xsl:value-of select="$system_cache__dita__x3A__svg:spacing"/></xsl:comment>
-            
+                            <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 -->
+                   
             
-            <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)"/>
-                
+                    <!-- PRICE -->
+                     
+                     
             
-           <!-- 
-            <svg:text hash="#152" x="{$system_cache__dita__x3A__svg:width div 2}" y="{$system_cache__dita__x3A__svg:cursor.current.Y}" ><!-\- 2 * $system_cache__dita__x3A__svg:offsetY -\->
-                <xsl:call-template name="system_cache__dita__x3A__svg:style">
-                    <xsl:with-param name="text-anchor.middle" select="true()"/>
-                    <xsl:with-param name="font-size" select="$system_cache__dita__x3A__svg:title.font-size.default"/>
-                </xsl:call-template>
-                Zintegrowany widok powiązań osób i transakcji</svg:text>
             
-            <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="system_cache__dita__x3A__svg:font-size" select="$system_cache__dita__x3A__svg:shortdesc.font-size.default"/>
-                    <xsl:with-param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:height" tunnel="yes"/>
-                </xsl:call-template>
-            </xsl:variable>
-            <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:copy-of select="$system_cache__dita__x3A__svg:cursor"/>-->
             
+                        <svg:g debug="#278fo:block-container  region-name- hi-lo-chart-grou">
+                            
+                            
+                       
+                       
+                            
+                            <xsl:comment> #361-BEFORE-COMMIT_CURSOR svgu:xyPlot 118
+                                $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.Y = <xsl:value-of select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)"/>
+                            </xsl:comment>
+                               
+                        <!--  #361 svgu:xyPlot --><!--  #361 svgu:xyPlot --><!--  #361 svgu:xyPlot --><!--  #361 svgu:xyPlot -->
+                            <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.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: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.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">
+                                <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: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: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:choose>
+                                <xsl:when test="$DEVEL_FLAG_YAXIS_TOP_LEFT_90">
+                                    <xsl:comment>#90 $DEVEL_FLAG_YAXIS_TOP_LEFT_90</xsl:comment>
+                                    
+                                    <!--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: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__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.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: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>#280 $DEVEL_FLAG_HI_LOW_FROM_POWIAZANIA.TEMP_GEM</xsl:comment>
+                                    
+                                    <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: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:comment>#1186 lower applying powiazania for hi low ( + $system_cache__dita__x3A__svg:height == <xsl:value-of select="$system_cache__dita__x3A__svg:height"/>)
+                                    
+                                      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)"/>
+                                        system_cache__dita__x3A__svg:height__x3A__limit__x3A__extract($system_cache__dita__x3A__svg:cursor) = <xsl:value-of select="system_cache__dita__x3A__svg:height__x3A__limit__x3A__extract($system_cache__dita__x3A__svg:cursor)"/>
+                                        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: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"/>
+                                        
+                                        <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:apply-templates>-->
+                                    
+                                    <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: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>#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>
             
-            <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:height"/>
-            </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 }"  
-                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 -->
-            <!-- PRICE -->
-            <!--<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="system_cache__dita__x3A__svg:font-size" select="$system_cache__dita__x3A__svg:shortdesc.font-size.default"/>
-                    <xsl:with-param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" select="$system_cache__dita__x3A__svg:height"/>
-                </xsl:call-template>
-            </xsl:variable>
-            <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:comment>svgu:openHiLoClose 76</xsl:comment>
+            <!--  #361 svgu:xyPlot --><!--  #361 svgu:xyPlot --><!--  #361 svgu:xyPlot --><!--  #361 svgu:xyPlot -->
             
-            <!--<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:comment>#1186 lower applying powiazania for hi low ( + $system_cache__dita__x3A__svg:height == <xsl:value-of select="$system_cache__dita__x3A__svg:height"/>)</xsl:comment>
-            <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"/>
-               
-                <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:apply-templates>
-                
-            <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:copy-of select="$system_cache__dita__x3A__svg:cursor"/>-->
         </svg:svg>
         

+ 156 - 0
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.ticks.xsl

@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="2.0"  
+        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+        xmlns:svg="http://www.w3.org/2000/svg"    
+        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"
+        exclude-result-prefixes="svgu test">
+        
+        
+    <xsl:output indent="yes"/>
+    <xsl:strip-space elements="*"/>
+    
+    
+    <xsl:template name="system_cache__dita__x3A__svg:ticks">
+        <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="xMajor1" /> 
+        <xsl:param name="yMajor1" />
+        <xsl:param name="xMajor2" />
+        <xsl:param name="yMajor2" />
+        <xsl:param name="labelMajor"/>
+        
+        
+        
+        <xsl:param name="freq" />
+        <xsl:param name="xMinor1" />
+        <xsl:param name="yMinor1" />
+        <xsl:param name="xMinor2" />
+        <xsl:param name="yMinor2" />
+        <xsl:param name="nTicks" select="0"/>
+        <xsl:param name="xIncr" select="0"/> 
+        <xsl:param name="yIncr" select="0"/> 
+        <xsl:param name="i" select="0"/>
+        <xsl:param name="scale"/>
+        <xsl:param name="context"/>
+        
+        
+        
+        <xsl:comment>#325 called ticks with
+                    $yMinor1 <xsl:value-of select="$yMinor1"/>;  $yMinor2 = <xsl:value-of select="$yMinor2"/>;  $yMajor1 <xsl:value-of select="$yMajor1"/>;
+                    $xMinor1 = <xsl:value-of select="$xMinor1"/> $xMinor2 = <xsl:value-of select="$xMinor2"/>;  $xMajor2 <xsl:value-of select="$xMajor2"/>
+                   
+        </xsl:comment>
+        
+        <xsl:if test="$i &lt; $nTicks">
+            <xsl:choose>
+                <!-- Time to draw a major tick -->
+                <xsl:when test="$i mod $freq = 0">
+                    <svg:line debug="svgu:ticks.214" x1="{$xMajor1}" y1="{$yMajor1}" 
+                        x2="{$xMajor2}" y2="{$yMajor2}">
+                        <xsl:attribute name="style">
+                            <xsl:call-template name="xAxisStyle">
+                                <xsl:with-param name="context" select="$context"/>
+                            </xsl:call-template>
+                        </xsl:attribute>
+                        <!--<xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.major">
+                            <xsl:with-param name="xMajor" select="$xMajor1"/>
+                            <xsl:with-param name="yMajor" select="$yMajor1"/>
+                            <xsl:with-param name="system_cache__dita__x3A__svg:offsetY" select="$system_cache__dita__x3A__svg:labelMajor.offsetY"/>
+                            <xsl:with-param name="yscale" select="$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>-->
+                    </svg:line>
+                    <xsl:if test="$labelMajor">
+                        <xsl:choose>
+                            
+                            <!-- Ticking along x-axis -->
+                            <xsl:when test="$xIncr > 0">
+                                <!-- Tick label must compensate for distorted coordinate 
+                      system -->
+                                <svg:text debug="svgu:ticks.224" x="{$xMajor1}" y="{$yMajor2}" 
+                                    transform="translate({$xMajor1},{$yMajor2})
+                                    scale({$scale},-1) 
+                                    translate({-$xMajor1},{-$yMajor2})"><!-- transform="translate({$xMajor1},{$yMajor2})
+                                  scale({$scale},-1) 
+                                  translate({-$xMajor1},{-$yMajor2})" -->
+                                    <xsl:attribute name="style">
+                                        <xsl:call-template name="xAxisLabelStyle">
+                                            <xsl:with-param name="context"
+                                                select="$context"/>
+                                        </xsl:call-template>
+                                    </xsl:attribute>
+                                    
+                                    <!-- Perhaps label format should be parameter -->
+                                    <xsl:value-of select="format-number($xMajor1,'#0.0')"/>
+                                </svg:text>
+                            </xsl:when>
+                            <!-- Ticking along y-axis -->
+                            <xsl:otherwise>
+                                <svg:text debug="svgu:ticks.240" x="{$xMajor1}" y="{$yMajor1 }"
+                                    transform="translate({$xMajor1},{$yMajor1})  scale(1,{-$scale}) translate({-$xMajor1},{-$yMajor1})" >                                     
+                                    <xsl:attribute name="style">
+                                        <xsl:call-template name="yAxisLabelStyle">
+                                            <xsl:with-param name="context" select="$context"/>
+                                        </xsl:call-template>
+                                    </xsl:attribute>
+                                    
+                                    <xsl:value-of select="format-number($yMajor1,'#0.0')"/>
+                                </svg:text>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                    </xsl:if>
+                </xsl:when>
+                <!-- Time to draw a minor tick -->
+                <xsl:otherwise>
+                    <svg:line debug="svgu:ticks.257" x1="{$xMinor1}" y1="{$yMinor1}" 
+                        x2="{$xMinor2}" y2="{$yMinor2}">
+                        <xsl:attribute name="style">
+                            <xsl:call-template name="yAxisStyle">
+                                <xsl:with-param name="context" select="$context"/>
+                            </xsl:call-template>
+                        </xsl:attribute>
+                        
+                    </svg:line>
+                </xsl:otherwise>
+            </xsl:choose>
+            
+            <!-- Recursive call for next tick -->     
+            <xsl:call-template name="system_cache__dita__x3A__svg:ticks">
+                <xsl:with-param name="xMajor1" select="$xMajor1 + $xIncr"/>
+                <xsl:with-param name="yMajor1" select="$yMajor1 + $yIncr"/>
+                <xsl:with-param name="xMajor2" select="$xMajor2 + $xIncr"/>
+                <xsl:with-param name="yMajor2" select="$yMajor2 + $yIncr"/>
+                <xsl:with-param name="labelMajor" select="$labelMajor"/>
+                <xsl:with-param name="freq" select="$freq"/>
+                <xsl:with-param name="xMinor1" select="$xMinor1 + $xIncr"/>
+                <xsl:with-param name="yMinor1" select="$yMinor1 + $yIncr"/>
+                <xsl:with-param name="xMinor2" select="$xMinor2 + $xIncr"/>
+                <xsl:with-param name="yMinor2" select="$yMinor2 + $yIncr"/>
+                <xsl:with-param name="nTicks" select="$nTicks"/>
+                <xsl:with-param name="xIncr" select="$xIncr"/> 
+                <xsl:with-param name="yIncr" select="$yIncr"/> 
+                <xsl:with-param name="i" select="$i + 1"/>
+                <xsl:with-param name="scale" select="$scale"/>
+                <xsl:with-param name="context" select="$context"/>
+                <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:if>
+        
+    </xsl:template>
+     
+</xsl:stylesheet>

+ 233 - 19
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.plot.xy.xsl

@@ -7,18 +7,208 @@
     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"/>
         <xsl:param name="dataX" required="yes" /> <!-- x values select="/.." -->
         <xsl:param name="dataY" required="yes" /><!-- select="/.." -->
         <xsl:param name="offsetX" select="0"/>
         <xsl:param name="offsetY" select="0"/>
-        <xsl:param name="width" select="500"/>
-        <xsl:param name="height" select="500"/>
+        <xsl:param name="width" required="yes" /><!-- select="500" -->
+        <!--<xsl:param name="height"  required="yes"/>--><!-- select="500" -->
         <xsl:param name="boundingBox" select="false( )"/>
         <xsl:param name="context"/> 
-        
+       
         <xsl:param name="minX">
             <xsl:call-template name="system_cache__dita__x3A__svg:emath.min">
                 <xsl:with-param name="nodes" select="$dataX"/>
@@ -45,21 +235,27 @@
         
         
         
+        <xsl:param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate" tunnel="yes" required="yes"/>
+        
+        
+        
         
         <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:param name="system_cache__dita__x3A__svg:cursor.current.Y" required="yes" /><!-- select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)" -->
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.current.height" required="yes"/>
+        
         
         <xsl:variable name="Xrange" select="$maxX - $minX"/>
         <xsl:variable name="Yrange" select="$maxY - $minY"/>
         <xsl:variable name="scaleX" select="number($width) div number($Xrange)"/>
-        <xsl:variable name="scaleY" select="number($height) div number($Yrange)"/><!-- $maxY -->
+        <xsl:variable name="scaleY" select="number($system_cache__dita__x3A__svg:cursor.current.height) div number($Yrange)"/><!-- $maxY -->
         
         
-        <xsl:variable name="scale" select="system_cache__dita__x3A__svg:math.max($scaleX,$scaleY)"/>
+        <!--<xsl:variable name="scale" select="system_cache__dita__x3A__svg:math.max($scaleX,$scaleY)"/>-->
         
-        <xsl:comment>#43 called plotxy 
-            
+        <xsl:comment>#43 called plotxy $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: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"/>
             $minY = <xsl:value-of select="$minY"/>;
             $minX=<xsl:value-of select="$minX"/> $maxX = <xsl:value-of select="$maxX"/>;
@@ -69,12 +265,13 @@
              - so should be offset -$width=
               $minY = <xsl:value-of select="$minY"/> $maxY = <xsl:value-of select="$maxY"/> 
               $Yrange=<xsl:value-of select="$Yrange"/> ="$maxY=<xsl:value-of select="$maxY"/> - $minY=<xsl:value-of select="$minY"/>" (use it min to firstly substract before scale)
-              $scaleY=<xsl:value-of select="$scaleY"/> = $height=<xsl:value-of select="$height"/> div $Yrange=<xsl:value-of select="$Yrange"/>
+              $scaleY=<xsl:value-of select="$scaleY"/> = $system_cache__dita__x3A__svg:cursor.current.height=<xsl:value-of select="$system_cache__dita__x3A__svg:cursor.current.height"/> div $Yrange=<xsl:value-of select="$Yrange"/>
+            TEST BOUNDS <xsl:value-of select="$system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate - ($system_cache__dita__x3A__svg:cursor.current.Y + $system_cache__dita__x3A__svg:cursor.current.height ) "/><!-- ($system_cache__dita__x3A__svg:cursor.current.Y + $system_cache__dita__x3A__svg:cursor.current.height ) - $ -->
         </xsl:comment>
         
         <xsl:if test="$boundingBox">
-            <svg:g debug="svgu:xyPlot.40 $maxX={$maxX} $maxY={$maxY} width={$width} height={$height} " transform="translate({$offsetX},{$offsetY})">
-                <svg:rect x="0" y="0" height="{$height}" width="{$width}" 
+            <svg:g debug="svgu:xyPlot.40 $maxX={$maxX} $maxY={$maxY} width={$width} height={$system_cache__dita__x3A__svg:cursor.current.height} " transform="translate({$offsetX},{$offsetY})">
+                <svg:rect x="0" y="0" height="{$system_cache__dita__x3A__svg:cursor.current.height}" width="{$width}" 
                     style="stroke: black;stroke-width:0.5; 
                     stroke-opacity:0.5;fill:none"/>
             </svg:g>
@@ -88,9 +285,11 @@
          scalex=
         -->
         <!-- transform=" translate(217.66666666666666,10)  translate(0,100)  scale(250,-0.0125)  translate(0,-4445)  translate(-500,0) " -->
-        <svg:path debug="svgu:xyPlot.48 $maxX={$maxX} $maxY={$maxY} width={$width} height={$height} "
-            transform.old="translate({$offsetX},{$height + $offsetY})    
+        <svg:path debug="svgu:xyPlot.48 $maxX={$maxX} $maxY={$maxY} width={$width} height={$system_cache__dita__x3A__svg:cursor.current.height} "
+            transform.old="translate({$offsetX},{$system_cache__dita__x3A__svg:cursor.current.height + $offsetY})    
             scale({$scaleX},{-$scaleY})">
+            
+            
             <!--<xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.major">
                 <!-\-<xsl:with-param name="xMajor" select="$offsetX"/>-\->
                 <!-\-<xsl:with-param name="yMajor" select="$maxY"/>-\-><!-\- $min -\->
@@ -98,7 +297,7 @@
                 <xsl:with-param name="system_cache__dita__x3A__svg:offsetY" select="$offsetY"/>
                 <xsl:with-param name="yscale" select="$scaleY"/>
                 <xsl:with-param name="xscale" select="$scaleX"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.height" select="$height"/>
+                <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.width" select="$width"/>
                 <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.min" select="$minY"/>
                 <!-\-<xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.Y" select="$system_cache__dita__x3A__svg:cursor.current.Y"/>-\->
@@ -110,7 +309,7 @@
                 
                 <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:offsetY.height" select="$height"/>
+                <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:cursor.current.Y" select="$system_cache__dita__x3A__svg:cursor.current.Y"/>
             </xsl:call-template>
@@ -138,7 +337,7 @@
                     
                     <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:offsetY.height" select="$height"/>
+                    <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:cursor.current.Y" select="$system_cache__dita__x3A__svg:cursor.current.Y"/>
                 </xsl:call-template>
@@ -153,7 +352,7 @@
                     
                     <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:offsetY.height" select="$height"/>
+                    <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:cursor.current.Y" select="$system_cache__dita__x3A__svg:cursor.current.Y"/>
                 </xsl:call-template>
@@ -168,7 +367,22 @@
                     
                     <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:offsetY.height" select="$height"/>
+                    <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:cursor.current.Y" select="$system_cache__dita__x3A__svg:cursor.current.Y"/>
+                </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="transform.validate.y.{$dataY[4]}">
+                <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.basic__x3A__height__x3A__limit__x3A__validate">
+                    <xsl:with-param name="yValue" select="$dataY[4]"/>
+                    <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:offsetX.width" select="$width"/>
+                    
+                    <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:offsetY.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"/>
                 </xsl:call-template>

+ 402 - 0
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.cursor.region.plot.xsl

@@ -0,0 +1,402 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+    xmlns:system_cache__dita="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/dita.xsd"
+    xmlns:system_cache__dita__x3A__p5gnuplot="http://biuro.biall-net.pl/WPS_Functions/system_cache__dita__x3A__p5gnuplot/system_cache__dita__x3A__p5gnuplot.xsd"
+    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:p5gnuplot__x3A__system_cache__dita="http://biuro.biall-net.pl/WPS_Functions/p5gnuplot__x3A__system_cache__dita/p5gnuplot__x3A__system_cache__dita.xsd"
+    xmlns:p5gnuplot="http://biuro.biall-net.pl/WPS_Functions/graph_gnuplot"
+    xmlns:svg="http://www.w3.org/2000/svg"
+    xmlns:default_db__x3A__BI_audit_ENERGA_RUM_UMOWY="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_UMOWY"
+    xmlns:default_db__x3A__BI_audit_BENFORD="https://biuro.biall-net.pl/wfs/default_db/BI_audit_BENFORD"
+    
+    xmlns:svgu="http://www.ora.com/XSLTCookbook/ns/svg-utils"
+    xmlns:test="http://www.ora.com/XSLTCookbook/ns/test"
+    exclude-result-prefixes="xs"
+    version="2.0">
+    
+    
+    
+    <xsl:output indent="yes"/>
+    <xsl:strip-space elements="*"/>
+    
+    <xsl:template name="system_cache__dita__x3A__svg:cursor.region.plot"  >
+        <xsl:param name="system_cache__dita__x3A__svg:cursor" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.region" required="no"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.id" required="no"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.region.position" required="no"/>
+        <xsl:apply-templates mode="system_cache__dita__x3A__svg:cursor.region.plot" select="$system_cache__dita__x3A__svg:cursor">
+            <xsl:with-param name="system_cache__dita__x3A__svg:cursor.region.plot__x3A__context" select="." 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:resolution.coordinate.id" select="$system_cache__dita__x3A__svg:resolution.coordinate.id" tunnel="yes"/>
+            <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.region.position" select="$system_cache__dita__x3A__svg:resolution.coordinate.region.position" tunnel="yes"/>
+        </xsl:apply-templates>
+    </xsl:template>
+    
+    <xsl:template  mode="system_cache__dita__x3A__svg:cursor.region.plot" match="system_cache__dita__x3A__svg:cursor">
+        <xsl:apply-templates mode="#current"/>
+    </xsl:template>
+    <xsl:template  mode="system_cache__dita__x3A__svg:cursor.region.plot" match="*">
+        <xsl:apply-templates mode="#current"/>
+    </xsl:template>
+    
+    <xsl:template  mode="system_cache__dita__x3A__svg:cursor.region.plot" match="system_cache__dita__x3A__svg:cursor.commit.instream-foreign-object[@system_cache__dita__x3A__svg:template]">
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.region.plot__x3A__context" tunnel="yes" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.region" tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.id" tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.region.position" tunnel="yes"/>
+        
+        <xsl:comment>#40 system_cache__dita__x3A__svg:cursor.region.plot <xsl:value-of select="parent::*/parent::*/name()"/>/
+            <xsl:value-of select="parent::*/name()"/>/ 
+            @system_cache__dita__x3A__svg:template = <xsl:value-of select="@system_cache__dita__x3A__svg:template"/>
+            @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"/>
+            @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: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.max.coordinate = <xsl:value-of select="../@system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+            @system_cache__dita__x3A__svg:data.y2.bounds.max.length = <xsl:value-of select="../@system_cache__dita__x3A__svg:data.y2.bounds.max.length"/>
+            
+                        
+            |[ <xsl:value-of select="../@system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/> ] -[ <xsl:value-of select="../@system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/> ]
+            ########[[ <xsl:value-of select="../@system_cache__dita__x3A__svg:data.x2.bounds.max.length"/> ]]#########
+            #                        #
+            #                      [[ <xsl:value-of select="../@system_cache__dita__x3A__svg:data.y2.bounds.max.length"/> ]]
+            #                        #
+            #########[[ <xsl:value-of select="../@system_cache__dita__x3A__svg:data.x2.bounds.max.length"/> ]]########
+                                     |[ <xsl:value-of select="../@system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/> ] -[ <xsl:value-of select="../@system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/> ]
+                                     
+            
+        </xsl:comment>
+            <xsl:choose>
+                <xsl:when test="$system_cache__dita__x3A__svg:resolution.coordinate.region.position and (count(preceding-sibling::*) = $system_cache__dita__x3A__svg:resolution.coordinate.region.position)">
+                    <xsl:comment>
+                        #74C $count[<xsl:value-of select="count(preceding-sibling::*)"/>] bypassed test="$system_cache__dita__x3A__svg:resolution.coordinate.region.position and (count(preceding-sibling::*) = $system_cache__dita__x3A__svg:resolution.coordinate.region.position)"
+                    </xsl:comment>
+                </xsl:when>
+                <xsl:when test="$system_cache__dita__x3A__svg:resolution.coordinate.region and not(parent::*/name() = $system_cache__dita__x3A__svg:resolution.coordinate.region)">
+                    <xsl:comment>
+                        #74A bypassed test="$system_cache__dita__x3A__svg:resolution.coordinate.region and not(parent::*/name() = $system_cache__dita__x3A__svg:resolution.coordinate.region)"
+                    </xsl:comment>
+                </xsl:when>
+                <xsl:when test="$system_cache__dita__x3A__svg:resolution.coordinate.id and not(parent::*/parent::*/name() = $system_cache__dita__x3A__svg:resolution.coordinate.id)">
+                    <xsl:comment>
+                        #74B bypassed test="$system_cache__dita__x3A__svg:resolution.coordinate.id and not(parent::*/parent::*/name() = $system_cache__dita__x3A__svg:resolution.coordinate.region)"
+                    </xsl:comment>
+                </xsl:when>
+                <xsl:when test="@system_cache__dita__x3A__svg:template = 'system_cache__dita__x3A__svg:xyPlot' and @system_cache__dita__x3A__svg:Ydata and @system_cache__dita__x3A__svg:Xdata">
+                    <xsl:choose>
+                        <xsl:when test="$system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Xdata ] and $system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Ydata ]">
+                            <xsl:call-template name="system_cache__dita__x3A__svg:xyPlot">
+                                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.id" select="parent::*/parent::*/name()"/>
+                                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.block" select="parent::*/name()"/>
+                                <xsl:with-param name="dataX" select="$system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Xdata ]"/>
+                                <xsl:with-param name="dataY" select="$system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Ydata ]"/>  
+                                
+                                <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>
+                            <xsl:comment>#80 errpr not found $system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Xdata(<xsl:value-of select="@system_cache__dita__x3A__svg:Xdata"/>) ] and $system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Ydata(<xsl:value-of select="@system_cache__dita__x3A__svg:Ydata"/>) ]
+                                    
+                            </xsl:comment>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                    
+                </xsl:when>
+                <xsl:when test="@system_cache__dita__x3A__svg:template = 'system_cache__dita__x3A__svg:bars' and @system_cache__dita__x3A__svg:Ydata ">
+                    <xsl:choose>
+                        <xsl:when test="$system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Ydata ]">
+                            <xsl:call-template name="system_cache__dita__x3A__svg:bars">
+                                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.block" select="parent::*/name()"/>
+                                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.id" select="parent::*/parent::*/name()"/>
+                                <!--<xsl:with-param name="dataX" select="$system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Xdata ]"/>-->
+                                <xsl:with-param name="dataY" select="$system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Ydata ]"/>  
+                                
+                                <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>
+                            <xsl:comment>#80 errpr not found $system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Xdata(<xsl:value-of select="@system_cache__dita__x3A__svg:Xdata"/>) ] and $system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Ydata(<xsl:value-of select="@system_cache__dita__x3A__svg:Ydata"/>) ]
+                                    
+                            </xsl:comment>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:when>
+                <xsl:when test="@system_cache__dita__x3A__svg:template = 'system_cache__dita__x3A__svg:yAxis' and @system_cache__dita__x3A__svg:Ydata ">
+                    <xsl:choose>
+                        <xsl:when test="$system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Ydata ]">
+                            <xsl:call-template name="system_cache__dita__x3A__svg:yAxis">
+                                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.block" select="parent::*/name()"/>
+                                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.id" select="parent::*/parent::*/name()"/>
+                                <!--<xsl:with-param name="dataX" select="$system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Xdata ]"/>-->
+                                <xsl:with-param name="dataY" select="$system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Ydata ]"/>  
+                                
+                                <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>
+                            <xsl:comment>#80 errpr not found $system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Xdata(<xsl:value-of select="@system_cache__dita__x3A__svg:Xdata"/>) ] and $system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Ydata(<xsl:value-of select="@system_cache__dita__x3A__svg:Ydata"/>) ]
+                                    
+                            </xsl:comment>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:when>
+                <xsl:when test="@system_cache__dita__x3A__svg:template = 'system_cache__dita__x3A__svg:openHiLoClose'  ">
+                    <xsl:choose>
+                        <xsl:when test="$system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:openData ]
+                            and $system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:hiData ]
+                            and $system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:loData ]
+                            and $system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:closeData ]
+                            ">
+                            <xsl:call-template name="system_cache__dita__x3A__svg:openHiLoClose">
+                                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.block" select="parent::*/name()"/>
+                                <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.id" select="parent::*/parent::*/name()"/>
+                                <!--<xsl:with-param name="dataX" select="$system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Xdata ]"/>-->
+                                <xsl:with-param name="openData" select="$system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:openData ]"/>
+                                <xsl:with-param name="hiData" select="$system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:hiData ]"/>
+                                <xsl:with-param name="loData" select="$system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:loData ]"/>
+                                <xsl:with-param name="closeData" select="$system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:closeData ]"/>
+                                
+                                
+                                <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>
+                            <xsl:comment>#80 errpr not found test="$system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:openData ]
+                            and $system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:hiData ]
+                            and $system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:loData ]
+                            and $system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:closeData ]
+                            "
+                                    
+                            </xsl:comment>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:when>
+            </xsl:choose>
+            <call-template-todo>
+                <xsl:value-of select="@system_cache__dita__x3A__svg:template"/>
+            </call-template-todo>
+        
+    </xsl:template>
+    
+    
+    <xsl:template  mode="system_cache__dita__x3A__svg:cursor.region.plot" match="system_cache__dita__x3A__svg:cursor.commit.instream-foreign-object[@system_cache__dita__x3A__svg:apply-template.mode and @system_cache__dita__x3A__svg:apply-template.select.param='system_cache__dita__x3A__svg:data__x3A__assign']">
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.region.plot__x3A__context" tunnel="yes" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.region" tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.id" tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.region.position" tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data__x3A__assign" required="yes" tunnel="yes"/>
+        
+        <xsl:comment>#40-mode-B system_cache__dita__x3A__svg:cursor.region.plot
+            [<xsl:value-of select="parent::*/parent::*/name()"/>]
+            [<xsl:value-of select="parent::*/name()"/>]
+            @system_cache__dita__x3A__svg:apply-template.select.param = <xsl:value-of select="@system_cache__dita__x3A__svg:apply-template.select.param"/>
+            @system_cache__dita__x3A__svg:apply-template.mode = <xsl:value-of select="@system_cache__dita__x3A__svg:apply-template.mode"/>
+            @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"/>
+            @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: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.max.coordinate = <xsl:value-of select="../@system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/>
+            @system_cache__dita__x3A__svg:data.y2.bounds.max.length = <xsl:value-of select="../@system_cache__dita__x3A__svg:data.y2.bounds.max.length"/>
+            
+                        
+            |[ <xsl:value-of select="../@system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/> ] -[ <xsl:value-of select="../@system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate"/> ]
+            ########[[ <xsl:value-of select="../@system_cache__dita__x3A__svg:data.x2.bounds.max.length"/> ]]#########
+            #                        #
+            #                      [[ <xsl:value-of select="../@system_cache__dita__x3A__svg:data.y2.bounds.max.length"/> ]]
+            #                        #
+            #########[[ <xsl:value-of select="../@system_cache__dita__x3A__svg:data.x2.bounds.max.length"/> ]]########
+                                     |[ <xsl:value-of select="../@system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/> ] -[ <xsl:value-of select="../@system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/> ]
+                                     
+            
+        </xsl:comment>
+        <xsl:choose>
+            <xsl:when test="$system_cache__dita__x3A__svg:resolution.coordinate.region.position and (count(preceding-sibling::*) = $system_cache__dita__x3A__svg:resolution.coordinate.region.position)">
+                <xsl:comment>
+                        #74-mode-C $count[<xsl:value-of select="count(preceding-sibling::*)"/>] bypassed test="$system_cache__dita__x3A__svg:resolution.coordinate.region.position and (count(preceding-sibling::*) = $system_cache__dita__x3A__svg:resolution.coordinate.region.position)"
+                    </xsl:comment>
+            </xsl:when>
+            <xsl:when test="$system_cache__dita__x3A__svg:resolution.coordinate.region and not(parent::*/name() = $system_cache__dita__x3A__svg:resolution.coordinate.region)">
+                <xsl:comment>
+                        #74-mode-A bypassed test="$system_cache__dita__x3A__svg:resolution.coordinate.region and not(parent::*/name() = $system_cache__dita__x3A__svg:resolution.coordinate.region)"
+                    </xsl:comment>
+            </xsl:when>
+            <xsl:when test="$system_cache__dita__x3A__svg:resolution.coordinate.id and not(parent::*/parent::*/name() = $system_cache__dita__x3A__svg:resolution.coordinate.id)">
+                <xsl:comment>
+                        #74-mode-B bypassed test="$system_cache__dita__x3A__svg:resolution.coordinate.id and not(parent::*/parent::*/name() = $system_cache__dita__x3A__svg:resolution.coordinate.region)"
+                      [S][<xsl:value-of select="$system_cache__dita__x3A__svg:resolution.coordinate.id"/>]  not= [<xsl:value-of select="parent::*/parent::*/name()"/>]
+                    </xsl:comment>
+            </xsl:when>
+            <xsl:when test="@system_cache__dita__x3A__svg:apply-template.mode = 'system_cache__dita__x3A__svg:openHiLoClose'">
+                <xsl:choose>
+                    <xsl:when test="1=1">
+                        <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:resolution.coordinate.id" select="parent::*/parent::*/name()"/>
+                            <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.block" select="parent::*/name()"/>
+                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="root()"/>
+                              
+                            
+                            <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: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:when>
+                    
+                    
+                    <xsl:otherwise>
+                        <xsl:comment>#80-B errpr not found $system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Xdata(<xsl:value-of select="@system_cache__dita__x3A__svg:Xdata"/>) ] and $system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Ydata(<xsl:value-of select="@system_cache__dita__x3A__svg:Ydata"/>) ]
+                                    
+                            </xsl:comment>
+                    </xsl:otherwise>
+                </xsl:choose>
+                
+            </xsl:when>
+            <xsl:when test="@system_cache__dita__x3A__svg:apply-template.mode = 'system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal'">
+                <xsl:choose>
+                    <xsl:when test="1=1">
+                        <xsl:apply-templates mode="system_cache__dita__x3A__svg:openHiLoClose__x3A__horizontal" select="$system_cache__dita__x3A__svg:data__x3A__assign">
+                            <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.id" select="parent::*/parent::*/name()"/>
+                            <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.block" select="parent::*/name()"/>
+                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="root()"/>
+                            <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: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: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:when>
+                    
+                    
+                    <xsl:otherwise>
+                        <xsl:comment>#80-B errpr not found $system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Xdata(<xsl:value-of select="@system_cache__dita__x3A__svg:Xdata"/>) ] and $system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Ydata(<xsl:value-of select="@system_cache__dita__x3A__svg:Ydata"/>) ]
+                                    
+                            </xsl:comment>
+                    </xsl:otherwise>
+                </xsl:choose>
+                
+            </xsl:when>
+            <xsl:when test="@system_cache__dita__x3A__svg:apply-template.mode = 'system_cache__dita__x3A__svg:bars'">
+                <xsl:choose>
+                    <xsl:when test="1=1">
+                        <xsl:comment>#350 apply mode mode="system_cache__dita__x3A__svg:bars"</xsl:comment>
+                        <xsl:apply-templates mode="system_cache__dita__x3A__svg:bars" select="$system_cache__dita__x3A__svg:data__x3A__assign">
+                            <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.id" select="parent::*/parent::*/name()"/>
+                            <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.block" select="parent::*/name()"/>
+                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="root()"/>
+                            
+                            
+                            <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: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:when>
+                    
+                    
+                    <xsl:otherwise>
+                        <xsl:comment>#80-B errpr not found $system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Xdata(<xsl:value-of select="@system_cache__dita__x3A__svg:Xdata"/>) ] and $system_cache__dita__x3A__svg:cursor.region.plot__x3A__context//*[ name() = current()/@system_cache__dita__x3A__svg:Ydata(<xsl:value-of select="@system_cache__dita__x3A__svg:Ydata"/>) ]
+                                    
+                            </xsl:comment>
+                    </xsl:otherwise>
+                </xsl:choose>
+                
+            </xsl:when>
+            
+            
+        </xsl:choose>
+        <call-template-todo>
+            <xsl:value-of select="@system_cache__dita__x3A__svg:template"/>
+        </call-template-todo>
+        
+    </xsl:template>
+    
+    
+  
+</xsl:stylesheet>

+ 440 - 0
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.cursor.region.xsl

@@ -0,0 +1,440 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+    xmlns:system_cache__dita="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/dita.xsd"
+    xmlns:system_cache__dita__x3A__p5gnuplot="http://biuro.biall-net.pl/WPS_Functions/system_cache__dita__x3A__p5gnuplot/system_cache__dita__x3A__p5gnuplot.xsd"
+    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:p5gnuplot__x3A__system_cache__dita="http://biuro.biall-net.pl/WPS_Functions/p5gnuplot__x3A__system_cache__dita/p5gnuplot__x3A__system_cache__dita.xsd"
+    xmlns:p5gnuplot="http://biuro.biall-net.pl/WPS_Functions/graph_gnuplot"
+    xmlns:svg="http://www.w3.org/2000/svg"
+    xmlns:default_db__x3A__BI_audit_ENERGA_RUM_UMOWY="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_UMOWY"
+    xmlns:default_db__x3A__BI_audit_BENFORD="https://biuro.biall-net.pl/wfs/default_db/BI_audit_BENFORD"
+    
+    xmlns:svgu="http://www.ora.com/XSLTCookbook/ns/svg-utils"
+    xmlns:test="http://www.ora.com/XSLTCookbook/ns/test"
+    exclude-result-prefixes="xs"
+    version="2.0">
+    
+    
+    
+    <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"/>
+        <xsl:param name="system_cache__dita__x3A__svg:cursor" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:increment" required="yes"/>
+        
+        <xsl:call-template name="system_cache__dita__x3A__svg:cursor.commit.region.start">
+            <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: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.commit.region.end">
+            <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: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:template>
+    
+    <xsl:template name="system_cache__dita__x3A__svg:cursor.commit.region.start">
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.start.extent" tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.current.width"/>
+        <xsl:param name="system_cache__dita__x3A__svg:cursor" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:increment" required="yes"/>
+        
+        <xsl:if test="$system_cache__dita__x3A__svg:cursor.commit.region.start.extent">
+            <xsl:element name="{system_cache__dita__x3A__svg:resolution.coordinate.region(system_cache__dita__x3A__svg:resolution.coordinate.region.start())}">
+                <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.extent()}" 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="$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.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.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(),
+                    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>
+        
+    </xsl:template>
+    
+    <xsl:template name="system_cache__dita__x3A__svg:cursor.commit.region.end">
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.commit.region.end.extent" tunnel="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.current.width"/>
+        <xsl:param name="system_cache__dita__x3A__svg:cursor" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:increment" required="yes"/>
+        <xsl:if test="$system_cache__dita__x3A__svg:cursor.commit.region.end.extent">
+            <xsl:element name="{system_cache__dita__x3A__svg:resolution.coordinate.region(system_cache__dita__x3A__svg:resolution.coordinate.region.end())}">
+                <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.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="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"/>
+        <xsl:param name="system_cache__dita__x3A__svg:cursor" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.block" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.current.width" required="no" />
+        <!--<xsl:param name="offsetX"/>-->
+        <xsl:choose>
+            
+            <!--<xsl:when test="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[name()=$system_cache__dita__x3A__svg:resolution.coordinate.block]/*[ name() = $system_cache__dita__x3A__svg:resolution.coordinate.region ]/@*[ name()=system_cache__dita__x3A__svg:resolution.coordinate.extent()]">
+                <xsl:value-of select="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[name()=$system_cache__dita__x3A__svg:resolution.coordinate.block]/*[ name() = $system_cache__dita__x3A__svg:resolution.coordinate.region ]/@*[ name()=system_cache__dita__x3A__svg:resolution.coordinate.extent()]"/>
+            </xsl:when>-->
+            <xsl:when test="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[name()=$system_cache__dita__x3A__svg:resolution.coordinate.block]/*[ name() = $system_cache__dita__x3A__svg:resolution.coordinate.region ]/@*[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() )]">
+                <xsl:value-of select="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[name()=$system_cache__dita__x3A__svg:resolution.coordinate.block]/*[ name() = $system_cache__dita__x3A__svg:resolution.coordinate.region ]/@*[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() )]"/>
+            </xsl:when>
+            <xsl:otherwise><xsl:message terminate="yes">#84 system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate not found for 
+                <xsl:value-of select="$system_cache__dita__x3A__svg:resolution.coordinate.block"/> ;
+                <xsl:value-of select="$system_cache__dita__x3A__svg:resolution.coordinate.region"/> 
+                test $cursor[count][<xsl:value-of select="count($system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[name()=$system_cache__dita__x3A__svg:resolution.coordinate.block])"/>]
+                test2 $cursor[*][count][<xsl:value-of select="count($system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*)"/>]
+                test2 $cursor[*][last][n/][<xsl:value-of select="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[last()]/name()"/>]
+            </xsl:message></xsl:otherwise>
+        </xsl:choose>
+        
+    </xsl:template>
+    
+    <xsl:template name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate">
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.region" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:cursor" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.block" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.current.width" required="no" />
+        <xsl:param name="offsetX"/>
+        <xsl:choose>
+            
+            <!--<xsl:when test="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[name()=$system_cache__dita__x3A__svg:resolution.coordinate.block]/*[ name() = $system_cache__dita__x3A__svg:resolution.coordinate.region ]/@*[ name()=system_cache__dita__x3A__svg:resolution.coordinate.extent()]">
+                <xsl:value-of select="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[name()=$system_cache__dita__x3A__svg:resolution.coordinate.block]/*[ name() = $system_cache__dita__x3A__svg:resolution.coordinate.region ]/@*[ name()=system_cache__dita__x3A__svg:resolution.coordinate.extent()]"/>
+            </xsl:when>-->
+            <xsl:when test="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[name()=$system_cache__dita__x3A__svg:resolution.coordinate.block]/*[ name() = $system_cache__dita__x3A__svg:resolution.coordinate.region ]/@*[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() )]">
+                <xsl:value-of select="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[name()=$system_cache__dita__x3A__svg:resolution.coordinate.block]/*[ name() = $system_cache__dita__x3A__svg:resolution.coordinate.region ]/@*[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() )]"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:message terminate="yes">#845995 system_cache__dita__x3A__svg:data.x2.bounds.min.coordinate not found for 
+                    <xsl:value-of select="$system_cache__dita__x3A__svg:resolution.coordinate.block"/> ;
+                    <xsl:value-of select="$system_cache__dita__x3A__svg:resolution.coordinate.region"/> 
+                    test $cursor[count][<xsl:value-of select="count($system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[name()=$system_cache__dita__x3A__svg:resolution.coordinate.block])"/>]
+                    test2 $cursor[*][count][<xsl:value-of select="count($system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*)"/>]
+                    test2 $cursor[*][last][n/][<xsl:value-of select="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[last()]/name()"/>]
+                </xsl:message>
+                
+                <!--<xsl:value-of select="$system_cache__dita__x3A__svg:cursor.current.width"/>--></xsl:otherwise>
+        </xsl:choose>
+        
+    </xsl:template>
+    
+    
+    
+    
+    <xsl:template name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate">
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.region" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:cursor" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.block" required="yes"/>
+        
+        <!--<xsl:param name="offsetX"/>-->
+        <xsl:choose>
+            
+            <!--<xsl:when test="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[name()=$system_cache__dita__x3A__svg:resolution.coordinate.block]/*[ name() = $system_cache__dita__x3A__svg:resolution.coordinate.region ]/@*[ name()=system_cache__dita__x3A__svg:resolution.coordinate.extent()]">
+                <xsl:value-of select="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[name()=$system_cache__dita__x3A__svg:resolution.coordinate.block]/*[ name() = $system_cache__dita__x3A__svg:resolution.coordinate.region ]/@*[ name()=system_cache__dita__x3A__svg:resolution.coordinate.extent()]"/>
+            </xsl:when>-->
+            <xsl:when test="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[name()=$system_cache__dita__x3A__svg:resolution.coordinate.block]/*[ name() = $system_cache__dita__x3A__svg:resolution.coordinate.region ]/@*[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() )]">
+                <xsl:value-of select="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[name()=$system_cache__dita__x3A__svg:resolution.coordinate.block]/*[ name() = $system_cache__dita__x3A__svg:resolution.coordinate.region ]/@*[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() )]"/>
+            </xsl:when>
+            <xsl:otherwise><xsl:message terminate="no">#845 system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate not found for 
+                <xsl:value-of select="$system_cache__dita__x3A__svg:resolution.coordinate.block"/> ;
+                <xsl:value-of select="$system_cache__dita__x3A__svg:resolution.coordinate.region"/> 
+                test $cursor[count][<xsl:value-of select="count($system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[name()=$system_cache__dita__x3A__svg:resolution.coordinate.block])"/>]
+                test2 $cursor[*][count][<xsl:value-of select="count($system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*)"/>]
+                test2 $cursor[*][last][n/][<xsl:value-of select="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[last()]/name()"/>]
+            </xsl:message></xsl:otherwise>
+        </xsl:choose>
+        
+    </xsl:template>
+    
+    
+    <xsl:template name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate">
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.region" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:cursor" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.block" required="yes"/>
+        
+        <xsl:choose>
+            
+            <!--<xsl:when test="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[name()=$system_cache__dita__x3A__svg:resolution.coordinate.block]/*[ name() = $system_cache__dita__x3A__svg:resolution.coordinate.region ]/@*[ name()=system_cache__dita__x3A__svg:resolution.coordinate.extent()]">
+                <xsl:value-of select="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[name()=$system_cache__dita__x3A__svg:resolution.coordinate.block]/*[ name() = $system_cache__dita__x3A__svg:resolution.coordinate.region ]/@*[ name()=system_cache__dita__x3A__svg:resolution.coordinate.extent()]"/>
+            </xsl:when>-->
+            <xsl:when test="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[name()=$system_cache__dita__x3A__svg:resolution.coordinate.block]/*[ name() = $system_cache__dita__x3A__svg:resolution.coordinate.region ]/@*[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() )]">
+                <xsl:value-of select="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[name()=$system_cache__dita__x3A__svg:resolution.coordinate.block]/*[ name() = $system_cache__dita__x3A__svg:resolution.coordinate.region ]/@*[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() )]"/>
+            </xsl:when>
+            <xsl:otherwise><xsl:message terminate="no">#84599 system_cache__dita__x3A__svg:data.y2.bounds.min.coordinate not found for 
+                <xsl:value-of select="$system_cache__dita__x3A__svg:resolution.coordinate.block"/> ;
+                <xsl:value-of select="$system_cache__dita__x3A__svg:resolution.coordinate.region"/> 
+                test $cursor[count][<xsl:value-of select="count($system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[name()=$system_cache__dita__x3A__svg:resolution.coordinate.block])"/>]
+                test2 $cursor[*][count][<xsl:value-of select="count($system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*)"/>]
+                test2 $cursor[*][last][n/][<xsl:value-of select="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[last()]/name()"/>]
+            </xsl:message></xsl:otherwise>
+        </xsl:choose>
+        
+    </xsl:template>
+    
+    
+  
+</xsl:stylesheet>

+ 652 - 125
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.cursor.xsl

@@ -22,14 +22,18 @@
     <xsl:strip-space elements="*"/>
     
     
-    
+    <xsl:include href="system_cache__dita__x3A__svg.utils.cursor.region.xsl"/>
     
     <xsl:template name="system_cache__dita__x3A__svg:cursor.read">
         <xsl:param name="system_cache__dita__x3A__svg:cursor" required="yes" tunnel="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" select="system_cache__dita__x3A__svg:cursor.current.height($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:apply-templates mode="system_cache__dita__x3A__svg:cursor.read" select="$system_cache__dita__x3A__svg:cursor"/>
         <!--<xsl:call-template name="system_cache__dita__x3A__svg:resolution.value.bounds">
             <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.axis" select="$system_cache__dita__x3A__svg:resolution.coordinate.axis.y" tunnel="yes"/>
@@ -41,9 +45,9 @@
     </xsl:template>
     
     <xsl:template mode="system_cache__dita__x3A__svg:cursor.read" match="*">
-        <xsl:copy>
+        <!--<xsl:copy>
             
-            <xsl:choose>
+            <!-\-<xsl:choose>
                 <xsl:when test="not(following-sibling::*) and preceding-sibling::*">
                     <xsl:apply-templates mode="#current" select="@*">
                         <xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.latest" select="true()"/>
@@ -55,18 +59,20 @@
                     </xsl:apply-templates>
                 </xsl:when>
                 <xsl:otherwise><xsl:apply-templates mode="#current" select="@*">
-                    <!--<xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.expired" select="true()"/>-->
+                    <!-\\-<xsl:with-param name="system_cache__dita__x3A__svg:resolution.coordinate.expired" select="true()"/>-\\->
                 </xsl:apply-templates></xsl:otherwise>
-            </xsl:choose>
+            </xsl:choose>-\->
+            <xsl:apply-templates mode="#current" select="@*" />
             <xsl:apply-templates mode="#current" />
-        </xsl:copy>
+        </xsl:copy>-->
+        <xsl:copy-of select="."/>
     </xsl:template>
     
         
    
         
     
-    <xsl:template mode="system_cache__dita__x3A__svg:cursor.read" match="@*[ contains( name(), system_cache__dita__x3A__svg:resolution.coordinate.latest())]">
+    <!--<xsl:template mode="system_cache__dita__x3A__svg:cursor.read" match="@*[ contains( name(), system_cache__dita__x3A__svg:resolution.coordinate.latest())]">
         <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.expired"/>
         <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.latest"/>    
             <xsl:choose>
@@ -78,9 +84,9 @@
                 </xsl:otherwise>
             </xsl:choose>
         
-        </xsl:template>
+        </xsl:template>-->
     
-    <xsl:template mode="system_cache__dita__x3A__svg:cursor.read" match="@*[ contains( name(), system_cache__dita__x3A__svg:resolution.coordinate.expired())]">
+    <!--<xsl:template mode="system_cache__dita__x3A__svg:cursor.read" match="@*[ contains( name(), system_cache__dita__x3A__svg:resolution.coordinate.expired())]">
         <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.expired"/>
         <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.latest"/>
                 <xsl:choose>
@@ -93,7 +99,7 @@
                     </xsl:otherwise>
                 </xsl:choose>
         
-        </xsl:template>
+        </xsl:template>-->
         
      
             
@@ -101,33 +107,33 @@
     
     <xsl:template mode="system_cache__dita__x3A__svg:cursor.read" match="@system_cache__dita__x3A__svg:height__x3A__limit">
         <xsl:copy-of select="."/>
-        <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('debug_x_111a',
             system_cache__dita__x3A__svg:resolution.coordinate.index.2(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.max.length())}" select="."/>
     </xsl:template>
     
     <xsl:template mode="system_cache__dita__x3A__svg:cursor.read" match="@system_cache__dita__x3A__svg:width__x3A__limit">
         <xsl:copy-of select="."/>
-        <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data(system_cache__dita__x3A__svg:resolution.coordinate.axis.x(),
+        <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data('debug_x_111',
             system_cache__dita__x3A__svg:resolution.coordinate.index.2(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.max.length())}" select="."/>
     </xsl:template>
     
     <xsl:template mode="system_cache__dita__x3A__svg:cursor.read" match="@nextY.height">
         <xsl:copy-of select="."/>
         
-        <!-- @nextY.height --> <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data(system_cache__dita__x3A__svg:resolution.coordinate.axis.y(),
+        <!-- @nextY.height --> <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data('debug_y_113',
             system_cache__dita__x3A__svg:resolution.coordinate.index.2(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.max.length())}" select="."/>
     </xsl:template>
     
     <xsl:template mode="system_cache__dita__x3A__svg:cursor.read" match="@nextY">
         <xsl:copy-of select="."/>
-        <!-- @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.2(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.max.coordinate())}" select="."/>
+        <!-- @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.2(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.max.coordinate())}" select="."/>-->
     </xsl:template>
     
     <xsl:template mode="system_cache__dita__x3A__svg:cursor.read" match="@lastY">
         <xsl:copy-of select="."/>
-        <!-- @lastY --><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.min.coordinate())}" select="."/>
+        <!-- @lastY --><!--<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.min.coordinate())}" select="."/>-->
     </xsl:template>
     
     <xsl:template mode="system_cache__dita__x3A__svg:cursor.read" match="@*">
@@ -140,9 +146,9 @@
     
     <xsl:template name="system_cache__dita__x3A__svg:cursor.commit"><!-- to add context item generated -->
         <xsl:param name="system_cache__dita__x3A__svg:cursor" required="yes"/>
-        <xsl:param name="system_cache__dita__x3A__svg:font-size" />
+        <!--<xsl:param name="system_cache__dita__x3A__svg:font-size" />
         <xsl:param name="system_cache__dita__x3A__svg:pheight"/>
-        <xsl:param name="system_cache__dita__x3A__svg:vheight"/>
+        <xsl:param name="system_cache__dita__x3A__svg:vheight"/>-->
         <xsl:param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate"  tunnel="yes"/><!--required="yes"  -->
         <xsl:param name="nextY.height"/><!-- example <system_cache__dita__x3A__svg:pheight 
                                             nextY.height="100"  mastepny rekord ma miec wysokosc 100
@@ -152,113 +158,187 @@
                                             comment="#174 after series of graph, lower graph for volumes"
                                             system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate="true"/> -->
         <xsl:param name="comment"/>
-        <xsl:param name="id" />
-        <xsl:param name="system_cache__dita__x3A__svg:increment"> <!-- ujednolicona zmienna do wartosci increment -->
-            <xsl:choose>
+        <xsl:param name="id"  required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:increment" required="yes"><!-- ujednolicona zmienna do wartosci increment -->
+            <!--<xsl:choose>
                 <xsl:when test="$system_cache__dita__x3A__svg:font-size"><xsl:value-of select="$system_cache__dita__x3A__svg:font-size"/></xsl:when>
                 <xsl:when test="$system_cache__dita__x3A__svg:pheight"><xsl:value-of select="$system_cache__dita__x3A__svg:pheight"/></xsl:when>
                 <xsl:when test="$system_cache__dita__x3A__svg:vheight"><xsl:value-of select="$system_cache__dita__x3A__svg:vheight"/></xsl:when>
-            </xsl:choose>
+            </xsl:choose>-->
         </xsl:param><!-- to oznaczania , ze cos ma dostac taki wymiar Y -->
+        <xsl:param name="system_cache__dita__x3A__svg:width__x3A__limit" /><!-- todo - override w razie co --> <!-- ujednolicona zmienna do wartosci increment -->
+        <xsl:param name="system_cache__dita__x3A__svg:next.neighbor.bottom.id"/><!-- expected next class of item- to controll it better  -->
+        <!--<xsl:param name="system_cache__dita__x3A__svg:next.neighbor.right.id"/>--><!-- expected next class of item- to controll it better  -->
         <!--<xsl:param name="system_cache__dita__x3A__svg:offsetY" select="0"/>-->
+        <!--<xsl:param name="system_cache__dita__x3A__svg:region.body" />
+        <xsl:param name="system_cache__dita__x3A__svg:region.start" />
+        <xsl:param name="system_cache__dita__x3A__svg:region.end" />-->
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.current.height"/>
         
         
+                <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="$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"/>
+                                        </xsl:call-template>
+                                        <xsl:call-template name="system_cache__dita__x3A__svg:cursor.lastY__x3A__assign">
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                                        </xsl:call-template>
+                                        <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.nextX__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:width__x3A__limit" select="$system_cache__dita__x3A__svg:width__x3A__limit"/>
+                                            
+                                        </xsl:call-template>
+                                        
+                                        <xsl:if test="$system_cache__dita__x3A__svg:next.neighbor.bottom.id">
+                                            <xsl:call-template name="system_cache__dita__x3A__svg:next.neighbor.bottom.id__x3A__assign">
+                                                <xsl:with-param name="system_cache__dita__x3A__svg:next.neighbor.bottom.id" select="$system_cache__dita__x3A__svg:next.neighbor.bottom.id"/>
+                                            </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: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"/>
+                                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+                                        </xsl:call-template>
+                                    </xsl:element>
+                                </xsl:when>
+                               
+                                <xsl:otherwise>
+                                    
+                                    <xsl:message terminate="yes">TODO MIGRATE TO ID</xsl:message>
+                                </xsl:otherwise>
+                            </xsl:choose>
+                            
+                            
+                        </system_cache__dita__x3A__svg:cursor>
+                </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"/>
         
-        <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="$id">
-                    <xsl:element name="{$id}">
-                        <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"/>
-                        </xsl:call-template>
-                        <xsl:call-template name="system_cache__dita__x3A__svg:cursor.lastY__x3A__assign">
-                            <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
-                        </xsl:call-template>
-                        <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:element>
-                </xsl:when>
-                <xsl:when test="$system_cache__dita__x3A__svg:font-size">
-                    <system_cache__dita__x3A__svg:font-size
-                        nextY.height="{$nextY.height}" lastY="{sum($system_cache__dita__x3A__svg:cursor//@increment)}"
-                        increment="{$system_cache__dita__x3A__svg:increment}"
-                        nextY="{sum($system_cache__dita__x3A__svg:cursor//@increment)+$system_cache__dita__x3A__svg:increment}"
-                        comment="{$comment} {$system_cache__dita__x3A__svg:font-size}" >
-                        <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="$nextY.height"/>
-                        <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:font-size)"/>
-                        
-                        <!-- @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.2(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.min.coordinate())}" select="sum($system_cache__dita__x3A__svg:cursor//@increment)+$system_cache__dita__x3A__svg:increment"/>
-                        
-                    </system_cache__dita__x3A__svg:font-size>
-                </xsl:when>
-           <!-- </xsl:choose>
-            <xsl:choose>-->
-                <xsl:when test="$system_cache__dita__x3A__svg:pheight">
-                    <system_cache__dita__x3A__svg:pheight 
-                        
-                        nextY.height="{$nextY.height}" lastY="{sum($system_cache__dita__x3A__svg:cursor//@increment)}"
-                        increment="{$system_cache__dita__x3A__svg:increment}" 
-                        nextY="{sum($system_cache__dita__x3A__svg:cursor//@increment)+$system_cache__dita__x3A__svg:increment}"
-                        comment="{$comment} {$system_cache__dita__x3A__svg:pheight}" >
-                        <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:pheight)"/>
-                        <!-- @nextY.height --> <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="$nextY.height"/>
-                        
-                        <!-- @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.2(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.min.coordinate())}" select="sum($system_cache__dita__x3A__svg:cursor//@increment)+$system_cache__dita__x3A__svg:increment"/>
-                        
-                        
-                    </system_cache__dita__x3A__svg:pheight>
-                </xsl:when>
-          <!--  </xsl:choose>
-            <xsl:choose>-->
-                
-                <xsl:when test="$system_cache__dita__x3A__svg:vheight">
-                    <system_cache__dita__x3A__svg:vheight nextY.height="{$nextY.height}" lastY="{sum($system_cache__dita__x3A__svg:cursor//@increment)}" increment="{$system_cache__dita__x3A__svg:increment}" 
-                        nextY="{sum($system_cache__dita__x3A__svg:cursor//@increment)+$system_cache__dita__x3A__svg:increment}" comment="volume chart forced {$comment} {$system_cache__dita__x3A__svg:vheight}" >
-                        <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:vheight)"/>
-                        
-                        <!-- @nextY.height --> <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="$nextY.height"/>
-                        
-                        <!-- @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.2(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.min.coordinate())}" select="sum($system_cache__dita__x3A__svg:cursor//@increment)+$system_cache__dita__x3A__svg:increment"/>
-                        
-                        
-                    </system_cache__dita__x3A__svg:vheight>
-                </xsl:when>
-                <xsl:otherwise>
-                    
-                    
-                </xsl:otherwise>
-            </xsl:choose>
-            
-            
-        </system_cache__dita__x3A__svg:cursor>
+    
+    
+    <xsl:template mode="system_cache__dita__x3A__svg:cursor__x3A__to_validate" match="@*">
+        <xsl:copy-of select="."/>
     </xsl:template>
     
     
     
+    <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: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>
+    
+    <xsl:template mode="system_cache__dita__x3A__svg:cursor__x3A__to_validate" match="text()|comment()">
+        <xsl:copy-of select="."/>
+    </xsl:template>
     
     <xsl:template name="system_cache__dita__x3A__svg:cursor.initial.Y">
         <xsl:param name="system_cache__dita__x3A__svg:offsetY" select="0"/>
         <xsl:value-of select="$system_cache__dita__x3A__svg:offsetY"/>
     </xsl:template>
     
+    <xsl:template name="system_cache__dita__x3A__svg:cursor.lastX__x3A__calculate">
+        <xsl:param name="system_cache__dita__x3A__svg:cursor"/>
+        <xsl:value-of select="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[position() = last()]/@*[ 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())]"/>
+    </xsl:template>
     
+    <xsl:function name="system_cache__dita__x3A__svg:cursor.lastX2LEN__x3A__calculate">
+        <xsl:param name="system_cache__dita__x3A__svg:cursor"/>
+        <xsl:value-of select="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[position() = last()]/@*[ 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())]"/>
+    </xsl:function>
+    
+    <xsl:template name="system_cache__dita__x3A__svg:cursor.lastX1__x3A__calculate">
+        <xsl:param name="system_cache__dita__x3A__svg:cursor"/>
+        <xsl:value-of select="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[position() = last()]/@*[ 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())]"/>
+    </xsl:template>
+    
+    <xsl:template name="system_cache__dita__x3A__svg:cursor.lastXA__x3A__calculate">
+        <xsl:param name="system_cache__dita__x3A__svg:cursor" required="yes"/>
+        <xsl:choose>
+            <xsl:when test="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[position() = last()]/@*[ 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())]">
+                <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/system_cache__dita__x3A__svg:cursor/*[position() = last()]/@*[ 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())]"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <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('X1_ERROR_312',
+                    system_cache__dita__x3A__svg:resolution.coordinate.index.1(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.min.coordinate())}" select="'not found expected last pos @min cord'"/>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
     
     <xsl:function name="system_cache__dita__x3A__svg:cursor.lastY__x3A__calculate">
         <xsl:param name="system_cache__dita__x3A__svg:cursor"/>
-        <xsl:value-of select="sum($system_cache__dita__x3A__svg:cursor//@increment)"/>
+        <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)"/>
@@ -272,8 +352,73 @@
             $$system_cache__dita__x3A__svg:increment = <xsl:value-of select="$system_cache__dita__x3A__svg:increment"/>;
         </xsl:message>
         <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.2(),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"/>
+        <!-- @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)"/>
+        <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>
+    
+    <xsl:template name="system_cache__dita__x3A__svg:cursor.nextX__x3A__assign">
+        <xsl:param name="system_cache__dita__x3A__svg:cursor" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:width__x3A__limit" required="yes"/>
+        
+        <xsl:message>#305 debug system_cache__dita__x3A__svg:cursor.nextX__x3A__assign
+            count($system_cache__dita__x3A__svg:cursor//*)=<xsl:value-of select="count($system_cache__dita__x3A__svg:cursor//*)"/>;
+            $$system_cache__dita__x3A__svg:increment = <xsl:value-of select="$system_cache__dita__x3A__svg:width__x3A__limit"/>;
+        </xsl:message>
+        <!--<xsl:attribute name="system_cache__dita__x3A__svg:width__x3A__limit" select="system_cache__dita__x3A__svg:cursor.lastX__x3A__calculate($system_cache__dita__x3A__svg:cursor)"/>-->
+        <!-- @nextY -->
+        <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/system_cache__dita__x3A__svg:cursor/*[position() = last()]/@*[ 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())]"/><!-- system_cache__dita__x3A__svg:cursor.lastX__x3A__calculate($system_cache__dita__x3A__svg:cursor) -->
+        
+        
+        <!--<xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data('Xdebug2_1_',
+            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/system_cache__dita__x3A__svg:cursor/*[position() = last()]/@*[ 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())]) - ($system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[position() = last()]/@*[ 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())])"/>--><!-- system_cache__dita__x3A__svg:cursor.lastX__x3A__calculate($system_cache__dita__x3A__svg:cursor) - system_cache__dita__x3A__svg:cursor.lastX1__x3A__calculate($system_cache__dita__x3A__svg:cursor) -->
+        
+        
+        
+        <!--<xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data('Xdebug341',
+            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.lastX1__x3A__calculate($system_cache__dita__x3A__svg:cursor)"/>-->
+        
+        <xsl:call-template name="system_cache__dita__x3A__svg:cursor.lastXA__x3A__calculate">
+            <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+        </xsl:call-template>
+        
+        <xsl:choose>
+            <xsl:when test="$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[position() = last()]/@*[ 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())] &gt; 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/system_cache__dita__x3A__svg:cursor/*[position() = last()]/@*[ 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())]"/>
+                
+            </xsl:when>
+            <xsl:otherwise>
+                <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/system_cache__dita__x3A__svg:cursor/*[position() = 1]/@*[ 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())]"/>
+            </xsl:otherwise>
+        </xsl:choose>
+        
+        
+        
+        
+        
+        <!--<xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data('Xdebug_337',
+            system_cache__dita__x3A__svg:resolution.coordinate.index.2(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.max.length())}" select="concat(system_cache__dita__x3A__svg:cursor.lastX1__x3A__calculate($system_cache__dita__x3A__svg:cursor),' a last1X: ',system_cache__dita__x3A__svg:cursor.lastX1__x3A__calculate($system_cache__dita__x3A__svg:cursor),' a last name: ',$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[position() = last()]/name(),' X2LEN' ,system_cache__dita__x3A__svg:cursor.lastX2LEN__x3A__calculate($system_cache__dita__x3A__svg:cursor),' @n: ',$system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[position() = last()]/@system_cache__dita__x3A__svg:data.x2.bounds.max.length/concat('n/',name(),'::v',.,'   ') )"/>-->
+    </xsl:template>
+    
+    
+    
+    
+    <xsl:template name="system_cache__dita__x3A__svg:next.neighbor.bottom.id__x3A__assign">
+        <xsl:param name="system_cache__dita__x3A__svg:next.neighbor.bottom.id" required="yes"/>
+        <xsl:attribute name="{system_cache__dita__x3A__svg:resolution.coordinate.data.neighbor(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.id())}" select="$system_cache__dita__x3A__svg:next.neighbor.bottom.id"/>
         
     </xsl:template>
     
@@ -284,28 +429,36 @@
         <xsl:param name="system_cache__dita__x3A__svg:width__x3A__limit"/>
         
         <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="300"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:width__x3A__limit"/>
         
         <xsl:param name="system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate" select="0"/>
-        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="300"/>
+        <xsl:param name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:height__x3A__limit"/>
         
         
         <system_cache__dita__x3A__svg:cursor>
             <system_cache__dita__x3A__svg:offsetY lastY="0" increment="{$system_cache__dita__x3A__svg:offsetY}" nextY="{$system_cache__dita__x3A__svg:offsetY}">
                 <!--<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:font-size)"/>-->
                 <xsl:if test="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate &gt;= 0"><xsl:attribute name="system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/></xsl:if>
-                <xsl:if test="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate &gt;= 0"><xsl:attribute name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/></xsl:if>
+                <xsl:if test="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate &gt;= 0">
+                    <xsl:attribute name="system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                    <xsl:attribute name="system_cache__dita__x3A__svg:data.x2.bounds.max.length" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate - $system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                </xsl:if>
                 <xsl:if test="$system_cache__dita__x3A__svg:data.y1.bounds.min.coordinate &gt;= 0"><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:if>
                 <xsl:if test="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate &gt;= 0"><xsl:attribute name="system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate" select="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate"/></xsl:if>
                 
                 
                 <xsl:if test="$system_cache__dita__x3A__svg:height__x3A__limit"><xsl:attribute name="system_cache__dita__x3A__svg:height__x3A__limit" select="$system_cache__dita__x3A__svg:height__x3A__limit"/></xsl:if>
                 <xsl:if test="$system_cache__dita__x3A__svg:width__x3A__limit"><xsl:attribute name="system_cache__dita__x3A__svg:width__x3A__limit" select="$system_cache__dita__x3A__svg:width__x3A__limit"/></xsl:if>
-                <!-- @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.2(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.min.coordinate())}" select="$system_cache__dita__x3A__svg:offsetY"/>
-                <!-- @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.2(),system_cache__dita__x3A__svg:resolution.coordinate.cursor.bounds.min.coordinate())}" select="$system_cache__dita__x3A__svg:offsetY"/>
-                <xsl:attribute name="debug_migrated_todo">$system_cache__dita__x3A__svg:offsetY wywalone - po co tu string?#295</xsl:attribute>
+                <!-- @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:offsetY"/>-->
+                
+                    <!--<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:offsetY"/>-->
+                
+                
+                <!-- @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:offsetY"/>-->
+                <!--<xsl:attribute name="debug_migrated_todo">$system_cache__dita__x3A__svg:offsetY wywalone - po co tu string?#295</xsl:attribute>-->
                 <!--<xsl:value-of select="$system_cache__dita__x3A__svg:offsetY"/>-->
             </system_cache__dita__x3A__svg:offsetY>
         </system_cache__dita__x3A__svg:cursor>
@@ -317,7 +470,35 @@
         <xsl:param name="system_cache__dita__x3A__svg:cursor.increment"/>
         <xsl:choose>
             <xsl:when test="(sum($system_cache__dita__x3A__svg:cursor//@increment)+$system_cache__dita__x3A__svg:cursor.increment) &gt; number($system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate)">
-                <xsl:message terminate="yes">#512 system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate - too much for @increment=<xsl:value-of select="$system_cache__dita__x3A__svg:cursor.increment"/>, that can fit into system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate=<xsl:value-of select="$system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate"/></xsl:message>
+                <xsl:message terminate="no">#512 system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate - too much for @increment=<xsl:value-of select="$system_cache__dita__x3A__svg:cursor.increment"/>, that can fit into system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate=<xsl:value-of select="$system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate"/></xsl:message>
+                <xsl:value-of select="false()"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:value-of select="true()"/>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:function>
+    
+    <xsl:function name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate">
+        <xsl:param name="system_cache__dita__x3A__svg:cursor"/>
+        <xsl:param name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate"/>
+        <xsl:choose>
+            <xsl:when test="(sum($system_cache__dita__x3A__svg:cursor//@increment)) &gt; number(system_cache__dita__x3A__svg:height__x3A__limit__x3A__extract($system_cache__dita__x3A__svg:cursor))">
+                <xsl:message terminate="no">#512 system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate - too much for @increment=, that can fit into system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate=</xsl:message>
+                <xsl:value-of select="false()"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:value-of select="true()"/>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:function>
+    
+    <xsl:function name="system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate">
+        <xsl:param name="system_cache__dita__x3A__svg:cursor"/>
+        <xsl:choose>
+            <xsl:when test="(sum($system_cache__dita__x3A__svg:cursor//@increment)) &gt; number(system_cache__dita__x3A__svg:height__x3A__limit__x3A__extract($system_cache__dita__x3A__svg:cursor))">
+                <xsl:message terminate="no">#512 system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate - too much for @increment=, that can fit into system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate=</xsl:message>
+                <xsl:value-of select="false()"/>
             </xsl:when>
             <xsl:otherwise>
                 <xsl:value-of select="true()"/>
@@ -328,9 +509,30 @@
     
     <xsl:function name="system_cache__dita__x3A__svg:height__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:height__x3A__limit]/@system_cache__dita__x3A__svg:height__x3A__limit"/>
+        <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/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"/>
@@ -339,35 +541,73 @@
     <xsl:template name="system_cache__dita__x3A__svg:cursor.increment__x3A__assign">
         <xsl:param name="system_cache__dita__x3A__svg:increment"/>
         <xsl:attribute name="increment" select="$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:increment"/>
     </xsl:template>
     
     
+    
+    <xsl:template name="system_cache__dita__x3A__svg:cursor.current.width">
+        <xsl:param name="system_cache__dita__x3A__svg:cursor"/>
+        <xsl:call-template name="system_cache__dita__x3A__svg:cursor.lastX__x3A__calculate">
+            <xsl:with-param name="system_cache__dita__x3A__svg:cursor" select="$system_cache__dita__x3A__svg:cursor"/>
+        </xsl:call-template>
+        <!--<xsl:value-of select="system_cache__dita__x3A__svg:cursor.lastX__x3A__calculate($system_cache__dita__x3A__svg:cursor)"/>-->
+    </xsl:template>
+    
     <xsl:function name="system_cache__dita__x3A__svg:cursor.current.Y">
         <xsl:param name="system_cache__dita__x3A__svg:cursor"/>
         <xsl:choose>
             <xsl:when test="$system_cache__dita__x3A__svg:cursor">
-                <xsl:value-of select="sum($system_cache__dita__x3A__svg:cursor//@increment/number())"/>        
+                <xsl:value-of select="sum($system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[not(position()=last())]/@increment/number())"/>        
             </xsl:when>
         </xsl:choose>
-        
     </xsl:function>
     
-    <xsl:function name="system_cache__dita__x3A__svg:cursor.current.height">
+    <!--<xsl:function name="system_cache__dita__x3A__svg:cursor.current.Y">
         <xsl:param name="system_cache__dita__x3A__svg:cursor"/>
+        <xsl:param name="system_cache__dita__x3A__svg:next.neighbor.bottom.id"/>
         <xsl:choose>
-            <xsl:when test="$system_cache__dita__x3A__svg:cursor//*[last()]/@nextY.height/number()">
+            <xsl:when test="$system_cache__dita__x3A__svg:cursor">
+                <xsl:value-of select="sum($system_cache__dita__x3A__svg:cursor/system_cache__dita__x3A__svg:cursor/*[not(name()=last())]/@increment/number())"/>        
+            </xsl:when>
+        </xsl:choose>
+        
+    </xsl:function>-->
+    
+    <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/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())"/>        
             </xsl:when>
             <xsl:when test="(sum($system_cache__dita__x3A__svg:cursor//@increment/number()) + 100 ) &lt; $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()">
                 <xsl:value-of select="100"/>
             </xsl:when>
-            <xsl:otherwise>
+            <xsl:when test="$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 ) &gt;0">
+                <xsl:message terminate="no">#369A NOT COMMITED PARAM @nextY.height last time - should be this set</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 )"/>
+            </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/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:function>
-    
+    </xsl:template>
     
+    <xsl:function name="system_cache__dita__x3A__svg:cursor.next.height">
+        <xsl:param name="system_cache__dita__x3A__svg:cursor"/>
+        <xsl:choose>
+            <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())"/>        
+            </xsl:when>
+            
+        </xsl:choose>
+    </xsl:function>
     
     
     
@@ -642,9 +882,29 @@
         <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)">[ERR_Y_TOO_BIG]<xsl:if test="$system_cache__dita__x3A__svg:offsetY.height"><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:offsetY.height div $Yrange"/>[-<xsl:value-of select="$system_cache__dita__x3A__svg:offsetY.minY"/>][<xsl:value-of select="$system_cache__dita__x3A__svg:offsetY.height"/> div (<xsl:value-of select="$system_cache__dita__x3A__svg:offsetY.maxY"/>-<xsl:value-of select="$system_cache__dita__x3A__svg:offsetY.minY"/>)*<xsl:value-of select="$Yscale"/>=<xsl:value-of select="( $yValue - $system_cache__dita__x3A__svg:offsetY.minY ) * $Yscale"/>]</xsl:if>
-                        <xsl:if test="$system_cache__dita__x3A__svg:cursor.current.Y">[+<xsl:value-of select="$system_cache__dita__x3A__svg:cursor.current.Y"/>]</xsl:if>
+                    <xsl:when test="$yValue.simulated &gt; number($system_cache__dita__x3A__svg:height__x3A__limit__x3A__validate)"><xsl:text>[ERR_Y_TOO_BIG]</xsl:text>
+                        <xsl:variable name="yValue.simulated" select="$yValue"/>
+                        <xsl:variable name="yValue.simulated">
+                            <xsl:choose>
+                                <xsl:when test="$system_cache__dita__x3A__svg:offsetY.height">
+                                    <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:offsetY.height div $Yrange"/>
+                                    <!--<xsl:variable name="Yoffset" select="$system_cache__dita__x3A__svg:offsetY.height div $Yrange"/>-->
+                                    <xsl:value-of select="( $yValue.simulated - $system_cache__dita__x3A__svg:offsetY.minY ) * $Yscale"/>
+                                </xsl:when>
+                                <xsl:otherwise><xsl:value-of select="$yValue.simulated"/></xsl:otherwise>
+                            </xsl:choose>
+                        </xsl:variable>
+                        <xsl:text>[(HL)</xsl:text><xsl:value-of select="$yValue.simulated"/><xsl:text>]</xsl:text>
+                        <xsl:variable name="yValue.simulated">
+                            <xsl:choose>
+                                <xsl:when  test="$system_cache__dita__x3A__svg:cursor.current.Y">
+                                    <xsl:value-of select="$yValue.simulated + $system_cache__dita__x3A__svg:cursor.current.Y"/>
+                                </xsl:when>
+                                <xsl:otherwise><xsl:value-of select="$yValue.simulated"/></xsl:otherwise>
+                            </xsl:choose>
+                        </xsl:variable>
+                        <xsl:text>[(CC)</xsl:text><xsl:value-of select="$yValue.simulated"/><xsl:text>]</xsl:text>
                     </xsl:when>
                     <xsl:when test="$yValue.simulated &lt; 0">[ERR_Y_LESS_0]</xsl:when>
                     <xsl:when test="$yValue.simulated &lt; $system_cache__dita__x3A__svg:cursor.current.height">[ERR_Y_OVER_CURSOR]</xsl:when>
@@ -656,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="@*"/>
         
     

二进制
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.resolution.numbers


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

@@ -240,17 +240,19 @@
     </xsl:template>
     
     <xsl:template mode="system_cache__dita__x3A__svg:openHiLoClose.label" match="system_cache__dita__x3A__svg:resolution.offset.dataset.prepared[system_cache__dita__x3A__svg:data.y1.label.dataset.prepared ]"><!-- merging datasets @*[ contains(local-name() , system_cache__dita__x3A__svg:resolution.coordinate.label()  ) -->
-        <system_cache__dita__x3A__svg:openHiLoClose.resolution.coordinate.label debug="1007m mod powinie zabrac system_cache__dita__x3A__svg:openHiLoClose.label">
+        <system_cache__dita__x3A__svg:openHiLoClose.resolution.coordinate.label debug="1007mX2 mod powinie zabrac system_cache__dita__x3A__svg:openHiLoClose.label">
 
             <xsl:comment>#245-A - przed wyzwolneime apply current</xsl:comment>
-                <xsl:apply-templates mode="#current"/>      
-            <xsl:comment>#245 -B- przed wyzwolneime apply current</xsl:comment>
-            
+            <DEBUG_245>
+                <xsl:apply-templates mode="#current"/>
+            </DEBUG_245>
+            <xsl:comment>#245-B- przed wyzwolneime apply current</xsl:comment>
             
+            <xsl:copy-of select="."></xsl:copy-of>
         </system_cache__dita__x3A__svg:openHiLoClose.resolution.coordinate.label>
     </xsl:template>
     
-    
+                     
     <xsl:template mode="system_cache__dita__x3A__svg:openHiLoClose.label" match="system_cache__dita__x3A__svg:data.y1.label.dataset.prepared"><!-- merging datasets @*[ contains(local-name() , system_cache__dita__x3A__svg:resolution.coordinate.label()  ) -->
         <xsl:param name="system_cache__dita__x3A__svg:offsetY.minY" select="system_cache__dita__x3A__svg:data.y1.value/@system_cache__dita__x3A__svg:data.y1.value.bounds.min" />
         <xsl:param name="system_cache__dita__x3A__svg:offsetY.maxY" select="system_cache__dita__x3A__svg:data.y1.value/@system_cache__dita__x3A__svg:data.y1.value.bounds.min" /><!-- to sa wartosci danych jak dalekp -->
@@ -266,7 +268,7 @@
         
         <xsl:comment>#191 to conitnue tutaj</xsl:comment>
         <!--<xsl:copy-of select="."/>-->
-        <svg:g debug="svgu:openHiLoClose.3175"  >
+        <svg:g debug="svgu:openHiLoClose.3175QQQ"  >
             <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:offsetY.minY" />
                 <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="$system_cache__dita__x3A__svg:offsetY.maxY" />
@@ -357,6 +359,8 @@
         <xsl:value-of select="$out"/>
     </xsl:function>
     
+    
+    
     <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.data.count">
         <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.axis"/>
         <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.index"/>
@@ -402,6 +406,23 @@
         <xsl:value-of select="$out"/>
     </xsl:function>
     
+    
+    <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.data.neighbor">
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.axis"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.index"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.class"/>
+        <xsl:variable name="out">
+            <xsl:value-of select="'system_cache__dita__x3A__svg:data.'"/>
+            <xsl:value-of select="system_cache__dita__x3A__svg:resolution.coordinate.neighbor()"/>
+            <xsl:if test="string-length($system_cache__dita__x3A__svg:resolution.coordinate.axis)&gt;0 or string-length($system_cache__dita__x3A__svg:resolution.coordinate.index)&gt;0">.</xsl:if>
+            <xsl:value-of select="$system_cache__dita__x3A__svg:resolution.coordinate.axis"/>
+            <xsl:value-of select="$system_cache__dita__x3A__svg:resolution.coordinate.index"/>
+            <xsl:if test="string-length($system_cache__dita__x3A__svg:resolution.coordinate.class)&gt;0">.</xsl:if>
+            <xsl:value-of select="$system_cache__dita__x3A__svg:resolution.coordinate.class"/>
+        </xsl:variable>
+        <xsl:value-of select="$out"/>
+    </xsl:function>
+    
     <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.data.dataset.prepared">prepared</xsl:function>
     
     <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.value.dataset">
@@ -443,6 +464,40 @@
     <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.value.bounds.max">bounds.max</xsl:function>
     <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.value">value</xsl:function>
     
+    
+    <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.neighbor">neighbor</xsl:function>
+    <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.neighbor.bottom">neighbor.bottom</xsl:function>
+    <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.neighbor.right">neighbor.right</xsl:function>
+    
+    <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.region.end">region.end</xsl:function>
+    <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.region.start">region.start</xsl:function>
+    <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.region.body">region.body</xsl:function>
+    <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.region">region</xsl:function>
+    
+    <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.region">
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.region"/>
+        <xsl:variable name="out">
+            <xsl:value-of select="'system_cache__dita__x3A__svg:esolution.coordinate.'"/>
+            <xsl:value-of select="$system_cache__dita__x3A__svg:resolution.coordinate.region"/>
+        </xsl:variable>
+        <xsl:value-of select="$out"/>
+    </xsl:function>
+    
+    
+    <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.extent">extent</xsl:function>
+    
+    
+    <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.last">last</xsl:function>
+    <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.next">next</xsl:function>
+    
+    <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.next.neighbor.bottom.name">next.neighbor.bottom.name</xsl:function>
+    
+    <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>
     <xsl:function name="system_cache__dita__x3A__svg:resolution.coordinate.diagnose.option">diagnose.option</xsl:function>
     

+ 407 - 0
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.translate.xsl

@@ -0,0 +1,407 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+    xmlns:system_cache__dita="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/dita.xsd"
+    xmlns:system_cache__dita__x3A__p5gnuplot="http://biuro.biall-net.pl/WPS_Functions/system_cache__dita__x3A__p5gnuplot/system_cache__dita__x3A__p5gnuplot.xsd"
+    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:p5gnuplot__x3A__system_cache__dita="http://biuro.biall-net.pl/WPS_Functions/p5gnuplot__x3A__system_cache__dita/p5gnuplot__x3A__system_cache__dita.xsd"
+    xmlns:p5gnuplot="http://biuro.biall-net.pl/WPS_Functions/graph_gnuplot"
+    xmlns:svg="http://www.w3.org/2000/svg"
+    xmlns:default_db__x3A__BI_audit_ENERGA_RUM_UMOWY="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_UMOWY"
+    xmlns:default_db__x3A__BI_audit_BENFORD="https://biuro.biall-net.pl/wfs/default_db/BI_audit_BENFORD"
+    
+    xmlns:svgu="http://www.ora.com/XSLTCookbook/ns/svg-utils"
+    xmlns:test="http://www.ora.com/XSLTCookbook/ns/test"
+    exclude-result-prefixes="xs"
+    version="2.0">
+    
+    <xsl:output indent="yes" />
+    <xsl:strip-space elements="*"/>
+    
+    <xsl:template name="system_cache__dita__x3A__svg:transform.translate.basic">
+        
+        <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:offsetX.width" />
+        
+        <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:offsetY.height" />
+        <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"/>-->
+        
+        
+        
+        <!-- 
+         if maxX=100 and minX=50 - range==100-50==50 , $xscale==100 div $range== 100/50==2
+            if X==50 - transf by scale = 50*2 = 100, but should be in bottom left so
+                calculate =50*2 - $?max=100? == 100 - 100 = 0 - OK
+                
+                $scale==$width div $range == 600 div 50 = 12
+                50*12=600 should be min ==0 if -600 
+                100*12==1200 - should be amx==600
+                
+                minX=20 == range==100-20==80  xcale==600 div 80 = 7,5
+                 test 20 * 7.5= 150 - 150 = 0
+                 test 100 * 7.5 = 750 - 150 ==600 max - correct
+                    we should minus offset $min * $scale
+                    
+                    test scale 250, max500 min=1 max=3  $min*scale==1*250==250
+                      1*250==250 - 250 ==0 
+                 test min==0 range==3-0==3  scale==600 div 3 = 200 ; off
+                 if 0 *259==0 - OK
+                 if 1 *250=250 ?
+                 if 3 *250=750 - 
+                    if *max * scale -??X?? = $widb
+                    max * scake - $width = XXX
+                    ( 3 * 200 ) 750 - $widgh - 600 = 150
+                    test if x0 0*250==0 - 150 = -150 - blad
+                    test if x3 3*250=750 - 150=600 
+                    
+                    min * scale
+                    
+                    0x200==0 ok
+                    3x200==600 ok
+                    
+                    range 2-3 ==3-2==1  scale==600 div 1== 600 div 1 ==600
+                    
+                    test id 2*200 == 400 (should be zero?) ==-400
+                    test id 3*200 == 600 (should be 600 - OK)
+                    
+                    if X-width * scale ? (min * scale == 400) (max * scale)==600 - 400-600==200 ? test if
+                    if 2-min=2 == 0 * scale = 0
+                    if 3-min=2 ==1 * scale 600 = 600 OK
+                    result odejmijod X minX i pomnoz przez scale
+                    
+         - so no other params ara needed
+        -->
+        
+        <xsl:attribute name="transform">
+            
+            
+            <xsl:choose>
+                <xsl:when test="$system_cache__dita__x3A__svg:cursor.current.Y">
+                    <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.offset(0, $system_cache__dita__x3A__svg:cursor.current.Y)"/>
+                </xsl:when>
+            </xsl:choose>
+            
+            <xsl:choose>
+                <xsl:when test="$system_cache__dita__x3A__svg:offsetX.width ">
+                    <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:offsetX.width 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: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:offsetX.minX,0)"/>
+                    
+                </xsl:when>
+            </xsl:choose>
+            
+            
+            
+            <xsl:choose>
+                <xsl:when test="$system_cache__dita__x3A__svg:offsetY.height">
+                    <xsl:message>#770 debug $system_cache__dita__x3A__svg:offsetY.height=(<xsl:value-of select="$system_cache__dita__x3A__svg:offsetY.height"/>) 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:offsetY.height 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:value-of select="system_cache__dita__x3A__svg:transform.translate.major.offset(0,$system_cache__dita__x3A__svg:offsetY.height)"/>
+                    
+                    <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.scale_positive(1,- $Yscale)"/>
+                    
+                    <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.offset(0,- $system_cache__dita__x3A__svg:offsetY.minY)"/>
+                    
+                </xsl:when>
+            </xsl:choose>
+            
+            
+            
+        </xsl:attribute>
+    </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">
+        
+        <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: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"/>-\->
+        
+        
+        
+        
+        
+        <xsl:attribute name="transform">
+            
+            
+            <xsl:choose>
+                <xsl:when test="$system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate">
+                    <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.offset(0, $system_cache__dita__x3A__svg:data.y2.bounds.max.coordinate)"/>
+                </xsl:when>
+            </xsl:choose>
+            
+            <xsl:choose>
+                <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: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:when>
+            </xsl:choose>
+            
+            
+            
+            <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: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: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 ) )"/>
+                    
+                    <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.scale_positive(1,- $Yscale)"/>
+                    
+                    <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.offset(0,- $system_cache__dita__x3A__svg:offsetY.minY)"/>
+                    
+                </xsl:when>
+            </xsl:choose>
+            
+            
+            
+        </xsl:attribute>
+    </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:function>
+    
+    <xsl:function name="system_cache__dita__x3A__svg:transform.translate.major.scale.initial">
+        <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:function>
+    
+    <xsl:function name="system_cache__dita__x3A__svg:transform.translate.major.scale">
+        <!--<xsl:param name="xscale"/>-->
+        <xsl:param name="yscale"/>
+        <xsl:text> scale(</xsl:text><xsl:value-of select="1"/><xsl:text>,</xsl:text><xsl:value-of select="- $yscale"/><xsl:text>) </xsl:text>
+    </xsl:function>
+    
+    <xsl:function name="system_cache__dita__x3A__svg:transform.translate.major.scale">
+        <!--<xsl:param name="xscale"/>-->
+        <xsl:param name="xscale"/>
+        <xsl:param name="yscale"/>
+        <xsl:text> scale(</xsl:text><xsl:value-of select="$xscale"/><xsl:text>,</xsl:text><xsl:value-of select="- $yscale"/><xsl:text>) </xsl:text>
+    </xsl:function>
+    
+    <xsl:function name="system_cache__dita__x3A__svg:transform.translate.major.scale_positive">
+        <!--<xsl:param name="xscale"/>-->
+        <xsl:param name="xscale"/>
+        <xsl:param name="yscale"/>
+        <xsl:text> scale(</xsl:text><xsl:value-of select="$xscale"/><xsl:text>,</xsl:text><xsl:value-of select="$yscale"/><xsl:text>) </xsl:text>
+    </xsl:function>
+    
+    <xsl:function name="system_cache__dita__x3A__svg:transform.translate.major.scale.final">
+        <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:function>
+    
+    
+    
+    
+    
+    
+  
+    
+  
+</xsl:stylesheet>

+ 255 - 269
SE/schema/default_db_xml_cache.public/default_db/system_cache__dita__x3A__svg/system_cache__dita__x3A__svg.utils.xsl

@@ -30,6 +30,9 @@
     <xsl:include href="system_cache__dita__x3A__svg.utils.resolution.xsl"/>
     <xsl:include href="system_cache__dita__x3A__svg.elements.xsl"/>
     <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="*"/>
@@ -76,6 +79,7 @@
                                        formatting template calls. -->
         
         <xsl:param name="system_cache__dita__x3A__svg:cursor" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.current.height" required="yes"/>
         <xsl:param name="system_cache__dita__x3A__svg:cursor.current.Y" required="yes"/>
         
         <!-- Compute the range and scaling factors -->
@@ -84,13 +88,13 @@
         
         <!-- Establish a Cartesian coordinate system with correct offset -->
         <!-- and scaling                                                 -->
-        <svg:g debug="svgu:xAxis.77 $min={$min} $max={$max} $width={$width} $height={$height} $range={$range} $cursor.current.Y={$system_cache__dita__x3A__svg:cursor.current.Y}" >
+        <svg:g debug="svgu:xAxis.77 $min={$min} $max={$max} $width={$width} $height={$system_cache__dita__x3A__svg:cursor.current.height} $range={$range} $cursor.current.Y={$system_cache__dita__x3A__svg:cursor.current.Y}" >
             <!-- transform="translate({$offsetX},{$offsetY+$height}) 
             scale({$scale},-1) translate({$min},0)" -->
             <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.height" select="$system_cache__dita__x3A__svg:cursor.current.height"/>
                 <xsl:with-param name="yscale" select="$scale"/>
                 <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"/>
@@ -99,7 +103,7 @@
                 <xsl:call-template name="system_cache__dita__x3A__svg:transform.cursor.init">
                     <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.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"/>
@@ -121,7 +125,7 @@
                         <xsl:with-param name="yValue" select="0"/>
                         <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.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"/>
@@ -156,19 +160,29 @@
     
     
     <xsl:template name="svgu:yAxis">
-        <xsl:param name="min"  required="yes"
-        />   <!--select="0" Min x coordinate -->
-        <xsl:param name="max" required="yes"
-        /> <!-- select="100" Max x coordinate -->
-        <xsl:param name="offsetX" 
-            select="0"/>   <!-- X offset of axis placement -->
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.block" required="yes"/>
+        <xsl:param name="system_cache__dita__x3A__svg:resolution.coordinate.region"/>
+        <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="offsetX" select="0"/>   <!-- X offset of axis placement -->
         <xsl:param name="offsetY" 
             select="0"/>   <!-- Y offset of axis placement -->
         <xsl:param name="width" 
             select="$system_cache__dita__x3A__svg:width.default"/> <!-- Width of the physical 
                                                 plotting area -->
-        <xsl:param name="height" 
-            select="$system_cache__dita__x3A__svg:height.default"/> <!-- Height of the physical plotting area -->  
+        
+            
+         <!-- select="$system_cache__dita__x3A__svg:height.default" Height of the physical plotting area -->
+        <xsl:param name="system_cache__dita__x3A__svg:cursor.current.width"  required="no"/>
         <xsl:param name="majorTicks" 
             select="$system_cache__dita__x3A__svg:majorTicks.default"/>     <!-- Number of major axis divisions -->
         <xsl:param name="majorLeftExtent" 
@@ -183,143 +197,242 @@
         <xsl:param name="minorTicks" 
             select="$system_cache__dita__x3A__svg:minorTicks.default"/>      <!-- Number of minor axis divisions per 
                                       major division-->
-        <xsl:param name="minorLeftExtent" 
-            select="$system_cache__dita__x3A__svg:minorLeftExtent.default"/>      <!-- select="2" Length of the minor tick mark from 
+        <!--<xsl:param name="minorLeftExtent" 
+            select="$system_cache__dita__x3A__svg:minorLeftExtent.default"/>-->      <!-- select="2" Length of the minor tick mark from 
                                       axis right -->
-        <xsl:param name="minorRightExtent" 
-            select="$system_cache__dita__x3A__svg:minorRightExtent.default"/> <!-- Length of the minor tick 
+        <!--<xsl:param name="minorRightExtent" 
+            select="$system_cache__dita__x3A__svg:minorRightExtent.default"/>--> <!-- Length of the minor tick 
                                                   mark from axis left -->
         <xsl:param name="context"/>   <!-- A user-defined context indicator for 
                                        formatting template calls -->
         
-        <xsl:param name="system_cache__dita__x3A__svg:labelMajor.offsetX" select="$system_cache__dita__x3A__svg:labelMajor.offsetX.default"/>
-        <xsl:param name="system_cache__dita__x3A__svg:labelMajor.offsetY" select="$system_cache__dita__x3A__svg:labelMajor.offsetY.default"/>
+        <!--<xsl:param name="system_cache__dita__x3A__svg:labelMajor.offsetX" select="$system_cache__dita__x3A__svg:labelMajor.offsetX.default"/>-->
+        <!--<xsl:param name="system_cache__dita__x3A__svg:labelMajor.offsetY" select="$system_cache__dita__x3A__svg:labelMajor.offsetY.default"/>-->
         <xsl:param name="system_cache__dita__x3A__svg:cursor"/>
         <xsl:param name="system_cache__dita__x3A__svg:transform.cursor"  />
-            
-        <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)"/>
-        <!-- Compute the range and scaling factors -->
-        <xsl:variable name="range" select="$max - $min"/>
-        <xsl:variable name="scale" select="$height div $range"/>
+        <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:cursor.current.Y" required="yes" /><!-- select="system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor)" -->
         
         
+        <!-- Compute the range and scaling factors -->
         
-        <xsl:comment>#202 name="xMajor2" select="$majorRightExtent = <xsl:value-of select="$majorRightExtent"/>"
-            $$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:offsetY.height =$height <xsl:value-of select="$height"/>
-            $system_cache__dita__x3A__svg:offsetY = <xsl:value-of select="$system_cache__dita__x3A__svg:offsetY"/>
-            $offsetX = <xsl:value-of select="$offsetX"/>
-            $minorRightExtent = <xsl:value-of select="$minorRightExtent"/>
+        <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:comment>#205 $offsetX $minY = <xsl:value-of select="$minY"/>  - $maxY = <xsl:value-of select="$maxY"/>
+            before detecting from cursor == [<xsl:value-of select="$offsetX"/>]
+
+                    $system_cache__dita__x3A__svg:cursor.current.width = <xsl:value-of select="$system_cache__dita__x3A__svg:cursor.current.width"/>
         </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:with-param name="system_cache__dita__x3A__svg:cursor.current.width" select="$system_cache__dita__x3A__svg:cursor.current.width"/>
+            </xsl:call-template>
+        </xsl:variable>
         
-        <!-- Establish a Cartesian coordinate system with correct offset -->
-        <!-- and scaling                                                 -->
-        <svg:g debug="svgu:yAxis.168 $offsetY={$offsetY} $min={$min} $max={$max} $width={$width} $height={$height} 
-            $range={$range} cursor.current.Y={$system_cache__dita__x3A__svg:cursor.current.Y} scale={$scale}">
-            <!-- transform="translate({$offsetX},{$offsetY+$height})  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: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:with-param name="offsetX" select="$offsetX"/>
+                <xsl:with-param name="system_cache__dita__x3A__svg:cursor.current.width" select="$system_cache__dita__x3A__svg:cursor.current.width"/>
             </xsl:call-template>
+        </xsl:variable>
+        
+        <xsl:variable name="rangeY" select="$maxY - $minY"/>
+        <xsl:variable name="scaleY" select="$system_cache__dita__x3A__svg:cursor.current.height div $rangeY"/>
+        
+        <xsl:message>#323 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>#202 name="xMajor2" $offsetX=<xsl:value-of select="$offsetX"/>; $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"/> ]
+                $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"/> ;]]
             
-            <xsl:variable name="system_cache__dita__x3A__svg:transform.cursor">
-                <xsl:call-template name="system_cache__dita__x3A__svg:transform.cursor.append">
-                    <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: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:with-param name="id">svgu.yAxis.168</xsl:with-param>
-                </xsl:call-template>
-            </xsl:variable>
-            <xsl:copy-of select="$system_cache__dita__x3A__svg:transform.cursor"/>
-            <!--<svg:line debug="svgu:yAxis.174"
-                x1="-18"
-                y1="69000"
-                x2="-530"
-                y2="9000"
-                transform.validate.y1="6.99"
-                transform.validate.y2="106.99000000000001"
-                style="stroke-width:5;stroke:red;vector-effect:non-scaling-stroke"/>-->
-            <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="$max"/>
-                <xsl:with-param name="system_cache__dita__x3A__svg:width" select="$majorLeftExtent"/>
-            </xsl:call-template>
-            <!-- wnioski - trzeba , jak glowna skala jest -0.01 to $range musi sie wpasowac do scale i dzialac wylacznie w tych przedzialach 
+            $$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:value-of select="$system_cache__dita__x3A__svg:cursor.current.height"/>]]
             
-            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="svgu:yAxis.174 1ds={1 div $scale} sc={$scale}" x1="{-$majorLeftExtent}" y1="{$min}" x2="{-$majorLeftExtent}"  y2="{$max}">
-                <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>
-                <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="$height"/>
-                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.min" select="$min"/>
+            
+        </xsl:comment>
+        
+        <!-- Establish a Cartesian coordinate system with correct offset -->
+        <!-- and scaling                                                 -->
+        <xsl:choose>
+            <xsl:when test="1=2 and number($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:cursor.current.height) and number(system_cache__dita__x3A__svg:cursor.current.Y($system_cache__dita__x3A__svg:cursor))">
+                
+                <svg:g debug="svgu:yAxis.168 block={$system_cache__dita__x3A__svg:resolution.coordinate.block} $offsetY={$offsetY} $minY={$minY} $maxY={$maxY} $width={$width} $system_cache__dita__x3A__svg:cursor.current.height= 
+                    $rangeY={$rangeY} cursor.current.Y={$system_cache__dita__x3A__svg:cursor.current.Y} scaleY={$scaleY}">
+                    <!-- transform="translate({$offsetX},{$offsetY+$height})  scale(1,{-$scale}) translate(0,{-$min})" -->
+                    <xsl:call-template name="system_cache__dita__x3A__svg:transform.translate.basic">
+                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                        <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: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:offsetX.width" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                        <!--<xsl:with-param name="system_cache__dita__x3A__svg:offsetY" select="$offsetY"/>-->
+                        
+                        
+                        
+                        
+                    </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="$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:call-template>-->
+                    
+                    <xsl:variable name="system_cache__dita__x3A__svg:transform.cursor">
+                        <xsl:call-template name="system_cache__dita__x3A__svg:transform.cursor.append">
+                            <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: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="$minY"/>
+                            <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="$scaleY"/>
+                            <xsl:with-param name="id">svgu.yAxis.168</xsl:with-param>
+                        </xsl:call-template>
+                    </xsl:variable>
+                    <xsl:copy-of select="$system_cache__dita__x3A__svg:transform.cursor"/>
+                    <!--<svg:line debug="svgu:yAxis.174"
+                            x1="-18"
+                            y1="69000"
+                            x2="-530"
+                            y2="9000"
+                            transform.validate.y1="6.99"
+                            transform.validate.y2="106.99000000000001"
+                            style="stroke-width:5;stroke:red;vector-effect:non-scaling-stroke"/>-->
+                    <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="$maxY"/>
+                        <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="svgu:yAxis.174 1ds={1 div $scaleY}
+                        sc={$scaleY}" 
+                        x1="{666}"
+                        y1="{$minY}"
+                        x2="{666}" 
+                        y2="{$maxY}"><!-- X1-$majorLeftExtent  X2=-$majorLeftExtent -->
+                        <!--XXX<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"/>; 
+                        $majorTicks=<xsl:value-of select="$majorTicks"/> * $minorTicks=<xsl:value-of select="$minorTicks"/> + 1
+                            $$xMajor2== $majorRightExtent=<xsl:value-of select="$majorRightExtent"/>;
+                        </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="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:call-template>-->
+                </svg:g>
                 
-                <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="$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:when>
+            <xsl:otherwise>
+                <xsl:comment>#254 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:comment>
+                <xsl:message>#254 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.basic">
+                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.minX" select="$system_cache__dita__x3A__svg:data.x1.bounds.min.coordinate"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetX.maxX" select="$system_cache__dita__x3A__svg:data.x2.bounds.max.coordinate"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.maxY" select="100"/>
+                        <xsl:with-param name="system_cache__dita__x3A__svg:offsetY.minY" select="0"/>
+                        <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: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:offsetX.width" select="10"/>
+                        <!--<xsl:with-param name="system_cache__dita__x3A__svg:offsetY" select="$offsetY"/>-->
                         
-                        <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="$min"/>; $majorTicks=<xsl:value-of select="$majorTicks"/> * $minorTicks=<xsl:value-of select="$minorTicks"/> + 1
-                $$xMajor2== $majorRightExtent=<xsl:value-of select="$majorRightExtent"/>;
-            </xsl:comment>
-            <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>
-        </svg:g>
+                </TEST_APPEND_335>
+            </xsl:otherwise>
+        </xsl:choose>
+        
         
     </xsl:template>
     
@@ -508,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" >
@@ -632,150 +757,11 @@
     
     
     
-    <xsl:template name="system_cache__dita__x3A__svg:transform.translate.basic">
-      
-        <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:offsetX.width" />
-        
-        <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:offsetY.height" />
-        <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"/>-->
-        
-        
-        
-        <!-- 
-         if maxX=100 and minX=50 - range==100-50==50 , $xscale==100 div $range== 100/50==2
-            if X==50 - transf by scale = 50*2 = 100, but should be in bottom left so
-                calculate =50*2 - $?max=100? == 100 - 100 = 0 - OK
-                
-                $scale==$width div $range == 600 div 50 = 12
-                50*12=600 should be min ==0 if -600 
-                100*12==1200 - should be amx==600
-                
-                minX=20 == range==100-20==80  xcale==600 div 80 = 7,5
-                 test 20 * 7.5= 150 - 150 = 0
-                 test 100 * 7.5 = 750 - 150 ==600 max - correct
-                    we should minus offset $min * $scale
-                    
-                    test scale 250, max500 min=1 max=3  $min*scale==1*250==250
-                      1*250==250 - 250 ==0 
-                 test min==0 range==3-0==3  scale==600 div 3 = 200 ; off
-                 if 0 *259==0 - OK
-                 if 1 *250=250 ?
-                 if 3 *250=750 - 
-                    if *max * scale -??X?? = $widb
-                    max * scake - $width = XXX
-                    ( 3 * 200 ) 750 - $widgh - 600 = 150
-                    test if x0 0*250==0 - 150 = -150 - blad
-                    test if x3 3*250=750 - 150=600 
-                    
-                    min * scale
-                    
-                    0x200==0 ok
-                    3x200==600 ok
-                    
-                    range 2-3 ==3-2==1  scale==600 div 1== 600 div 1 ==600
-                    
-                    test id 2*200 == 400 (should be zero?) ==-400
-                    test id 3*200 == 600 (should be 600 - OK)
-                    
-                    if X-width * scale ? (min * scale == 400) (max * scale)==600 - 400-600==200 ? test if
-                    if 2-min=2 == 0 * scale = 0
-                    if 3-min=2 ==1 * scale 600 = 600 OK
-                    result odejmijod X minX i pomnoz przez scale
-                    
-         - so no other params ara needed
-        -->
-         
-        <xsl:attribute name="transform">
-        
-        
-            <xsl:choose>
-                <xsl:when test="$system_cache__dita__x3A__svg:cursor.current.Y">
-                    <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.offset(0, $system_cache__dita__x3A__svg:cursor.current.Y)"/>
-                </xsl:when>
-            </xsl:choose>
-            
-            <xsl:choose>
-                <xsl:when test="$system_cache__dita__x3A__svg:offsetX.width ">
-                    <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:offsetX.width 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: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:offsetX.minX,0)"/>
-                    
-                </xsl:when>
-            </xsl:choose>
-            
-            
-            
-            <xsl:choose>
-                <xsl:when test="$system_cache__dita__x3A__svg:offsetY.height">
-                    <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:offsetY.height 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:value-of select="system_cache__dita__x3A__svg:transform.translate.major.offset(0,$system_cache__dita__x3A__svg:offsetY.height)"/>
-                    
-                    <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.scale_positive(1,- $Yscale)"/>
-                    
-                    <xsl:value-of select="system_cache__dita__x3A__svg:transform.translate.major.offset(0,- $system_cache__dita__x3A__svg:offsetY.minY)"/>
-                    
-                </xsl:when>
-            </xsl:choose>
-            
-            
-            
-        </xsl:attribute>
-    </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:function>
-    
-    <xsl:function name="system_cache__dita__x3A__svg:transform.translate.major.scale.initial">
-        <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:function>
     
-    <xsl:function name="system_cache__dita__x3A__svg:transform.translate.major.scale">
-        <!--<xsl:param name="xscale"/>-->
-        <xsl:param name="yscale"/>
-        <xsl:text> scale(</xsl:text><xsl:value-of select="1"/><xsl:text>,</xsl:text><xsl:value-of select="- $yscale"/><xsl:text>) </xsl:text>
-    </xsl:function>
     
-    <xsl:function name="system_cache__dita__x3A__svg:transform.translate.major.scale">
-        <!--<xsl:param name="xscale"/>-->
-        <xsl:param name="xscale"/>
-        <xsl:param name="yscale"/>
-        <xsl:text> scale(</xsl:text><xsl:value-of select="$xscale"/><xsl:text>,</xsl:text><xsl:value-of select="- $yscale"/><xsl:text>) </xsl:text>
-    </xsl:function>
-    
-    <xsl:function name="system_cache__dita__x3A__svg:transform.translate.major.scale_positive">
-        <!--<xsl:param name="xscale"/>-->
-        <xsl:param name="xscale"/>
-        <xsl:param name="yscale"/>
-        <xsl:text> scale(</xsl:text><xsl:value-of select="$xscale"/><xsl:text>,</xsl:text><xsl:value-of select="$yscale"/><xsl:text>) </xsl:text>
-    </xsl:function>
-    
-    <xsl:function name="system_cache__dita__x3A__svg:transform.translate.major.scale.final">
-        <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:function>
     
     
+   
     
     <xsl:template name="system_cache__dita__x3A__svg:style">
         <xsl:param name="text-anchor.middle"/>

部分文件因为文件数量过多而无法显示