a.binder hace 7 años
padre
commit
b16301bce7
Se han modificado 19 ficheros con 760 adiciones y 252 borrados
  1. 1 1
      SE/schema/WPS_Functions/bocian-graph-to-html/bcgtht.tree_to_dita.xsl
  2. 55 50
      SE/schema/default_db_xml_cache.public/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.universal.xsl
  3. 215 38
      SE/schema/default_db_xml_cache.public/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_4UA.xsl
  4. 118 0
      SE/schema/default_db_xml_cache.public/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_context.path.keyrefs.xsl
  5. 19 8
      SE/schema/default_db_xml_cache.public/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_context.path.xsl
  6. 4 3
      SE/schema/default_db_xml_cache.public/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row.xsl
  7. 13 1
      SE/schema/default_db_xml_cache.public/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_LISTA.xsl
  8. 49 15
      SE/schema/default_db_xml_cache.public/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_tree_to_dita.xsl
  9. 96 15
      SE/schema/default_db_xml_cache.public/default_db/Linear_regression/Linear_regression.xsl
  10. 3 1
      SE/schema/default_db_xml_cache.public/default_db/dateTime.xsl
  11. 73 23
      SE/schema/default_db_xml_cache.public/default_db/graph_gnuplot/graph_gnuplot.simpletable__x3A__from_rows__x3A__analyze.xsl
  12. 62 64
      SE/schema/default_db_xml_cache.public/default_db/graph_gnuplot/graph_gnuplot.simpletable__x3A__graph.stats.xsl
  13. 23 13
      SE/schema/default_db_xml_cache.public/default_db/graph_gnuplot/graph_gnuplot.simpletable__x3A__graph.stats__x3A__analyze.xsl
  14. 7 3
      SE/schema/default_db_xml_cache.public/default_db/graph_gnuplot/graph_gnuplot.xsl
  15. 15 1
      SE/schema/default_db_xml_cache.public/default_db/graph_gnuplot/graph_gnuplotdat.row__x3A__from__xtics__x3A__detect.xsl
  16. 2 1
      SE/schema/default_db_xml_cache.public/default_db/graph_gnuplot/graph_gnuplotdat.row__x3A__from__xtics__x3A__set.xsl
  17. 2 0
      SE/schema/default_db_xml_cache.public/default_db/tree_to_dita.localname.translate.xsl
  18. 2 0
      SE/schema/default_db_xml_cache.public/default_db/tree_to_dita__x3A__to_merge.xsl
  19. 1 15
      se.oxygen.xpr

+ 1 - 1
SE/schema/WPS_Functions/bocian-graph-to-html/bcgtht.tree_to_dita.xsl

@@ -621,7 +621,7 @@ plot "<xsl:value-of select="$fileindex"/>.gnuplot.dat" using 2:xtic(1) with boxe
       </xsl:choose>
    </xsl:function>
    
-   <xsl:template match="relation_from|BI_audit_MSIG_person[preceding-sibling::* and following-sibling::*][preceding-sibling::* and following-sibling::*]|BI_audit_KRS_person[ preceding-sibling::* and following-sibling::* ]|BI_audit_MSIG_company|BI_audit_KRS_company|BI_audit_taxpayer|TERYT_adresy|BI_audit_MSIG_address|BI_audit_KRS_address" mode="bocian-graph-2-html.preprocess.names" priority="5"/>
+   <xsl:template match="relation_DateRangeElements|relation_from|BI_audit_MSIG_person[preceding-sibling::* and following-sibling::*][preceding-sibling::* and following-sibling::*]|BI_audit_KRS_person[ preceding-sibling::* and following-sibling::* ]|BI_audit_MSIG_company|BI_audit_KRS_company|BI_audit_taxpayer|TERYT_adresy|BI_audit_MSIG_address|BI_audit_KRS_address" mode="bocian-graph-2-html.preprocess.names" priority="5"/>
    
    <xsl:template mode="bocian-graph-2-html.preprocess.names" match="ID|imiona|nazwisko|Pelna_nazwa_kontrahenta|nazwa"> <!-- |*[not(*)] -->
       <xsl:element name="default_db__x3A__{parent::*/local-name()}:{local-name()}" namespace="https://biuro.biall-net.pl/wfs/default_db/{local-name()}">

+ 55 - 50
SE/schema/default_db_xml_cache.public/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.universal.xsl

@@ -199,6 +199,28 @@
                                                     <xsl:with-param name="mode" select="$mode" tunnel="yes"/>
                                                 </xsl:apply-templates>
                                             </xsl:when>
+                                            <xsl:when test="$mode = 'system_cache__dita:ANALIZA_KORELACJI_UKR'">
+                                                <xsl:message>#290 debug mode <xsl:value-of select="$mode"/>; </xsl:message>
+                                                <xsl:apply-templates mode="system_cache__dita:ANALIZA_UMOW_4UA_preprocess" select="." >
+                                                    <xsl:with-param name="group_name" select="$group_name"/>
+                                                    <xsl:with-param name="position" select="position()"/>
+                                                    <xsl:with-param name="resulset" select="$resulset"/>
+                                                    <xsl:with-param name="title" select="concat($title,$source)"/>
+                                                    <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:valueField"    select="$default_db__x3A__BI_audit_BENFORD:valueField" />
+                                                    <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:groupField"     select="$default_db__x3A__BI_audit_BENFORD:groupField"/>
+                                                    <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:timeField"   select="$default_db__x3A__BI_audit_BENFORD:timeField" />
+                                                    <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:AddressField" select="$default_db__x3A__BI_audit_BENFORD:AddressField" />
+                                                    <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:PeselField" select="$default_db__x3A__BI_audit_BENFORD:PeselField"  />
+                                                    <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:TaxIdField"  select="$default_db__x3A__BI_audit_BENFORD:TaxIdField" />
+                                                    <xsl:with-param name="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.fixed" select="$system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.fixed"/>
+                                                    <xsl:with-param name="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.uniq" select="$system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.uniq"/>
+                                                    <xsl:with-param name="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.fixed.current" select="$system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.fixed//fixed[@generate-id=current()/@generate-id][1]"/>
+                                                    <xsl:with-param name="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.uniq.current" select="$system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.uniq//uniq[@generate-id=current()/@generate-id][1]"/>
+                                                    <xsl:with-param name="interested_row" select="$interested_row"/>
+                                                    <xsl:with-param name="source" select="$source"/>
+                                                    <xsl:with-param name="mode" select="$mode" tunnel="yes"/>
+                                                </xsl:apply-templates>
+                                            </xsl:when>
                                             
                                             <xsl:when test="$mode = 'BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_LISTA'">
                                                     
@@ -675,7 +697,7 @@
         <xsl:choose>
             <xsl:when test="TERYT_names/*">
                 <xsl:for-each select="TERYT_names">
-                    <xsl:element name="{$system_cache__dita:paragraph_allowed_element__x3A__calculated}">
+                    <xsl:element name="ph">
                     
                         <ph>
                         <xsl:choose>
@@ -699,18 +721,11 @@
         </xsl:choose>
         <xsl:choose>
             <xsl:when test="BI_audit_taxpayer   or $context/BI_audit_taxpayer">
-                <xsl:element name="{$system_cache__dita:paragraph_allowed_element__x3A__calculated}">
+                <p>
+                    <ph>Status VAT: <b><xsl:value-of select="BI_audit_taxpayer/taxpayer_status_info"/></b></ph> 
+                    <ph>stan na dzień: <b><xsl:value-of select="BI_audit_taxpayer/taxpayer_status_date"/></b> </ph>
+                </p>
                 
-                   
-                                <ph>Status VAT:</ph>
-                            
-                    <ph><b><xsl:value-of select="BI_audit_taxpayer/taxpayer_status_info"/></b></ph>
-                          
-                                <ph>(stan na dzień</ph>
-                           
-                                <ph><xsl:value-of select="BI_audit_taxpayer/taxpayer_status_date"/>)</ph>
-                         
-                </xsl:element>
             </xsl:when>
         </xsl:choose>
         
@@ -752,44 +767,32 @@
                                 
                                     
                                 
-                                <dl>
-                                    <dlentry>
-                                    <dt/>
-                                        
-                                        <dt>Relacja w czasie</dt>
-                                        
-                                        <xsl:for-each select="relation_DateRangeElements">
-                                            <xsl:choose>
-                                                <xsl:when test="@leadingTimeDate-From">
-                                                    <dd>
-                                                        od dnia <xsl:value-of select="@leadingTimeDate-From"/>
-                                                    </dd>
-                                                </xsl:when>
-                                            </xsl:choose>
+                                <p>
+                                    <ph>Relacja w czasie: </ph>
+                                </p>
+                                
+                                <xsl:for-each select="relation_DateRangeElements">
+                                    <p>
+                                    <xsl:choose>
+                                        <xsl:when test="@leadingTimeDate-From">
+                                            <ph> od dnia: <b><xsl:value-of select="@leadingTimeDate-From"/></b> </ph>
+                                        </xsl:when>
+                                    </xsl:choose>
+                                    <xsl:choose>
+                                        <xsl:when test="@leadingTimeDate-To">
                                             <xsl:choose>
-                                                <xsl:when test="@leadingTimeDate-To">
-                                                    <xsl:choose>
-                                                        <xsl:when test="string-length(@leadingTimeDate-To) &gt;0">
-                                                            <dd>
-                                                                do <xsl:value-of select="@leadingTimeDate-To"/>
-                                                            </dd>
-                                                        </xsl:when>
-                                                        <xsl:otherwise>
-                                                            <dd>
-                                                                n. określ.
-                                                            </dd>
-                                                        </xsl:otherwise>
-                                                    </xsl:choose>
-                                                    
-                                                    
-                                                    
+                                                <xsl:when test="string-length(@leadingTimeDate-To) &gt;0">
+                                                    <ph> do: <b><xsl:value-of select="@leadingTimeDate-To"/></b></ph>
                                                 </xsl:when>
+                                                <xsl:otherwise>
+                                                    <ph> do: <b> n. określ. </b></ph>  
+                                                </xsl:otherwise>
                                             </xsl:choose>
-                                        </xsl:for-each>
-                                        
-                                                
-                                    </dlentry>
-                                </dl>
+                                            
+                                        </xsl:when>
+                                    </xsl:choose>
+                                    </p>
+                                </xsl:for-each>
                                 
                                 
                             </xsl:when>
@@ -850,9 +853,11 @@
                                 <xsl:when test="count(parent::*//*[last()]/*[1]/*) &gt; 5">
                                     <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__resolve__conkey">
                                         <xsl:with-param name="fid" select="parent::*//*[last()]/*[1]/@fid"/>
-                                        <xsl:with-param name="system_cache__dita:element__x3A__name">image</xsl:with-param>
-                                        <xsl:with-param name="title">APU4_umowy</xsl:with-param>
-                                        <xsl:with-param name="graph.name">APU4-DPW</xsl:with-param>
+                                        <xsl:with-param name="system_cache__dita:element__x3A__name" select="'image'"/>
+                                        <xsl:with-param name="title" select="'APU4_umowy'"/>
+                                        <!--<xsl:with-param name="graph.name" select="'APU4-DPW'"/>-->
+                                        <xsl:with-param name="graph.name" select="'APU4-DKW'"/>
+                                        <xsl:with-param name="get_wfs:name_from_fid" select="''"/>
                                     </xsl:call-template>
                                 </xsl:when>
                                 <xsl:otherwise>

+ 215 - 38
SE/schema/default_db_xml_cache.public/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_4UA.xsl

@@ -44,6 +44,7 @@
         <xsl:variable name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset">
             <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.attrs__x3A__to_nodeset">
                 <xsl:with-param name="system_cache__dita:interested_row" select="$interested_row"/>
+                <xsl:with-param name="system_cache__dita:interested_row.noattrrs__x3A__include" select="true()"/>
                 <xsl:with-param name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.attrs" select="$system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.fixed.current/@default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs"/><!-- $system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.uniq.current -->
             </xsl:call-template>
         </xsl:variable>
@@ -63,7 +64,7 @@
         <xsl:call-template name="system_cache__dita:ANALIZA_UMOW_4UA.graph">
             <xsl:with-param name="fid" select="@fid"/>                                                                           
             <xsl:with-param name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset" select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset"/>
-            <xsl:with-param name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.childs.attrs.nodeset" select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.childs.attrs.nodeset"/>
+            <!--<xsl:with-param name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.childs.attrs.nodeset" select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.childs.attrs.nodeset"/>-->
             <xsl:with-param name="title" select="$title"/>
         </xsl:call-template>
         <xsl:call-template name="system_cache__dita:ANALIZA_UMOW_4UA.graph.deals">
@@ -112,6 +113,7 @@
                 <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__assign__key">
                     <xsl:with-param name="fid" select="@fid"/>
                     <xsl:with-param name="title" select="$title"/>
+                    <xsl:with-param name="get_wfs:name_from_fid" select="''"/>
                 </xsl:call-template>
                 <xsl:result-document href="{system_cache__dita:files.key.href.write.topic.title.context(current(),$title)}"> <!--XX  href="{$temp}/{$uuid}/{system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.DETECT.key(@fid,'','',$position)}.dita -->
                     
@@ -137,6 +139,7 @@
                             <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.attrs__x3A__to_nodeset">
                                 <xsl:with-param name="system_cache__dita:interested_row" select="$interested_row"/>
                                 <xsl:with-param name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.attrs" select="$system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.fixed.current/@default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs"/><!-- $system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.uniq.current -->
+                                <xsl:with-param name="system_cache__dita:interested_row.noattrrs__x3A__include" select="true()"/>
                             </xsl:call-template>
                         </xsl:variable>
                         
@@ -164,8 +167,15 @@
                         
                         <body>
                             <p>
+                                <foreign props="firt">
+                                    <!--<xsl:copy-of select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset"></xsl:copy-of>-->
+                                </foreign>
                                 <foreign>
-                                    <xsl:value-of select="$system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.fixed.current/@default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.parent.attrs"/>
+                                    @@default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.parent.attrs = <xsl:value-of select="$system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.fixed.current/@default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.parent.attrs"/>
+                                    parent::/@fid = <xsl:value-of select="parent::*/@fid"/> count(curr_gr)=<xsl:value-of select="count(current-group())"/>
+                                    parent::*/*[position()=1]/@fid = <xsl:value-of select="parent::*/*[position()=1]/@fid"/>
+                                    @@default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.end.attrs <xsl:value-of select="$system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.fixed.current/@default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.end.attrs"/>
+                                    @@default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs - <xsl:value-of select="$system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.fixed.current/@default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs"/>
                                 </foreign>
                                 
                             
@@ -178,9 +188,14 @@
                                             </dlentry>
                                         
                                         <dlentry props="do_200">
+                                            <dt/>
                                             <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__resolve__key">
-                                                <xsl:with-param name="fid" select="$system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.fixed.current/@default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs"/>
+                                                <!--<xsl:with-param name="fid" select="$system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.fixed.current/@default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs"/>-->
+                                                <xsl:with-param name="fid" select="$system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.fixed.current/@default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs"/><!-- parent::*/*[position()=1]/@fid -->
+                                                <!--<xsl:with-param name="end_fid" select="@fid"/>-->
+                                                <xsl:with-param name="title">BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_LISTA</xsl:with-param>
                                                 <xsl:with-param name="link__x3A__title">kontekst od</xsl:with-param>
+                                                <xsl:with-param name="get_wfs:name_from_fid" select="''"/>
                                                 <xsl:with-param name="system_cache__dita:element__x3A__surrounding">dd</xsl:with-param>
                                                 <xsl:with-param name="system_cache__dita:element__x3A__surrounding.title">dt</xsl:with-param>
                                             </xsl:call-template>
@@ -191,7 +206,7 @@
                                     
                                 
                                         
-                                
+                                <xsl:comment>#2299</xsl:comment>
                                 
                                  
                                 <xsl:choose>
@@ -232,18 +247,16 @@
                             
                             
                             
-                            
-                            
                                         <xsl:choose>
                                             <xsl:when test="string-length($system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.fixed.current/@default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs)&gt;0">
                                                 <xsl:comment>#181 bypassed by string-length($system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.fixed.current/@default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs) gt; 0</xsl:comment>
                                             </xsl:when>
                                             <xsl:otherwise>
-                                                <p>
+                                                <p props="analiza_255">
                                                 <xsl:call-template name="system_cache__dita:ANALIZA_UMOW_4UA.graph">
                                                     <xsl:with-param name="fid" select="@fid"/>                                                                           
                                                     <xsl:with-param name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset" select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset"/>
-                                                    <xsl:with-param name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.childs.attrs.nodeset" select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.childs.attrs.nodeset"/>
+                                                    <!--<xsl:with-param name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.childs.attrs.nodeset" select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.childs.attrs.nodeset"/>-->
                                                     <xsl:with-param name="title" select="$title"/>
                                                 </xsl:call-template>
                                                 </p>
@@ -345,7 +358,7 @@
     <xsl:template name="system_cache__dita:ANALIZA_UMOW_4UA.graph" >
         <xsl:param name="fid" select="@fid"/>
         <xsl:param name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset" required="yes"/>
-        <xsl:param name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.childs.attrs.nodeset" required="yes"/>
+        <!--<xsl:param name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.childs.attrs.nodeset" required="yes"/>-->
         <xsl:param name="title" required="yes"/>
         <xsl:param name="graph.name" select="'APU4-P'"/>
         <!--<strow>
@@ -361,40 +374,50 @@
                     <xsl:with-param name="title" select="$title"/>
                 </xsl:call-template>
                 <strow props="graph.headers">
-                    <xsl:for-each-group select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset//*" group-by="@fid">
-                        <stentry current-grouping-key="{@fid}" props="graph.xtic" audience="powiazania"><xsl:copy-of select="string-join(*[@default_db__x3A__BI_audit_BENFORD:NameField]/text(),' ')"></xsl:copy-of></stentry><!--<xsl:value-of select="position()"/>-->
-                        <stentry current-grouping-key="{@fid}" props="graph.xtic" audience="powiazania"><xsl:copy-of select="string-join(*[@default_db__x3A__BI_audit_BENFORD:NameField]/text(),' ')"></xsl:copy-of><xsl:value-of select="nazwa"/></stentry><!--<xsl:value-of select="position()"/>--> 
+                    <xsl:for-each-group select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset/*/*" group-by="@fid">
+                        <xsl:for-each-group select="current-group()" group-by="@fid"><!-- $default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset//* -->
+                            <stentry current-grouping-key="{@fid}" props="graph.xtic" audience="powiazania"><xsl:copy-of select="string-join(*[@default_db__x3A__BI_audit_BENFORD:NameField]/text(),' ')"></xsl:copy-of></stentry><!--<xsl:value-of select="position()"/>-->
+                            <!--<stentry current-grouping-key="{@fid}"  audience="powiazania"><xsl:copy-of select="string-join(*[@default_db__x3A__BI_audit_BENFORD:NameField]/text(),' ')"></xsl:copy-of><xsl:value-of select="nazwa"/></stentry>--><!--<xsl:value-of select="position()"/>--> 
+                        </xsl:for-each-group>
                     </xsl:for-each-group>
                 </strow>
                 <strow props="graph.data">
-                    <xsl:for-each-group select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset//*" group-by="@fid">
-                        <stentry current-grouping-key="{@fid}"><xsl:value-of select="count(current-group())"/></stentry>
-                        <stentry current-grouping-key="{@fid}"><xsl:value-of select="min(current-group()/number(@default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.attrs__x3A__to_nodeset.precedings.count.parent.following))"/></stentry>
+                    <xsl:for-each-group select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset/*/*" group-by="@fid">
+                        <xsl:for-each-group select="current-group()" group-by="@fid">
+                            <stentry current-grouping-key="{@fid}"><xsl:value-of select="count(current-group())"/></stentry>
+                            <!--<stentry current-grouping-key="{@fid}"><xsl:value-of select="min(current-group()/number(@default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.attrs__x3A__to_nodeset.precedings.count.parent.following))"/></stentry>-->
+                        </xsl:for-each-group>
                     </xsl:for-each-group>
-                    
                 </strow>
                 
                 <!--<xsl:call-template name="p5gnuplot:simpletable__x3A__graph.stats">
                     <xsl:with-param name="system_cache__dita:context.path.attrs.nodeset" select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset"/>
-                    <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:FieldType" select="'default_db__x3A__BI_audit_BENFORD:NameField'"/>
-                    <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:ValueType" select="'default_db__x3A__BI_audit_BENFORD:NameField'"/>
-                    <xsl:with-param name="p5gnuplot:simpletable__x3A__graph.stats.group_by" select="'fid'"/>
-                    <xsl:with-param name="audience">powiazania</xsl:with-param>
-                    <!-\-<xsl:with-param name="group.root">koszt.</xsl:with-param>-\->
-                    <xsl:with-param name="group.count">iloscB.</xsl:with-param>
-                    <xsl:with-param name="group.sum">kosztB.</xsl:with-param>
+                    <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:FieldType" select="'@fid'"/>
+                    <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:ValueType" select="'default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.attrs__x3A__to_nodeset.precedings.count.parent.all'"/>
+                    <xsl:with-param name="p5gnuplot:simpletable__x3A__graph.stats.group_by.root" select="'fid'"/>
+                    <xsl:with-param name="p5gnuplot:simpletable__x3A__graph.stats.group_by" select="'default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.attrs__x3A__to_nodeset.precedings.count.parent.all'"/>
+                    <xsl:with-param name="audience">ilość</xsl:with-param>
+                    <!-\-<xsl:with-param name="group.root" select="1"/>-\->
+                    <!-\-<xsl:with-param name="group.count" select="1"/>-\->
+                    <!-\-<xsl:with-param name="group.count__x3A__path__x3A__length" select="1"/>-\->
+                    <!-\-<xsl:with-param name="group.sum">kosztB.</xsl:with-param>-\->
+                    
                 </xsl:call-template>-->
                 
                 <strow props="graph.title">
-                    <xsl:for-each-group select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset//*" group-by="@fid">
+                    <xsl:for-each-group select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset/*/*" group-by="@fid">
+                    <xsl:for-each-group select="current-group()" group-by="@fid">
                         <stentry current-grouping-key="{@fid}" audience="powiazania">ilość powiązań</stentry>
-                        <stentry current-grouping-key="{@fid}" audience="powiazania">minimalna dł. ścieżki</stentry>
+                        <!--<stentry current-grouping-key="{@fid}" audience="powiazania">minimalna dł. ścieżki</stentry>-->
+                    </xsl:for-each-group>
                     </xsl:for-each-group>
                 </strow>
                 <strow props="graph.color.name">
-                    <xsl:for-each-group select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset//*" group-by="@fid">
+                    <xsl:for-each-group select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset/*/*" group-by="@fid">
+                    <xsl:for-each-group select="current-group()" group-by="@fid">
                         <stentry current-grouping-key="{@fid}">brown</stentry>
-                        <stentry current-grouping-key="{@fid}">orange</stentry>
+                        <!--<stentry current-grouping-key="{@fid}">orange</stentry>-->
+                    </xsl:for-each-group>
                     </xsl:for-each-group>
                 </strow>
                 <!--<strow props="graph.color.variable">
@@ -404,21 +427,27 @@
                     </xsl:for-each-group>
                 </strow>-->
                 <strow props="graph.yaxis">
-                    <xsl:for-each-group select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset//*" group-by="@fid">
-                        <stentry current-grouping-key="{@fid}"/>
-                        <stentry current-grouping-key="{@fid}">2</stentry>
+                    <xsl:for-each-group select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset/*/*" group-by="@fid">
+                        <xsl:for-each-group select="current-group()" group-by="@fid">
+                            <stentry current-grouping-key="{@fid}"/>
+                            <!--<stentry current-grouping-key="{@fid}">2</stentry>-->
+                        </xsl:for-each-group>
                     </xsl:for-each-group>
                 </strow>
                 <strow props="graph.fill.style">
-                    <xsl:for-each-group select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset//*" group-by="@fid">
+                    <xsl:for-each-group select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset/*/*" group-by="@fid">
+                    <xsl:for-each-group select="current-group()" group-by="@fid">
                         <stentry current-grouping-key="{@fid}"> lw 2 </stentry>
-                        <stentry current-grouping-key="{@fid}"/>
+                        <!--<stentry current-grouping-key="{@fid}"/>-->
+                    </xsl:for-each-group>
                     </xsl:for-each-group>
                 </strow>
                 <strow props="graph.newhistogram">
-                    <xsl:for-each-group select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset//*" group-by="@fid">
+                    <xsl:for-each-group select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset/*/*" group-by="@fid">
+                    <xsl:for-each-group select="current-group()" group-by="@fid">
                         <stentry audience="powiazania" current-grouping-key="{@fid}"> powiązania </stentry>
                     </xsl:for-each-group>
+                    </xsl:for-each-group>
                 </strow>
             </simpletable>
             </SIMPLETABLE_WTITLE>
@@ -674,6 +703,7 @@
         <xsl:param name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.childs.attrs.nodeset" required="yes"/>
         <xsl:param name="title" required="yes"/>
         <xsl:param name="default_db__x3A__BI_audit_BENFORD:FieldType" select="'default_db__x3A__BI_audit_BENFORD:leadingTimeYear-quarter'"/>
+        <xsl:param name="default_db__x3A__BI_audit_BENFORD:ValueType">default_db__x3A__BI_audit_BENFORD:leadingNumber</xsl:param>
         <xsl:param name="graph.name" select="'APU4-DKW'"/>
         <!--<strow>
             <xsl:copy-of select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.begin.attrs.nodeset"/>
@@ -710,12 +740,23 @@
                             <!--<xsl:for-each-group select="current-group()" group-by="@default_db__x3A__BI_audit_BENFORD:leadingNumber">-->
                                 <!--<xsl:sort select="number(@default_db__x3A__BI_audit_BENFORD:leadingNumber)" data-type="number" order="ascending"/>-->
                                 <stentry current-grouping-key="{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}"  audience="rozklad_{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}"><xsl:value-of select="count(current-group())"/></stentry>
-                                <stentry current-grouping-key="{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}"  audience="rozklad_{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}"><xsl:value-of select="sum(current-group()/*[$default_db__x3A__BI_audit_BENFORD:FieldType]/number())"/></stentry>
+                            <stentry current-grouping-key="{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}"  audience="rozklad_{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}"><xsl:value-of select="sum(current-group()/*[@*[name()=$default_db__x3A__BI_audit_BENFORD:ValueType]]/number())"/></stentry>
                             <!--</xsl:for-each-group>-->
                         </xsl:for-each-group>
                         
                     </strow>
                     
+                    <xsl:call-template name="p5gnuplot:simpletable__x3A__graph.stats">
+                        <xsl:with-param name="system_cache__dita:context.path.attrs.nodeset" select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.childs.attrs.nodeset"/>
+                        <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:FieldType" select="$default_db__x3A__BI_audit_BENFORD:FieldType"/>
+                        <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:ValueType" select="$default_db__x3A__BI_audit_BENFORD:ValueType"/>
+                        <xsl:with-param name="p5gnuplot:simpletable__x3A__graph.stats.group_by.root" select="$default_db__x3A__BI_audit_BENFORD:FieldType"/>
+                        <xsl:with-param name="p5gnuplot:simpletable__x3A__graph.stats.group_by" select="$default_db__x3A__BI_audit_BENFORD:FieldType"/>
+                        <xsl:with-param name="audience">rozklad</xsl:with-param>
+                        <!--<xsl:with-param name="group.root">koszt.</xsl:with-param>-->
+                        <xsl:with-param name="group.count">iloscB.</xsl:with-param>
+                        <xsl:with-param name="group.sum">kosztB.</xsl:with-param>
+                    </xsl:call-template>
                     
                    
                     
@@ -820,6 +861,11 @@
                         <xsl:with-param name="path.prefix">../</xsl:with-param>
                     </xsl:apply-templates>
                 <!--</p>-->
+                <!-- ANALIZA WYKRESOW -->
+                <xsl:call-template name="p5gnuplot:simpletable__x3A__from_rows.xsl.dita__x3A__analyze">
+                    <xsl:with-param name="fileindex" select="$simpletable/simpletable/@id"/>
+                </xsl:call-template>
+                
             </xsl:when>
             <xsl:otherwise>
                 <!--<p props="214a">
@@ -868,11 +914,11 @@
                             <xsl:sort select="@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]" order="ascending"/>
                             <!--<stentry audience="rozklad_{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}" current-grouping-key="{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}" ><xsl:value-of select="count(current-group())"/></stentry>-->
                             <xsl:variable name="current-group.parent.count" select="count(current-group())"/>
-                            <stentry audience="rozklad_{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}" current-grouping-key="{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}" ><xsl:call-template name="default_db__x3A__BI_audit_BENFORD:generate__x3A__copy_attrs"/><xsl:value-of select="sum(current-group()/*[@default_db__x3A__BI_audit_BENFORD:leadingNumber]/number())"/></stentry>
+                            <stentry audience="rozklad_{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}" current-grouping-key="{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}" ><xsl:call-template name="default_db__x3A__BI_audit_BENFORD:generate__x3A__copy_attrs"/><xsl:value-of select="sum(current-group()/*[@*[name()=$default_db__x3A__BI_audit_BENFORD:ValueType]]/number())"/></stentry>
                             <xsl:for-each-group select="current-group()" group-by="@default_db__x3A__BI_audit_BENFORD:leadingNumber">
                                 <xsl:sort select="number(@default_db__x3A__BI_audit_BENFORD:leadingNumber)" data-type="number" order="ascending"/>
                                 <stentry current-grouping-key="{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}"  audience="rozklad_{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}"><xsl:call-template name="default_db__x3A__BI_audit_BENFORD:generate__x3A__copy_attrs"/><xsl:value-of select="count(current-group()) "/></stentry><!-- div $current-group.parent.count -->
-                                <stentry current-grouping-key="{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}"  audience="rozklad_{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}"><xsl:call-template name="default_db__x3A__BI_audit_BENFORD:generate__x3A__copy_attrs"/><xsl:value-of select="sum(current-group()/*[@default_db__x3A__BI_audit_BENFORD:leadingNumber]/number())"/></stentry>
+                                <stentry current-grouping-key="{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}"  audience="rozklad_{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}"><xsl:call-template name="default_db__x3A__BI_audit_BENFORD:generate__x3A__copy_attrs"/><xsl:value-of select="sum(current-group()/*[@*[name()=$default_db__x3A__BI_audit_BENFORD:ValueType]]/number())"/></stentry>
                             </xsl:for-each-group>
                         </xsl:for-each-group>
                     </strow>
