Browse Source

benford fix

a.binder 7 năm trước cách đây
mục cha
commit
9233215061

+ 1 - 1
SE/projects/bocian

@@ -1 +1 @@
-Subproject commit 2e30e36430c760ab6c0f7d24e9062deaa28fba45
+Subproject commit b91300478fd6594a32737bb5e489967ada0b06ba

+ 74 - 30
SE/schema/default_db_xml_cache.public/default_db/BI_audit_BENFORD/default_db__x3A__BI_audit_BENFORD.BI_audit_BENFORD.podglad_analizy_liczb.records.xsl

@@ -48,8 +48,8 @@
                                 <xsl:choose>
                                     <xsl:when test="count(current-group()) &gt; $count_percent_cout ">
                                         <strow>
-                                            <stentry> <xsl:value-of select="$column"/></stentry>
-                                            <stentry> <xsl:value-of select="text()"/></stentry>
+                                            <stentry> <xsl:value-of select="replace($column,'_',' ')"/></stentry>
+                                            <stentry> <xsl:value-of select="replace(text(),'_',' ')"/></stentry>
                                             <stentry> <xsl:value-of select="count(current-group())"/></stentry>
                                         </strow>
                                     </xsl:when>
@@ -62,7 +62,7 @@
                 
                 <xsl:choose>
                     <xsl:when test="$default_db__x3A__BI_audit_BENFORD:BI_audit_BENFORD.podglad_analizy_liczb.records//stentry">
-                        <simpletable frame="all" relcolwidth="1* 4* 2*" >
+                        <simpletable frame="all" relcolwidth="1* 4* 2*" props="BI_audit_BENFORD.podgl_anal_liczb.records__65">
                             <sthead>
                                 <stentry>analizowana kolumna</stentry>
                                 <stentry>wartość</stentry>
@@ -148,19 +148,40 @@
                                 <xsl:sort select="count(current-group())" data-type="number"  order="descending"/>
                                 <xsl:choose>
                                     <xsl:when test="count(current-group()) &gt; $count_percent_cout ">
-                                        <strow > <!-- id="{default_db__x3A__BI_audit_BENFORD:system_cache__dita.files.topic.table.podglad_analizy_liczb.records.id($system_cache__dita:topic_name,@fid,parent::*/local-name(),local-name())}" -->
-                                            <stentry> <xsl:value-of select="$column"/></stentry>
-                                            <stentry> <xsl:value-of select="text()"/></stentry>
-                                            <stentry> <xsl:value-of select="count(current-group())"/></stentry>
-                                            <stentry> <xsl:value-of select="count(current-group())"/>
-                                                <xsl:for-each-group select="current-group()/parent::*[ not( contains($default_db__x3A__BI_audit_BENFORD:BI_audit_BENFORD.podglad_analizy_liczb.records.ignore,local-name())) ]" group-by="@fid">
-                                                    <xsl:message>#166 @fid ;<xsl:value-of select="@fid"/>;</xsl:message>
-                                                    <xref
-                                                        href="{default_db__x3A__BI_audit_BENFORD:system_cache__dita.files.topic.table.podglad_analizy_liczb.records.id.xref.fid.local_name($system_cache__dita:files.key.title.context.href.all_table,$system_cache__dita:files.key.topic.id.context.value.all_table,@fid,local-name())}"
-                                                            scope="local"/>
-                                                </xsl:for-each-group>
-                                            </stentry>
-                                        </strow>
+                                        <xsl:choose>
+                                            <xsl:when test="position() &lt;10">
+                                                <strow > <!-- id="{default_db__x3A__BI_audit_BENFORD:system_cache__dita.files.topic.table.podglad_analizy_liczb.records.id($system_cache__dita:topic_name,@fid,parent::*/local-name(),local-name())}" -->
+                                                    <stentry> <xsl:value-of select="replace($column,'_',' ')"/></stentry>
+                                                    <stentry> <xsl:value-of select="replace(text(),'_',' ')"/></stentry>
+                                                    <stentry> <xsl:value-of select="count(current-group())"/></stentry>
+                                                    <stentry> <!--<xsl:value-of select="count(current-group())"/>-->
+                                                        <xsl:for-each-group select="current-group()/parent::*[ not( contains($default_db__x3A__BI_audit_BENFORD:BI_audit_BENFORD.podglad_analizy_liczb.records.ignore,local-name())) ]" group-by="@fid">
+                                                            <xsl:message>#166 @fid ;<xsl:value-of select="@fid"/>;</xsl:message>
+                                                            <xsl:value-of select="substring-after(@fid,'.')"/><xsl:text> </xsl:text>
+                                                            <!--<xsl:choose>
+                                                                <xsl:when test="position() &lt;10">
+                                                                    <!-\- TODO  -\->
+                                                                    <!-\-<xref
+                                                                        href="{default_db__x3A__BI_audit_BENFORD:system_cache__dita.files.topic.table.podglad_analizy_liczb.records.id.xref.fid.local_name($system_cache__dita:files.key.title.context.href.all_table,$system_cache__dita:files.key.topic.id.context.value.all_table,@fid,local-name())}"
+                                                                        scope="local"/>-\->
+                                                                </xsl:when>
+                                                                <xsl:when test="position() = 10">
+                                                                    <sub>pominieto <xsl:value-of select="last() - position()"/> przykl.</sub>
+                                                                </xsl:when>
+                                                            </xsl:choose>-->
+                                                        </xsl:for-each-group>
+                                                    </stentry>
+                                                </strow>
+                                            </xsl:when>
+                                            <xsl:when test="position() = 10">
+                                                <strow>
+                                                    <stentry/>
+                                                    <stentry/>
+                                                    <stentry> pominięto <xsl:value-of select="last() - 10"/> przykładów </stentry>
+                                                    <stentry/>
+                                                </strow>
+                                            </xsl:when>
+                                        </xsl:choose>
                                     </xsl:when>
                                 </xsl:choose>
                                 
