Procházet zdrojové kódy

fix working 006 + todo fix graphs

a.binder před 7 roky
rodič
revize
8c60ec8fa4

+ 6 - 1
SE/schema/WPS_Functions/bocian-graph-to-html/Makefile

@@ -2,7 +2,7 @@
 # cat graph-part-first.html input.xml graph-part-last.html > output.html
 # Wynikiem jest plik output.html, który wymaga katalogu static (SE/static)
 # /Users/a.binder/procesy5-dita-templates-druki/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/bocian-graph-to-html/example-xml/example-graph-api-kontr17508-3.xml
-all: example-12 example-15 example-last20 example-113 example-graph-api-kontr17508-3 example-graph-api-kontr475-3.xml
+all: example-12 example-15 example-last20 example-113 example-graph-api-kontr17508-3 example-graph-api-kontr475-3.xml validate-test-input1
 
 example-113:
 	cat graph-part-first.html example-xml/example-graph-api-id-113.xml graph-part-last.html > example-graph-api-id-113.html
@@ -20,6 +20,11 @@ example-graph-api-kontr475-3.xml:
 	cat graph-part-first.html example-xml/example-graph-api-kontr475-3.xml graph-part-last.html > example-graph-api-kontr475-3.xml.html
 
 
+validate-test-input1:
+	cat graph-part-first.html validate/test-input1/bocian-graph-2-html/test_fid.10.xml graph-part-last.html > validate-test_fid.10.xml.html
+
+
+    
 clean:
 	rm example-graph-api-id-12.html
 	rm example-graph-api-id-15.html

+ 8 - 1
SE/schema/WPS_Functions/bocian-graph-to-html/build_bocian-graph-to-html.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns:bcgtht="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/bocian-graph-to-html/bcgtht.xsd"
          basedir="../../."
-         default="default"
+         default="validate"
          name="bocian-graph-to-html">
    <include as="PRODUCT" file="build.bcgtht.PRODUCT.xml"/>
    <include as="SYSTEM" file="build.bcgtht.SYSTEM.xml"/>
@@ -9,4 +9,11 @@
    <include as="WPS_Functions" file="../build.WPS_Functions.PRODUCT.xml"/>
    <include file="../system_ui_info_speech/build.system_ui_info_speech.PRODUCT.xml"/>
    <target depends="PRODUCT.PRODUCT,INSTALL.INSTALL" name="default"/>
+   
+   <target name="validate">
+      <exec executable="make" dir="${bcgtht.basedir}">
+         <arg value="all"/>
+      </exec>
+   </target>
+   
 </project>

+ 10 - 0
SE/schema/default_db_xml_cache.public/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_tree_to_dita.func.xsl

@@ -216,6 +216,16 @@
         <xsl:value-of select="concat($group_name,'__x2F__',$fid,'_',$end_name,'_',$end_fid,'__',$pos)"/>
     </xsl:function>
     
+    <xsl:function name="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.BI_audit_operational_raport_note.key">
+        <xsl:param name="fid"/><!-- XX1 -->
+        <xsl:param name="end_name"/>
+        <xsl:param name="end_fid"/><!-- XX1 -->
+        <xsl:param name="pos" /><!-- when several paths - take from $interested_row//@pos-->
+        <xsl:param name="source" />
+        <xsl:variable name="group_name" select="'note'"/>
+        <xsl:value-of select="concat($group_name,'__x2F__',$fid,'_',$end_name,'_',$end_fid,'__',$pos,'___',$source)"/>
+    </xsl:function>
+    
     <xsl:function name="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.BI_audit_ENERGA_RUM_KONTRAHENCI.key"><!-- XX1 -->
         <xsl:param name="fid"/><!-- XX1 -->
         <xsl:param name="end_name"/>

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

@@ -625,6 +625,17 @@
                     </sources>
                 </xsl:variable>
                 
+                <xsl:variable name="sources">
+                    <sources>
+                        <xsl:for-each-group select="$sources//source" group-by="@source">
+                            <source>
+                                <xsl:copy-of select="@*"/>
+                                <xsl:value-of select="text()"/>
+                            </source>
+                        </xsl:for-each-group>
+                    </sources>
+                </xsl:variable>
+                
                 <xsl:result-document href="{$temp}/{$uuid}/sources.xml">
                     <xsl:copy-of select="$sources"/>
                 </xsl:result-document>
@@ -825,7 +836,7 @@
                                             <xsl:apply-templates mode="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_LISTA" select=".">
                                                 <xsl:with-param name="group_name" select="$group_name"/>
                                                 <xsl:with-param name="position" select="position()"/>
-                                                <xsl:with-param name="title" select="'1o'"/>
+                                                <xsl:with-param name="title" select="'_1o_'"/>
                                                 <xsl:with-param name="current-grouping-key" select="current-grouping-key()"/>
                                             </xsl:apply-templates>
                                             <xsl:comment>#386 EOF add lista</xsl:comment>
@@ -843,13 +854,14 @@
                     </xsl:when>
                 </xsl:choose>
                 
+                <xsl:message>#855 debug - should be called once this line </xsl:message>
                 
                 <xsl:choose>
                     <xsl:when test="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[ position() = last()]/BI_audit_ENERGA_RUM_KONTRAHENCI">
                         <topichead navtitle="Powiązania pogrupowane pod kątem pochodzenia źródła danych do kontrahentow (1) - grupowanie po celach ">
                             <xsl:for-each select="$sources/sources/source">
                                 <xsl:variable name="source" select="."/>
-                                <xsl:message>#112 analyzing source: <xsl:value-of select="$source"/> Powiązania pogrupowane pod kątem pochodzenia źródła danych do kontrahentow (1) - grupowanie po celach </xsl:message>
+                                <xsl:message>#112-862 analyzing source: "<xsl:value-of select="$source"/>" , pos()="<xsl:value-of select="position()"/>"; Powiązania pogrupowane pod kątem pochodzenia źródła danych do kontrahentow (1) - grupowanie po celach </xsl:message>
                                 <topichead>
                                     <xsl:choose>
                                         <xsl:when test="string-length(.) &gt; 0">
@@ -863,12 +875,17 @@
                                         group-by="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[last()]/*[ position() = 1]/@fid">
                                         <xsl:sort select=" count(.)"/>
                                         <xsl:variable name="group_name" select="system_cache__appinfo:truncate_special_and_do_uppercase(BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[position() = 1]/*[ position() = 1] /concat(imiona,'_',nazwisko,'_',nip))"/><!-- XX1 TODO -->
+                                        <xsl:variable name="title" select="concat('_1_',$source,'__x875__',@pos,'__',BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[position() = 1]/*[ position() = 1]/@fid,'___',BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[position() = last()]/*[ position() = 1]/@fid)"/>
+                                        <xsl:message>#875 $group_name=<xsl:value-of select="$group_name"/>;  @pos=<xsl:value-of select="@pos"/>; first/@fid=<xsl:value-of select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[position() = 1]/*[ position() = 1]/@fid"/>; last/@fid=<xsl:value-of select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[position() = last()]/*[ position() = 1]/@fid"/>; 
+                                                $source="<xsl:value-of select="$source"/>"
+                                                $title="<xsl:value-of select="$title"/>";
+                                            applying BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_LISTA</xsl:message>
                                         
                                         <topichead navtitle="{BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[last()]/*/concat(imiona,' ',nazwisko,' ',nip,' ',nazwa,' ',Pelna_nazwa_kontrahenta)} powiązań ({ count( current-group())})  ">
                                             <xsl:apply-templates mode="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_LISTA" select=".">
                                                 <xsl:with-param name="group_name" select="$group_name"/>
                                                 <xsl:with-param name="position" select="position()"/>
-                                                <xsl:with-param name="title" select="'1'"/>
+                                                <xsl:with-param name="title" select="$title"/>
                                                 <xsl:with-param name="current-grouping-key" select="current-grouping-key()"/>
                                                 <xsl:with-param name="context" select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[last()]"/>
                                                 <xsl:with-param name="system_cache__dita:bocian-graph-2-html.read.group" select="'dst'"/>
@@ -1560,14 +1577,14 @@
                         <xsl:message>#719 Powiązania do BI_audit_operational_raport_note (podział na źródła) = <xsl:value-of select="."/>;count_lite=<xsl:value-of select="count($interested_row/interested_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/*[1]//BI_audit_operational_raport_note)"/> ; count = <xsl:value-of select="count($interested_row/interested_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row[BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object/*[1]/source= $source or not(BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object/*[1]/source= $source)
                             and system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.BI_audit_operational_raport_note.key(system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.BI_audit_operational_raport_note.ID.key(ID),'','','1') = current()/@key
                             ]//BI_audit_operational_raport_note)"/></xsl:message>