@@ -881,6 +927,8 @@
                         <xsl:with-param name="system_cache__dita:context.path.attrs.nodeset" select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.related.childs.attrs.nodeset"/>
                         <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:FieldType" select="$default_db__x3A__BI_audit_BENFORD:FieldType"/>
                         <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:ValueType" select="$default_db__x3A__BI_audit_BENFORD:ValueType"/>
+                        <xsl:with-param name="p5gnuplot:simpletable__x3A__graph.stats.group_by.root" select="$default_db__x3A__BI_audit_BENFORD:FieldType"/>
+                        <xsl:with-param name="p5gnuplot:simpletable__x3A__graph.stats.group_by" select="$default_db__x3A__BI_audit_BENFORD:ValueType"/>
                         <xsl:with-param name="audience">rozklad</xsl:with-param>
                         <xsl:with-param name="group.root">koszt.</xsl:with-param>
                         <xsl:with-param name="group.count">iloscB.</xsl:with-param>
@@ -1032,9 +1080,138 @@
         <xsl:param name="title"/>
         <title><parmname><xsl:value-of select="replace($title,'_',' ')"/></parmname>
             <!--<xsl:apply-templates mode="system_cache__dita:ANALIZA_UMOW_4UA.title" select="."/>-->
-            <xsl:apply-templates mode="system_cache__dita:ANALIZA_UMOW_4UA.title" />
+            <!--<xsl:apply-templates mode="system_cache__dita:ANALIZA_UMOW_4UA.title" />-->
+            
+            <xsl:choose>
+                <xsl:when test="Numer_kontrahenta/text()|ID/text()|source/text()|jednostka_organizacyjna/text()">
+                    <!--<sup>-->
+                    <ph>
+                        <xsl:if test="Numer_kontrahenta/text()"> nr kontr: <b><xsl:value-of select="Numer_kontrahenta"/></b></xsl:if>
+                        <xsl:if test="jednostka_organizacyjna/text()"> nr kontr: <b><xsl:value-of select="jednostka_organizacyjna"/></b></xsl:if>
+                        <xsl:if test="ID/text()"> ID <b><xsl:value-of select="ID"/></b></xsl:if>
+                        <xsl:if test="source/text()"> source <b><xsl:value-of select="source"/></b></xsl:if>
+                    </ph>
+                    <!--</sup>--> 
+                </xsl:when>
+            </xsl:choose>
+            <xsl:choose>
+            <xsl:when test="nazwa/text()|Pelna_nazwa_kontrahenta/text()">
+                <xsl:variable name="link__x3A__title">
+                    <xsl:if test="nazwa/text()"> nazwa: <b><xsl:value-of select="replace(nazwa,'SPÓŁKA Z OGRANICZONĄ ODPOWIEDZIALNOŚCIĄ',' (Sp. z o.o.) ')"/></b></xsl:if>
+                    <xsl:if test="Pelna_nazwa_kontrahenta/text()"> nazwa : <b><xsl:value-of select="replace(Pelna_nazwa_kontrahenta,'SPÓŁKA Z OGRANICZONĄ ODPOWIEDZIALNOŚCIĄ',' (Sp. z o.o.) ')"/></b></xsl:if>
+                </xsl:variable>
+                        <ph>
+                            <xsl:copy-of select="$link__x3A__title"></xsl:copy-of>
+                        </ph>
+            </xsl:when>
+            </xsl:choose>
+            
         </title>
-        <shortdesc>kontekst <xsl:value-of select="system_cache__dita:localname.translate(name())"/> [il.<xsl:value-of select="count(current-group())"/>] <parmname>ID</parmname> <cmdname><xsl:value-of select="get_wfs:id_from_fid(@fid)"/></cmdname> </shortdesc>
+        <shortdesc>
+            <menucascade>
+                <xsl:if test="count(following::BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row) &gt;0"><uicontrol><varname>#nr</varname><markupname><xsl:value-of select="count(preceding::BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row)+1"/></markupname></uicontrol></xsl:if>
+            </menucascade>
+            
+            kontekst <xsl:value-of select="system_cache__dita:localname.translate(name())"/> [il.<xsl:value-of select="count(current-group())"/>] <parmname>ID</parmname> <cmdname><xsl:value-of select="get_wfs:id_from_fid(@fid)"/></cmdname>
+            <xsl:if test="nazwisko/text()"> nazwisko: <b><xsl:value-of select="nazwisko"/></b></xsl:if>
+            <xsl:if test="imiona/text()"> imiona: <b><xsl:value-of select="imiona"/></b></xsl:if>
+            <xsl:choose>
+                <xsl:when test="pesel/text()|PESEL/text()">
+                    <!--<sup>-->
+                    <ph>
+                        <xsl:if test="pesel/text()"> PESEL: <b><xsl:value-of select="pesel"/></b></xsl:if>
+                        <xsl:if test="PESEL/text()"> PESEL: <b><xsl:value-of select="PESEL"/></b></xsl:if>
+                    </ph>
+                    <!--</sup>-->
+                </xsl:when>
+            </xsl:choose>
+            <xsl:choose>
+                <xsl:when test="krs/text()|regon/text()|KRS/text()|REGON/text()|NIP/text()|nip/text()">
+                    <!--<sup>-->
+                    <ph>
+                        <xsl:if test="krs/text()"> KRS: <b><xsl:value-of select="krs"/></b></xsl:if>
+                        <xsl:if test="KRS/text()"> KRS: <b><xsl:value-of select="KRS"/></b></xsl:if>
+                        <xsl:if test="regon/text()"> REGON: <b><xsl:value-of select="regon"/></b></xsl:if>
+                        <xsl:if test="REGON/text()"> REGON: <b><xsl:value-of select="REGON"/></b></xsl:if>
+                        <xsl:if test="NIP/text()"> NIP: <b><xsl:value-of select="NIP"/></b></xsl:if>
+                        <xsl:if test="nip/text()"> NIP: <b><xsl:value-of select="nip"/></b></xsl:if>
+                        
+                    </ph>
+                    <!--</sup>-->
+                </xsl:when>
+            </xsl:choose>
+            <xsl:choose>
+                <xsl:when test="S_kraj/text()|S_wojewodztwo/text()">
+                    <!--<sup>-->
+                    <ph>
+                        <xsl:if test="S_kraj/text()"> kraj: <b><xsl:value-of select="S_kraj"/></b></xsl:if>
+                        <xsl:if test="S_wojewodztwo/text()"> woj.: <b><xsl:value-of select="S_wojewodztwo"/></b></xsl:if>
+                        
+                    </ph>
+                    <!--</sup>-->
+                </xsl:when>
+            </xsl:choose>
+            <xsl:choose>
+                <xsl:when test="A_miejscowosc/text()|Miejscowosc/text()|A_ulica/text()|A_nrDomu/text()|ulica/text()|Numer_budynku/text()|nrLokalu/text()|Numer_mieszkania_lokalu/text()|Ulica/text()">
+                    <!--<sup>-->
+                    <ph>
+                        <xsl:if test="A_miejscowosc/text()"> msc.: <b><xsl:value-of select="A_miejscowosc"/></b></xsl:if>
+                        <xsl:if test="Miejscowosc/text()"> msc.: <b><xsl:value-of select="Miejscowosc"/></b></xsl:if>
+                        <xsl:if test="A_ulica/text()"> ul.: <b><xsl:value-of select="A_ulica"/></b></xsl:if>
+                        <xsl:if test="ulica/text()"> ul.: <b><xsl:value-of select="ulica"/></b></xsl:if>
+                        <xsl:if test="Ulica/text()"> ul.: <b><xsl:value-of select="Ulica"/></b></xsl:if>
+                        <xsl:if test="A_nrDomu/text()"> dom: <b><xsl:value-of select="A_nrDomu"/></b></xsl:if>
+                        <xsl:if test="Numer_budynku/text()"> dom: <b><xsl:value-of select="Numer_budynku"/></b></xsl:if>
+                        <xsl:if test="nrLokalu/text()"> lok.: <b><xsl:value-of select="nrLokalu"/></b></xsl:if>
+                        <xsl:if test="A_nrLokalu/text()"> lok.: <b><xsl:value-of select="A_nrLokalu"/></b></xsl:if>
+                        
+                        <xsl:if test="Numer_mieszkania_lokalu/text()"> lok.: <b><xsl:value-of select="Numer_mieszkania_lokalu"/></b></xsl:if>
+                    </ph>
+                    <!--</sup>-->
+                </xsl:when>
+            </xsl:choose>
+            <xsl:choose>
+                <xsl:when test="A_poczta/text()|kodPocztowy/text()|A_kod/text()">
+                    <!--<sup>-->
+                    <ph>
+                        <xsl:if test="A_poczta/text()"> poczta: <b><xsl:value-of select="A_poczta"/></b></xsl:if>
+                        <xsl:if test="kodPocztowy/text()"> kod: <b><xsl:value-of select="kodPocztowy"/></b></xsl:if>
+                        <xsl:if test="A_kod/text()"> kod: <b><xsl:value-of select="A_kod"/></b></xsl:if>
+                    </ph>
+                    <!--</sup>-->
+                </xsl:when>
+            </xsl:choose>
+            <xsl:choose>
+                <xsl:when test="BI_audit_ENERGA_PRACOWNICY_adresy/*">
+                    <xsl:for-each select="BI_audit_ENERGA_PRACOWNICY_adresy">
+                        <p>
+                            <!--<sup>-->
+                            <xsl:choose>
+                                <xsl:when test="last() &gt; 0"><i> adres nr <xsl:value-of select="position()"/>/<xsl:value-of select="last()"/></i></xsl:when>
+                            </xsl:choose>
+                            
+                            <xsl:if test="kodPocztowy/text()"> kod: <b><xsl:value-of select="kodPocztowy"/></b> </xsl:if>
+                            <xsl:if test="miejscowosc/text()"> msc.: <b><xsl:value-of select="miejscowosc"/></b> </xsl:if>
+                            <xsl:if test="ulica/text()"> ul.: <b><xsl:value-of select="ulica"/></b> </xsl:if>
+                            <xsl:if test="nrBudynku/text()"> dom: <b><xsl:value-of select="nrBudynku"/></b> </xsl:if>
+                            <xsl:if test="nrLokalu/text()"> lok.: <b><xsl:value-of select="nrLokalu"/></b> </xsl:if>
+                            <!--</sup>-->
+                        </p>
+                    </xsl:for-each>
+                </xsl:when>
+            </xsl:choose>
+            
+            <xsl:choose>
+                <xsl:when test="BI_audit_taxpayer  ">
+                    <p>
+                        <ph>Status VAT: <b><xsl:value-of select="BI_audit_taxpayer/taxpayer_status_info"/></b></ph> 
+                        <ph>stan na dzień: <b><xsl:value-of select="BI_audit_taxpayer/taxpayer_status_date"/></b> </ph>
+                    </p>
+                    
+                </xsl:when>
+            </xsl:choose>
+            
+        </shortdesc>
         <prolog>
             <metadata>
                 <xsl:call-template name="system_cache__dita:indexterm">

+ 118 - 0
SE/schema/default_db_xml_cache.public/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_context.path.keyrefs.xsl

@@ -13,6 +13,7 @@
     xmlns:default_db__x3A__BI_audit_VALIDATE="https://biuro.biall-net.pl/wfs/default_db/BI_audit_VALIDATE"
     xmlns:default_db__x3A__BI_audit_BENFORD="https://biuro.biall-net.pl/wfs/default_db/BI_audit_BENFORD"
     xmlns:default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA="https://biuro.biall-net.pl/wfs/default_db/ENERGA_RUM_KONTRAHENCI_POWIAZANIA"
+    xmlns:Linear_regression="https://en.wikipedia.org/wiki/Linear_regression"
     exclude-result-prefixes="xs "
     version="2.0"><!-- system_cache__appinfo system_cache__dita ogr Benford default_db get_wfs p5 p5gnuplot -->
     
@@ -42,6 +43,7 @@
         <xsl:param name="p5gnuplot:value"/>
         <xsl:param name="props"/>
         <xsl:param name="end_fid"/>
+        <xsl:param name="Linear_regression:calculate_matrix__x3A__to_dita"/>
         <xsl:variable name="out">
             <xsl:if test="$system_cache__dita:element__x3A__name"><xsl:value-of select="concat(',',$system_cache__dita:element__x3A__name)"/></xsl:if>
             <xsl:if test="$get_wfs:name_from_fid"><xsl:value-of select="concat(',',$get_wfs:name_from_fid)"/></xsl:if>
@@ -52,7 +54,9 @@
             <xsl:if test="$foreign_fallback"><xsl:value-of select="concat(',',$foreign_fallback)"/></xsl:if>
             <xsl:if test="$p5gnuplot:value"><xsl:value-of select="concat(',',$p5gnuplot:value)"/></xsl:if>
             <xsl:if test="$props"><xsl:value-of select="concat(',',$props)"/></xsl:if>
+            <xsl:if test="$Linear_regression:calculate_matrix__x3A__to_dita"><xsl:value-of select="concat(',',$Linear_regression:calculate_matrix__x3A__to_dita)"/></xsl:if>
             <xsl:if test="$end_fid"><xsl:value-of select="concat(',','...',$end_fid)"/></xsl:if>
+            
         </xsl:variable>
         <xsl:variable name="out">
             <xsl:for-each select="tokenize($out,',')">
@@ -80,6 +84,8 @@
         <xsl:param name="p5gnuplot:value"/>
         <xsl:param name="props"/>
         <xsl:param name="end_fid"/>
+        <xsl:param name="Linear_regression:calculate_matrix__x3A__to_dita"/>
+        
             <xsl:attribute name="keys">
                 <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__generate__key">
                     <xsl:with-param name="title" select="$title"/>
@@ -92,6 +98,7 @@
                     <xsl:with-param name="p5gnuplot:value"  select="$p5gnuplot:value"/>
                     <xsl:with-param name="props" select="$props"/>
                     <xsl:with-param name="end_fid" select="$end_fid"/>
+                    <xsl:with-param name="Linear_regression:calculate_matrix__x3A__to_dita" select="$Linear_regression:calculate_matrix__x3A__to_dita"/>
                 </xsl:call-template>
             </xsl:attribute>
     </xsl:template>
@@ -136,6 +143,7 @@
         <xsl:param name="fileindex"/>
         <xsl:param name="p5gnuplot:value"/>
         <xsl:param name="props"/>
+        <xsl:param name="Linear_regression:calculate_matrix__x3A__to_dita"/>
         <xsl:attribute name="id" >
             <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__assign__key">
                 <xsl:with-param name="system_cache__dita:element__x3A__name" select="$system_cache__dita:element__x3A__name"/>
@@ -145,11 +153,119 @@
                 <xsl:with-param name="fileindex" select="$fileindex"/>
                 <xsl:with-param name="p5gnuplot:value" select="$p5gnuplot:value"/>
                 <xsl:with-param name="props" select="$props"/>
+                <xsl:with-param name="Linear_regression:calculate_matrix__x3A__to_dita" select="$Linear_regression:calculate_matrix__x3A__to_dita"/>
             </xsl:call-template>
         </xsl:attribute>
     </xsl:template>
     
     
+    <xsl:template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__assign__href">
+        <xsl:param name="system_cache__dita:element__x3A__name"/>
+        <xsl:param name="title"/>
+        <xsl:param name="graph.name"/>
+        <xsl:param name="fid"/>
+        <xsl:param name="fileindex"/>
+        <xsl:param name="p5gnuplot:value"/>
+        <xsl:param name="props"/>
+        <xsl:param name="system_cache__dita:root__x3A__name"/>
+            <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__full__x3A__filepath">
+                <xsl:with-param name="system_cache__dita:root__x3A__name" select="$system_cache__dita:root__x3A__name"/>
+            </xsl:call-template>
+            <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__generate__key">
+                <xsl:with-param name="system_cache__dita:element__x3A__name" select="$system_cache__dita:element__x3A__name"/>
+                <xsl:with-param name="title" select="$title"/>
+                <xsl:with-param name="graph.name" select="$graph.name"/>
+                <xsl:with-param name="fid" select="$fid"/>
+                <xsl:with-param name="fileindex" select="$fileindex"/>
+                <xsl:with-param name="p5gnuplot:value" select="$p5gnuplot:value"/>
+                <xsl:with-param name="props" select="$props"/>
+            </xsl:call-template>
+        <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__full__x3A__filepath__x3A__suffix"/>
+    </xsl:template>
+    
+    <xsl:template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__full__x3A__filepath">
+        <xsl:param name="temp" select="$temp"/>
+        <xsl:param name="uuid" select="$uuid"/>
+        <xsl:param name="system_cache__dita:root__x3A__name" select="'context.path.keyref__x3A__full__x3A__filepath'"/>
+        <xsl:value-of select="concat($temp,'/',$uuid,'/',$system_cache__dita:root__x3A__name,'/')"/>
+    </xsl:template>
+    
+    <xsl:template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__full__x3A__filepath__x3A__suffix">
+        <xsl:text>.xml</xsl:text>
+    </xsl:template>
+    
+    <xsl:template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__result-document">
+        <xsl:param name="context__x3A__to__x3A__save"/>
+        <xsl:param name="system_cache__dita:element__x3A__name"/>
+        <xsl:param name="title"/>
+        <xsl:param name="graph.name"/>
+        <xsl:param name="fid"/>
+        <xsl:param name="fileindex"/>
+        <xsl:param name="p5gnuplot:value"/>
+        <xsl:param name="props"/>
+        <xsl:param name="system_cache__dita:root__x3A__name"/>
+        <xsl:variable name="href">
+            <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__full__x3A__filepath">
+                <xsl:with-param name="system_cache__dita:root__x3A__name" select="$system_cache__dita:root__x3A__name"/>
+            </xsl:call-template>
+            <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__generate__key">
+                <xsl:with-param name="system_cache__dita:element__x3A__name" select="$system_cache__dita:element__x3A__name"/>
+                <xsl:with-param name="title" select="$title"/>
+                <xsl:with-param name="graph.name" select="$graph.name"/>
+                <xsl:with-param name="fid" select="$fid"/>
+                <xsl:with-param name="fileindex" select="$fileindex"/>
+                <xsl:with-param name="p5gnuplot:value" select="$p5gnuplot:value"/>
+                <xsl:with-param name="props" select="$props"/>
+            </xsl:call-template>
+            <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__full__x3A__filepath__x3A__suffix"/>
+                
+            
+        </xsl:variable>
+        
+        <xsl:choose>
+            <xsl:when test="$context__x3A__to__x3A__save/*">
+                <xsl:message>#208 saving to <xsl:value-of select="$href"/></xsl:message>
+                <xsl:result-document href="{$href}">
+                    <xsl:copy-of select="$context__x3A__to__x3A__save"/>
+                </xsl:result-document>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:message>#208-NOT  === EMPTY saving to <xsl:value-of select="$href"/></xsl:message>
+            </xsl:otherwise>
+        </xsl:choose>
+        
+        
+    </xsl:template>
+    
+    <xsl:template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__load-document">
+        <xsl:param name="system_cache__dita:root__x3A__name"/>
+        <xsl:param name="system_cache__dita:element__x3A__name"/>
+        <xsl:param name="title"/>
+        <xsl:param name="graph.name"/>
+        <xsl:param name="fid"/>
+        <xsl:param name="fileindex"/>
+        <xsl:param name="p5gnuplot:value"/>
+        <xsl:param name="props"/>
+        <xsl:variable name="href">
+            <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__assign__href">
+                <xsl:with-param name="system_cache__dita:element__x3A__name" select="$system_cache__dita:element__x3A__name"/>
+                <xsl:with-param name="title" select="$title"/>
+                <xsl:with-param name="graph.name" select="$graph.name"/>
+                <xsl:with-param name="fid" select="$fid"/>
+                <xsl:with-param name="fileindex" select="$fileindex"/>
+                <xsl:with-param name="p5gnuplot:value" select="$p5gnuplot:value"/>
+                <xsl:with-param name="props" select="$props"/>
+            </xsl:call-template>
+        </xsl:variable>
+        <xsl:choose>
+            <xsl:when test="doc-available($href)">
+                <xsl:copy-of select="doc($href)"></xsl:copy-of>
+            </xsl:when>
+            <xsl:otherwise><xsl:message>#233 doc-available($href) unaviable (<xsl:value-of select="$href"/>)</xsl:message></xsl:otherwise>
+        </xsl:choose>
+        
+    </xsl:template>
+    
     
     
     <xsl:template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__resolve__key">
@@ -184,6 +300,7 @@
                                         <xsl:with-param name="get_wfs:name_from_fid" select="$get_wfs:name_from_fid"/>
                                     </xsl:call-template>
                                 </xsl:attribute>
+                                <xsl:if test="$link__x3A__title"><xsl:copy-of select="$link__x3A__title"/></xsl:if>
                                 <!--<xsl:attribute name="keyref" select="concat($fid,'...',$end_fid)"/>-->
                             </xsl:when>
                             <xsl:otherwise>
@@ -196,6 +313,7 @@
                                                 <xsl:with-param name="get_wfs:name_from_fid" select="$get_wfs:name_from_fid"/>
                                             </xsl:call-template>
                                         </xsl:attribute>
+                                        <xsl:if test="$link__x3A__title"><xsl:copy-of select="$link__x3A__title"/></xsl:if>
                                     </xsl:when>
                                     <xsl:otherwise>
                                         <xref>

+ 19 - 8
SE/schema/default_db_xml_cache.public/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_context.path.xsl

@@ -93,7 +93,7 @@
             <default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.attrs__x3A__to_nodeset default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.attrs="{$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.attrs}">
                 <xsl:for-each select="tokenize(current(),' ')">
                     <xsl:apply-templates mode="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.attrs__x3A__to_nodeset" select="$system_cache__dita:interested_row//*[@fid = current()]">
-                        <xsl:with-param name="system_cache__dita:interested_row.noattrrs__x3A__include" select="$system_cache__dita:interested_row.noattrrs__x3A__include" tunnel="yes"/>
+                        <xsl:with-param name="system_cache__dita:interested_row.noattrrs__x3A__include" select="$system_cache__dita:interested_row.noattrrs__x3A__include" />
                     </xsl:apply-templates>
                 </xsl:for-each>
             </default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.attrs__x3A__to_nodeset>
@@ -116,7 +116,9 @@
                     <xsl:for-each-group select="$tags//tag" group-by="text()" >
                         <xsl:for-each select="$system_cache__dita:interested_row//*[@fid = current()]">
                             <xsl:if test="position() = 1">
-                                <xsl:apply-templates mode="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.attrs__x3A__to_nodeset" select="." />
+                                <xsl:apply-templates mode="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.attrs__x3A__to_nodeset" select="." >
+                                    
+                                </xsl:apply-templates>
                             </xsl:if>
                         </xsl:for-each>
                     </xsl:for-each-group>
@@ -135,21 +137,28 @@
     
     
     <xsl:template mode="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.attrs__x3A__to_nodeset" match="*[*]">
-        <xsl:param name="system_cache__dita:interested_row.noattrrs__x3A__include" tunnel="yes"/>
+        <xsl:param name="system_cache__dita:interested_row.noattrrs__x3A__include" /><!-- tunnel="yes" -->
+        <xsl:message>#139 debug should call nodes  <xsl:value-of select="name()"/>; <xsl:value-of select="@fid"/>; </xsl:message>
         <xsl:copy>
             <xsl:copy-of select="@*"/>
             <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.attrs__x3A__to_nodeset.precedings.count"/>
-            <xsl:apply-templates mode="#current"/>
+                
+            
+            <xsl:apply-templates mode="#current">
+                <xsl:with-param name="system_cache__dita:interested_row.noattrrs__x3A__include" select="$system_cache__dita:interested_row.noattrrs__x3A__include"/>
+            </xsl:apply-templates>
         </xsl:copy>
     </xsl:template>
     
     <xsl:template mode="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.attrs__x3A__to_nodeset" match="*[not(*) and not(@*)]">
-        <xsl:param name="system_cache__dita:interested_row.noattrrs__x3A__include" tunnel="yes"/>
+        <xsl:param name="system_cache__dita:interested_row.noattrrs__x3A__include" />
         <xsl:choose>
             <xsl:when test="$system_cache__dita:interested_row.noattrrs__x3A__include">
                 <xsl:copy>
                     <xsl:copy-of select="@*"/>
-                    <xsl:apply-templates mode="#current"/>
+                    <xsl:apply-templates mode="#current">
+                        <xsl:with-param name="system_cache__dita:interested_row.noattrrs__x3A__include" select="$system_cache__dita:interested_row.noattrrs__x3A__include"/>
+                    </xsl:apply-templates>
                 </xsl:copy>
             </xsl:when>
         </xsl:choose>
@@ -158,10 +167,12 @@
     
     
     <xsl:template mode="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.attrs__x3A__to_nodeset" match="*[@* and not(*)]">
-        <xsl:param name="system_cache__dita:interested_row.noattrrs__x3A__include" tunnel="yes"/>
+        <xsl:param name="system_cache__dita:interested_row.noattrrs__x3A__include" />
         <xsl:copy>
             <xsl:copy-of select="@*"/>
-            <xsl:apply-templates mode="#current"/>
+            <xsl:apply-templates mode="#current">
+                <xsl:with-param name="system_cache__dita:interested_row.noattrrs__x3A__include" select="$system_cache__dita:interested_row.noattrrs__x3A__include"/>
+            </xsl:apply-templates>
         </xsl:copy>
     </xsl:template>
     

+ 4 - 3
SE/schema/default_db_xml_cache.public/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row.xsl

@@ -267,13 +267,13 @@
                                             <xsl:when test="position()=last()">pos_last</xsl:when>
                                             <xsl:otherwise>pos_else</xsl:otherwise>
                                         </xsl:choose>
-                                        <xsl:text> mode__POWIAZANIA_row_3624 </xsl:text>
+                                        <xsl:text> mode__POWIAZANIA_row_3624 limit </xsl:text> <xsl:value-of select="$limit"/>
                                     </xsl:attribute>
-                                    <xsl:choose>
+                                    <!--<xsl:choose>
                                         <xsl:when test="position() &gt; $limit">
                                             <xsl:attribute name="processing-role">resource-only</xsl:attribute> 
                                         </xsl:when>
-                                    </xsl:choose>
+                                    </xsl:choose>-->
                                     <!--<xsl:for-each select="current-group()">-->
                                         <!--<xsl:copy-of select="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.DETECT.dita_pair.key.attr($current-save-file-id,system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.DETECT.key(BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[1]/*[1]/@fid,'','','1'),system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.DETECT.key(BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[last()]/*[1]/@fid,'','','1'))"/>--> <!-- concat($group_name,'.dita')XXf -->
                                     <!--</xsl:for-each>-->
@@ -320,6 +320,7 @@
                                             <shortdesc>
                                                 
                                                 <menucascade>
