| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358 |
- <?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"
- exclude-result-prefixes="xs"
- version="2.0">
- <xsl:output indent="yes"/>
- <xsl:strip-space elements="*"/>
-
- <xsl:template name="bcgtht:applying_analys" >
- <xsl:param name="bcgtht:src_fid_analys" required="yes"/>
- <applying_analys>
- <xsl:for-each select="$bcgtht:src_fid_analys/src_fid_analys/src_fid">
- <xsl:copy copy-namespaces="no">
- <xsl:copy-of select="@*"/>
- <!--<gml:featureMember>-->
- <xsl:variable name="dst_fid.following.count" select="count(dst_fid[following-sibling])"/>
- <xsl:variable name="dst_fid.not.following.count" select="count(dst_fid[not(following-sibling)])"/>
- <xsl:variable name="src_fid" select="."/>
- <xsl:attribute name="dst_fid.following.count" select="$dst_fid.following.count"/>
- <xsl:attribute name="dst_fid.not.following.count" select="$dst_fid.not.following.count"/>
- <xsl:apply-templates mode="bocian-graph-2-html.preprocess.from_analys" select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row"/>
- <!--<xsl:for-each select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object/*[1]">
- <xsl:copy copy-namespaces="no">
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates mode="bocian-graph-2-html.preprocess.names"/>
- <xsl:for-each select="parent::*">
- <xsl:copy copy-namespaces="no">
- <xsl:copy-of select="@*"/>
- <xsl:for-each select="parent::*">
- <xsl:copy copy-namespaces="no">
- <xsl:copy-of select="@*"/>
- </xsl:copy>
- </xsl:for-each>
- </xsl:copy>
- </xsl:for-each>
- </xsl:copy>
-
- </xsl:for-each>-->
- <!--<xsl:for-each select="1 to $dst_fid.not.following.count">-->
- <!--<xsl:call-template name="bocian-graph-2-html.applying_analys">
- <xsl:with-param name="src_fid_analys" select="$bcgtht:src_fid_analys"/>
- <xsl:with-param name="dst_fid.not.following.count" select="$dst_fid.not.following.count"/>
- <xsl:with-param name="dst_fid.following.count" select="$dst_fid.following.count"/>
-
- <xsl:with-param name="src_fid" select="$src_fid"/>
- </xsl:call-template>-->
- <!--</xsl:for-each>-->
- <xsl:for-each select="dst_fid"> <!-- [not(following-sibling)] -->
- <xsl:sort select="count(following-sibling)" order="ascending"/>
- <!--<dst_fid_not_following-sibling>-->
- <xsl:copy copy-namespaces="no">
- <xsl:copy-of select="@*"/>
- <xsl:copy-of select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row" copy-namespaces="no"/>
- <xsl:apply-templates mode="bocian-graph-2-html.preprocess.from_analys" select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object"/>
-
-
- <!--<TO_GRAPH>-->
- <xsl:for-each select="*[@key]">
- <xsl:sort select="position()" order="descending"/>
- <xsl:copy copy-namespaces="no">
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates mode="bocian-graph-2-html.preprocess.from_analys" select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object"/>
- <xsl:copy-of select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row" copy-namespaces="no"/>
- </xsl:copy>
- </xsl:for-each>
- <!--</TO_GRAPH>-->
- </xsl:copy>
- <!--</dst_fid_not_following-sibling>-->
- </xsl:for-each>
- <!--</gml:featureMember>-->
- </xsl:copy>
- </xsl:for-each>
- </applying_analys>
- </xsl:template>
-
-
-
- <xsl:template mode="bcgtht:applying_analys" match="applying_analys|TO_GRAPH">
- <xsl:apply-templates mode="#current"/>
- </xsl:template>
-
- <xsl:template mode="bcgtht:applying_analys" match="src_fid">
- <xsl:apply-templates mode="#current">
- <xsl:with-param name="src_fid.key" select="@key"/>
- </xsl:apply-templates>
- </xsl:template>
-
-
- <xsl:template mode="bcgtht:applying_analys" match="dst_fid">
- <xsl:param name="src_fid.key" required="yes"/>
- <gml:featureMember>
- <xsl:variable name="applying_analys.current" select="."/>
- <xsl:comment>
- #263 dst_fid called from($src_fid.keysrc_fid.key=<xsl:value-of select="$src_fid.key"/>) for <xsl:copy-of select="@*"/> must go as second after src; ancestor-or-self::src_fid/@key = <xsl:value-of select="ancestor-or-self::src_fid/@key"/> ; count var <xsl:value-of select="count(ancestor-or-self::src_fid/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object)"/> </xsl:comment>
-
- <xsl:for-each select="ancestor-or-self::src_fid/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object">
- <xsl:element name="{system_cache__dita:bocian.add.elements(local-name())}">
- <!-- <xsl:copy copy-namespaces="no">-->
- <xsl:copy-of select="@*"/>
- <!--<xsl:comment>#124 current node <xsl:value-of select="name()"/>; *[1]/@fid<xsl:value-of select="*[1]/@fid"/></xsl:comment>-->
- <xsl:for-each select="*">
- <xsl:copy-of select="@*"/>
- <xsl:copy-of select="*" copy-namespaces="no"/>
- <xsl:comment>
- #128 src comes first upper</xsl:comment>
-
-
- <xsl:comment> last preceding-sibling is correct for row-object count prec sib last <xsl:value-of select="count($applying_analys.current/preceding-sibling[last()]/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object)"/></xsl:comment>
-
- <xsl:for-each select="$applying_analys.current/preceding-sibling[last()]/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object">
- <xsl:element name="{system_cache__dita:bocian.add.elements(local-name())}">
- <xsl:copy-of select="@*"/>
- <xsl:comment>dst comes first next</xsl:comment>
-
- <xsl:for-each select="$applying_analys.current/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row">
- <xsl:element name="{system_cache__dita:bocian.add.elements(local-name())}">
- <!--<xsl:copy copy-namespaces="no">-->
- <xsl:copy-of select="@*"/>
- <xsl:for-each select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object">
- <xsl:element name="{system_cache__dita:bocian.add.elements(local-name())}">
- <xsl:copy-of select="@*"/>
- <xsl:for-each select="*">
- <xsl:element name="{system_cache__dita:bocian.add.elements(local-name())}">
- <!--<xsl:copy copy-namespaces="no">-->
- <xsl:copy-of select="@*"/>
- <xsl:copy-of select="*" copy-namespaces="no"/>
-
- </xsl:element>
- </xsl:for-each>
- </xsl:element>
- </xsl:for-each>
- <xsl:apply-templates mode="#current" select="$applying_analys.current/*">
- <xsl:with-param name="src_fid.key" select="'xx'"/>
- </xsl:apply-templates>
- <!--</xsl:copy>-->
- </xsl:element>
-
- </xsl:for-each>
- </xsl:element>
-
- </xsl:for-each>
-
-
-
-
-
- </xsl:for-each>
-
-
-
-
- <!--</xsl:copy>-->
- </xsl:element>
- </xsl:for-each>
-
-
-
-
-
- <!--<DEBUG_dst_fid>
- <xsl:copy-of select="."/>
- </DEBUG_dst_fid>-->
- <!--<xsl:apply-templates mode="#current" />-->
-
- </gml:featureMember>
- </xsl:template>
-
- <!--<xsl:template mode="bcgtht:applying_analys" match="dst_fid">
- <xsl:param name="src_fid.key" required="yes"/>
- <gml:featureMember>
- <xsl:variable name="applying_analys.current" select="."/>
- <xsl:comment>
- #263 dst_fid for <xsl:copy-of select="@*"/> must go as second after src; ancestor-or-self::src_fid/@key = <xsl:value-of select="ancestor-or-self::src_fid/@key"/> </xsl:comment>
-
-
- <!-\-<xsl:for-each select="ancestor-or-self::src_fid/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object">-\->
- <!-\-<xsl:element name="{system_cache__dita:bocian.add.elements(local-name())}">-\->
- <!-\- <xsl:copy copy-namespaces="no">-\->
- <!-\-<xsl:copy-of select="@*"/>-\->
- <!-\-<xsl:for-each select="*">-\->
- <!-\-<xsl:copy-of select="@*"/>-\->
- <!-\-<xsl:copy-of select="*" copy-namespaces="no"/>-\->
- <!-\-<xsl:comment>src comes first upper</xsl:comment>-\->
-
-
- <xsl:comment> last preceding-sibling is correct for row-object</xsl:comment>
-
- <xsl:for-each select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object/*"> <!-\- $applying_analys.current/preceding-sibling[last()]/ -\->
- <xsl:element name="{system_cache__dita:bocian.add.elements(local-name())}">
- <xsl:copy-of select="@*"/>
- <xsl:copy-of select="*" copy-namespaces="no"/>
- <xsl:for-each select="parent::BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object">
- <xsl:element name="{system_cache__dita:bocian.add.elements(local-name())}">
- <xsl:copy-of select="@*"/>
- <xsl:comment>dst comes first next</xsl:comment>
- <xsl:for-each select="parent::BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row">
- <xsl:element name="{system_cache__dita:bocian.add.elements(local-name())}">
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates mode="#current" select="$applying_analys.current/*">
- <xsl:with-param name="src_fid.key" select="'xx'"/>
- </xsl:apply-templates>
- <!-\-<xsl:for-each select="$applying_analys.current/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object">
- <xsl:element name="{system_cache__dita:bocian.add.elements(local-name())}">
- <!-\\-<xsl:copy copy-namespaces="no">-\\->
- <xsl:copy-of select="@*"/>
-
- <xsl:for-each select="*">
- <!-\\-<xsl:copy copy-namespaces="no">-\\->
- <xsl:element name="{system_cache__dita:bocian.add.elements(local-name())}">
- <xsl:copy-of select="@*"/>
- <xsl:copy-of select="*" copy-namespaces="no"/>
- </xsl:element>
- <!-\\-</xsl:copy>-\\->
- </xsl:for-each>
-
- <!-\\-</xsl:copy>-\\->
- </xsl:element>
- <xsl:apply-templates mode="#current" select="$applying_analys.current/*">
- <xsl:with-param name="src_fid.key" select="'xx'"/>
- </xsl:apply-templates>
- </xsl:for-each>-\->
-
- </xsl:element>
- </xsl:for-each>
- </xsl:element>
- </xsl:for-each>
-
-
-
-
-
-
-
- </xsl:element>
-
- </xsl:for-each>
-
-
-
-
-
- <!-\-</xsl:for-each>-\->
-
-
-
-
- <!-\-</xsl:copy>-\->
- <!-\-</xsl:element>-\->
- <!-\-</xsl:for-each>-\->
-
-
-
-
-
- <!-\-<DEBUG_dst_fid>
- <xsl:copy-of select="."/>
- </DEBUG_dst_fid>-\->
- <!-\-<xsl:apply-templates mode="#current" />-\->
-
- </gml:featureMember>
- </xsl:template>-->
-
-
- <xsl:template mode="bcgtht:applying_analys" match="following-sibling">
- <xsl:comment>#315 following-sibling stop</xsl:comment>
- </xsl:template>
-
-
- <xsl:template mode="bcgtht:applying_analys" match="preceding-sibling">
- <xsl:param name="src_fid.key" required="yes"/>
- <xsl:variable name="applying_analys.current" select="."/>
- <xsl:comment>
- #89AAA preceding-sibling for <xsl:copy-of select="@*"/> count(preceding-sibling::*)=<xsl:value-of select="count(preceding-sibling::*)"/> , count(following-sibling::*)=<xsl:value-of select="count(following-sibling::*)"/></xsl:comment>
-
-
- <xsl:choose>
- <xsl:when test="$src_fid.key = @key">
- <xsl:comment>#347 when test="$src_fid.key = @key" </xsl:comment>
- </xsl:when>
- <xsl:when test="count(preceding-sibling::*) = 0">
- <xsl:for-each select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object/*">
- <!-- <xsl:copy copy-namespaces="no">-->
- <xsl:element name="{system_cache__dita:bocian.add.elements(local-name())}">
-
- <xsl:copy-of select="@*"/>
- <xsl:copy-of select="*" copy-namespaces="no"/>
- <xsl:for-each select="parent::BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object">
- <xsl:element name="{system_cache__dita:bocian.add.elements(local-name())}">
- <!--<xsl:copy copy-namespaces="no">-->
- <xsl:copy-of select="@*"/>
- <xsl:copy-of select="*" copy-namespaces="no"/>
- <xsl:for-each select="parent::BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row">
- <xsl:element name="{system_cache__dita:bocian.add.elements(local-name())}">
- <!--<xsl:copy copy-namespaces="no">-->
- <xsl:copy-of select="@*"/>
- <xsl:copy-of select="*" copy-namespaces="no"/>
-
- <!--<xsl:apply-templates mode="#current" select="$applying_analys.current/*"/>-->
- <!--</xsl:copy>-->
- </xsl:element>
- </xsl:for-each>
- <!--<xsl:apply-templates mode="#current" select="$applying_analys.current/*"/>-->
- <!--</xsl:copy>-->
- </xsl:element>
- </xsl:for-each>
- </xsl:element>
- <!--</xsl:copy>-->
- </xsl:for-each>
- </xsl:when>
- </xsl:choose>
-
- <xsl:for-each select="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object">
- <!-- <xsl:copy copy-namespaces="no">-->
- <xsl:element name="{system_cache__dita:bocian.add.elements(local-name())}">
-
- <xsl:copy-of select="@*"/>
-
- <!--<xsl:copy-of select="*" copy-namespaces="no"/>-->
- <xsl:for-each select="*">
- <xsl:copy copy-namespaces="no">
- <xsl:copy-of select="@*"/>
- <xsl:copy-of select="*" copy-namespaces="no"/>
- <!--<xsl:apply-templates mode="#current" select="$applying_analys.current/*"/>-->
- </xsl:copy>
- </xsl:for-each>
- </xsl:element>
- <!--</xsl:copy>-->
- </xsl:for-each>
-
- <!--<DEBUGpreceding-sibling>
- <xsl:copy-of select="."/>
- </DEBUGpreceding-sibling>-->
- </xsl:template>
-
- </xsl:stylesheet>
|