| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?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:p5yed="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/yed/p5yed.xsd"
- xmlns:yed="http://www.yworks.com/xml/yed/3"
- xmlns:p5xsl="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/xsl_interface/xsl_interface.xsd"
- xmlns:y="http://www.yworks.com/xml/graphml"
-
-
-
- exclude-result-prefixes="xs yed p5xsl"
- version="2.0">
-
- <xsl:include href="../xsl_interface/p5xsl.ascii.xsl"/>
-
- <xsl:param name="y:debug"/>
-
- <xsl:variable name="colors">
- <colors>
- <color pos="0">#FFAAFF</color>
- <color pos="1">#003300</color>
- <color pos="2">#AA0000</color>
- <color pos="3">#AAAA00</color>
- <color pos="4">#AAAAAA</color>
- <color pos="5">#FF0000</color>
- <color pos="6">#FFAA00</color>
- <color pos="7">#FFFF00</color>
- <color pos="8">#FF00AA</color>
- <color pos="9">#FFAAAA</color>
- </colors>
- <dashed>
- <dash pos="0">dashed</dash>
- <dash pos="1">line</dash>
- </dashed>
- </xsl:variable>
-
- <xsl:template mode="yed:graphml.nodes" match="*[@p5yed:node.from.nodegraphics.type]">
- <xsl:apply-templates mode="y:Fill" select="."/>
- </xsl:template>
-
- <xsl:template mode="yed:graphml.edge" match="*[@p5yed:edge.source and @p5yed:node]">
- <xsl:apply-templates mode="y:edge" select="."/>
- </xsl:template>
-
- <xsl:template mode="y:edge" match="*[@p5yed:edge.source and @p5yed:node and not(p5yed:node.unique.descriptor)]">
- <xsl:attribute name="source" select="@p5yed:edge.source"/>
- <xsl:attribute name="target" select="@p5yed:node"/>
- </xsl:template>
-
-
- <xsl:template mode="y:edge" match="*[@p5yed:edge.source and @p5yed:node and p5yed:node.unique.descriptor]">
- <!-- kontekst wyzwolenia .//* -->
- <xsl:attribute name="source" select="@p5yed:edge.source"/>
- <xsl:attribute name="target" select="@p5yed:node"/>
- <!-- szukamy pierwszego przedstawiciela p5yed:node.unique.descriptor.source -->
- <!-- szukamy pierwszego przedstawiciela p5yed:node.unique.descriptor.target -->
- <!--<xsl:copy-of select="p5yed:node.unique.descriptor"/>-->
- <xsl:variable name="context" select="."/>
- <!--<p5yed:node.unique.descriptor.target>-->
- <xsl:for-each select="p5yed:node.unique.descriptor/*[ not(@p5yed:clousure.node.unique.descriptor.not)]"> <!-- todo remove cesc -->
- <!-- <xsl:copy>-->
- <!--<xsl:attribute name="look_for.name" select="text()"/>-->
- <xsl:comment>#61 p5yed:node.unique.descriptor look for <xsl:value-of select="text()"/> </xsl:comment>
- <xsl:for-each select="$context/root()/descendant-or-self::*[ name()=current()/local-name() and text()=current()/text() and parent::p5yed:node.unique.descriptor ][1]/ancestor::*[ local-name()='path.included' or local-name()='path.clousure.following'][1]">
- <!--<xsl:copy-of select="@p5yed:node"/>-->
- <xsl:comment>#64 found <xsl:copy-of select="@p5yed:node"/> </xsl:comment>
- </xsl:for-each>
- <!--</xsl:copy>-->
- </xsl:for-each>
- <!--</p5yed:node.unique.descriptor.target>-->
- </xsl:template>
-
-
-
- <xsl:template mode="y:edge" match="*"/>
-
-
-
- <xsl:template mode="y:Fill" match="*[@p5yed:node.from.nodegraphics.type]">
- <y:Fill>
- <xsl:variable name="colors.count" select="count($colors//color)"/>
- <xsl:if test="number($y:debug) > 3"><xsl:attribute name="colors.count" select="$colors.count"/></xsl:if>
- <xsl:variable name="mod" select="p5xsl:ascii.sum(@p5yed:node.from.nodegraphics.type) mod $colors.count"/>
- <xsl:if test="number($y:debug) > 3"><xsl:attribute name="mod" select="$mod"/></xsl:if>
- <xsl:attribute name="color" select="$colors//color[ @pos = $mod ]/text()"/>
- <xsl:attribute name="transparent" select="'false'"/>
- <!--<xsl:value-of select="p5xsl:ascii.sum(@p5yed:node.nodegraphics.type)"/>-->
- </y:Fill>
- </xsl:template>
-
- </xsl:stylesheet>
|