|
@@ -0,0 +1,253 @@
|
|
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
|
|
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
|
|
|
+ xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
|
|
|
|
|
+ xmlns:system_cache__dita="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/dita.xsd"
|
|
|
|
|
+ xmlns:p5gnuplot="http://biuro.biall-net.pl/WPS_Functions/graph_gnuplot"
|
|
|
|
|
+ xmlns:default_db__x3A__BI_audit_ENERGA_RUM_UMOWY="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_UMOWY"
|
|
|
|
|
+ xmlns:default_db__x3A__BI_audit_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"
|
|
|
|
|
+ exclude-result-prefixes="xs"
|
|
|
|
|
+ version="2.0">
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:output indent="yes"/>
|
|
|
|
|
+ <xsl:strip-space elements="*"/>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:template name="p5gnuplot:simpletable__x3A__graph.stats__x3A__analyze" >
|
|
|
|
|
+ <xsl:param name="p5gnuplot:value"/>
|
|
|
|
|
+ <xsl:param name="fileindex" required="yes"/>
|
|
|
|
|
+ <xsl:param name="system_cache__dita:element__x3A__parent" required="yes" />
|
|
|
|
|
+ <xsl:param name="p5gnuplot:simpletable__x3A__from_rows.xsl.dita__x3A__detect__x3A__rowset.Y"/><!-- ograniczenie danych dla osi -->
|
|
|
|
|
+ <xsl:param name="system_cache__dita:graph.ytics_detect_row"/>
|
|
|
|
|
+ <!--example <equation-inline><!-\-#68 p5gnuplot:simpletable__x3A__from_rows.xsl.dita__x3A__detect__x3A__rowset-\-><!-\-#88-B found self bypass recurse-\->
|
|
|
|
|
+ <ph props="p5gnuplot__file.row.y_241">
|
|
|
|
|
+ <equation-inline props="position">3</equation-inline>) </ph>
|
|
|
|
|
+ <q props="p5gnuplot.current-grouping-key.xtics">rok|kwartał</q>
|
|
|
|
|
+ <ph props="p5gnuplot__file.row.y_241">, <equation-inline props="position">4</equation-inline>) </ph>
|
|
|
|
|
+ <q props="p5gnuplot.current-grouping-key.xtics">rok|kwartał</q>
|
|
|
|
|
+ <ph props="p5gnuplot__file.row.y_241">, <equation-inline props="position">5</equation-inline>) </ph>
|
|
|
|
|
+ <q props="p5gnuplot.current-grouping-key.xtics">rok|kwartał</q>
|
|
|
|
|
+ <ph props="p5gnuplot__file.row.y_241">, <equation-inline props="position">6</equation-inline>) </ph>
|
|
|
|
|
+ <q props="p5gnuplot.current-grouping-key.xtics">rok|kwartał</q>
|
|
|
|
|
+ <ph props="p5gnuplot__file.row.y_241">, <equation-inline props="position">7</equation-inline>) </ph>
|
|
|
|
|
+ <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>
|
|
|
|
|
+
|
|
|
|
|
+ <!--</p5gnuplot:simpletable__x3A__graph.stats__x3A__analyze>-->
|
|
|
|
|
+ </xsl:template>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:template mode="p5gnuplot:simpletable__x3A__graph.stats__x3A__analyze" match="*">
|
|
|
|
|
+ <xsl:param name="system_cache__dita:element__x3A__parent" required="yes" />
|
|
|
|
|
+ <xsl:comment>#32 matched = <xsl:value-of select="name()"/></xsl:comment>
|
|
|
|
|
+ </xsl:template>
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:template mode="p5gnuplot:simpletable__x3A__graph.stats__x3A__analyze" match="strow">
|
|
|
|
|
+ <xsl:param name="system_cache__dita:element__x3A__parent" required="yes" />
|
|
|
|
|
+ <xsl:param name="system_cache__dita:graph.ytics_detect_row" required="yes"/>
|
|
|
|
|
+ <xsl:param name="p5gnuplot:simpletable__x3A__from_rows.xsl.dita__x3A__detect__x3A__rowset.Y" required="yes"/>
|
|
|
|
|
+ <xsl:param name="p5gnuplot:value"/>
|
|
|
|
|
+ <!--<xsl:for-each-group select="stentry" group-by="@current-grouping-key">-->
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:variable name="system_cache__dita:element.next" select="system_cache__dita:element.next($system_cache__dita:element__x3A__parent)"/>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:for-each-group select="stentry/p5gnuplot:stats" group-by="parent::*/@props">
|
|
|
|
|
+ <xsl:variable name="system_cache__dita:graph.ytics_detect_row__x3A__if_current_histogram__x3A__detect">
|
|
|
|
|
+ <xsl:call-template name="system_cache__dita:graph.ytics_detect_row__x3A__if_current_histogram__x3A__detect">
|
|
|
|
|
+ <xsl:with-param name="col" select="parent::*/@col"/>
|
|
|
|
|
+ <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:call-template>
|
|
|
|
|
+ </xsl:variable>
|
|
|
|
|
+ <xsl:variable name="col" select="parent::*/@col"/>
|
|
|
|
|
+ <!--<dd>col=<xsl:value-of select="$col"/>;$p5gnuplot:value=<xsl:value-of select="$p5gnuplot:value"/>;$system_cache__dita:graph.ytics_detect_row__x3A__if_current_histogram__x3A__detect=<xsl:value-of select="$system_cache__dita:graph.ytics_detect_row__x3A__if_current_histogram__x3A__detect//@system_cache__dita:graph.ytics_detect_row__x3A__if_current_histogram__x3A__detect"/>
|
|
|
|
|
+ Test:<xsl:value-of select="system_cache__dita:graph.ytics_detect_row__x3A__if_current_histogram__x3A__detect($system_cache__dita:graph.ytics_detect_row,$p5gnuplot:simpletable__x3A__from_rows.xsl.dita__x3A__detect__x3A__rowset.Y,$col)"/>
|
|
|
|
|
+ </dd>-->
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="count(current-group())=0">
|
|
|
|
|
+ <xsl:comment>#88 count 0 </xsl:comment>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:when test="$p5gnuplot:value and $system_cache__dita:graph.ytics_detect_row__x3A__if_current_histogram__x3A__detect//@system_cache__dita:graph.ytics_detect_row__x3A__if_current_histogram__x3A__detect">
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <dlentry>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:element name="dt">
|
|
|
|
|
+ <xsl:element name="{system_cache__dita:element.next($system_cache__dita:element__x3A__parent)}">
|
|
|
|
|
+ Grupa <xsl:value-of select="current-grouping-key()"/> / <xsl:value-of select="@audience"/> / <xsl:value-of select="@group"/> <!-- fid <xsl:value-of select="@fid"/> col=<xsl:value-of select="parent::*/@col"/> ; <xsl:value-of select="$p5gnuplot:simpletable__x3A__from_rows.xsl.dita__x3A__detect__x3A__rowset.Y//varname[@props='system_cache__dita:graph.ytics_detect_row']/text()"/> -->
|
|
|
|
|
+ </xsl:element>
|
|
|
|
|
+ <!--dla grupy <xsl:value-of select="current-grouping-key()"/>; p5gnuplot:stats/@fid=<xsl:value-of select="p5gnuplot:stats/@fid"/> , name=<xsl:value-of select="name()"/>-->
|
|
|
|
|
+ <!-- min fid 1 = <xsl:value-of select="current-group()//p5gnuplot:stats/number(text())"/>
|
|
|
|
|
+ min fid 2 = <xsl:value-of select="current-group()//p5gnuplot:stats/text()"/>
|
|
|
|
|
+ min fin 22= <xsl:value-of select=".//p5gnuplot:stats"/>
|
|
|
|
|
+ min fin 23= <xsl:value-of select=".//p5gnuplot:stats/text()"/>
|
|
|
|
|
+ min fin 2a= <xsl:value-of select="descendant-or-self::p5gnuplot:stats[1]/text()"/>
|
|
|
|
|
+ min fid 3 = <xsl:value-of select="current-group()//p5gnuplot:stats[ min(number(text())) ]/@fid"/>
|
|
|
|
|
+
|
|
|
|
|
+ min fid 33 = <xsl:value-of select="current-group()//p5gnuplot:stats[ text()=min(current-group()//p5gnuplot:stats/number(text())) ]/@fid"/>
|
|
|
|
|
+
|
|
|
|
|
+ min fid 33vb = <xsl:value-of select="current-group()//p5gnuplot:stats[ text()=min(current-group()//p5gnuplot:stats/number(text())) ]/parent::stentry/@props"/>-->
|
|
|
|
|
+ </xsl:element>
|
|
|
|
|
+
|
|
|
|
|
+ <dd>
|
|
|
|
|
+ Wartości skrajne
|
|
|
|
|
+ </dd>
|
|
|
|
|
+
|
|
|
|
|
+ </dlentry>
|
|
|
|
|
+ <dlentry>
|
|
|
|
|
+
|
|
|
|
|
+ <dt>
|
|
|
|
|
+ Analiza regresji liniowej
|
|
|
|
|
+ </dt>
|
|
|
|
|
+ <dd>
|
|
|
|
|
+ <xsl:variable name="Linear_regression:calculate_data">
|
|
|
|
|
+ <xsl:call-template name="Linear_regression:calculate_data">
|
|
|
|
|
+ <!--<xsl:with-param name="Linear_regression:X_attribute__x3A__set">default_db__x3A__BI_audit_BENFORD:leadingNumber</xsl:with-param>-->
|
|
|
|
|
+ <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:call-template>
|
|
|
|
|
+ </xsl:variable>
|
|
|
|
|
+ <xsl:apply-templates mode="Linear_regression:calculate_data__x3A__to_dita" select="$Linear_regression:calculate_data"/>
|
|
|
|
|
+ <foreign>
|
|
|
|
|
+ <xsl:copy-of select="$Linear_regression:calculate_data"/>
|
|
|
|
|
+ </foreign>
|
|
|
|
|
+
|
|
|
|
|
+ </dd>
|
|
|
|
|
+ </dlentry>
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="current-group()/text()">
|
|
|
|
|
+ <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())))"/>
|
|
|
|
|
+ <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)}">
|
|
|
|
|
+ <xsl:value-of select="min(current-group()/number(text()))"/>
|
|
|
|
|
+ <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()[ text()=min(current-group()/number(text())) ][1]/@fid"/>
|
|
|
|
|
+ </xsl:call-template>
|
|
|
|
|
+ </xsl:element>
|
|
|
|
|
+ </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())))"/>
|
|
|
|
|
+ </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())))"/>
|
|
|
|
|
+ </xsl:element>
|
|
|
|
|
+ <xsl:element name="dd">
|
|
|
|
|
+ Suma <xsl:value-of select="system_cache__dita:big_values_format(sum(current-group()/number(text())))"/>
|
|
|
|
|
+ </xsl:element>
|
|
|
|
|
+ <xsl:element name="dd">
|
|
|
|
|
+ Ilość <xsl:value-of select="count(current-group()/number(text()))"/>
|
|
|
|
|
+ </xsl:element>
|
|
|
|
|
+ </dlentry>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:otherwise>
|
|
|
|
|
+ <dlentry>
|
|
|
|
|
+ <dt>
|
|
|
|
|
+ wykrycie danych
|
|
|
|
|
+ </dt>
|
|
|
|
|
+ <dd>nieudane (brak wartości w zestawie danych)</dd>
|
|
|
|
|
+ </dlentry>
|
|
|
|
|
+
|
|
|
|
|
+ </xsl:otherwise>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:when test="string-length($p5gnuplot:value)=0">
|
|
|
|
|
+ <xsl:comment>#155 going all </xsl:comment>
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:for-each-group select="stentry/p5gnuplot:stats" group-by="parent::*/@props">
|
|
|
|
|
+ <dlentry>
|
|
|
|
|
+ <dt>
|
|
|
|
|
+ min/max
|
|
|
|
|
+ </dt>
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:element name="dd">
|
|
|
|
|
+ Suma <xsl:value-of select="system_cache__dita:big_values_format(sum(current-group()/number(text())))"/>
|
|
|
|
|
+ </xsl:element>
|
|
|
|
|
+ <xsl:element name="dd">
|
|
|
|
|
+ Ilość <xsl:value-of select="count(current-group()/number(text()))"/>
|
|
|
|
|
+ </xsl:element>
|
|
|
|
|
+ </dlentry>
|
|
|
|
|
+ <dlentry>
|
|
|
|
|
+ <xsl:call-template name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:context.path.keyref__x3A__assign__id">
|
|
|
|
|
+ <xsl:with-param name="title">APU4_umowy</xsl:with-param>
|
|
|
|
|
+ <xsl:with-param name="graph.name">GAD_Linear_Regres</xsl:with-param>
|
|
|
|
|
+ <xsl:with-param name="system_cache__dita:element__x3A__name">dlentry</xsl:with-param>
|
|
|
|
|
+ <xsl:with-param name="fid" select="@fid"/>
|
|
|
|
|
+ </xsl:call-template>
|
|
|
|
|
+ <dt>
|
|
|
|
|
+ Analiza regresji liniowej dla całości zakresu
|
|
|
|
|
+ </dt>
|
|
|
|
|
+ <dd>
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:variable name="Linear_regression:calculate_data">
|
|
|
|
|
+ <xsl:call-template name="Linear_regression:calculate_data">
|
|
|
|
|
+ <xsl:with-param name="Linear_regression:X_attribute__x3A__set">default_db__x3A__BI_audit_BENFORD:leadingNumber</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:call-template>
|
|
|
|
|
+ </xsl:variable>
|
|
|
|
|
+ <xsl:apply-templates mode="Linear_regression:calculate_data__x3A__to_dita" select="$Linear_regression:calculate_data"/>
|
|
|
|
|
+ </dd>
|
|
|
|
|
+ </dlentry>
|
|
|
|
|
+ </xsl:for-each-group>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:otherwise>
|
|
|
|
|
+ <!--<xsl:element name="{system_cache__dita:element.next($system_cache__dita:element__x3A__parent)}">
|
|
|
|
|
+ Grupa nie z tego histogramu <xsl:value-of select="current-grouping-key()"/> fid <xsl:value-of select="@fid"/> col=<xsl:value-of select="@col"/> ; <xsl:value-of select="$p5gnuplot:simpletable__x3A__from_rows.xsl.dita__x3A__detect__x3A__rowset.Y//varname[@props='system_cache__dita:graph.ytics_detect_row']/text()"/> ;
|
|
|
|
|
+ </xsl:element>-->
|
|
|
|
|
+ <xsl:comment>#139 Grupa nie z tego histogramu <xsl:value-of select="current-grouping-key()"/> fid <xsl:value-of select="@fid"/> col=<xsl:value-of select="parent::*/@col"/> ; $$p5gnuplot:value=<xsl:value-of select="$p5gnuplot:value"/></xsl:comment>
|
|
|
|
|
+ </xsl:otherwise>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ </xsl:for-each-group>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <!--</xsl:for-each-group>-->
|
|
|
|
|
+ </xsl:template>
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:template mode="p5gnuplot:simpletable__x3A__graph.stats__x3A__analyze" match="text()|comment()"/>
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:template mode="p5gnuplot:simpletable__x3A__graph.stats__x3A__analyze" match="@*"/>
|
|
|
|
|
+
|
|
|
|
|
+</xsl:stylesheet>
|