+                                                    <xsl:if test="count(following::BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row) &gt;0"><uicontrol><varname>#nr</varname><markupname><xsl:value-of select="count(preceding::BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row)+1"/></markupname></uicontrol></xsl:if>
                                                     <uicontrol><varname>do</varname></uicontrol>
                                                     <uicontrol>  <xsl:value-of select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ position() = last()]/*[ position() = 1]/concat(Pelna_nazwa_kontrahenta,nazwa,nazwisko,' - ',Miejscowosc,imiona,imie,' ',NIP,' ',regon,' ',Nr_dzialki,firma,' ',Nr_KW,' ',Seller_person,pesel,miejscowosc)"/><xsl:text> </xsl:text>
                                                         <xsl:value-of select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ position() = last()]/*[ position() = 1]/Seller_person"/><xsl:text> </xsl:text> 

+ 13 - 1
SE/schema/default_db_xml_cache.public/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_LISTA.xsl

@@ -67,10 +67,13 @@
             <xsl:copy-of select="system_cache__dita:files.href.context.title.keydef(system_cache__dita:files.key.title.context.href(current(),'map',$title),BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[1]/*[1],'BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_LISTA')" copy-namespaces="no"/>
             <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__assign__keydef">
                 <xsl:with-param name="fid" select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[1]/*[1]/@fid"/>
-                <xsl:with-param name="end_fid" select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[last()]/*[1]/@fid"/>
+                <!--<xsl:with-param name="end_fid" select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[last()]/*[1]/@fid"/>-->
                 <xsl:with-param name="title">BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_LISTA</xsl:with-param>
                 <xsl:with-param name="href" select="system_cache__dita:files.key.href.write.topic.title.context(.,$title)"/>
+                <xsl:with-param name="get_wfs:name_from_fid" select="''"/>
             </xsl:call-template>
+            <xsl:comment>#554 <xsl:value-of select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[last()]/*[1]/@fid"/></xsl:comment>
+            
             <xsl:result-document href="{system_cache__dita:files.key.href.write.topic.title.context(.,$title)}"> <!-- system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.href.write(system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.DETECT.key(@fid,'',$current-grouping-key,$position)) --><!-- {$temp}/{$uuid}/{$group_name}_LIST.dita -->
                 <topic id="{$uuid}topic_simpletable_cheat_row_{replace($group_name,'/','')}_{ generate-id()}" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:noNamespaceSchemaLocation="urn:oasis:names:tc:dita:xsd:topic.xsd">
@@ -143,6 +146,9 @@
                                         <equation-inline>
                                             <xsl:apply-templates mode="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.universal.body" select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ 1]/*[1]">
                                                 <xsl:with-param name="system_cache__dita:subscript" select="$system_cache__dita:subscript"/>
+                                                <xsl:with-param name="end_fid" select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ position()=last()]/*[1]/@fid"/>
+                                                <xsl:with-param name="fid" select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ 1]/*[1]/@fid"/>
+                                                <xsl:with-param name="get_wfs:name_from_fid" select="''"/>
                                                 <xsl:with-param name="system_cache__dita:element__x3A__parent">equation-inline</xsl:with-param>
                                             </xsl:apply-templates>
                                         </equation-inline>
@@ -211,6 +217,12 @@
         <topicref> <!-- system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.href.write(system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.DETECT.key(@fid,'',$current-grouping-key,$position)) --><!-- {$group_name}_LIST.dita -->
             <xsl:copy-of select="system_cache__dita:files.key.title.context.href(current(),'map',$title)" copy-namespaces="no"/>
             <xsl:copy-of select="system_cache__dita:files.context.title.keys($context/*[1],$title)" copy-namespaces="no"/>
+            
+            <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__assign__key">
+                <xsl:with-param name="fid" select="*[1]/@fid"/>
+                <xsl:with-param name="end_fid" select="parent::BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/*[last()]/*[1]/@fid"/>
+                <xsl:with-param name="get_wfs:name_from_fid" select="''"/>
+            </xsl:call-template>
             <xsl:attribute name="toc" select="'no'"/>
             <xsl:attribute name="props">
                 <xsl:choose>

+ 49 - 15
SE/schema/default_db_xml_cache.public/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_tree_to_dita.xsl

@@ -71,6 +71,8 @@
     <xsl:include href="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_4UA.xsl"/>
     <xsl:include href="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_context.path.xsl"/>
     
+    <xsl:include href="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_4UKR.xsl"/>
+    
     <xsl:variable name="KRS_own">
         <KRS_own>
            <!-- <KRS>0000033455</KRS>
@@ -945,23 +947,23 @@
                     </xsl:call-template>
                     
                 </topichead>-->
-               
+                <xsl:variable name="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.fixed.UMOWY">
+                    <xsl:call-template name="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.fixed">
+                        <xsl:with-param name="sources" select="$sources"/>
+                        <xsl:with-param name="interested_row" select="$interested_row"/>
+                        <xsl:with-param name="system_cache__dita:groupset.mode.BI_audit_ENERGA_RUM_KONTRAHENCI_UMOWY.path" select="true()"/><!-- system_cache__dita:groupset.mode.BI_audit_ENERGA_RUM_KONTRAHENCI_UMOWY.path -->
+                        <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:valueField"    select="$default_db__x3A__BI_audit_BENFORD:valueField"  />
+                        <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:groupField"     select="$default_db__x3A__BI_audit_BENFORD:groupField"/>
+                        <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:timeField"   select="$default_db__x3A__BI_audit_BENFORD:timeField" />
+                        <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:NameField" select="$default_db__x3A__BI_audit_BENFORD:NameField"/>
+                        <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:AddressField" select="$default_db__x3A__BI_audit_BENFORD:AddressField" />
+                        <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:PeselField" select="$default_db__x3A__BI_audit_BENFORD:PeselField"  />
+                        <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:TaxIdField" select="$default_db__x3A__BI_audit_BENFORD:TaxIdField"  />
+                    </xsl:call-template>
+                </xsl:variable>
                 <topichead navtitle="Powiązania do wybranych podmiotów/kontrahentów (APU4)" >
                     
-                    <xsl:variable name="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.fixed.UMOWY">
-                        <xsl:call-template name="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.fixed">
-                            <xsl:with-param name="sources" select="$sources"/>
-                            <xsl:with-param name="interested_row" select="$interested_row"/>
-                            <xsl:with-param name="system_cache__dita:groupset.mode.BI_audit_ENERGA_RUM_KONTRAHENCI_UMOWY.path" select="true()"/><!-- system_cache__dita:groupset.mode.BI_audit_ENERGA_RUM_KONTRAHENCI_UMOWY.path -->
-                            <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:valueField"    select="$default_db__x3A__BI_audit_BENFORD:valueField"  />
-                            <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:groupField"     select="$default_db__x3A__BI_audit_BENFORD:groupField"/>
-                            <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:timeField"   select="$default_db__x3A__BI_audit_BENFORD:timeField" />
-                            <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:NameField" select="$default_db__x3A__BI_audit_BENFORD:NameField"/>
-                            <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:AddressField" select="$default_db__x3A__BI_audit_BENFORD:AddressField" />
-                            <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:PeselField" select="$default_db__x3A__BI_audit_BENFORD:PeselField"  />
-                            <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:TaxIdField" select="$default_db__x3A__BI_audit_BENFORD:TaxIdField"  />
-                        </xsl:call-template>
-                    </xsl:variable>
+                    
                     
                     <xsl:attribute name="props">APU4</xsl:attribute>
                     <xsl:attribute name="toc">no</xsl:attribute>
@@ -990,6 +992,38 @@
                     
                 </topichead>
                 
+                
+                <topichead navtitle="Prosta analiza korelacji (UKR)" >
+                    
+                    
+                    
+                    <xsl:attribute name="props">UKR</xsl:attribute>
+                    <xsl:attribute name="toc">yes</xsl:attribute>
+                    <!--<xsl:attribute name="processing-role">resource-only</xsl:attribute>-->
+                    
+                    <xsl:call-template name="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.universal">
+                        <xsl:with-param name="navtitle">Prosta analiza korelacji (UKR) </xsl:with-param>
+                        <xsl:with-param name="keys">_element_gwiazdka__mode_BI_audit_ENERGA_RUM_UMOWY_UKR</xsl:with-param>
+                        <xsl:with-param name="mode">system_cache__dita:ANALIZA_KORELACJI_UKR</xsl:with-param>
+                        <!--<xsl:with-param name="processing-role">resource-only</xsl:with-param>-->
+                        <xsl:with-param name="element">*</xsl:with-param>
+                        <xsl:with-param name="interested_row" select="$interested_row"/>
+                        <xsl:with-param name="sources" select="$sources"/>
+                        <xsl:with-param name="resulset" select="$resulset"/>
+                        <xsl:with-param name="title" select="'UKR_analiza'"/>
+                        <xsl:with-param name="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.fixed" select="$system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.fixed.UMOWY"/>
+                        <!--<xsl:with-param name="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.uniq" select="$system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.values.uniq"/>-->
+                        <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:valueField" select="$default_db__x3A__BI_audit_BENFORD:valueField" tunnel="yes"/>
+                        <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:groupField" select="$default_db__x3A__BI_audit_BENFORD:groupField" tunnel="yes"/>
+                        <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:timeField" select="$default_db__x3A__BI_audit_BENFORD:timeField" tunnel="yes"/>
+                        <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:NameField" select="$default_db__x3A__BI_audit_BENFORD:NameField" tunnel="yes"/>
+                        <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:AddressField" select="$default_db__x3A__BI_audit_BENFORD:AddressField" tunnel="yes"/>
+                        <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:PeselField" select="$default_db__x3A__BI_audit_BENFORD:PeselField" tunnel="yes"  />
+                        <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:TaxIdField" select="$default_db__x3A__BI_audit_BENFORD:TaxIdField" tunnel="yes" />
+                    </xsl:call-template>
+                    
+                </topichead>
+                
                 <xsl:choose>
                     <xsl:when test="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_old">
                         <topichead navtitle="Powiązania dla wariantu porównawczego raportów (dostępne, nie użyte)"/>

+ 96 - 15
SE/schema/default_db_xml_cache.public/default_db/Linear_regression/Linear_regression.xsl

@@ -8,6 +8,7 @@
     xmlns:default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA="https://biuro.biall-net.pl/wfs/default_db/ENERGA_RUM_KONTRAHENCI_POWIAZANIA"
     xmlns:default_db__x3A__BI_audit_BENFORD="https://biuro.biall-net.pl/wfs/default_db/BI_audit_BENFORD"
     xmlns:Linear_regression="https://en.wikipedia.org/wiki/Linear_regression"
+    xmlns:math="http://exslt.org/math"
     exclude-result-prefixes="xs"
     version="2.0">
     
@@ -35,12 +36,15 @@
         <xsl:param name="Linear_regression:Y_attribute__x3A__set"/>
         <xsl:param name="Linear_regression:Y_element__x3A__set"/>
         <xsl:param name="Linear_regression:dataset" required="yes"/>
+        <xsl:param name="p5gnuplot:value"/>
+        
         <Linear_regression:calculate_data>
             <xsl:attribute name="Linear_regression:X_attribute__x3A__set" select="$Linear_regression:X_attribute__x3A__set"/>
             <xsl:attribute name="Linear_regression:Y_attribute__x3A__set" select="$Linear_regression:Y_attribute__x3A__set"/>
             <xsl:attribute name="Linear_regression:X_element__x3A__set" select="$Linear_regression:X_element__x3A__set"/>
             <xsl:attribute name="Linear_regression:Y_element__x3A__set" select="$Linear_regression:Y_element__x3A__set"/>
             <xsl:attribute name="name" select="$Linear_regression:dataset[1]/name()"/>
+            <xsl:attribute name="p5gnuplot:value" select="$p5gnuplot:value"/>
             <xsl:variable name="Linear_regression:calculate_data.XY">
                 <Linear_regression:calculate_data.XY>
                     <xsl:apply-templates mode="Linear_regression:calculate_data.XY" select="$Linear_regression:dataset">
@@ -74,15 +78,61 @@
     
     
     
+    
+    
+    <xsl:function name="Linear_regression:calculate_matrix__x3A__to_dita">
+        <xsl:param name="Linear_regression:slope-m"/>
+        <xsl:param name="Linear_regression:y-int.b"/>
+        <xsl:param name="Linear_regression:r"/>
+        <!--<xsl:param name="Linear_regression:n"/>-->
+        <xsl:call-template name="Linear_regression:calculate_matrix__x3A__to_dita">
+            <xsl:with-param name="Linear_regression:slope-m" select="$Linear_regression:slope-m"/>
+            <xsl:with-param name="Linear_regression:y-int.b" select="$Linear_regression:y-int.b"/>
+            <xsl:with-param name="Linear_regression:r" select="$Linear_regression:r"/>
+            <!--<xsl:with-param name="Linear_regression:n" select="$Linear_regression:n"/>-->
+        </xsl:call-template>
+    </xsl:function>
+    
+    
+    <xsl:function name="Linear_regression:calculate_matrix__x3A__value">
+        <xsl:param name="value"/>
+        <xsl:choose>
+            <xsl:when test="number($value) &lt;100"><xsl:value-of select="number($value)"/></xsl:when>
+            <xsl:when test="number($value) &lt;1000"><xsl:value-of select="number($value)"/></xsl:when>
+            <xsl:otherwise><xsl:value-of select="xs:integer(substring(string($value),1,4))"/></xsl:otherwise>
+            
+        </xsl:choose>
+    </xsl:function>
+    
+    
+    <xsl:template name="Linear_regression:calculate_matrix__x3A__to_dita">
+        <xsl:param name="Linear_regression:slope-m"/>
+        <xsl:param name="Linear_regression:y-int.b"/>
+        <xsl:param name="Linear_regression:r"/>
+        <xsl:param name="Linear_regression:n"/>
+        <xsl:variable name="out">
+            <xsl:text>RL.</xsl:text><xsl:value-of select="round($Linear_regression:slope-m)"/><xsl:text>-</xsl:text>
+            <xsl:value-of select="round($Linear_regression:y-int.b)"/><xsl:text>-</xsl:text>
+            <xsl:value-of select="round($Linear_regression:r)"/><xsl:text></xsl:text>
+        </xsl:variable>
+        <xsl:value-of select="$out"/>
+    </xsl:template>
+    
     <xsl:template mode="Linear_regression:calculate_data__x3A__to_dita" match="Linear_regression:calculate_data.XY">
         <xsl:param name="system_cache__dita:element__x3A__parent" select="'equation-inline'"/>
         <xsl:element name="{$system_cache__dita:element__x3A__parent}">
+            <xsl:variable name="Linear_regression:calculate_matrix__x3A__to_dita" select="Linear_regression:calculate_matrix__x3A__to_dita(Linear_regression:XY16/@Linear_regression:XY16.slope.m,Linear_regression:XY16/@Linear_regression:XY16.y-int.b,Linear_regression:XY16/@Linear_regression:XY16.r)"/>
+            <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__assign__id">
+                <xsl:with-param name="graph.name">calculate_matrix__x3A__to_dita</xsl:with-param>
+                <xsl:with-param name="Linear_regression:calculate_matrix__x3A__to_dita" select="$Linear_regression:calculate_matrix__x3A__to_dita"/>
+            </xsl:call-template>
             <xsl:attribute name="props" select="'Linear_regression.calculate_data__x3A__to_dita'"/>
-            <ph>Obliczono Regresję liniową z następującymi wynikami </ph>
-            <ph>trend m : </ph> <tt><xsl:value-of select="Linear_regression:XY16/@Linear_regression:XY16.slope.m"/></tt>
-            <ph> y-int.b :  </ph><tt><xsl:value-of select="Linear_regression:XY16/@Linear_regression:XY16.y-int.b"/></tt>
-            <ph>przybliżony parametr r :  </ph><tt> <xsl:value-of select="Linear_regression:XY16/@Linear_regression:XY16.r-like"/></tt>
-            <ph>obliczenia wykonano dla <xsl:value-of select="Linear_regression:XY11/@Linear_regression:XY11.n"/> elementów </ph>
+            <ph>Obliczono <b>Regresję liniową</b>    z następującymi wynikami </ph>
+            <ph>trend <i>m</i> : </ph> <b props="Linear_regression.m"><xsl:value-of select="Linear_regression:XY16/@Linear_regression:XY16.slope.m"/></b><xsl:text>; </xsl:text>
+            <ph> <i>y-int.b</i> :  </ph><b props="Linear_regression.y-int.b"><xsl:value-of select="Linear_regression:XY16/@Linear_regression:XY16.y-int.b"/></b>; <xsl:text>; </xsl:text>
+            <ph>przybliżony parametr <i>r</i> :  </ph><b props="Linear_regression.r"> <xsl:value-of select="Linear_regression:XY16/@Linear_regression:XY16.r"/></b>;<xsl:text>; </xsl:text>
+            <ph>obliczenia wykonano dla <i>n</i> <b props="Linear_regression.n"><xsl:value-of select="Linear_regression:XY11/@Linear_regression:XY11.n"/></b> elementów;  </ph>
+            <ph>bieżący marker wykrytego profilu <i>P</i> <b><xsl:value-of select="$Linear_regression:calculate_matrix__x3A__to_dita"/></b></ph>
         </xsl:element>
     </xsl:template>
     
@@ -92,9 +142,9 @@
         <xsl:copy>
             <xsl:copy-of select="@*"/>
             <xsl:attribute name="Linear_regression:XY16.y-int.b" select="( ../Linear_regression:XY11/@Linear_regression:XY11.Ey - @Linear_regression:XY16.slope.m  * ../Linear_regression:XY11/@Linear_regression:XY11.Ex )  div ../Linear_regression:XY11/@Linear_regression:XY11.n "/>
-            <xsl:attribute name="Linear_regression:XY16.r" select="( ../Linear_regression:XY11/@Linear_regression:XY11.n  *  ../Linear_regression:XY11/@Linear_regression:XY11.Exy  -   ../Linear_regression:XY11/@Linear_regression:XY11.Ex  *  ../Linear_regression:XY11/@Linear_regression:XY11.Ey )"/>
-            <xsl:attribute name="Linear_regression:XY16.r-sqrt" select="( (../Linear_regression:XY11/@Linear_regression:XY11.n * ../Linear_regression:XY11/@Linear_regression:XY11.Ex2 - ../Linear_regression:XY14/@Linear_regression:XY14.Ex2  )*( ../Linear_regression:XY11/@Linear_regression:XY11.n * ../Linear_regression:XY11/@Linear_regression:XY11.Ey2 -  ../Linear_regression:XY14/@Linear_regression:XY14.Ey2   )  ) "/>
-            <xsl:attribute name="Linear_regression:XY16.r-like" select="( ../Linear_regression:XY11/@Linear_regression:XY11.n  *  ../Linear_regression:XY11/@Linear_regression:XY11.Exy  -   ../Linear_regression:XY11/@Linear_regression:XY11.Ex  *  ../Linear_regression:XY11/@Linear_regression:XY11.Ey ) div ( ( (../Linear_regression:XY11/@Linear_regression:XY11.n * ../Linear_regression:XY11/@Linear_regression:XY11.Ex2 - ../Linear_regression:XY14/@Linear_regression:XY14.Ex2  )*( ../Linear_regression:XY11/@Linear_regression:XY11.n * ../Linear_regression:XY11/@Linear_regression:XY11.Ey2 -  ../Linear_regression:XY14/@Linear_regression:XY14.Ey2   )  )  )"/>
+            <xsl:attribute name="Linear_regression:XY16.r" select="( ../Linear_regression:XY11/@Linear_regression:XY11.n  *  ../Linear_regression:XY11/@Linear_regression:XY11.Exy  -   ../Linear_regression:XY11/@Linear_regression:XY11.Ex  *  ../Linear_regression:XY11/@Linear_regression:XY11.Ey )
+                div math:sqrt( ( (../Linear_regression:XY11/@Linear_regression:XY11.n * ../Linear_regression:XY11/@Linear_regression:XY11.Ex2 - ../Linear_regression:XY14/@Linear_regression:XY14.Ex2  )*( ../Linear_regression:XY11/@Linear_regression:XY11.n * ../Linear_regression:XY11/@Linear_regression:XY11.Ey2 -  ../Linear_regression:XY14/@Linear_regression:XY14.Ey2   )  )  )
+                "/>
         </xsl:copy>
     </xsl:template>
     
@@ -158,18 +208,31 @@
             <xsl:attribute name="position" select="count(preceding::*)"/>
             <xsl:attribute name="name" select="name()"/>
             <xsl:attribute name="count" select="count(descendant::*)"/>
+            <xsl:attribute name="text" select="text()"/>
+            <xsl:attribute name="curr_name" select="$Linear_regression:X_element__x3A__set"/>
+            <xsl:attribute name="if_local_x_ok" select=".[name()=$Linear_regression:X_element__x3A__set]/text()"/>
+            <xsl:attribute name="attrs"><xsl:value-of select="@*/name()"/></xsl:attribute>
             <xsl:choose>
                 <xsl:when test="string-length($Linear_regression:X_element__x3A__set)&gt;0">
                     <xsl:choose>
-                        <xsl:when test="*/local-name()=$Linear_regression:X_element__x3A__set">
-                            <Linear_regression:X><xsl:value-of select="*[local-name()=$Linear_regression:X_element__x3A__set]/text()"/></Linear_regression:X>
+                        <xsl:when test="*/local-name()=$Linear_regression:X_element__x3A__set and count(*/local-name()=$Linear_regression:X_element__x3A__set)=1" >
+                            <Linear_regression:X><xsl:value-of select="*[local-name()=$Linear_regression:X_element__x3A__set]/Linear_regression:convert__x3A__to__axis__digit($Linear_regression:X_element__x3A__set,text())"/></Linear_regression:X>
                         </xsl:when>
                         <xsl:when test="local-name()=$Linear_regression:X_element__x3A__set">
-                            <Linear_regression:X><xsl:value-of select="text()"/></Linear_regression:X>
+                            <Linear_regression:X><xsl:value-of select="Linear_regression:convert__x3A__to__axis__digit($Linear_regression:X_element__x3A__set,text())"/></Linear_regression:X>
                         </xsl:when>
                         <xsl:when test="name()=$Linear_regression:X_element__x3A__set">
-                            <Linear_regression:X><xsl:value-of select="text()"/></Linear_regression:X>
+                            <Linear_regression:X ><xsl:value-of select="Linear_regression:convert__x3A__to__axis__digit($Linear_regression:X_element__x3A__set,text())"/></Linear_regression:X>
                         </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:message terminate="yes">#266 cannot found X <xsl:value-of select="$Linear_regression:X_element__x3A__set"/>; $Linear_regression:X_attribute__x3A__set=<xsl:value-of select="$Linear_regression:X_attribute__x3A__set"/>
+                                current attr = <xsl:for-each select="@*"> <xsl:value-of select="name()"/>; <xsl:value-of select="."/> ; </xsl:for-each> EOF
+                                <xsl:for-each select="*"> <xsl:value-of select="name()"/> = <xsl:value-of select="."/>  EOF </xsl:for-each>
+                                curr name = <xsl:value-of select="name()"/>;.
+                                
+                            
+                            </xsl:message>
+                        </xsl:otherwise>
                     </xsl:choose>
                 </xsl:when>
                 <xsl:otherwise>
@@ -205,6 +268,24 @@
         
     </xsl:template>
     
+    
+    <xsl:function name="Linear_regression:convert__x3A__to__axis__digit">
+        <xsl:param name="Linear_regression:name__x3A__set"/>
+        <xsl:param name="text"/>
+        <xsl:choose>
+            <xsl:when test="number($text)"><xsl:value-of select="number(Linear_regression:calculate_matrix__x3A__value($text))"/></xsl:when>
+            <xsl:when test="$Linear_regression:name__x3A__set='default_db__x3A__BI_audit_BENFORD:FieldType'">
+                <xsl:value-of select="$text"/>
+            </xsl:when>
+            <xsl:when test="$Linear_regression:name__x3A__set='default_db__x3A__BI_audit_BENFORD:leadingTime'"><xsl:value-of select="number(Linear_regression:calculate_matrix__x3A__value(replace(replace($text,'-',''),'\|','')))"/></xsl:when>
+            <xsl:when test="$Linear_regression:name__x3A__set='default_db__x3A__BI_audit_BENFORD:leadingTimeYear'"><xsl:value-of select="number(Linear_regression:calculate_matrix__x3A__value(replace(replace($text,'-',''),'\|','')))"/></xsl:when>
+            <xsl:when test="$Linear_regression:name__x3A__set='default_db__x3A__BI_audit_BENFORD:leadingTimeYear-month'"><xsl:value-of select="number(Linear_regression:calculate_matrix__x3A__value(replace(replace($text,'-',''),'\|','')))"/></xsl:when>
+            <xsl:when test="$Linear_regression:name__x3A__set='default_db__x3A__BI_audit_BENFORD:leadingTimeYear-quarter'"><xsl:value-of select="number(Linear_regression:calculate_matrix__x3A__value(replace(replace($text,'-',''),'\|','')))"/></xsl:when>
+            <xsl:when test="matches($text,'[0-9].[0-9]')"><xsl:value-of select="number(replace(replace(system_cache__dita:year-month($text),'-',''),'\|',''))"/></xsl:when>
+            <xsl:otherwise><xsl:value-of select="number(replace(replace($text,'-',''),'\|',''))"/></xsl:otherwise>
+        </xsl:choose>
+    </xsl:function>
+    
     <xsl:template mode="Linear_regression:calculate_data.XY" match="@*">
         <xsl:param name="Linear_regression:Y_attribute__x3A__set" required="yes"/>
         <xsl:param name="Linear_regression:X_attribute__x3A__set" required="yes"/>
@@ -215,17 +296,17 @@
                 <Linear_regression:X>
                     <xsl:choose>
                         <xsl:when test="$Linear_regression:X_attribute__x3A__set='default_db__x3A__BI_audit_BENFORD:FieldType'">
-                            <xsl:value-of select="../number(text())"/>
+                            <xsl:value-of select="../Linear_regression:convert__x3A__to__axis__digit($Linear_regression:X_attribute__x3A__set,current())"/>
                         </xsl:when>
                         <xsl:otherwise>
-                            <xsl:value-of select="number(replace(replace(current(),'-',''),'\|',''))"/>
+                            <xsl:value-of select="Linear_regression:convert__x3A__to__axis__digit($Linear_regression:X_attribute__x3A__set,current())"/>
                         </xsl:otherwise>
                     </xsl:choose>
                 </Linear_regression:X>
             </xsl:when>
             <xsl:when test="name()=$Linear_regression:Y_attribute__x3A__set">
                 <Linear_regression:Y>
-                    <xsl:value-of select="number(replace(replace(current(),'-',''),'\|',''))"/>
+                    <xsl:value-of select="Linear_regression:convert__x3A__to__axis__digit($Linear_regression:Y_attribute__x3A__set,current())"/>
                 </Linear_regression:Y>
             </xsl:when>
         </xsl:choose>

+ 3 - 1
SE/schema/default_db_xml_cache.public/default_db/dateTime.xsl

@@ -41,6 +41,7 @@
     
     <xsl:function name="system_cache__dita:year-month">
         <xsl:param name="date"/>
+        <xsl:variable name="out">
         <xsl:choose>
             
             <xsl:when test="string($date) castable as xs:dateTime">
@@ -62,7 +63,8 @@
             </xsl:otherwise>
             
         </xsl:choose>
-        
+        </xsl:variable>
+        <xsl:value-of select="$out"/>
         
     </xsl:function>
     

+ 73 - 23
SE/schema/default_db_xml_cache.public/default_db/graph_gnuplot/graph_gnuplot.simpletable__x3A__from_rows__x3A__analyze.xsl

@@ -15,11 +15,43 @@
     
     <xsl:template name="p5gnuplot:simpletable__x3A__from_rows.xsl.dita__x3A__analyze">
         <xsl:param name="fileindex" required="yes"/>
+        <!--<xsl:variable name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__load-document">
+            <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__load-document">
+                <xsl:with-param name="system_cache__dita:root__x3A__name">simpletable__x3A__from_rows.xsl.dita__x3A__analyze</xsl:with-param>
+                <xsl:with-param name="fileindex" select="$fileindex"/>
+            </xsl:call-template>
+        </xsl:variable>-->
         <xsl:choose>
+            <!--<xsl:when test="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__load-document/*">
+                <xsl:message>#26 file loaded $fileindex=<xsl:value-of select="$fileindex"/></xsl:message>
+                <xsl:copy-of select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__load-document/p5gnuplot:simpletable__x3A__from_rows.xsl.dita__x3A__analyze"/>
+            </xsl:when>-->
             <xsl:when test="p5gnuplot:graph.gnuplot.dita__x3A__if__x3A__aviable($fileindex) and p5gnuplot:graph.debug.xtics.xml__x3A__if__x3A__aviable($fileindex)">
-                <xsl:apply-templates mode="p5gnuplot:simpletable__x3A__from_rows.xsl.dita__x3A__analyze" select="doc(p5gnuplot:set.gnuplot.debug.xtics.xml($fileindex))">
-                    <xsl:with-param name="fileindex" select="$fileindex" tunnel="yes"/>
-                </xsl:apply-templates>
+                <!--<xsl:message>#26-B NOT file loaded $fileindex=<xsl:value-of select="$fileindex"/>; analyzing</xsl:message>-->
+                <!--<xsl:variable name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__result-document">-->
+                    <!--<p5gnuplot:simpletable__x3A__from_rows.xsl.dita__x3A__analyze>-->
+                <xsl:choose>
+                    <xsl:when test="doc-available(p5gnuplot:set.gnuplot.debug.xtics.xml($fileindex))">
+                        <xsl:apply-templates mode="p5gnuplot:simpletable__x3A__from_rows.xsl.dita__x3A__analyze" select="doc(p5gnuplot:set.gnuplot.debug.xtics.xml($fileindex))">
+                            <xsl:with-param name="fileindex" select="$fileindex" tunnel="yes"/>
+                        </xsl:apply-templates>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <foreign props="error_113_unaviable_file">doc-available(p5gnuplot:set.gnuplot.debug.xtics.xml($fileindex))</foreign>
+                            
+                        
+                    </xsl:otherwise>
+                </xsl:choose>
+                
+                    
+                    <!--</p5gnuplot:simpletable__x3A__from_rows.xsl.dita__x3A__analyze>-->
+                <!--</xsl:variable>-->
+                <!--<xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__result-document">
+                    <xsl:with-param name="fileindex" select="$fileindex"/>
+                    <xsl:with-param name="system_cache__dita:root__x3A__name">simpletable__x3A__from_rows.xsl.dita__x3A__analyze</xsl:with-param>
+                    <xsl:with-param name="context__x3A__to__x3A__save" select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__result-document"/>
+                </xsl:call-template>-->
+                <!--<xsl:copy-of select="$default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__result-document"/>-->
             </xsl:when>
         </xsl:choose>
     </xsl:template>
@@ -60,11 +92,24 @@
                     <equation-inline>
                         Osie Y (wszystkie)
                     </equation-inline>
-                    <equation-inline>
-                        <xsl:call-template name="system_cache__dita:graph.dat.row__x3A__from__ytics.xml__x3A__detect_Y" />
-                            
-                        
-                    </equation-inline>
+                    
+                        <xsl:variable name="system_cache__dita:graph.dat.row__x3A__from__ytics.xml__x3A__detect_Y">
+                            <equation-inline>
+                                <xsl:call-template name="system_cache__dita:graph.dat.row__x3A__from__ytics.xml__x3A__detect_Y" />
+                            </equation-inline>
+                        </xsl:variable>
+                    <xsl:for-each-group select="$system_cache__dita:graph.dat.row__x3A__from__ytics.xml__x3A__detect_Y//equation-inline[@props='yaxis']" group-by="descendant::*[@props='p5gnuplot__dat.sthead.ytics.row.xml__x3A__detect_Y']/text()">
+                        <xsl:copy>
+                            <xsl:copy-of select="@*"/>
+                            <equation-inline><b><xsl:value-of select="current-grouping-key()"/></b></equation-inline>
+                            <equation-inline>ilość: </equation-inline>
+                            <equation-inline> <b><xsl:value-of select="count(current-group())"/></b></equation-inline>
+                            <equation-inline><xsl:for-each select="current-group()//*[@props='position']"><b><xsl:value-of select="text()"/></b><xsl:if test="not(position()=last())"><xsl:text>, </xsl:text></xsl:if></xsl:for-each></equation-inline>
+                            <xsl:comment>#017 iso</xsl:comment>
+                            <!--<foreign props="debug"><xsl:copy-of select="current-group()"></xsl:copy-of></foreign>-->
+                        </xsl:copy>
+                    </xsl:for-each-group>
+                    <xsl:comment>#109 eof osie</xsl:comment>
                 </dd>
                 <dd props="detect_X.all">
                     <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__assign__id">
@@ -76,9 +121,12 @@
                         Osie X
                     </equation-inline>
                     <equation-inline>
+                        
+                        
                         <xsl:call-template name="system_cache__dita:graph.dat.row__x3A__from__ytics.xml__x3A__detect_X" >
                             <xsl:with-param name="fileindex" select="$fileindex"/>
                         </xsl:call-template>
+                        
                     </equation-inline>
                 </dd>
                 
@@ -206,9 +254,9 @@
                         Powiązania do innych elementów o podobnych cechach
                     </dt>
                     <dd>
-                        <equation-inline>
+                        <!--<equation-inline>
                             Wnioski
-                        </equation-inline>
+                        </equation-inline>-->
                     </dd>
                 </dlentry>
             </xsl:for-each>
