Created
September 29, 2014 14:11
-
-
Save stoerr/fe404637d2b7676650d0 to your computer and use it in GitHub Desktop.
Makes graph of tiles 1 definition extensions in dotty / graphviz format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions"> | |
<xsl:output method="text" /> | |
<xsl:template match="/" > | |
<xsl:text>digraph tilesdefs { | |
ranksep="2"; | |
</xsl:text> | |
<xsl:for-each select="/tiles-definitions/definition[@extends]"> | |
"<xsl:value-of select="@name"/>" -> "<xsl:value-of select="@extends"/>" ; | |
</xsl:for-each> | |
<xsl:for-each select="/tiles-definitions/definition/put[starts-with(@value,'.')]"> | |
"<xsl:value-of select="../@name"/>" -> "<xsl:value-of select="@value"/>" [style="dashed", label="<xsl:value-of select="@name"/>"] ; | |
</xsl:for-each> | |
<xsl:text> | |
}</xsl:text> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment