| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484 |
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:gml="http://www.opengis.net/gml"
- xmlns:p5bws="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/WPS_Functions.xsd"
- xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
- xmlns:bcgtht="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/bocian-graph-to-html/bcgtht.xsd"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:default_db__x3A__BI_audit_ENERGA_PRACOWNICY="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_PRACOWNICY"
- xmlns:p5="https://biuro.biall-net.pl/wfs"
- xmlns:default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object"
- xmlns:default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row"
- xmlns:default_db__x3A__BI_audit_KRS="https://biuro.biall-net.pl/wfs/default_db/BI_audit_KRS"
- xmlns:default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI"
-
- xmlns:default_db__x3A__BI_audit_MSIG="https://biuro.biall-net.pl/wfs/default_db/BI_audit_MSIG"
- xmlns:default_db__x3A__BI_audit_CEIDG="https://biuro.biall-net.pl/wfs/default_db/BI_audit_CEIDG"
- xmlns:system_cache__dita="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/dita.xsd"
- xmlns:default_db__x3A__BI_audit_KRS_person="https://biuro.biall-net.pl/wfs/default_db/BI_audit_KRS_person"
- xmlns:default_db__x3A__BI_audit_taxpayer="https://biuro.biall-net.pl/wfs/default_db/BI_audit_taxpayer"
- xmlns:default_db__x3A__BI_audit_KRS_company="https://biuro.biall-net.pl/wfs/default_db/BI_audit_KRS_company"
- xmlns:default_db__x3A__BI_audit_MSIG_company="https://biuro.biall-net.pl/wfs/default_db/BI_audit_MSIG_company"
- xmlns:default_db__x3A__TERYT_adresy="https://biuro.biall-net.pl/wfs/default_db/TERYT_adresy"
- xmlns:default_db__x3A__BI_audit_MSIG_person="https://biuro.biall-net.pl/wfs/default_db/BI_audit_MSIG_person"
- xmlns:default_db__x3A__BI_audit_operational_raport_note="https://biuro.biall-net.pl/wfs/default_db/BI_audit_operational_raport_note"
- xmlns:default_db__x3A__BI_audit_MSIG_address="https://biuro.biall-net.pl/wfs/default_db/BI_audit_MSIG_address"
- xmlns:p5yed="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/yed/p5yed.xsd"
- xmlns:p5suis="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/system_ui_info_speech/system_ui_info_speech.xsd"
- xmlns:math="http://exslt.org/math"
- xmlns:p5xmli="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/xmlschema_interface/p5xmli.xsd"
-
- extension-element-prefixes="math"
- version="2.0">
-
-
- <xsl:output indent="yes"/>
- <xsl:strip-space elements="*"/>
-
- <xsl:key name="path.clousure.following" match="path.clousure.following" use="@bcgtht:id"/>
-
- <xsl:key name="bcgtht:edge" match="bcgtht:edge" use="@bcgtht:id.edge"/>
-
- <xsl:key name="bcgtht:clousure.node.unique.descriptor.edge" match="/bcgtht:clousure.analys/path.clousure.following" use="bcgtht:edge[@bcgtht:id.edge] "/> <!-- parent::*/parent::*/@bcgtht:clousure.node,'|', --> <!-- [ parent::path.clousure.following[@bcgtht:clousure.from.len = '1']] -->
- <!-- taki sam id -->
-
- <xsl:key name="bcgtht:clousure.node.unique.descriptor.edge.other" match="/bcgtht:clousure.analys/path.clousure.following" use="1=1" > <!-- use="local-name()='path.clousure.following'" -->
- <!-- do wyszukania innych niz sami id -->
- </xsl:key>
-
- <!--<xsl:key name="bcgtht:clousure.node.unique.descriptor.edge.other_not" match="/bcgtht:clousure.analys/path.clousure.following" use="[ not(@bcgtht:id = current()/@bcgtht:id)]">
- <!-\- do wyszukania innych niz sami id -\->
- </xsl:key>-->
-
-
- <xsl:key name="bcgtht:clousure.node.unique.descriptor.edge.2" match="/bcgtht:clousure.analys/path.clousure.following" use="bcgtht:edge[@bcgtht:id.edge]"> <!-- and not(current()/@bcgtht:id = @bcgtht:id) -->
- <!--tested dziala do wyszukania innych niz sami -->
- </xsl:key>
-
- <!--<xsl:key name="bcgtht:clousure.node.unique.descriptor.same_id.same_edge.bypass" match="/bcgtht:clousure.analys/path.clousure.following" use="preceding-sibling::path.clousure.following[ bcgtht:edge[@bcgtht:id.edge] ]/generate-id()"> <!-\- bcgtht:edge[@bcgtht:id.edge] and not(current()/@bcgtht:id.edge = @bcgtht:id.edge) -\->
- <!-\- jak jest cos z moim id do jednej z moich krawedzi = bypass - to samo -\->
- </xsl:key>-->
-
- <xsl:key name="bcgtht:clousure.node.unique.descriptor.same_id.same_edge.bypass" match="/bcgtht:clousure.analys/path.clousure.following" use="bcgtht:edge[@bcgtht:id.edge] "> <!-- bcgtht:edge[@bcgtht:id.edge] and not(current()/@bcgtht:id.edge = @bcgtht:id.edge) -->
- <!-- NO CLEANUP jak jest cos z moim id do jednej z moich krawedzi = bypass - to samo -->
- </xsl:key>
-
- <!--<xsl:key name="bcgtht:clousure.node.unique.descriptor.prec_same_edge_pos_0.bypass" match="/bcgtht:clousure.analys/path.clousure.following[ @bcgtht:clousure.node.pos = '0']" use="preceding-sibling::path.clousure.following[ bcgtht:edge[@bcgtht:id.edge] and @bcgtht:id]/generate-id()"> <!-\- bcgtht:edge[@bcgtht:id.edge] and not(current()/@bcgtht:id.edge = @bcgtht:id.edge) -\->
- <!-\- jak cos startuje i jest dowiazane do tej samej krawedzi = to samo -\->
- </xsl:key>-->
- <!--<xsl:key name="bcgtht:clousure.node.unique.descriptor.prec_same_edge_pos_0.bypass" match="/bcgtht:clousure.analys/path.clousure.following[ @bcgtht:clousure.node.pos = '0']" use="bcgtht:edge[@bcgtht:id.edge]"> <!-\- bcgtht:edge[@bcgtht:id.edge] and not(current()/@bcgtht:id.edge = @bcgtht:id.edge) -\->
- <!-\- MUST CLEANUP jak cos startuje i jest dowiazane do tej samej krawedzi = to samo - wymaga czuysczenia -\->
- </xsl:key>-->
-
-
- <!--<xsl:key name="bcgtht:clousure.node.unique.descriptor.all_same_edge_pos_0.bypass" match="/bcgtht:clousure.analys/path.clousure.following[ @bcgtht:clousure.node.pos = '0']" use="bcgtht:edge[@bcgtht:id.edge] and ( count(bcgtht:edge) > current()/count(bcgtht:edge) or ( count(bcgtht:edge) = current()/count(bcgtht:edge) and @bcgtht:id > current()/@bcgtht:id ) ) "> <!-\- bcgtht:edge[@bcgtht:id] and not(current()/@bcgtht:id = @bcgtht:id) -\->
- <!-\- FULL jak cos startuje i jest dowiazane do tej samej krawedzi = to samo, bierzemy noda z najwieksza liczba edge oraz najwyzszym bcgtht:id -\->
- </xsl:key>-->
-
-
- <!--<xsl:key name="bcgtht:clousure.node.unique.descriptor.all_same_edge_both.bypass" match="/bcgtht:clousure.analys/path.clousure.following/bcgtht:edge" use="@bcgtht:id"> <!-\- bcgtht:edge[@bcgtht:id.edge] and not(current()/@bcgtht:id = @bcgtht:id) -\->
- <!-\- TEST CLEANUP jak cos ma dwie krawedzie z roznych relacji takie do tego samego co ja (po czesci - ale z kazdej z nich) ma wiecej danych niz my lub wiekszy id -\->
- </xsl:key>-->
-
- <!--<xsl:key name="bcgtht:clousure.node.unique.descriptor.more_edges_or_grtr_id" match="bcgtht:clousure.analys/path.clousure.following" use="not(current()/@bcgtht:id = @bcgtht:id) and ( count(bcgtht:edge) > current()/count(bcgtht:edge) or ( count(bcgtht:edge) = current()/count(bcgtht:edge) and @bcgtht:id > current()/@bcgtht:id ) )">
- <!-\-CLEANUP dodatkowy warunek do eliminacji slabszych wezlow - wiecej edge lub wiekszy id-\->
- </xsl:key>-->
-
- <!-- Merging bcgtht:clousure.node.unique.descriptor -->
-
- <!-- eliminujemy duble - sprawdzamy czy nasz wezel gdzies wystepuje -->
-
- <!-- chyba -->
-
- <!--<xsl:function name="bcgtht:clousure.node.unique.descriptor.edge.other">
- <xsl:param name="id"/>
- </xsl:function>-->
-
- <xsl:function name="bcgtht:clousure.node.unique.descriptor.edge.other">
-
- <xsl:param name="current"/>
- <!--<xsl:copy-of select="key('bcgtht:clousure.node.unique.descriptor.edge.other', 1=1)"/>-->
- <xsl:copy-of select="$current/root()/bcgtht:clousure.analys/path.clousure.following[ not(@bcgtht:id = $current/@bcgtht:id)]"/>
- </xsl:function>
-
-
- <xsl:function name="bcgtht:clousure.node.unique.descriptor.edge.other.clean">
- <xsl:param name="path.clousure.following"/>
- <xsl:param name="current"/>
- <xsl:copy-of select="$path.clousure.following[not(@bcgtht:id = $current/@bcgtht:id) ]"/>
- </xsl:function>
-
- <!--<xsl:function name="bcgtht:clousure.node.unique.descriptor.all_same_edge_pos_0.bypass">
- <xsl:param name="path.clousure.following"/>
- <xsl:param name="current"/> <!-\- jak cos startuje i jest dowiazane do tej samej krawedzi = to samo -\->
- <!-\- bcgtht:edge[@bcgtht:id.edge] and ( count(bcgtht:edge) > current()/count(bcgtht:edge) or ( count(bcgtht:edge) = current()/count(bcgtht:edge) and @bcgtht:id > current()/@bcgtht:id ) ) -\->
- <xsl:copy-of select="$path.clousure.following[ count(bcgtht:edge) > $current/count(bcgtht:edge) or ( count(bcgtht:edge) = $current/count(bcgtht:edge) and @bcgtht:id > $current/@bcgtht:id ) ]"/>
- </xsl:function>-->
-
-
- <xsl:function name="bcgtht:clousure.node.unique.descriptor.all_same_edge_pos_0.bypass">
-
- <xsl:param name="current"/> <!-- jak cos startuje i jest dowiazane do tej samej krawedzi = to samo -->
- <!-- bcgtht:edge[@bcgtht:id.edge] and ( count(bcgtht:edge) > current()/count(bcgtht:edge) or ( count(bcgtht:edge) = current()/count(bcgtht:edge) and @bcgtht:id > current()/@bcgtht:id ) ) -->
- <xsl:copy-of select="$current/root()/bcgtht:clousure.analys/path.clousure.following[ count(bcgtht:edge) > $current/count(bcgtht:edge) or ( count(bcgtht:edge) = $current/count(bcgtht:edge) and @bcgtht:id > $current/@bcgtht:id ) ]"/>
- </xsl:function>
-
- <xsl:function name="bcgtht:clousure.node.unique.descriptor.more_edges_or_grtr_id">
- <xsl:param name="path.clousure.following"/>
- <xsl:param name="current"/> <!-- CLEANUP dodatkowy warunek do eliminacji slabszych wezlow - wiecej edge lub wiekszy id- -->
- <xsl:copy-of select="$current/root()/bcgtht:clousure.analys/path.clousure.following[ not($current/@bcgtht:id = @bcgtht:id) and ( count(bcgtht:edge) > $current/count(bcgtht:edge) or ( count(bcgtht:edge) = $current/count(bcgtht:edge) and @bcgtht:id > $current/@bcgtht:id ) ) ]"/>
- </xsl:function>
-
- <xsl:function name="bcgtht:clousure.node.unique.descriptor.more_edges_or_grtr_id">
- <!-- CLEANUP dodatkowy warunek do eliminacji slabszych wezlow - wiecej edge lub wiekszy id- -->
- <xsl:param name="current"/>
- <xsl:copy-of select="$current/root()/bcgtht:clousure.analys/path.clousure.following[ not($current/@bcgtht:id = @bcgtht:id) and ( count(bcgtht:edge) > $current/count(bcgtht:edge) or ( count(bcgtht:edge) = $current/count(bcgtht:edge) and @bcgtht:id > $current/@bcgtht:id ) ) ]"/>
- </xsl:function>
-
-
- <xsl:function name="bcgtht:clousure.node.unique.descriptor.prec_same_edge_pos_0.bypass">
- <xsl:param name="current"/> <!-- jak cos startuje i jest dowiazane do tej samej krawedzi = to samo -->
- <!-- TEST CLEANUP jak cos ma dwie krawedzie z roznych relacji takie do tego samego co ja (po czesci - ale z kazdej z nich) ma wiecej danych niz my lub wiekszy id -->
- <xsl:copy-of select="$current/root()/bcgtht:clousure.analys/path.clousure.following[ @bcgtht:clousure.node.pos = '0' and bcgtht:edge[@bcgtht:id.edge = $current/bcgtht:edge/@bcgtht:id.edge] ]"/>
- </xsl:function>
-
-
- <xsl:function name="bcgtht:edge.prio_anal">
- <!-- im wyzsza liczba na wyjsciu , tym wiekszy priorytet postawienia noda -->
- <xsl:param name="bcgtht:edge.local.node"/>
- <xsl:param name="bcgtht:edge.remote.node"/>
- <!--<xsl:param name="bcgtht:id.local"/>
- <xsl:param name="bcgtht:id.remote"/>-->
- <xsl:variable name="out">
- <out>
- <edge>
- <xsl:choose>
- <xsl:when test="count($bcgtht:edge.local.node/*) > count($bcgtht:edge.remote.node/*)"><xsl:attribute name="points" select="1"/></xsl:when>
- <xsl:otherwise><xsl:attribute name="points" select="-1"/></xsl:otherwise>
- </xsl:choose>
- </edge>
- <id>
- <xsl:choose>
- <xsl:when test="$bcgtht:edge.local.node/@bcgtht:id > $bcgtht:edge.remote.node/@bcgtht:id"><xsl:attribute name="points" select="1"/></xsl:when>
- <xsl:otherwise><xsl:attribute name="points" select="0"/></xsl:otherwise>
- </xsl:choose>
- </id>
- <peer>
- <xsl:choose>
- <xsl:when test="$bcgtht:edge.local.node/@bcgtht:clousure.node.pos = '0'"><xsl:attribute name="points" select="1"/></xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="$bcgtht:edge.remote.node/@bcgtht:clousure.node.pos = '0'"><xsl:attribute name="points" select="-1"/></xsl:when>
- </xsl:choose>
- </peer>
- <!--<id>
- <xsl:for-each-group select="$bcgtht:edge.local.node/bcgtht:edge" group-by="@bcgtht:edge.group"></xsl:for-each-group>
- <!-\-<xsl:choose>
- <xsl:when test="$bcgtht:edge.local.node/@bcgtht:id > $bcgtht:edge.remote.node/@bcgtht:id"><xsl:attribute name="points" select="1"/></xsl:when>
- <xsl:otherwise><xsl:attribute name="points" select="0"/></xsl:otherwise>
- </xsl:choose>-\->
- </id>-->
- </out>
- </xsl:variable>
- <xsl:value-of select="sum($out//@points)"/>
- </xsl:function>
-
-
- <xsl:template mode="bcgtht:clousure.analys.merge" match="@*"/>
-
- <xsl:template mode="bcgtht:clousure.analys.merge" match="@bcgtht:id|@bcgtht:clousure.from|@bcgtht:clousure.node|@bcgtht:clousure.node.pos">
- <xsl:copy-of select="."/>
- </xsl:template>
-
- <xsl:function name="bcgtht:clousure.node.unique.descriptor.analys_vectors.sort">
- <xsl:param name="bcgtht:edge.local"/>
- <xsl:param name="bcgtht:edge.context"/>
- <xsl:choose>
- <xsl:when test="$bcgtht:edge.context[@bcgtht:id.edge = $bcgtht:edge.local/@bcgtht:id.edge]">
- <xsl:value-of select="1"/>
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="0"/></xsl:otherwise>
- </xsl:choose>
- <!--<xsl:value-of select="$bcgtht:edge.context"/>-->
- </xsl:function>
-
-
- <xsl:function name="bcgtht:clousure.node.unique.descriptor.analys_vectors">
- <!-- do analizy danego noda co z nim zrobic itp -->
- <xsl:param name="current"/>
- <xsl:param name="bcgtht:edge.count.requested" /> <!-- glebokosc? -->
- <bcgtht:clousure.node.unique.descriptor.analys_vectors>
- <xsl:apply-templates mode="bcgtht:clousure.analys.merge" select="$current/@*"/>
- <xsl:for-each select="$current/bcgtht:edge">
- <LOCAL_EDGE>
- <xsl:variable name="bcgtht:edge" select="."/>
- <xsl:for-each select="$current/root()/bcgtht:clousure.analys/path.clousure.following[ bcgtht:edge.prio_anal($current,.) < 0 and not($current/@bcgtht:id = @bcgtht:id ) and bcgtht:edge[@bcgtht:id.edge = $bcgtht:edge/@bcgtht:id.edge ] ][ position() < $bcgtht:edge.count.requested]">
- <xsl:sort select="bcgtht:clousure.node.unique.descriptor.analys_vectors.sort($bcgtht:edge,bcgtht:edge)" data-type="number" order="descending"/>
- <VECTOR_MAP>
- <xsl:apply-templates mode="bcgtht:clousure.analys.merge" select="@*"/>
- </VECTOR_MAP>
- </xsl:for-each>
- </LOCAL_EDGE>
- </xsl:for-each>
- </bcgtht:clousure.node.unique.descriptor.analys_vectors>
-
-
- </xsl:function>
-
-
- <xsl:function name="bcgtht:clousure.node.unique.descriptor.all_same_edge_both.bypass">
- <!-- staramy sie nie pokazywac i znalezc powod do nie pokazania - jest nod ktory ma wyzszy priorytet i ma dwa podpiecia takie same -->
- <xsl:param name="current"/><!-- TODO jak cos ma dwie krawedzie z roznych relacji takie do tego samego co ja (po czesci - ale z kazdej z nich) ma wiecej danych niz my lub wiekszy id -->
- <xsl:param name="bcgtht:edge.count.requested" /> <!-- jakiego oczekujemy minimalnego warunku ilosci pasujacych wezlow -->
- <xsl:message>#147 todo incomplete bcgtht:clousure.node.unique.descriptor.all_same_edge_both.bypass</xsl:message>
- <!--<xsl:copy-of select="$current/root()/bcgtht:clousure.analys/path.clousure.following/bcgtht:edge[ @bcgtht:clousure.node.pos = '0' and bcgtht:edge[@bcgtht:id.edge = $current/bcgtht:edge/@bcgtht:id.edge] ]"/>-->
- <bcgtht:clousure.node.unique.descriptor.all_same_edge_both.bypass>
- <!--<xsl:copy-of select="$current/root()/bcgtht:clousure.analys/path.clousure.following/bcgtht:edge[ @bcgtht:id.edge = $current[bcgtht:edge[@bcgtht:id.edge] ] ]"/>-->
-
- <!--<xsl:call-template name="p5suis:say_to_queue.copy_file">
- <xsl:with-param name="text" select="'Likwidacja wezlow o takich samych cechach zakończeń. '"/>
- <xsl:with-param name="context" select="$current"/>
- <xsl:with-param name="unique-key" select="$current/@bcgtht:id"/>
- </xsl:call-template>-->
-
-
-
- <xsl:for-each select="$current/bcgtht:edge">
- <xsl:variable name="bcgtht:edge" select="."/>
-
- <LOCAL_bcgtht>
- <xsl:for-each select="$current/root()/bcgtht:clousure.analys/path.clousure.following[ bcgtht:edge.prio_anal($current,.) < 0 and not($current/@bcgtht:id = @bcgtht:id ) and bcgtht:edge[@bcgtht:id.edge = $bcgtht:edge/@bcgtht:id.edge ] ]" > <!-- group-by="@bcgtht:edge.group" -->
- <!--<xsl:sort select="concat(count(bcgtht:edge),$current/@bcgtht:id > @bcgtht:id)"/>-->
- <!--<xsl:sort select="bcgtht:edge.prio_anal($current,.)"/>-->
- <PORT1>
- <xsl:copy-of select="@bcgtht:clousure.from"/>
- <xsl:copy-of select="@bcgtht:clousure.node"/>
- <xsl:copy-of select="@bcgtht:clousure.node.pos"/>
- <xsl:variable name="bcgtht:edge.prio_anal" select="bcgtht:edge.prio_anal($current,current())"/>
- <xsl:attribute name="bcgtht:edge.prio_anal" select="$bcgtht:edge.prio_anal"/>
- <!--<xsl:choose>
- <xsl:when test="$bcgtht:edge.prio_anal > 0 "></xsl:when>
- </xsl:choose>-->
-
- <!-- trzeba sprawdzic, czy mamy podwojne zapiecia sa takie same - jak tylko jedna strona, to pokazujemy na mapie -->
- <xsl:for-each-group select="bcgtht:edge [ @bcgtht:id.edge = $bcgtht:edge/@bcgtht:id.edge and position() >= $bcgtht:edge.count.requested ]" group-by="@bcgtht:edge.group"> <!-- [ and count( preceding-sibling::*) > 1 @bcgtht:id = $bcgtht:edge/@bcgtht:id] -->
-
- <xsl:variable name="bcgtht:edge.remote.prio" select="@bcgtht:id.edge"/>
- <xsl:variable name="bcgtht:edge.local.prio" select="$bcgtht:edge/@bcgtht:id.edge"/>
- <xsl:variable name="bcgtht:edge.remote.count" select="count( current-group())"/>
-
- <PORT_LOCAL2>
- <xsl:attribute name="bcgtht:edge.pos" select="position()"/>
-
- <xsl:attribute name="p5suis:say.PL">#153 znalazlem taki sam koniec - liczyc trzeba wszystkie = <xsl:value-of select="@bcgtht:id.edge"/> dla node <xsl:value-of select="parent::path.clousure.following/@bcgtht:id"/> - (kontekstowy test od @bcgtht:id = <xsl:value-of select="$current/@bcgtht:id"/></xsl:attribute>
- <xsl:message>#153CCC znalazlem taki sam koniec - liczyc trzeba wszystkie = <xsl:value-of select="@bcgtht:id.edge"/> dla node <xsl:value-of select="parent::path.clousure.following/@bcgtht:id"/> - (kontekstowy test od @bcgtht:id = <xsl:value-of select="$current/@bcgtht:id"/></xsl:message>
- <xsl:comment>#153CCC znalazlem taki sam
- #153CCC znalazlem taki sam koniec - liczyc trzeba wszystkie = <xsl:value-of select="@bcgtht:id.edge"/> dla node <xsl:value-of select="parent::path.clousure.following/@bcgtht:id"/> - (kontekstowy test od @bcgtht:id = <xsl:value-of select="$current/@bcgtht:id"/></xsl:comment>
- <xsl:copy-of select="."/>
- </PORT_LOCAL2>
-
- </xsl:for-each-group>
- </PORT1>
- </xsl:for-each>
- <say>
- <xsl:attribute name="p5suis:say.PL">#152 will check czy jest dubel po koncach bcgtht:clousure.node.unique.descriptor.all_same_edge_both.bypass</xsl:attribute>
- <xsl:message>#152 will check czy jest dubel po koncach bcgtht:clousure.node.unique.descriptor.all_same_edge_both.bypass</xsl:message>
- </say>
-
- </LOCAL_bcgtht>
- </xsl:for-each>
- </bcgtht:clousure.node.unique.descriptor.all_same_edge_both.bypass>
- </xsl:function>
-
-
- <xsl:template mode="bcgtht:clousure.analys.merge" match="bcgtht:clousure.analys">
- <xsl:message>#37 template mode="bcgtht:clousure.analys.merge"</xsl:message>
- <bcgtht:clousure.analys.merge>
- <xsl:copy-of select="p5xmli:xsi.schemaLocation($bcgtht.clousure.xsd,'http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/bocian-graph-to-html/bcgtht.xsd')"/>
- <xsl:apply-templates mode="bcgtht:clousure.analys.merge"/>
- </bcgtht:clousure.analys.merge>
- </xsl:template>
-
-
-
-
- <xsl:template mode="bcgtht:clousure.analys.merge" match="path.clousure.following">
- <xsl:variable name="bcgtht:clousure.analys.merge.current" select="."/>
- <xsl:message>#84 node <xsl:value-of select="bcgtht:edge/@bcgtht:id.edge"/></xsl:message>
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <!--<xsl:apply-templates mode="p5suis:add_group_raport_attributes" select=".">
- <xsl:with-param name="p5suis:lang" select="'PL'"/>
- </xsl:apply-templates>-->
- <!--
- <xsl:attribute name="p5suis:group.name" select="local-name()"/>
- <xsl:attribute name="p5suis:group.by">child::local-name()</xsl:attribute>
- <xsl:attribute name="p5suis:group-desc">child::local-name()</xsl:attribute>
- -->
-
- <xsl:if test="count(preceding-sibling::path.clousure.following) < 10">
- <xsl:attribute name="bcgtht:clousure.node.unique.descriptor.edge" select="count(key('bcgtht:clousure.node.unique.descriptor.edge',bcgtht:edge))"/>
- <!--<xsl:attribute name="bcgtht:clousure.node.unique.descriptor.edge.other" select="count(key('bcgtht:clousure.node.unique.descriptor.edge.other',not(current()/@bcgtht:id = @bcgtht:id) ))"/>-->
- <xsl:attribute name="bcgtht:clousure.node.unique.descriptor.edge.other" select="count(bcgtht:clousure.node.unique.descriptor.edge.other( current()))"/>
- <xsl:attribute name="bcgtht:clousure.node.unique.descriptor.same_id.same_edge.bypass" select="count(key('bcgtht:clousure.node.unique.descriptor.same_id.same_edge.bypass',bcgtht:edge))"/>
- <xsl:attribute name="bcgtht:clousure.node.unique.descriptor.edge.2" select="count(bcgtht:clousure.node.unique.descriptor.edge.other.clean(key('bcgtht:clousure.node.unique.descriptor.edge.2',bcgtht:edge and not(current()/@bcgtht:id = @bcgtht:id)),current()))"/>
- <!--<xsl:attribute name="bcgtht:clousure.node.unique.descriptor.prec_same_edge_pos_0.bypass" select="count(bcgtht:clousure.node.unique.descriptor.edge.other(key('bcgtht:clousure.node.unique.descriptor.prec_same_edge_pos_0.bypass', bcgtht:edge),current()))"/>-->
- <xsl:attribute name="bcgtht:clousure.node.unique.descriptor.all_same_edge_pos_0.bypass" select="count( bcgtht:clousure.node.unique.descriptor.all_same_edge_pos_0.bypass( current()))"/>
- <!--<xsl:attribute name="bcgtht:clousure.node.unique.descriptor.more_edges_or_grtr_id" select="count( bcgtht:clousure.node.unique.descriptor.more_edges_or_grtr_id( key('bcgtht:clousure.node.unique.descriptor.more_edges_or_grtr_id', not(current()/@bcgtht:id = @bcgtht:id) and ( count(bcgtht:edge) > current()/count(bcgtht:edge) or ( count(bcgtht:edge) = current()/count(bcgtht:edge) and @bcgtht:id > current()/@bcgtht:id ) )) ,current()))"/>-->
- <xsl:attribute name="bcgtht:clousure.node.unique.descriptor.more_edges_or_grtr_id" select="count( bcgtht:clousure.node.unique.descriptor.more_edges_or_grtr_id(current()))"/>
- <xsl:attribute name="bcgtht:clousure.node.unique.descriptor.all_same_edge_both.bypass" select="count( bcgtht:clousure.node.unique.descriptor.all_same_edge_both.bypass(current(),2))"/>
-
- <xsl:copy-of select="bcgtht:edge"/>
-
- <xsl:if test="1=2">
- <xsl:for-each select="key('bcgtht:clousure.node.unique.descriptor.edge',key('bcgtht:clousure.node.unique.descriptor.edge',bcgtht:edge))[position() < 3]">
- <bcgtht:clousure.node.unique.descriptor.edge debug="###DDEEES taki sam id ? ">
- <xsl:copy-of select="."/>
- </bcgtht:clousure.node.unique.descriptor.edge>
- </xsl:for-each>
- <xsl:for-each select="bcgtht:clousure.node.unique.descriptor.more_edges_or_grtr_id(current()) [position() < 3]">
- <bcgtht:clousure.node.unique.descriptor.more_edges_or_grtr_id debug="### FUNC CLEANED DD-GRRRTR-EEE-OID dodatkowy warunek do eliminacji slabszych wezlow - wiecej edge lub wiekszy id ">
- <xsl:copy-of select="."/>
- </bcgtht:clousure.node.unique.descriptor.more_edges_or_grtr_id>
- </xsl:for-each>
-
-
-
- <xsl:variable name="bcgtht:id" select="@bcgtht:id"/>
- <xsl:for-each select="bcgtht:clousure.node.unique.descriptor.edge.other( current())[ position() < 3]">
- <bcgtht:clousure.node.unique.descriptor.edge.other debug="### OK DD-UU-EEE-OO do wyszukania innych niz sami - tylko id ">
- <xsl:message>#130 found bcgtht:clousure.node.unique.descriptor.edge.other OTHER = <xsl:value-of select="@bcgtht:id"/></xsl:message>
- <xsl:copy-of select="."/>
- </bcgtht:clousure.node.unique.descriptor.edge.other>
- </xsl:for-each>
- <!--<xsl:for-each select="key('bcgtht:clousure.node.unique.descriptor.edge.other_not', local-name() )[ position() < 3]">
- <bcgtht:clousure.node.unique.descriptor.edge.other_not debug="###DD-UU-EEE-OO do wyszukania innych niz sami - tylko id ">
- <xsl:message>#135 found bcgtht:clousure.node.unique.descriptor.edge.other_not OTHER 22= <xsl:value-of select="@bcgtht:id"/></xsl:message>
- <xsl:copy-of select="."/>
- </bcgtht:clousure.node.unique.descriptor.edge.other_not>
- </xsl:for-each>-->
-
-
- <xsl:for-each select="bcgtht:clousure.node.unique.descriptor.all_same_edge_pos_0.bypass(current())[position() < 3]">
- <bcgtht:clousure.node.unique.descriptor.all_same_edge_pos_0.bypass debug="##MID CLEANUP EEE-AAA-SSS-EEE-PP-000 krawedz 0 jak cos startuje i jest dowiazane do tej samej krawedzi = to samo, bierzemy noda z najwieksza liczba edge oraz najwyzszym bcgtht:id">
- <xsl:copy-of select="."/>
- </bcgtht:clousure.node.unique.descriptor.all_same_edge_pos_0.bypass>
- </xsl:for-each>
-
- <xsl:for-each select="bcgtht:clousure.node.unique.descriptor.edge.other.clean(key('bcgtht:clousure.node.unique.descriptor.edge.2',bcgtht:edge), current()) [ position() < 3]"> <!-- key('bcgtht:clousure.node.unique.descriptor.edge.2',bcgtht:edge and not(current()/@bcgtht:id = @bcgtht:id)) [ position() < 3] --> <!-- and not(current()/@bcgtht:id = @bcgtht:id) -->
- <bcgtht:clousure.node.unique.descriptor.edge.2 debug="## DEBUG TESTED dziala UUU-DD-OOO-T-SSS-N-ID--SSSEEEE do wyszukania innych niz sami not id, ale same edghe">
- <xsl:copy-of select="."/>
- </bcgtht:clousure.node.unique.descriptor.edge.2>
- </xsl:for-each>
-
- <xsl:for-each select="key('bcgtht:clousure.node.unique.descriptor.same_id.same_edge.bypass',bcgtht:edge)[position() < 3]">
- <bcgtht:clousure.node.unique.descriptor.same_id.same_edge.bypass debug="# NO CLEANUP D-SSS-III-EEE-BBB jak jest cos z moim id do jednej z moich krawedzi = bypass - to samo">
- <xsl:copy-of select="."/>
- </bcgtht:clousure.node.unique.descriptor.same_id.same_edge.bypass>
- </xsl:for-each>
- <xsl:for-each select="bcgtht:clousure.node.unique.descriptor.prec_same_edge_pos_0.bypass( current()) [ position() < 3]">
- <bcgtht:clousure.node.unique.descriptor.prec_same_edge_pos_0.bypass debug="### OK CLEANUP DDD-PPP-SSS-EEE-PPP-000 jak cos startuje i jest dowiazane do tej samej krawedzi = to samo">
- <xsl:copy-of select="."/>
- </bcgtht:clousure.node.unique.descriptor.prec_same_edge_pos_0.bypass>
- </xsl:for-each>
- </xsl:if>
-
-
- <!--<xsl:variable name="bcgtht:clousure.node.unique.descriptor.all_same_edge_both.bypass">-->
- <!--<xsl:for-each select="bcgtht:clousure.node.unique.descriptor.all_same_edge_both.bypass(current(),2)[position() < 5]">
- <bcgtht:clousure.node.unique.descriptor.all_same_edge_both.bypass debug="### TODO CCC_DDD_SS_BBBYS_EDGE jak cos ma dwie krawedzie z roznych relacji takie do tego samego co ja (po czesci - ale z kazdej z nich) ma wiecej danych niz my lub wiekszy id ">
- <xsl:attribute name="p5suis:say.PL">#153AAA znalazlem taki sam koniec - liczyc trzeba wszystkie <xsl:value-of select="@bcgtht:id"/> </xsl:attribute>
- <xsl:copy-of select="."/>
-
- </bcgtht:clousure.node.unique.descriptor.all_same_edge_both.bypass>
- </xsl:for-each>-->
- <!--</xsl:variable>-->
- <!--<bcgtht:clousure.node.unique.descriptor.analys_vectors>
- <xsl:copy-of select="bcgtht:clousure.node.unique.descriptor.analys_vectors(.,4)"/>
- </bcgtht:clousure.node.unique.descriptor.analys_vectors>-->
- <xsl:variable name="current" select="."/>
- <bcgtht:clousure.node.unique.descriptor.analys_vectors>
- <xsl:apply-templates mode="bcgtht:clousure.analys.merge" select="$current/@*"/>
- <xsl:for-each select="$current/bcgtht:edge">
- <LOCAL_EDGE>
- <xsl:variable name="bcgtht:edge" select="."/>
- <xsl:for-each select="$current/root()/bcgtht:clousure.analys/path.clousure.following[ bcgtht:edge.prio_anal($current,.) < 0 and not($current/@bcgtht:id = @bcgtht:id ) and key('bcgtht:edge',@bcgtht:id.edge ) ][ position() < 5]"> <!-- bcgtht:edge[@bcgtht:id.edge = $bcgtht:edge/@bcgtht:id.edge ] -->
- <xsl:sort select="bcgtht:clousure.node.unique.descriptor.analys_vectors.sort($bcgtht:edge,bcgtht:edge)" data-type="number" order="descending"/>
- <VECTOR_MAP>
- <xsl:apply-templates mode="bcgtht:clousure.analys.merge" select="@*"/>
- </VECTOR_MAP>
- </xsl:for-each>
- </LOCAL_EDGE>
- </xsl:for-each>
- </bcgtht:clousure.node.unique.descriptor.analys_vectors>
-
- </xsl:if>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <xsl:choose>
-
- <!-- czegi nie wyswietlamy? -->
- <!-- drugi raz tego samego id= ktore dotyka tej samej krawedzi -->
-
- <xsl:when test="bcgtht:clousure.node.unique.descriptor.all_same_edge_both.bypass(current(),2)//PORT1[ @bcgtht:edge.prio_anal < 0 ]/PORT_LOCAL2[@bcgtht:edge.pos='2']">
- <xsl:message>###374 bcgtht:clousure.node.unique.descriptor.all_same_edge_both.bypass - merge nodes ? ingore</xsl:message>
- <bcgtht:clousure.node.unique.descriptor.all_same_edge_both.bypass>
- <xsl:apply-templates mode="bcgtht:clousure.analys.merge" select="@*"/>
- <xsl:copy-of select="bcgtht:edge"/>
- </bcgtht:clousure.node.unique.descriptor.all_same_edge_both.bypass>
- </xsl:when>
-
-
-
- <xsl:when test="1=1">
-
-
-
-
-
- </xsl:when>
- <!-- priorytet takie same konce tylko jeden wezel taki -->
-
- </xsl:choose>
-
- <!--<xsl:choose>
- <xsl:when test="1 = 1 or key('bcgtht:clousure.node.unique.descriptor.edge.other', @bcgtht:id )">
- <bcgtht:clousure.node.unique.descriptor.edge.other count1="{ count(key('bcgtht:clousure.node.unique.descriptor.edge.other',@bcgtht:id ))}"
- count11="{ count(key('bcgtht:clousure.node.unique.descriptor.edge.other',$bcgtht:clousure.analys.merge.current/@bcgtht:id ))}"
- count_limited2="{ count(key('bcgtht:clousure.node.unique.descriptor.edge', bcgtht:edge [not( key('bcgtht:clousure.node.unique.descriptor.edge.other',$bcgtht:clousure.analys.merge.current/@bcgtht:id) ) ] ))}"
- count_limited_3="{ count(key('bcgtht:clousure.node.unique.descriptor.edge', bcgtht:edge))}"
- >
-
- </bcgtht:clousure.node.unique.descriptor.edge.other>
- </xsl:when>
- </xsl:choose>-->
-
-
- </xsl:copy>
-
- </xsl:template>
-
-
- <xsl:template mode="bcgtht:clousure.analys.merge" match="text()|comment()"/>
-
-
-
-
- </xsl:stylesheet>
|