@@ -173,7 +194,7 @@
                 
                 <xsl:choose>
                     <xsl:when test="$default_db__x3A__BI_audit_BENFORD:BI_audit_BENFORD.podglad_analizy_liczb.records//stentry">
-                        <simpletable frame="all" relcolwidth="1* 4* 2* 6*"  >
+                        <simpletable frame="all" relcolwidth="1* 4* 2* 3*"  props="BI_audit_BENFORD.podgl_anal_liczb.records__176">
                             <sthead>
                                 <stentry>analizowana kolumna</stentry>
                                 <stentry>wartość</stentry>
@@ -212,7 +233,7 @@
                 <xsl:otherwise><xsl:value-of select="$count_percent_cout"/></xsl:otherwise>
             </xsl:choose>
         </xsl:variable>
-        <topic>
+        <topic props="BI_audit_BENFORD.podgl_anal_liczb.records__215">
             <xsl:copy-of select="system_cache__dita:files.key.topic.title.attrs.context(.,'topic',$system_cache__dita:topic_name)"/>
             <title>
                 Wszystkie dane 
@@ -222,10 +243,7 @@
                 
             </title>
             <body>
-                
-                
-                
-               
+
                         <xsl:for-each-group select=".//*[@fid and not(contains($default_db__x3A__BI_audit_BENFORD:BI_audit_BENFORD.podglad_analizy_liczb.records.ignore,local-name()))]" group-by="local-name()">
                             <xsl:sort select="count(current-grouping-key())" data-type="number" order="descending"/>
                             <xsl:variable name="column" select="current-grouping-key()"/>
@@ -241,7 +259,7 @@
                             </xsl:variable>
                             
                             <!--<simpletable frame="all"  id="simpgletablesss_inaaz_fwf_{generate-id()}" system_cache__dita:width_cols="auto"  system_cache__dita:bypass_rows_with_zero="true" system_cache__dita:bypass_rows_empty="true"> --><!-- system_cache__dita:width_cols="10" system_cache__dita:bypass_rows_with_zero="true" system_cache__dita:bypass_rows_empty="true" -->