@@ -258,14 +306,15 @@
     
     
     <xsl:template mode="system_cache__dita:graph.dat.row__x3A__from__ytics.xml__x3A__detect_Y" match="p5gnuplot:dat.sthead">
-        
+        <equation-inline props="yaxis">
         <ph props="p5gnuplot__file.row.y_detect_Y_133"><xsl:if test="count(preceding-sibling::p5gnuplot:dat.sthead) &gt;0">, </xsl:if> <equation-inline props="position"><xsl:value-of select="count(preceding-sibling::p5gnuplot:dat.sthead)+1"/></equation-inline>)</ph>
-        <q props="p5gnuplot__dat.sthead.ytics.row.xml__x3A__detect_Y">
+        <ph props="p5gnuplot__dat.sthead.ytics.row.xml__x3A__detect_Y">
             <xsl:apply-templates mode="system_cache__dita:localname.translate" select="@system_cache__dita:graph.yaxis.platform"/>
-        </q>
-        <markupname>
+        </ph>
+            <equation-inline>
             <xsl:value-of select="@p5gnuplot:value"/>
-        </markupname>
+        </equation-inline>
+        </equation-inline>
     </xsl:template>
     
     
@@ -288,17 +337,18 @@
     </xsl:template>
     
     <xsl:template mode="system_cache__dita:graph.dat.row__x3A__from__ytics.xml__x3A__detect_X" match="p5gnuplot:dat.sthead.ytics.row">
-        
+        <equation-inline props="xaxis">
         <ph props="p5gnuplot__dat.sthead.ytics.row_163_cnt"><xsl:if test="count(preceding::p5gnuplot:dat.sthead.ytics.row) &gt;0">, </xsl:if><equation-inline props="position"><xsl:value-of select="count(preceding::p5gnuplot:dat.sthead.ytics.row)+1"/></equation-inline>) </ph>
-        <q props="p5gnuplot__dat.sthead.ytics.row_163">
-            <xsl:apply-templates mode="system_cache__dita:localname.translate" select="@system_cache__dita:graph.xaxis.platform"/>
-        </q>
+        <ph props="p5gnuplot__dat.sthead.ytics.row_163">
+            <b><xsl:apply-templates mode="system_cache__dita:localname.translate" select="@system_cache__dita:graph.xaxis.platform"/></b>
+        </ph>
         <ph props="p5gnuplot__dat.sthead.ytics.row_199_props">
             <xsl:apply-templates mode="system_cache__dita:localname.translate" select="@system_cache__dita:graph.xaxis.props"/>
         </ph>
-        <markupname>
+            <equation-inline>
             <xsl:value-of select="@p5gnuplot:value"/>
-        </markupname>
+        </equation-inline>
+        </equation-inline>
     </xsl:template>
     
     <xsl:template mode="system_cache__dita:graph.dat.row__x3A__from__ytics.xml__x3A__detect_X system_cache__dita:graph.dat.row__x3A__from__ytics.xml__x3A__detect_Y" match="text()|comment()"/>
@@ -361,9 +411,9 @@
         
     
     <xsl:template match="system_cache__dita:graph.yaxis.platform" mode="p5gnuplot:simpletable__x3A__from_rows.xsl.dita__x3A__detect__x3A__rowset.Y">
-        <q props="p5gnuplot.current-grouping-key.xtics">
+        <ph props="p5gnuplot.current-grouping-key.xtics">
             <xsl:apply-templates mode="system_cache__dita:localname.translate" select="@system_cache__dita:graph.yaxis.platform"/>
-        </q>
+        </ph>
         <!--<tt><xsl:value-of select="."/></tt>-->
     </xsl:template>
     

+ 62 - 64
SE/schema/default_db_xml_cache.public/default_db/graph_gnuplot/graph_gnuplot.simpletable__x3A__graph.stats.xsl

@@ -24,23 +24,28 @@
         <xsl:param name="system_cache__dita:context.path.attrs.nodeset" required="yes"/>
         <xsl:param name="default_db__x3A__BI_audit_BENFORD:FieldType" required="no"/>
         <xsl:param name="default_db__x3A__BI_audit_BENFORD:ValueType" required="yes"/><!-- which field value to use  attr -->
-        <xsl:param name="p5gnuplot:simpletable__x3A__graph.stats.group_by" select="$default_db__x3A__BI_audit_BENFORD:FieldType" /><!-- which field value to use  attr -->
+        <xsl:param name="p5gnuplot:simpletable__x3A__graph.stats.group_by.root" select="$default_db__x3A__BI_audit_BENFORD:FieldType" /><!-- which field value to use  attr -->
+        <xsl:param name="p5gnuplot:simpletable__x3A__graph.stats.group_by" select="$default_db__x3A__BI_audit_BENFORD:ValueType" />
         <xsl:param name="group.root"/>
         <xsl:param name="group.count"/>
+        <xsl:param name="group.count__x3A__path__x3A__length"/>
         <xsl:param name="group.sum"/>
         <xsl:param name="audience"/>
         <strow props="graph.stats">
             
-            <xsl:choose>
-                <xsl:when test="string-length($group.root) &gt;0">
+            
+            <xsl:comment>#38 $p5gnuplot:simpletable__x3A__graph.stats.group_by.root = <xsl:value-of select="$p5gnuplot:simpletable__x3A__graph.stats.group_by.root"/> ; $default_db__x3A__BI_audit_BENFORD:FieldType = <xsl:value-of select="$default_db__x3A__BI_audit_BENFORD:FieldType"/>; </xsl:comment>
+            <xsl:comment>#39 p5gnuplot:simpletable__x3A__graph.stats.group_by = <xsl:value-of select="$p5gnuplot:simpletable__x3A__graph.stats.group_by"/> ; $$default_db__x3A__BI_audit_BENFORD:ValueType = <xsl:value-of select="$default_db__x3A__BI_audit_BENFORD:ValueType"/>; </xsl:comment>
+            
                     <xsl:variable name="current-group.parent.count" select="count(current-group())"/>
-                    <xsl:for-each-group select="$system_cache__dita:context.path.attrs.nodeset/*/*" group-by="@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]">
-                        <xsl:sort select="@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]" order="ascending"/>
+            <xsl:for-each-group select="$system_cache__dita:context.path.attrs.nodeset/*/*" group-by="@*[ name()=$p5gnuplot:simpletable__x3A__graph.stats.group_by.root ]">
+                <xsl:sort select="@*[ name()=$p5gnuplot:simpletable__x3A__graph.stats.group_by.root ]" order="ascending"/>
                         <!--<stentry audience="rozklad_{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}" current-grouping-key="{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}" ><xsl:value-of select="count(current-group())"/></stentry>-->
                         <!--<stentry audience="rozklad_{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}" current-grouping-key="{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}" ><xsl:value-of select="sum(current-group()/*[@default_db__x3A__BI_audit_BENFORD:leadingNumber]/number())"/></stentry>-->
                         
-                        
-                        <stentry props="group.root" audience="{$audience}_{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}" current-grouping-key="{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}" ><xsl:call-template name="default_db__x3A__BI_audit_BENFORD:generate__x3A__copy_attrs"/>
+                <xsl:if test="$group.root">      
+                    <stentry props="group.root" rev=" p5gnuplot:simpletable__x3A__graph.stats.group_by.root= {$p5gnuplot:simpletable__x3A__graph.stats.group_by.root}" audience="{$audience}_{@*[ name()=$p5gnuplot:simpletable__x3A__graph.stats.group_by.root ]}" current-grouping-key="{@*[ name()=$p5gnuplot:simpletable__x3A__graph.stats.group_by.root ]}" ><xsl:call-template name="default_db__x3A__BI_audit_BENFORD:generate__x3A__copy_attrs"/>
+                    
                             <xsl:call-template name="p5gnuplot:set.graph.group">
                                 <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:FieldType" select="$default_db__x3A__BI_audit_BENFORD:FieldType"/>
                                 <xsl:with-param name="group__x3A__value" select="$group.root"/>
@@ -51,66 +56,59 @@
                                 </xsl:apply-templates>
                             </xsl:for-each>
                             <!--<xsl:value-of select="sum(current-group()/*[@default_db__x3A__BI_audit_BENFORD:leadingNumber]/number())"/>--></stentry>
+                </xsl:if>
+                        <xsl:for-each-group  select="current-group()" group-by="@*[name()=$p5gnuplot:simpletable__x3A__graph.stats.group_by]"><!-- todo other -->
+                                    <xsl:sort select="number(@*[ name()=$p5gnuplot:simpletable__x3A__graph.stats.group_by ])" data-type="number" order="ascending"/>
+                                    
+                                    <xsl:if test="$group.sum">
+                                        <stentry rev=" group-by {$p5gnuplot:simpletable__x3A__graph.stats.group_by}"   props="group.sum"  current-grouping-key="{@*[ name()=$p5gnuplot:simpletable__x3A__graph.stats.group_by ]}"  audience="{$audience}_{@*[ name()=$p5gnuplot:simpletable__x3A__graph.stats.group_by ]}"><!-- {@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]} -->
+                                            <xsl:call-template name="p5gnuplot:set.graph.group">
+                                                <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:FieldType" select="$default_db__x3A__BI_audit_BENFORD:FieldType"/>
+                                                <xsl:with-param name="group__x3A__value" select="$group.sum"/>
+                                            </xsl:call-template>
+                                            
+                                            <xsl:for-each select="current-group()">
+                                                <xsl:apply-templates mode="p5gnuplot:simpletable__x3A__graph.stats" select=".">
+                                                    <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:FieldType" select="$default_db__x3A__BI_audit_BENFORD:ValueType"/>
+                                                    
+                                                </xsl:apply-templates>
+                                            </xsl:for-each>
+                                        </stentry>
+                                    </xsl:if>
+                                    <xsl:if test="$group.count">
+                                    <stentry props="group.count" current-grouping-key="{@*[ name()=$p5gnuplot:simpletable__x3A__graph.stats.group_by ]}"  audience="{$audience}_{@*[ name()=$p5gnuplot:simpletable__x3A__graph.stats.group_by ]}">
+                                            <xsl:call-template name="p5gnuplot:set.graph.group">
+                                                <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:FieldType" select="$default_db__x3A__BI_audit_BENFORD:FieldType"/>
+                                                <xsl:with-param name="group__x3A__value" select="$group.count"/>
+                                            </xsl:call-template>
+                                            <xsl:for-each select="current-group()">
+                                                <xsl:apply-templates mode="p5gnuplot:simpletable__x3A__graph.stats" select=".">
+                                                    <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:FieldType" select="$default_db__x3A__BI_audit_BENFORD:ValueType"/>
+                                                </xsl:apply-templates>
+                                            </xsl:for-each>
+                                        </stentry>
+                                    </xsl:if>
+                                </xsl:for-each-group>
+                        
+                        
+                
+                <xsl:if test="$group.count__x3A__path__x3A__length">
+                    <stentry props="group.count__x3A__path__x3A__length" current-grouping-key="{@*[ name()=$default_db__x3A__BI_audit_BENFORD:ValueType ]}"  audience="{$audience}_{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}"><!-- {@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]} -->
+                        <xsl:call-template name="p5gnuplot:set.graph.group">
+                            <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:FieldType" select="$default_db__x3A__BI_audit_BENFORD:FieldType"/>
+                            <xsl:with-param name="group__x3A__value" select="$group.count__x3A__path__x3A__length"/>
+                        </xsl:call-template>
                         
-                        <xsl:for-each-group select="current-group()" group-by="@*[name()=$default_db__x3A__BI_audit_BENFORD:ValueType]"><!-- todo other -->
-                            <xsl:sort select="number(@*[ name()=$default_db__x3A__BI_audit_BENFORD:ValueType ])" data-type="number" order="ascending"/>
-                            <stentry props="group.count" current-grouping-key="{@*[ name()=$default_db__x3A__BI_audit_BENFORD:ValueType ]}"  audience="{$audience}_{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}">
-                                <xsl:call-template name="p5gnuplot:set.graph.group">
-                                    <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:FieldType" select="$default_db__x3A__BI_audit_BENFORD:FieldType"/>
-                                    <xsl:with-param name="group__x3A__value" select="$group.count"/>
-                                </xsl:call-template>
-                                <xsl:for-each select="current-group()">
-                                    <xsl:apply-templates mode="p5gnuplot:simpletable__x3A__graph.stats" select=".">
-                                        <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:FieldType" select="$default_db__x3A__BI_audit_BENFORD:ValueType"/>
-                                    </xsl:apply-templates>
-                                </xsl:for-each>
-                            </stentry>
-                            <stentry props="group.sum" current-grouping-key="{@*[ name()=$default_db__x3A__BI_audit_BENFORD:ValueType ]}"  audience="{$audience}_{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}"><!-- {@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]} -->
-                                <xsl:call-template name="p5gnuplot:set.graph.group">
-                                    <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:FieldType" select="$default_db__x3A__BI_audit_BENFORD:FieldType"/>
-                                    <xsl:with-param name="group__x3A__value" select="$group.sum"/>
-                                </xsl:call-template>
+                        <xsl:for-each select="current-group()">
+                            <xsl:apply-templates mode="p5gnuplot:simpletable__x3A__graph.stats" select=".">
+                                <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:FieldType" select="$default_db__x3A__BI_audit_BENFORD:ValueType"/>
                                 
-                                <xsl:for-each select="current-group()">
-                                    <xsl:apply-templates mode="p5gnuplot:simpletable__x3A__graph.stats" select=".">
-                                        <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:FieldType" select="$default_db__x3A__BI_audit_BENFORD:ValueType"/>
-                                        
-                                    </xsl:apply-templates>
-                                </xsl:for-each>
-                            </stentry>
-                        </xsl:for-each-group>
-                    </xsl:for-each-group>
-                </xsl:when>
-                <xsl:otherwise>
-                    <xsl:for-each-group select="$system_cache__dita:context.path.attrs.nodeset/*/*" group-by="@*[name()=$p5gnuplot:simpletable__x3A__graph.stats.group_by]"><!-- todo other -->
-                        <xsl:sort select="number(@*[ name()=$default_db__x3A__BI_audit_BENFORD:ValueType ])" data-type="number" order="ascending"/>
-                        <stentry props="group.count" current-grouping-key="{@*[ name()=$default_db__x3A__BI_audit_BENFORD:ValueType ]}"  audience="{$audience}_{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}">
-                            <xsl:call-template name="p5gnuplot:set.graph.group">
-                                <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:FieldType" select="$default_db__x3A__BI_audit_BENFORD:FieldType"/>
-                                <xsl:with-param name="group__x3A__value" select="$group.count"/>
-                            </xsl:call-template>
-                            <xsl:for-each select="current-group()">
-                                <xsl:apply-templates mode="p5gnuplot:simpletable__x3A__graph.stats" select=".">
-                                    <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:FieldType" select="$default_db__x3A__BI_audit_BENFORD:ValueType"/>
-                                </xsl:apply-templates>
-                            </xsl:for-each>
-                        </stentry>
-                        <stentry props="group.sum" current-grouping-key="{@*[ name()=$default_db__x3A__BI_audit_BENFORD:ValueType ]}"  audience="{$audience}_{@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]}"><!-- {@*[ name()=$default_db__x3A__BI_audit_BENFORD:FieldType ]} -->
-                            <xsl:call-template name="p5gnuplot:set.graph.group">
-                                <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:FieldType" select="$default_db__x3A__BI_audit_BENFORD:FieldType"/>
-                                <xsl:with-param name="group__x3A__value" select="$group.sum"/>
-                            </xsl:call-template>
-                            
-                            <xsl:for-each select="current-group()">
-                                <xsl:apply-templates mode="p5gnuplot:simpletable__x3A__graph.stats" select=".">
-                                    <xsl:with-param name="default_db__x3A__BI_audit_BENFORD:FieldType" select="$default_db__x3A__BI_audit_BENFORD:ValueType"/>
-                                    
-                                </xsl:apply-templates>
-                            </xsl:for-each>
-                        </stentry>
+                            </xsl:apply-templates>
+                        </xsl:for-each>
+                    </stentry>
+                </xsl:if>
+                
                     </xsl:for-each-group>
