|
@@ -274,37 +274,38 @@
|
|
|
<xsl:param name="Benford:force_raport" select="false()"/> <!-- default is to ignore when there is no anomaly - otherwise when true is to show analyzed data subject -->
|
|
<xsl:param name="Benford:force_raport" select="false()"/> <!-- default is to ignore when there is no anomaly - otherwise when true is to show analyzed data subject -->
|
|
|
<xsl:variable name="Benford:table_analys_exceed" select="."/>
|
|
<xsl:variable name="Benford:table_analys_exceed" select="."/>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- <topic id="{$id}" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
|
|
- xsi:noNamespaceSchemaLocation="urn:oasis:names:tc:dita:xsd:topic.xsd">
|
|
|
|
|
- <title>Nie wykryto anomalii Benford dla <xsl:value-of select="@Benford:subject"/> w <xsl:value-of select="@Benford:year"/> dla liczby <xsl:value-of select="@Benford:digit"/> liczone dla <xsl:value-of select="count($Benford:subject.xml/node()[name()=$Benford:subject.value])"/> pozycji.
|
|
|
|
|
- <!--Wartość: <xsl:value-of select="sum($Benford:subject.xml [ node()[name()=$Benford:subject] = $Benford:table_analys_exceed/@Benford:subject and substring(node()[name()=$Benford:subject.value],1,1)=$Benford:table_analys_exceed/@Benford:digit and node()[name()=$Benford:year]=$Benford:table_analys_exceed/@Benford:year ]/node()[name()=$Benford:subject.value])"/>-->
|
|
|
|
|
- Wartość: <xsl:value-of select="sum($Benford:subject.xml[substring(node()[name()=$Benford:subject.value],1,1)=$Benford:table_analys_exceed/@Benford:digit ] /node()[name()=$Benford:subject.value]) div 1000000"/> [mln]
|
|
|
|
|
-
|
|
|
|
|
- </title>
|
|
|
|
|
- <body>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <p>
|
|
|
|
|
- <xsl:value-of select="round(sum($Benford:subject.xml/node()[name()=$Benford:subject.value]) div 1000)"/> [tys] - ogólna wartość transakcji
|
|
|
|
|
-
|
|
|
|
|
- </p>
|
|
|
|
|
- <p>
|
|
|
|
|
- <xsl:value-of select="count($Benford:subject.xml/node()[name()=$Benford:subject.value]) "/> - ogólna ilość transakcji
|
|
|
|
|
- </p>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <simpletable frame="all" relcolwidth="8* 2* 2*" id="topic__Benford_table_analys_not_exceed_simpletable_{ generate-id()}" > <!-- system_cache__dita:width_cols="auto" -->
|
|
|
|
|
- <sthead>
|
|
|
|
|
- <stentry>Dane obiektu </stentry>
|
|
|
|
|
- <stentry>Data</stentry>
|
|
|
|
|
- <stentry>Kwota</stentry>
|
|
|
|
|
- </sthead>
|
|
|
|
|
-
|
|
|
|
|
- <!--<debug.285.Benford.subject.xml>
|
|
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="$Benford:force_raport">
|
|
|
|
|
+ <topic id="{$id}" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
|
|
+ xsi:noNamespaceSchemaLocation="urn:oasis:names:tc:dita:xsd:topic.xsd">
|
|
|
|
|
+ <title>Nie wykryto anomalii Benford dla <xsl:value-of select="@Benford:subject"/> w <xsl:value-of select="@Benford:year"/> dla liczby <xsl:value-of select="@Benford:digit"/> liczone dla <xsl:value-of select="count($Benford:subject.xml/node()[name()=$Benford:subject.value])"/> pozycji.
|
|
|
|
|
+ <!--Wartość: <xsl:value-of select="sum($Benford:subject.xml [ node()[name()=$Benford:subject] = $Benford:table_analys_exceed/@Benford:subject and substring(node()[name()=$Benford:subject.value],1,1)=$Benford:table_analys_exceed/@Benford:digit and node()[name()=$Benford:year]=$Benford:table_analys_exceed/@Benford:year ]/node()[name()=$Benford:subject.value])"/>-->
|
|
|
|
|
+ Wartość: <xsl:value-of select="sum($Benford:subject.xml[substring(node()[name()=$Benford:subject.value],1,1)=$Benford:table_analys_exceed/@Benford:digit ] /node()[name()=$Benford:subject.value]) div 1000000"/> [mln]
|
|
|
|
|
+
|
|
|
|
|
+ </title>
|
|
|
|
|
+ <body>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <p>
|
|
|
|
|
+ <xsl:value-of select="round(sum($Benford:subject.xml/node()[name()=$Benford:subject.value]) div 1000)"/> [tys] - ogólna wartość transakcji
|
|
|
|
|
+
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p>
|
|
|
|
|
+ <xsl:value-of select="count($Benford:subject.xml/node()[name()=$Benford:subject.value]) "/> - ogólna ilość transakcji
|
|
|
|
|
+ </p>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <simpletable frame="all" relcolwidth="8* 2* 2*" id="topic__Benford_table_analys_not_exceed_simpletable_{ generate-id()}" > <!-- system_cache__dita:width_cols="auto" -->
|
|
|
|
|
+ <sthead>
|
|
|
|
|
+ <stentry>Dane obiektu </stentry>
|
|
|
|
|
+ <stentry>Data</stentry>
|
|
|
|
|
+ <stentry>Kwota</stentry>
|
|
|
|
|
+ </sthead>
|
|
|
|
|
+
|
|
|
|
|
+ <!--<debug.285.Benford.subject.xml>
|
|
|
<xsl:copy-of select="$Benford:subject.xml"/>
|
|
<xsl:copy-of select="$Benford:subject.xml"/>
|
|
|
</debug.285.Benford.subject.xml>-->
|
|
</debug.285.Benford.subject.xml>-->
|
|
|
- <!--<debug.285.Benford.subject.xml.count>
|
|
|
|
|
|
|
+ <!--<debug.285.Benford.subject.xml.count>
|
|
|
<xsl:copy-of select="count($Benford:subject.xml//*)"/>
|
|
<xsl:copy-of select="count($Benford:subject.xml//*)"/>
|
|
|
</debug.285.Benford.subject.xml.count>
|
|
</debug.285.Benford.subject.xml.count>
|
|
|
<Benford:subject.value>
|
|
<Benford:subject.value>
|
|
@@ -323,26 +324,30 @@
|
|
|
<xsl:copy-of select="$Benford:force_raport"/>
|
|
<xsl:copy-of select="$Benford:force_raport"/>
|
|
|
</Benford:force_raport>
|
|
</Benford:force_raport>
|
|
|
-->
|
|
-->
|
|
|
- <!--<xsl:for-each select="$Benford:subject.xml [ node()[name()=$Benford:subject] = $Benford:table_analys_exceed/@Benford:subject and substring(node()[name()=$Benford:subject.value],1,1)=$Benford:table_analys_exceed/@Benford:digit and node()[name()=$Benford:year]=$Benford:table_analys_exceed/@Benford:year ]">-->
|
|
|
|
|
- <xsl:for-each select="$Benford:subject.xml">
|
|
|
|
|
- <strow>
|
|
|
|
|
- <xsl:variable name="current" select="current()"/>
|
|
|
|
|
- <stentry>
|
|
|
|
|
- <!--<xsl:value-of select="current()/node()[name()='default_db:Numer_rejestrowy']"/>-->
|
|
|
|
|
- <xsl:for-each select=" tokenize($Benford:subject.description,' ')">
|
|
|
|
|
- <xsl:variable name="nname" select="."/>
|
|
|
|
|
- <!--<xsl:comment>#171 checking for name '<xsl:value-of select="$nname"/>'</xsl:comment>-->
|
|
|
|
|
- <p><xsl:value-of select="$nname"/>: <xsl:value-of select="$current//node()[name()=$nname]"/></p>
|
|
|
|
|
- </xsl:for-each>
|
|
|
|
|
- </stentry>
|
|
|
|
|
- <stentry><xsl:value-of select="current()/node()[name()=$Benford:year]"/></stentry>
|
|
|
|
|
- <stentry><xsl:value-of select="system_cache__dita:big_values_format(current()/node()[name()=$Benford:subject.value])"/></stentry>
|
|
|
|
|
- </strow>
|
|
|
|
|
- </xsl:for-each>
|
|
|
|
|
-
|
|
|
|
|
- </simpletable>
|
|
|
|
|
- </body>
|
|
|
|
|
- </topic>
|
|
|
|
|
|
|
+ <!--<xsl:for-each select="$Benford:subject.xml [ node()[name()=$Benford:subject] = $Benford:table_analys_exceed/@Benford:subject and substring(node()[name()=$Benford:subject.value],1,1)=$Benford:table_analys_exceed/@Benford:digit and node()[name()=$Benford:year]=$Benford:table_analys_exceed/@Benford:year ]">-->
|
|
|
|
|
+ <xsl:for-each select="$Benford:subject.xml">
|
|
|
|
|
+ <strow>
|
|
|
|
|
+ <xsl:variable name="current" select="current()"/>
|
|
|
|
|
+ <stentry>
|
|
|
|
|
+ <!--<xsl:value-of select="current()/node()[name()='default_db:Numer_rejestrowy']"/>-->
|
|
|
|
|
+ <xsl:for-each select=" tokenize($Benford:subject.description,' ')">
|
|
|
|
|
+ <xsl:variable name="nname" select="."/>
|
|
|
|
|
+ <!--<xsl:comment>#171 checking for name '<xsl:value-of select="$nname"/>'</xsl:comment>-->
|
|
|
|
|
+ <p><xsl:value-of select="$nname"/>: <xsl:value-of select="$current//node()[name()=$nname]"/></p>
|
|
|
|
|
+ </xsl:for-each>
|
|
|
|
|
+ </stentry>
|
|
|
|
|
+ <stentry><xsl:value-of select="current()/node()[name()=$Benford:year]"/></stentry>
|
|
|
|
|
+ <stentry><xsl:value-of select="system_cache__dita:big_values_format(current()/node()[name()=$Benford:subject.value])"/></stentry>
|
|
|
|
|
+ </strow>
|
|
|
|
|
+ </xsl:for-each>
|
|
|
|
|
+
|
|
|
|
|
+ </simpletable>
|
|
|
|
|
+ </body>
|
|
|
|
|
+ </topic>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:otherwise><xsl:comment>#348 suppressed raport by $Benford:force_raport=false()</xsl:comment></xsl:otherwise>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+
|
|
|
|
|
|
|
|
</xsl:template>
|
|
</xsl:template>
|
|
|
|
|
|