-                            <simpletable  id="{current-grouping-key()}" frame="all"  > <!-- system_cache__dita:width_cols="auto" system_cache__dita:bypass_rows_with_zero="true" system_cache__dita:bypass_rows_empty="true" -->
+                            <simpletable  id="{current-grouping-key()}" frame="all" props="BI_audit_BENFORD.podgl_anal_liczb.records__241" > <!-- system_cache__dita:width_cols="auto" system_cache__dita:bypass_rows_with_zero="true" system_cache__dita:bypass_rows_empty="true" -->
                                 <xsl:attribute name="relcolwidth">
                                     <xsl:for-each select="$columns//sthead">
                                         <xsl:choose>
@@ -271,13 +289,39 @@
                                             </xsl:when>
                                         </xsl:choose>
                                         
-                                        
-                                        <strow id="{concat(@fid,'_',local-name())}">
-                                            <xsl:apply-templates mode="default_db__x3A__BI_audit_BENFORD:BI_audit_BENFORD.podglad_analizy_liczb.records.fields" select="$columns/columns/*[ position() &lt; number($default_db__x3A__BI_audit_BENFORD:BI_audit_BENFORD.podglad_analizy_liczb.records.table_width) ]">
-                                                <xsl:with-param name="context" select="."/>
-                                                <xsl:with-param name="element" select="'strow'"/>
-                                            </xsl:apply-templates>
-                                        </strow>
+                                        <xsl:choose>
+                                            <xsl:when test="position() &lt; 10 ">
+                                                <strow id="{concat(@fid,'_',local-name())}">
+                                                    <xsl:apply-templates mode="default_db__x3A__BI_audit_BENFORD:BI_audit_BENFORD.podglad_analizy_liczb.records.fields" select="$columns/columns/*[ position() &lt; number($default_db__x3A__BI_audit_BENFORD:BI_audit_BENFORD.podglad_analizy_liczb.records.table_width) ]">
+                                                        <xsl:with-param name="context" select="."/>
+                                                        <xsl:with-param name="element" select="'strow'"/>
+                                                    </xsl:apply-templates>
+                                                </strow>
+                                            </xsl:when>
+                                            <xsl:when test="position() = 10 ">
+                                                <xsl:variable name="context.strow" select="."/>
+                                                <strow props="BI_audit_BENFORD.podgl_anal_liczb.records__283">
+                                                    <xsl:for-each select="$columns//sthead">
+                                                        <xsl:choose>
+                                                            <xsl:when test="position() = 1">
+                                                                <stentry>
+                                                                    max <xsl:value-of select="$context.strow/last()"/>
+                                                                </stentry>
+                                                            </xsl:when>
+                                                            <xsl:when test="position() = 2">
+                                                                <stentry>
+                                                                    pominięto <xsl:value-of select="$context.strow/last() - $context.strow/position()"/> przykł.
+                                                                </stentry>
+                                                            </xsl:when>
+                                                            <xsl:otherwise>
+                                                                <stentry/>
+                                                            </xsl:otherwise>
+                                                        </xsl:choose>
+                                                    </xsl:for-each>
+                                                </strow>
+                                            </xsl:when>
+                                            <xsl:otherwise/>
+                                        </xsl:choose>
                                         
                                     </xsl:for-each-group>
                             </simpletable>

+ 12 - 5
SE/schema/default_db_xml_cache.public/default_db/BI_audit_BENFORD/default_db__x3A__BI_audit_BENFORD.BI_audit_BENFORD.xsl

@@ -49,9 +49,12 @@
     
     <xsl:template mode="default_db__x3A__BI_audit_BENFORD:BI_audit_BENFORD" match="default_db__x3A__BI_audit_BENFORD:BI_audit_BENFORD">
         <topichead >
+            <xsl:variable name="title" select="'BI_audit_BENFORD__53'"/>
             <xsl:call-template name="default_db__x3A__BI_audit_BENFORD:BI_audit_BENFORD.navtitle.attr"/>
-            <topicref>
+            <topicref props="BI_audit_BENFORD__53 mode__x3A__will__default_db__x3A__BI_audit_BENFORD:BI_audit_BENFORD.info">
                 <xsl:copy-of select="system_cache__dita:files.key.href.map.context(.)"/>