-                </xsl:otherwise>
-            </xsl:choose>
             
             
         </strow>

+ 23 - 13
SE/schema/default_db_xml_cache.public/default_db/graph_gnuplot/graph_gnuplot.simpletable__x3A__graph.stats__x3A__analyze.xsl

@@ -39,12 +39,21 @@
             <q props="p5gnuplot.current-grouping-key.xtics">rok|kwartał</q>
         </equation-inline>-->
         <!--<p5gnuplot:simpletable__x3A__graph.stats__x3A__analyze>-->
-            <xsl:apply-templates mode="p5gnuplot:simpletable__x3A__graph.stats__x3A__analyze" select="doc(p5gnuplot:set.graph.stats.xml($fileindex))">
-                <xsl:with-param name="system_cache__dita:element__x3A__parent" select="$system_cache__dita:element__x3A__parent"/>
-                <xsl:with-param name="system_cache__dita:graph.ytics_detect_row" select="$system_cache__dita:graph.ytics_detect_row"/>
-                <xsl:with-param name="p5gnuplot:simpletable__x3A__from_rows.xsl.dita__x3A__detect__x3A__rowset.Y" select="$p5gnuplot:simpletable__x3A__from_rows.xsl.dita__x3A__detect__x3A__rowset.Y"/>
-                <xsl:with-param name="p5gnuplot:value" select="$p5gnuplot:value"/>
-            </xsl:apply-templates>
+        
+            <xsl:choose>
+                <xsl:when test="p5gnuplot:graph.stats.xml__x3A__detect__if__file_aviable($fileindex)">
+                    <xsl:apply-templates mode="p5gnuplot:simpletable__x3A__graph.stats__x3A__analyze" select="doc(p5gnuplot:set.graph.stats.xml($fileindex))">
+                        <xsl:with-param name="system_cache__dita:element__x3A__parent" select="$system_cache__dita:element__x3A__parent"/>
+                        <xsl:with-param name="system_cache__dita:graph.ytics_detect_row" select="$system_cache__dita:graph.ytics_detect_row"/>
+                        <xsl:with-param name="p5gnuplot:simpletable__x3A__from_rows.xsl.dita__x3A__detect__x3A__rowset.Y" select="$p5gnuplot:simpletable__x3A__from_rows.xsl.dita__x3A__detect__x3A__rowset.Y"/>
+                        <xsl:with-param name="p5gnuplot:value" select="$p5gnuplot:value"/>
+                    </xsl:apply-templates>
+                </xsl:when>
+                <xsl:otherwise>
+                    <foreign>#533 unaviable p5gnuplot:graph.stats.xml__x3A__detect__if__file_aviable($fileindex) = <xsl:value-of select="$fileindex"/> </foreign>
+                </xsl:otherwise>
+            </xsl:choose>
+        
             
         <!--</p5gnuplot:simpletable__x3A__graph.stats__x3A__analyze>-->
     </xsl:template>
@@ -128,6 +137,7 @@
                                     <xsl:with-param name="Linear_regression:X_element__x3A__set">p5gnuplot:stats</xsl:with-param>
                                     <xsl:with-param name="Linear_regression:Y_attribute__x3A__set">default_db__x3A__BI_audit_BENFORD:leadingTimeYear-month</xsl:with-param>
                                     <xsl:with-param name="Linear_regression:dataset" select="current-group()"/>
+                                    <xsl:with-param name="p5gnuplot:value" select="$p5gnuplot:value"/>
                                 </xsl:call-template>
                                 </xsl:variable>
                                 <xsl:apply-templates mode="Linear_regression:calculate_data__x3A__to_dita" select="$Linear_regression:calculate_data"/>
@@ -139,14 +149,14 @@
                         </dlentry>   
                         
                         <xsl:choose>
-                            <xsl:when test="current-group()/text()">
+                            <xsl:when test="number(current-group()[1])">
                                 <dlentry>
                                     <dt>
                                         min/max
                                     </dt>
                                     <xsl:element name="dd">
                                         <xsl:element name="{system_cache__dita:element.next($system_cache__dita:element__x3A__parent)}">
-                                            Minimum <xsl:value-of select="system_cache__dita:big_values_format(min(current-group()/number(text())))"/>
+                                            Minimum: <b><xsl:value-of select="system_cache__dita:big_values_format(min(current-group()/number(text())))"/></b> 
                                             <foreign>current-group()/name()= <xsl:value-of select="current-group()[1]/name()"/> , text()=<xsl:value-of select="text()"/></foreign>
                                         </xsl:element>
                                         <xsl:element name="{system_cache__dita:element.next($system_cache__dita:element__x3A__parent)}">
@@ -158,20 +168,20 @@
                                     </xsl:element>
                                     <xsl:element name="dd">
                                         <xsl:element name="{system_cache__dita:element.next($system_cache__dita:element__x3A__parent)}">
-                                            Maximum <xsl:value-of select="system_cache__dita:big_values_format(max(current-group()/number(text())))"/> 
+                                            Maximum: <b><xsl:value-of select="system_cache__dita:big_values_format(max(current-group()/number(text())))"/></b> 
                                         </xsl:element>
                                         <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__resolve__key">
                                             <xsl:with-param name="fid" select="current-group()[ max(number(text()))]/@fid"/>
                                         </xsl:call-template>
                                     </xsl:element>
                                     <xsl:element name="dd">
-                                        Średnia <xsl:value-of select="system_cache__dita:big_values_format(avg(current-group()/number(text())))"/> 
+                                        Średnia: <b><xsl:value-of select="system_cache__dita:big_values_format(avg(current-group()/number(text())))"/></b> 
                                     </xsl:element>
                                     <xsl:element name="dd">
-                                        Suma <xsl:value-of select="system_cache__dita:big_values_format(sum(current-group()/number(text())))"/> 
+                                        Suma: <b><xsl:value-of select="system_cache__dita:big_values_format(sum(current-group()/number(text())))"/></b> 
                                     </xsl:element>
                                     <xsl:element name="dd">
-                                        Ilość <xsl:value-of select="count(current-group()/number(text()))"/> 
+                                        Ilość: <b><xsl:value-of select="count(current-group()/number(text()))"/></b> 
                                     </xsl:element>
                                 </dlentry>
                             </xsl:when>
@@ -180,7 +190,7 @@
                                     <dt>
                                         wykrycie danych 
                                     </dt>
-                                    <dd>nieudane (brak wartości w zestawie danych)</dd>
+                                    <dd>nieudane (brak wartości w zestawie danych) [<!--<xsl:value-of select="current-group()//[1]text()[1]"/>-->]</dd>
                                 </dlentry>
                                 
                             </xsl:otherwise>

+ 7 - 3
SE/schema/default_db_xml_cache.public/default_db/graph_gnuplot/graph_gnuplot.xsl

@@ -322,10 +322,14 @@
         
         
         
+        <xsl:choose>
+            <xsl:when test="p5gnuplot:graph.stats.xml__x3A__if_data_aviable_to_save($system_cache__dita:graph.stats)">
+                <xsl:result-document href="{p5gnuplot:set.graph.stats.xml($fileindex)}" >
+                    <xsl:copy-of select="$system_cache__dita:graph.stats"/>
+                </xsl:result-document>
+            </xsl:when>
+        </xsl:choose>
         
-        <xsl:result-document href="{p5gnuplot:set.graph.stats.xml($fileindex)}" >
-                <xsl:copy-of select="$system_cache__dita:graph.stats"/>
-        </xsl:result-document>
         
          <xsl:result-document href="{$ditadir}/graph_to_image/{$fileindex}.gnuplot.debug.xml" >
             <p5gnuplot:DEBUG xmlns:p5gnuplot="http://biuro.biall-net.pl/WPS_Functions/graph_gnuplot">

+ 15 - 1
SE/schema/default_db_xml_cache.public/default_db/graph_gnuplot/graph_gnuplotdat.row__x3A__from__xtics__x3A__detect.xsl

@@ -252,6 +252,12 @@
         <xsl:copy-of select="count(strow[ position() = 1]/stentry)"/>
     </xsl:template>
     
+    <xsl:function name="p5gnuplot:graph.stats.xml__x3A__detect__if__file_aviable">
+        <xsl:param name="fileindex"/>
+        <xsl:choose>
+            <xsl:when test="doc-available(p5gnuplot:set.graph.stats.xml($fileindex))"><xsl:value-of select="1"/></xsl:when>
+        </xsl:choose>
+    </xsl:function>
     
     <xsl:template name="system_cache__dita:graph.stats__x3A__detect">
         <xsl:copy-of select="strow[ contains(@props,'graph.stats')]"/>
@@ -381,10 +387,18 @@ set xtics rotate
     <xsl:template name="system_cache__dita:graph.separate.outputs.auto__x3A__detect">
         <xsl:choose>
             <xsl:when test="contains(@props,'graph.separate.outputs.auto')"><xsl:value-of select="1"/></xsl:when>
-            <xsl:otherwise></xsl:otherwise>
+            <xsl:otherwise/>
         </xsl:choose>
     </xsl:template>
     
+    <xsl:function name="p5gnuplot:graph.stats.xml__x3A__if_data_aviable_to_save">
+        <xsl:param name="system_cache__dita:graph.stats"/>
+        <xsl:choose>
+            <xsl:when test="$system_cache__dita:graph.stats//*"><xsl:value-of select="1"/></xsl:when>
+            <xsl:otherwise><xsl:message>#382 unaviable data to save for $system_cache__dita:graph.stats </xsl:message></xsl:otherwise>
+        </xsl:choose>
+    </xsl:function>
+    
     <xsl:function name="p5gnuplot:graph.gnuplot.dita__x3A__if__x3A__aviable">
         <xsl:param name="fileindex"/>
         <xsl:choose>

+ 2 - 1
SE/schema/default_db_xml_cache.public/default_db/graph_gnuplot/graph_gnuplotdat.row__x3A__from__xtics__x3A__set.xsl

@@ -264,7 +264,7 @@ set output '</xsl:text><xsl:value-of select="$fileindex"/><xsl:text>.png'
         <xsl:param name="default_db__x3A__BI_audit_BENFORD:FieldType" required="yes"/>
         
         <xsl:choose>
-            <xsl:when test="string-length($group__x3A__value) &gt;0">
+            <xsl:when test="string-length(string($group__x3A__value)) &gt;1">
                 <xsl:attribute name="group" select="concat($group__x3A__value,@*[name()=$default_db__x3A__BI_audit_BENFORD:FieldType])"/>
             </xsl:when>
         </xsl:choose>
@@ -279,6 +279,7 @@ set output '</xsl:text><xsl:value-of select="$fileindex"/><xsl:text>.png'
     
     <xsl:function name="p5gnuplot:set.gnuplot.debug.xtics.xml">
         <xsl:param name="fileindex"/>
+        <xsl:message>#262 called p5gnuplot:set.gnuplot.debug.xtics.xml with <xsl:value-of select="$fileindex"/>; fileindex.</xsl:message>
         <xsl:value-of select="concat($ditadir,'/graph_to_image/',$fileindex,'.gnuplot.debug.xtics.xml')"/>
     </xsl:function>
     

+ 2 - 0
SE/schema/default_db_xml_cache.public/default_db/tree_to_dita.localname.translate.xsl

@@ -33,6 +33,8 @@
             <xsl:when test="$localname='BI_audit_KRS'"> KRS </xsl:when>
             <xsl:when test="$localname='BI_audit_MSIG'"> MSIG </xsl:when>
             <xsl:when test="$localname='BI_audit_KRS_person'"> KRS/o </xsl:when>
+            <xsl:when test="$localname='KRS_address'"> KRS/adr. </xsl:when>
+            
             <xsl:when test="$localname='BI_audit_MSIG_person'"> MSIG/o </xsl:when>
             <xsl:when test="$localname='BI_audit_ENERGA_PRACOWNICY'"> Pracow. </xsl:when>
             <xsl:when test="$localname='BI_audit_ENERGA_RUM_KONTRAHENCI'"> Kontr/RUM </xsl:when>

+ 2 - 0
SE/schema/default_db_xml_cache.public/default_db/tree_to_dita__x3A__to_merge.xsl

@@ -32,4 +32,6 @@
     
     <xsl:include href="Linear_regression/Linear_regression.xsl"/>
     
+    <xsl:include href="../math/sqrt.xsl"/>
+    
 </xsl:stylesheet>

+ 1 - 15
se.oxygen.xpr

@@ -2045,21 +2045,6 @@
                                     </list>
                                 </field>
                             </scenarioAssociation>
-                            <scenarioAssociation>
-                                <field name="url">
-                                    <String>../../../../opt/local/pl.procesy5/p5build_SE/temp/WPS_Functions/default_db/CRM_PROCES_tree/relations-164_000001/relations-164_000001.ditamap</String>
-                                </field>
-                                <field name="scenarioIds">
-                                    <list>
-                                        <String>DITA Map PDF - based on XSL-FO - Copy</String>
-                                    </list>
-                                </field>
-                                <field name="scenarioTypes">
-                                    <list>
-                                        <String>DITAMAP</String>
-                                    </list>
-                                </field>
-                            </scenarioAssociation>
                             <scenarioAssociation>
                                 <field name="url">
                                     <String>../../../../opt/local/pl.procesy5/p5build_SE/temp/WPS_Functions/default_db/CRM_PROCES_tree/relations-136_000006_/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row.410252____APT_trasy.dita</String>
@@ -2662,6 +2647,7 @@
             <file name="SE/schema/WPS_Functions/graph_tree_TODO_PROJ6806/graph_tree_yed.xsl"/>
             <file name="SE/schema/WPS_Functions/dita-ot/dita-ot-2.3.3/plugins/org.dita.pdf2/xsl/fo/i18n-postprocess.xsl"/>
             <file name="SE/schema/WPS_Functions/dita-ot/dita-ot-2.3.3/plugins/org.dita.pdf2/xsl/fo/i18n-postprocess_template.xsl"/>
+            <file name="SE/schema/default_db_xml_cache.public/default_db/Linear_regression/Linear_regression.xsl"/>
             <file name="SE/schema/WPS_Functions/dita-ot/dita-ot-2.3.3/plugins/org.dita.docbook/xsl/map2docbook.xsl"/>
             <file name="SE/schema/WPS_Functions/dita-ot/dita-ot-2.3.3/plugins/org.dita.eclipsehelp/xsl/map2eclipse.xsl"/>
             <file name="SE/schema/WPS_Functions/dita-ot/dita-ot-2.3.3/plugins/org.dita.eclipsehelp/xsl/map2eclipse_template.xsl"/>