-                        <topichead navtitle="żródło:{.}  Powiązania do śledzonych obiektów">
+                        <topichead navtitle="zrodlo:{.}  Powiązania do śledzonych obiektów">
                             <xsl:for-each select="$BI_audit_operational_raport_note_uniq//element[@source=$source]">  
                                 <xsl:message>#1731__- $souce <xsl:copy-of select="$source/@*" copy-namespaces="no"/> ; key = <xsl:value-of select="@key"/> ; test_lite=<xsl:value-of select="count($interested_row/interested_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row[BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object/*[1]/source= $source or not(BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object/*[1]/source= $source)]) "/>
                                     down 
                                 </xsl:message>
                                 <xsl:for-each-group select="$interested_row/interested_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row[BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[  position() = 1  and ( source= $source or not(source) ) ]]/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object/*[  position() = 1 ]//BI_audit_operational_raport_note[   system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.BI_audit_operational_raport_note.key(system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.BI_audit_operational_raport_note.ID.key(ID),'','','1') = current()/@key ]"  group-by="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.BI_audit_operational_raport_note.key(system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.BI_audit_operational_raport_note.ID.key(ID),'','','1')"> <!--X11 system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.BI_audit_operational_raport_note.key(ID)  --> <!-- X11 group system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.BI_audit_KRS_person.key(nazwisko,imiona,pesel,'') -->
                                     
-                                    <xsl:variable name="group_name" select="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.BI_audit_operational_raport_note.key(system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.BI_audit_operational_raport_note.ID.key(ID),'','',position())"/> <!-- X11 system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.BI_audit_operational_raport_note.key(ID) -->
+                                    <xsl:variable name="group_name" select="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.BI_audit_operational_raport_note.key(system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.BI_audit_operational_raport_note.ID.key(ID),'','',position(),$source)"/> <!-- X11 system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.BI_audit_operational_raport_note.key(ID) -->
                                     <!--<topichead navtitle="{BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object[position() = last()]/*/concat(Pelna_nazwa_kontrahenta,' ',Miejscowosc,' ',NIP)} powiązań ({ count( current-group())}) ">-->
                                     
                                     <!--<xsl:choose>
@@ -2275,10 +2292,18 @@
         <xsl:param name="position"  required="yes"/>
         <!--<xsl:variable name="group_name" select="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.BI_audit_operational_raport_note.key($group_name,'','',$position)"/>-->
         <xsl:variable name="href" select="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.href($group_name)"/>
-        <topicref href="{system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.href($group_name)}">
-            <xsl:copy-of select="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.DETECT.dita.fid.keydef($href,$group_name)" copy-namespaces="no"/><!-- TODO -->
+        <xsl:message>#2294 $group_name=<xsl:value-of select="$group_name"/>; $refpos=<xsl:value-of select="$refpos"/>; $position=<xsl:value-of select="$position"/>; mode="BI_audit_operational_raport_note"</xsl:message>
+        
+        <topicref ><!-- system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.href($group_name) -->
+            <!-- new -->
+            <xsl:copy-of select="system_cache__dita:files.key.title.context.href(current(),'map',$group_name)" copy-namespaces="no"/>
+            <xsl:copy-of select="system_cache__dita:files.context.title.keys(current(),$group_name)" copy-namespaces="no"/>
+            <xsl:copy-of select="system_cache__dita:files.href.context.title.keydef(system_cache__dita:files.key.title.context.href(current(),'map',$group_name),current(),'BI_audit_operational_raport_note')" copy-namespaces="no"/>
+            <!-- old -->
+            <!--<xsl:copy-of select="system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.DETECT.dita.fid.keydef($href,$group_name)" copy-namespaces="no"/>--><!-- TODO -->
+            
             <xsl:message>#1021 debug : result doc: <xsl:value-of select="$href"/></xsl:message>
-            <xsl:result-document href="{system_cache__dita:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.href.write($group_name)}">
+            <xsl:result-document href="{system_cache__dita:files.key.href.write.topic.title.context(.,$group_name)}"><!-- {system_cache__dita:files.key.href.write.topic.title.context(.,$group_name)} -->
                 <topic id="{$uuid}topic_simpletable_person_{$group_name}_{position()}" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:noNamespaceSchemaLocation="urn:oasis:names:tc:dita:xsd:topic.xsd">