+                <xsl:copy-of select="system_cache__dita:files.context.title.keys(.,$title)" copy-namespaces="no"/>
+                <!--<xsl:copy-of select="system_cache__dita:files.context.title.keydef(.,'map',$title)" copy-namespaces="no"/>-->
                 <xsl:result-document href="{system_cache__dita:files.key.href.write.topic.context(.)}"> 
                     <topic >
                         <xsl:copy-of select="system_cache__dita:files.key.topic.attrs.context(.,'topic')"/>
@@ -79,9 +82,11 @@
             <xsl:when test=".//*[@fid]">
                 <xsl:variable name="system_cache__dita:files.key.title.context.href.all_table" select="system_cache__dita:files.key.title.context.href(.,'topic','podglad_analizy_liczb__records__all_table')"/>
                 
-                <topicref>
+                <topicref props="BI_audit_BENFORD__82 mode__x3A__will__default_db__x3A__BI_audit_BENFORD:BI_audit_BENFORD.podglad_analizy_liczb.records.all">
                     <xsl:variable name="system_cache__dita:topic_name" select="'podglad_analizy_liczb__records__all'"/>
                     <xsl:copy-of select="system_cache__dita:files.key.href.map.title.context(.,$system_cache__dita:topic_name)"/>
+                    <xsl:copy-of select="system_cache__dita:files.context.title.keys(.,$system_cache__dita:topic_name)" copy-namespaces="no"/>
+                    <xsl:copy-of select="system_cache__dita:files.context.title.keydef(.,'map',$system_cache__dita:topic_name)" copy-namespaces="no"/>
                     <!--<xsl:comment>#83 will system_cache__dita:files.key.href.map.title.context(.,$$system_cache__dita:topic_name) to <xsl:value-of select="system_cache__dita:files.key.href.map.title.context(.,$system_cache__dita:topic_name)"/></xsl:comment>-->
                     <xsl:result-document href="{system_cache__dita:files.key.href.write.topic.title.context(.,$system_cache__dita:topic_name)}">
                         <xsl:apply-templates mode="default_db__x3A__BI_audit_BENFORD:BI_audit_BENFORD.podglad_analizy_liczb.records.all" select=".">
@@ -94,11 +99,12 @@
                         </xsl:apply-templates>
                     </xsl:result-document>
                 </topicref>
-                
-                <topicref>
-                    
+                <xsl:variable name="title" select="'BI_audit_BENFORD__102'"/>
+                <topicref props="BI_audit_BENFORD__102 default_db__x3A__BI_audit_BENFORD:BI_audit_BENFORD.podglad_analizy_liczb.records.all.table">
                          <xsl:variable name="system_cache__dita:topic_name" select="'podglad_analizy_liczb__records__all_table'"/>
                          <xsl:copy-of select="system_cache__dita:files.key.href.map.title.context(.,$system_cache__dita:topic_name)"/>
+                    <xsl:copy-of select="system_cache__dita:files.context.title.keys(.,$system_cache__dita:topic_name)" copy-namespaces="no"/>
+                    <xsl:copy-of select="system_cache__dita:files.context.title.keydef(.,'map',$system_cache__dita:topic_name)" copy-namespaces="no"/>
                          <!--<xsl:comment>#83 will system_cache__dita:files.key.href.map.title.context(.,$$system_cache__dita:topic_name) to <xsl:value-of select="system_cache__dita:files.key.href.map.title.context(.,$system_cache__dita:topic_name)"/></xsl:comment>-->
                          <xsl:result-document href="{system_cache__dita:files.key.href.write.topic.title.context(.,$system_cache__dita:topic_name)}">
                              <xsl:apply-templates mode="default_db__x3A__BI_audit_BENFORD:BI_audit_BENFORD.podglad_analizy_liczb.records.all.table" select=".">
@@ -153,6 +159,7 @@
             </xsl:when>
             <xsl:otherwise><xsl:attribute name="navtitle"> Problem z obsługą pliku - brak danych w elemencie firstStep</xsl:attribute></xsl:otherwise>
         </xsl:choose>
+        <xsl:attribute name="props">BI_audit_BENFORD__162 mode__default_db__x3A__BI_audit_BENFORD:BI_audit_BENFORD.navtitle.attr</xsl:attribute>
     </xsl:template>