| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557 |
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:wfs="http://www.opengis.net/wfs"
- xmlns:gml="http://www.opengis.net/gml"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:p5dg="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/documentation_generator/documentation_generator.xsd"
- xmlns:get_wfs_recurse_xsl="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/get_wfs_recurse_xsl.xsd"
- xmlns:y="http://www.yworks.com/xml/graphml"
- xmlns:graph="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/graph/graph.xsd"
- xmlns:p5ant="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache.public/ant/ant.xsd"
- exclude-result-prefixes="xs"
- version="2.0">
- <xsl:output indent="yes"/>
- <xsl:strip-space elements="*"/>
-
- <xsl:param name="nazwisko" select="'siurni'"/>
- <xsl:param name="limit_rec" select="99999999"/>
- <xsl:param name="graph_title" select="'Arkadiusz Binder/RIP Graficzna prezentacja wybranych par raportu dla podanych KRS 2017-08-09'"/>
- <xsl:param name="graph_desc" select="'Uwaga - limit 10 umow'"/>
-
- <xsl:param name="bypass_nodes_string" select="'(.*XXXXBI_audit_MSIG_nameXXXX.*)|(.*BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row)'"/>
- <xsl:param name="not_bypass_nodes_string" select="'xxxxxxxBI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object'"/>
-
- <xsl:param name="graph:debug" select="0"/>
-
- <xsl:param name="graph.graph-to-analyze-property.xml"/>
-
- <xsl:template name="graph:property.evaluated">
- <xsl:param name="property.name" required="yes"/>
- <xsl:param name="graph:property.eval" required="yes"/>
- <xsl:param name="p5dg:p5ant.include.structure" required="yes"/>
- <xsl:param name="graph:property.evaluated.recurse_level" select="1"/>
- <xsl:param name="p5ant:dir" required="yes"/>
- <xsl:param name="p5dg:basedir" required="yes"/>
- <xsl:param name="property.value_or_location" required="yes"/>
- <!--<xsl:variable name="graph:property.eval.esc" select="replace($graph:property.eval,'\$','\\\$')"/>-->
- <xsl:choose>
- <xsl:when test="$graph:property.evaluated.recurse_level > 8">
- <xsl:message>#38 ERROR RECURSE $graph:property.evaluated.recurse_level=<xsl:value-of select="$graph:property.evaluated.recurse_level"/></xsl:message>
- <graph:property.evaluated.recurse_level>
- <xsl:attribute name="graph:property.evaluated.recurse_level" select="$graph:property.evaluated.recurse_level"/>
- </graph:property.evaluated.recurse_level>
- </xsl:when>
- <xsl:when test=" contains($graph:property.eval,'\$') or 1=1">
- <xsl:variable name="tokens">
- <tokens>
- <!--<xsl:attribute name="graph:property.eval.esc" select="$graph:property.eval.esc"/>-->
- <xsl:for-each select="tokenize($graph:property.eval,'\$\{')">
- <xsl:variable name="ifeval" select="contains(.,'}')"/>
-
- <lt>
- <xsl:attribute name="ifeval" select="$ifeval"/>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:attribute name="val" select="."/>
- <xsl:for-each select="tokenize(.,'\}')">
- <rt>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:value-of select="."/>
- </rt>
- </xsl:for-each>
- </lt>
- </xsl:for-each>
- </tokens>
- </xsl:variable>
- <!--<xsl:variable name="property.value" select=" replace($graph:property.eval,'\$','\\\$')"/>-->
- <!--<xsl:variable name="property.value.evaluated" select="$p5dg:p5ant.include.structure//property[]"/>-->
- <xsl:if test=" number($graph:debug) > 3"><xsl:copy-of select="$tokens"/></xsl:if>
- <xsl:variable name="evaluating">
- <evaluating>
- <xsl:for-each select="$tokens/tokens/lt">
- <xsl:variable name="ifeval" select="@ifeval"/>
- <xsl:for-each select="rt">
- <xsl:choose>
- <xsl:when test="@pos='1'">
- <xsl:choose>
- <xsl:when test=" text()='basedir' and not( contains($p5dg:basedir,'${'))">
- <!--<xsl:value-of select="'BASEDIR_CALCULATE_BY_p5ant:file'"/>-->
- <!-- <xsl:text>
- $p5ant:dir=</xsl:text><xsl:value-of select="$p5ant:dir"/>
- <xsl:text>
- p5ant:basedir.calculate=</xsl:text>-->
- <!--<xsl:choose>
- <xsl:when test=" contains($p5dg:basedir,'${')">
- <xsl:variable name="evaluated" select="($p5dg:p5ant.include.structure//property[@name=current() and not(@value=concat('${', current(),'}'))])[1]/concat(@value,@location)"/>
- </xsl:when>
- </xsl:choose>-->
- <xsl:value-of select="p5ant:basedir.calculate($p5ant:dir,$p5dg:basedir)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="evaluated" select="($p5dg:p5ant.include.structure//property[@name=current() and not(concat(@value,@location)=concat('${', current(),'}'))])[1]/concat(@value,@location)"/>
- <xsl:choose>
- <xsl:when test="$evaluated">
- <xsl:value-of select="$evaluated"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>{</xsl:text><xsl:value-of select="current()"/><xsl:text>}</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <!--<xsl:text>F:</xsl:text>--><xsl:value-of select="."/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:for-each>
- </evaluating>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test=" contains($evaluating/evaluating/text(),'${')">
- <xsl:message>#104 recurrent eval <xsl:value-of select="$evaluating//text()"/></xsl:message>
- <recurse_evaluating>
- <xsl:attribute name="evaluating" select="$evaluating/evaluating/text()"/>
- <xsl:call-template name="graph:property.evaluated">
- <xsl:with-param name="property.name" select="$property.name"/>
- <xsl:with-param name="graph:property.eval" select="$evaluating/evaluating/text()"/>
- <xsl:with-param name="p5dg:p5ant.include.structure" select="$p5dg:p5ant.include.structure"/>
- <xsl:with-param name="graph:property.evaluated.recurse_level" select="$graph:property.evaluated.recurse_level + 1"/>
- <xsl:with-param name="p5ant:dir" select="$p5ant:dir"/>
- <xsl:with-param name="p5dg:basedir" select="$p5dg:basedir"/>
- <xsl:with-param name="property.value_or_location" select="$property.value_or_location"/>
- </xsl:call-template>
- </recurse_evaluating>
- </xsl:when>
- <xsl:otherwise>
- <graph:property.evaluated>
- <xsl:value-of select="$evaluating"/>
- </graph:property.evaluated>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
-
- <xsl:function name="p5ant:basedir.calculate">
- <xsl:param name="p5ant:dir"/>
- <xsl:param name="p5dg:basedir"/>
- <xsl:variable name="basedir_roots" select="count(tokenize($p5dg:basedir,'../'))"/>
-
- <xsl:variable name="result">
- <xsl:for-each select="tokenize($p5ant:dir,'/')[ position() <= ( count(tokenize($p5ant:dir,'/')) - $basedir_roots + 1 ) ]">
- <xsl:value-of select="'/'"/><xsl:value-of select="."/>
- </xsl:for-each>
- <xsl:choose>
- <xsl:when test="$basedir_roots > 0">
- <xsl:text>/</xsl:text>
- <xsl:choose>
- <xsl:when test=" tokenize($p5dg:basedir,'/')[ position()=$basedir_roots]='.'"/>
- <xsl:otherwise>
- <xsl:value-of select=" tokenize($p5dg:basedir,'/')[ position()=$basedir_roots]"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>/</xsl:text>
- <xsl:choose>
- <xsl:when test="$p5dg:basedir='.'"></xsl:when>
- <xsl:otherwise><xsl:value-of select="$p5dg:basedir"/></xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:value-of select="replace($result,'//','/')"/>
- </xsl:function>
-
- <xsl:template mode="graph:graph.graph-to-analyze-property.xml" match="p5dg:p5ant.include.structure">
- <graph:graph.graph-to-analyze-property.xml>
- <!--<xsl:apply-templates mode="#current"/>-->
- <xsl:variable name="p5dg:p5ant.include.structure" select="."/>
- <xsl:for-each-group select=".//property[ position() < 10000000 or contains(@name,'php_session') ]" group-by="concat(@value,@location)"> <!-- FILTERING -->
- <xsl:copy copy-namespaces="no" exclude-result-prefixes="#all">
- <xsl:copy-of select="@*"/>
- <xsl:attribute name="p5ant:dir" select=" ancestor::node()[name()='p5ant:file']/@p5ant:dir"/>
- <xsl:variable name="property.name" select="@name"/>
- <xsl:variable name="property.value_or_location">
- <xsl:choose>
- <xsl:when test="@value">
- <xsl:value-of select="'value'"/>
- </xsl:when>
- <xsl:when test="@location">
- <xsl:value-of select="'location'"/>
- </xsl:when>
- <xsl:when test="@refid"><xsl:message>#185 todo @refid for @name=<xsl:value-of select="@name"/>; </xsl:message></xsl:when>
- <xsl:otherwise>
- <xsl:message terminate="yes">#183 property should be or @value or @location! - none of this was set! - for @name=<xsl:value-of select="@name"/>; @p5ant:dir=<xsl:value-of select=" ancestor::node()[name()='p5ant:file']/@p5ant:dir"/>;</xsl:message>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="property.value" >
- <xsl:choose>
- <xsl:when test="$property.value_or_location='value'">
- <xsl:value-of select=" replace(@value,'\$','\\\$')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select=" replace(@location,'\$','\\\$')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="graph:property.eval">
- <xsl:choose>
- <xsl:when test="$property.value_or_location='value'">
- <xsl:value-of select="@value"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@location"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!--<xsl:variable name="match"><xsl:text><![CDATA[\\$\{]]></xsl:text><xsl:value-of select="$property.name"/><xsl:text><![CDATA[}]]></xsl:text></xsl:variable>-->
- <!--<xsl:variable name="match"><xsl:value-of select="$property.name"/></xsl:variable>-->
- <xsl:variable name="match"><xsl:text>\$\{</xsl:text><xsl:value-of select="$property.name"/><xsl:text>\}</xsl:text></xsl:variable>
- <xsl:message>#35 match is <xsl:value-of select="$match"/></xsl:message>
- <!--<graph:property.evals>
- <xsl:for-each select="root()/xxxxxxx/property[ matches(@value,concat('(.*',$match,'.*)'))]"> <!-\- \\$\{ -\->
- <xsl:copy exclude-result-prefixes="#all" copy-namespaces="no">
- <xsl:copy-of select="@*"/>
- <xsl:variable name="to.replace.value" select="replace(@value,'\$','\\\$')"/>
- <xsl:attribute name="graph:property.eval" select='replace(@value, $match , $property.value)'/>
- <xsl:attribute name="graph:property.eval.from" select="$property.name"/>
-
- </xsl:copy>
- </xsl:for-each>
- </graph:property.evals>-->
- <xsl:choose>
- <xsl:when test=" contains($property.value,'${')"> <!-- contains(replace(@value, $match , $property.value),'\$') -->
- <xsl:variable name="graph:property.evaluated">
- <xsl:call-template name="graph:property.evaluated">
- <xsl:with-param name="graph:property.eval" select="$graph:property.eval"/> <!-- @value -->
- <xsl:with-param name="p5dg:p5ant.include.structure" select="$p5dg:p5ant.include.structure"/>
- <xsl:with-param name="property.name" select="$property.name"/>
- <xsl:with-param name="p5ant:dir" select=" ancestor::node()[name()='p5ant:file']/@p5ant:dir"/>
- <xsl:with-param name="p5dg:basedir" select="@p5dg:basedir"/>
- <xsl:with-param name="property.value_or_location" select="$property.value_or_location"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:attribute name="graph:property.evaluated" select="$graph:property.evaluated//graph:property.evaluated/text()"/>
- <xsl:if test="number($graph:debug) >3"><xsl:copy-of select="$graph:property.evaluated"/></xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="graph:property.evaluated.not_needed" select="true()"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:copy>
- </xsl:for-each-group>
- </graph:graph.graph-to-analyze-property.xml>
- </xsl:template>
-
-
- <xsl:template mode="graph:graph.graph-to-analyze.xml" match="p5dg:p5ant.include.structure">
- <graph:graph.graph-to-analyze.xml>
- <!--<xsl:apply-templates mode="#current"/>-->
- <xsl:variable name="graph:graph.graph-to-analyze-property.xml" select="doc($graph.graph-to-analyze-property.xml)"/>
- <xsl:for-each select=".//(p5dg:p5ant.include.structure.ant.build|p5dg:p5ant.include.structure.ant.build.target|p5dg:p5ant.include.structure.ant.build.child.target.antcall|p5dg:p5ant.include.structure.ant.build.child.target.ant)">
- <!--<xsl:message>#135OKOK trasa <xsl:value-of select="position()"/> <xsl:value-of select="@fid"/></xsl:message>-->
- <xsl:element name="{name()}" exclude-result-prefixes="#all" >
- <!--<xsl:namespace name="{ substring-before(name(),':')}" select="substring-before(name(),':')"/>-->
- <xsl:copy-of select="@*"/>
- <xsl:copy-of select="../@p5ant:dir.parent"/>
- <xsl:copy-of select="../@p5ant:dir"/>
- <xsl:copy-of select="../@p5ant:uuid"/>
- <xsl:attribute name="p5ant:file" select="../@p5ant:file"/>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:if test="../@fid"><xsl:attribute name="parent" select="../@fid"/></xsl:if>
- <xsl:choose>
- <xsl:when test="project">
- <xsl:attribute name="fid" select="concat( name(*),'_','.', ../@p5ant:uuid)"/>
- </xsl:when>
- <xsl:when test="target|extension-point">
- <xsl:attribute name="fid" select="concat( name(*),'_','.', @p5ant:uuid)"/>
- <xsl:attribute name="fid.parent" select=" ancestor::project[ position() = 1]/concat( name(),'_',@name,'.', ../@p5ant:uuid)"/>
- </xsl:when>
- <xsl:when test="ant">
- <xsl:attribute name="fid" select="concat( name(*),'_','.', @p5ant:uuid)"/>
- <xsl:attribute name="fid.parent" select=" ancestor::project[ position() = 1]/concat( name(),'_',@name,'.', ../@p5ant:uuid)"/>
- </xsl:when>
- <xsl:when test="antcall">
- <xsl:attribute name="fid" select="concat( @p5dg:name,'_','.', ../@p5ant:uuid)"/>
- <xsl:attribute name="fid.parent" select=" ancestor::target[position() = 1]/concat( @p5dg:name,'_',@name,'.', ../@p5ant:uuid)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="fid" select="concat( name(*),'_','.', ../@p5ant:uuid)"/> <!-- @name -->
- <xsl:attribute name="fid.parent" select=" ancestor::project[position() = 1]/concat( name(*),'_',@name,'.', ../@p5ant:uuid)"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:apply-templates mode="graph:graph.graph-to-analyze.xml.child">
- <xsl:with-param name="graph:graph.graph-to-analyze-property.xml" select="$graph:graph.graph-to-analyze-property.xml"/>
- </xsl:apply-templates>
- </xsl:element>
- </xsl:for-each>
- </graph:graph.graph-to-analyze.xml>
- </xsl:template>
-
-
-
-
- <xsl:template match="p5dg:p5ant.include.structure.ant.build|p5dg:p5ant.include.structure.ant.build.child.target.antcall|p5dg:p5ant.include.structure.ant.build.child.target.ant" mode="graph:graph.graph-to-analyze.xml.child">
- <xsl:param name="graph:graph.graph-to-analyze-property.xml" required="yes"/>
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- </xsl:copy>
- </xsl:template>
-
- <xsl:template match="*" mode="graph:graph.graph-to-analyze.xml.child">
- <xsl:param name="graph:graph.graph-to-analyze-property.xml" required="yes"/>
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates mode="graph:graph.graph-to-analyze.xml.child" select="@*">
- <xsl:with-param name="graph:graph.graph-to-analyze-property.xml" select="$graph:graph.graph-to-analyze-property.xml"/>
- </xsl:apply-templates>
- <xsl:apply-templates mode="#current">
- <xsl:with-param name="graph:graph.graph-to-analyze-property.xml" select="$graph:graph.graph-to-analyze-property.xml"/>
- </xsl:apply-templates>
- </xsl:copy>
- </xsl:template>
-
-
- <xsl:template match="@value[../property]" mode="graph:graph.graph-to-analyze.xml.child">
- <xsl:param name="graph:graph.graph-to-analyze-property.xml" required="yes"/>
- <xsl:choose>
- <xsl:when test="../@graph:property.evaluated"><xsl:attribute name="value" select="../@graph:property.evaluated"/></xsl:when>
- <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="@*" mode="graph:graph.graph-to-analyze.xml.child">
- <xsl:copy-of select="."/>
- </xsl:template>
-
-
- <xsl:template mode="graph:graph.graph-to-nodes.xml" match="graph:graph.graph-to-analyze.xml">
- <graph.graph-to-nodes.xml>
- <xsl:for-each-group select="*" group-by="@fid">
- <xsl:comment>#142 create-nodes-BI-wfs for @fid=<xsl:value-of select="@fid"/>;</xsl:comment>
- <xsl:apply-templates mode="graph:create-nodes" select="." />
- </xsl:for-each-group>
- <xsl:for-each-group select="*" group-by="@fid">
- <xsl:comment>#142 create-nodes-BI-wfs for @fid=<xsl:value-of select="@fid"/>;</xsl:comment>
- <xsl:apply-templates mode="graph:create-edges" select="." />
- </xsl:for-each-group>
- </graph.graph-to-nodes.xml>
- </xsl:template>
-
-
-
-
- <xsl:template match="*" mode="graph:create-nodes" >
- <xsl:element name="node" namespace="http://graphml.graphdrawing.org/xmlns">
- <xsl:attribute name="id">
- <!--<xsl:value-of select="concat(name(),'_',@pos)"/>-->
- <xsl:value-of select="replace(@fid,'\.','_')"/>
- </xsl:attribute>
- <!--<xsl:attribute name="deb.fid" select="@fid"/>-->
- <!--<xsl:attribute name="deb.fid2" select=" text()"/>-->
- <data key="d0" xmlns="http://graphml.graphdrawing.org/xmlns">
- <y:ShapeNode>
- <!--<y:Geometry height="{ ((count(*[not( local-name()='ID') and not( matches(local-name(),'(S_*)|(A_)|(TERYT.*)'))]) * 18) + 70)}" width="600"/>--><!-- { count(*) * 10} -->
- <!--<y:Fill color="#CCCCCC"/>-->
- <y:Geometry height="100" width="600"/>
- <y:Fill transparent="false">
- <xsl:attribute name="color">
- <!--<xsl:value-of select="$colors/colors/object_hex[ @name = current()/local-name() or @name='*'][1]/text()" xpath-default-namespace=""/>-->
- <xsl:value-of select="'#666666'" xpath-default-namespace=""/>
- </xsl:attribute>
- </y:Fill><!--<xsl:value-of select="local-name()"/>-->
- <!--<y:NodeLabel width="400" height="{ ((count(*[not( local-name()='ID') and not( matches(local-name(),'(S_*)|(A_)|(TERYT.*)'))]) * 18) + 70)}"><html><div
- style="font-size:120%;color:black;">
- <xsl:value-of select="ID"/><br>
- <xsl:value-of select=" substring(name(),10)"/><br>
- <xsl:for-each select="*[not( local-name()='ID') and not( matches(local-name(),'(S_*)|(A_)|(TERYT.*)'))]" xpath-default-namespace="http://graphml.graphdrawing.org/xmlns">
- <xsl:value-of select=" substring(local-name(),0,10)"/><xsl:text> : </xsl:text><xsl:value-of select=" substring(.,0,20)"/> <!-\-<xsl:for-each select="text()"><xsl:value-of select="substring(text(),20)"/></xsl:for-each>-\-><br>
- </xsl:for-each>
- </div>
- </y:NodeLabel>-->
- <y:NodeLabel width="400" height="100"><html><div
- style="font-size:120%;color:black;">
- <xsl:value-of select="ID"/><br>
- <xsl:value-of select=" substring(name(),10)"/><br>
- <xsl:for-each select="*[not( local-name()='ID') and not( matches(local-name(),'(S_*)|(A_)|(TERYT.*)'))]" xpath-default-namespace="http://graphml.graphdrawing.org/xmlns">
- <xsl:value-of select=" substring(local-name(),0,10)"/><xsl:text> : </xsl:text><xsl:value-of select=" substring(.,0,20)"/> <!--<xsl:for-each select="text()"><xsl:value-of select="substring(text(),20)"/></xsl:for-each>--><br>
- </xsl:for-each>
- </div>
- </y:NodeLabel>
- </y:ShapeNode>
- </data>
- </xsl:element>
- </xsl:template>
-
-
-
- <xsl:template match="*[@fid]" mode="graph:create-edges" priority="5" >
- <!--<default_db__x3A__BI_audit_KRS_person:BI_audit_KRS_person
- xlink:href="https://biuro.biall-net.pl/wfs/default_db/BI_audit_KRS_person#BI_audit_KRS_person.150746"/>-->
-
- <!-- <xsl:param name="pos" required="yes"/>
- <xsl:param name="next" required="yes"/>-->
- <xsl:comment>#273parent <xsl:value-of select="@parent"/></xsl:comment>
- <xsl:choose>
- <xsl:when test="@fid">
- <xsl:element name="edge" namespace="http://graphml.graphdrawing.org/xmlns">
- <!--<xsl:attribute name="debug.279" select="1"/>-->
- <xsl:attribute name="id">
- <xsl:value-of select="generate-id()"/>
- </xsl:attribute>
- <xsl:attribute name="source">
- <!--<xsl:value-of select="concat(name(),'_',@pos)"/>-->
- <xsl:value-of select="replace(@fid,'\.','_')"/>
- </xsl:attribute>
- <xsl:attribute name="target">
- <!--<xsl:value-of select="$next[1]/concat(name(), '_',@pos)"/>-->
- <xsl:value-of select="replace(@fid.parent,'\.','_')"/>
- </xsl:attribute>
- <!--<xsl:attribute name="deb.ref" select="../*[@fid = current()/substring-after(@xlink:href,'#')]"/>-->
- <y:GenericEdge configuration="com.yworks.edge.framed">
- <xsl:comment>mod:<!--<xsl:value-of select="$pos mod 10"/>-->/<xsl:value-of select=" position() mod 10"/> /<xsl:value-of select=" position() mod 2"/> </xsl:comment>
- <y:LineStyle width="{(position() mod 3) + 1}.0">
- <!--<xsl:attribute name="color" select="$colors/colors/object_hex[ @name = substring-before(@fid,'.') or @name='*' ][1]/text()" xpath-default-namespace=""/>-->
- <xsl:attribute name="color" select="'#669900'" />
- <!--<xsl:attribute name="type" select="$colors/colors/dashed/dash[ @pos = ( $pos mod 2 ) ]/text()" xpath-default-namespace=""/>-->
- </y:LineStyle>
- <y:Arrows source="none" target="standard"/>
- <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true"><xsl:value-of select="../relation_from/text()"/><y:LabelModel>
- <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
- </y:LabelModel>
- <y:ModelParameter>
- <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
- </y:ModelParameter>
- <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
- </y:EdgeLabel>
- <y:StyleProperties>
- <!--<y:Property class="java.awt.Color" name="FramedEdgePainter.fillColor" value="{$colors/colors/color[ @pos = $pos mod 10 ]/text()}"/>-->
- <y:Property class="java.awt.Color" name="FramedEdgePainter.fillColor" value="red"/>
- </y:StyleProperties>
- </y:GenericEdge>
-
- <!--<group>
- <xsl:value-of select="concat(name(),'_',ID,$next/concat(name(), '_',ID))"/>
- </group>-->
- </xsl:element>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>#284 not found node in xml <xsl:value-of select="@xlink:href"/></xsl:message>
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:template>
-
-
-
-
-
-
- <xsl:template match="wfs:FeatureCollection" xpath-default-namespace="http://graphml.graphdrawing.org/xmlns">
- <graphml
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://graphml.graphdrawing.org/xmlns"
- xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd">
- <key id="d0" for="node" yfiles.type="nodegraphics"/>
- <key id="d1" for="edge" yfiles.type="edgegraphics"/>
- <graph id="G" edgedefault="directed">
-
-
- <!-- TITLE -->
- <xsl:element name="node">
- <xsl:attribute name="id">
- <xsl:value-of select="'title'"/>
- </xsl:attribute>
- <data key="d0">
- <y:ShapeNode>
- <y:Geometry height="50.0" width="600"/>
- <y:Fill color="#FFFFAA"/>
- <y:BorderStyle color="#000000" type="line" width="1.0"/>
- <y:NodeLabel width="600" height="50"><html><div
- style="font-size:100%;color:blue;">
- <xsl:value-of select="$graph_title"/><br>
- <xsl:value-of select="$graph_desc"/><!--<br>-->
- </div>
- </y:NodeLabel>
- </y:ShapeNode>
- </data>
- </xsl:element>
-
-
- <xsl:variable name="gml:featureMember">
- <!--<gml:featureMember>-->
- <xsl:for-each select="gml:featureMember//*[ substring-before(substring-after(name(),'__x3A__'),':') = local-name() and * ]">
- <!--<xsl:message>#135OKOK trasa <xsl:value-of select="position()"/> <xsl:value-of select="@fid"/></xsl:message>-->
- <xsl:element name="{local-name()}" >
- <!--<xsl:namespace name="{ substring-before(name(),':')}" select="substring-before(name(),':')"/>-->
- <xsl:copy-of select="@*"/>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:if test="../@fid"><xsl:attribute name="parent" select="../@fid"/></xsl:if>
-
- <xsl:for-each select="*[ not( substring-before(substring-after(name(),'__x3A__'),':') = local-name() ) ]">
- <xsl:copy-of select="." copy-namespaces="no"/>
- </xsl:for-each>
- </xsl:element>
- </xsl:for-each>
- <!--</gml:featureMember>-->
- </xsl:variable>
-
- <!--<debug.128>
- <xsl:copy-of select="$gml:featureMember"/>
- </debug.128>-->
-
-
- <!--<debug_129_grouped>
- <xsl:for-each-group select="$gml:featureMember/*" group-by="@fid">
- <xsl:copy-of select="."/>
- </xsl:for-each-group>
- </debug_129_grouped>-->
- <xsl:comment>#95 create-nodes-BI dla DEALS</xsl:comment>
-
-
-
-
-
- <xsl:comment>#139 nizej group by</xsl:comment>
-
- <xsl:for-each-group select="$gml:featureMember/*" group-by="@fid">
- <xsl:comment>#142 create-nodes-BI-wfs for @fid=<xsl:value-of select="@fid"/>;</xsl:comment>
- <xsl:apply-templates mode="create-nodes-BI-wfs" select="." />
- </xsl:for-each-group>
-
- <xsl:variable name="edges">
- <edges>
- <xsl:for-each select="$gml:featureMember/*">
- <xsl:comment>#149 parent <xsl:value-of select="@parent"/> fid <xsl:value-of select="@fid"/> name=<xsl:value-of select="name()"/></xsl:comment>
- <!--<xsl:message>#149 parent <xsl:value-of select="@parent"/> fid <xsl:value-of select="@fid"/> name=<xsl:value-of select="name()"/></xsl:message>-->
- <xsl:apply-templates mode="create-edges-BI-wfs" select="." >
- <xsl:with-param name="pos" select="@pos"/>
- <xsl:with-param name="next" select="@parent"/>
- </xsl:apply-templates>
- </xsl:for-each>
-
-
-
- </edges>
- </xsl:variable>
-
- <xsl:for-each-group select="$edges/edges/edge" group-by="concat(@target,@source)"> <!-- group-by="@target" -->
-
- <edge xmlns="http://graphml.graphdrawing.org/xmlns">
- <xsl:copy-of select="@*"/>
- <!--<xsl:copy-of select="../comment()"/>-->
- <!--<xsl:comment>#173</xsl:comment>-->
- <!--<xsl:copy-of select="../../comment()"/>-->
- <xsl:copy-of select="*"/>
- </edge>
- </xsl:for-each-group>
-
- </graph>
- </graphml>
- </xsl:template>
-
- </xsl:stylesheet>
|