<!--
xml2dot.xsl - transform Bison XML Report into DOT.
- $Id$
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007-2012 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
</xsl:template>
<xsl:template match="bison-xml-report">
- <xsl:apply-templates select="automaton"/>
+ <xsl:text>// Generated by GNU Bison </xsl:text>
+ <xsl:value-of select="@version"/>
+ <xsl:text>. </xsl:text>
+ <xsl:text>// Report bugs to <</xsl:text>
+ <xsl:value-of select="@bug-report"/>
+ <xsl:text>>. </xsl:text>
+ <xsl:text>// Home page: <</xsl:text>
+ <xsl:value-of select="@url"/>
+ <xsl:text>>. </xsl:text>
+ <xsl:apply-templates select="automaton">
+ <xsl:with-param name="filename" select="filename"/>
+ </xsl:apply-templates>
</xsl:template>
<xsl:template match="automaton">
- <xsl:text>digraph Automaton { </xsl:text>
+ <xsl:param name="filename"/>
+ <xsl:text>digraph "</xsl:text>
+ <xsl:call-template name="escape">
+ <xsl:with-param name="subject" select="$filename"/>
+ </xsl:call-template>
+ <xsl:text>" { </xsl:text>
<xsl:apply-templates select="state"/>
<xsl:text>} </xsl:text>
</xsl:template>
</xsl:template>
<xsl:template match="item">
- <xsl:apply-templates select="key('bison:ruleNumber', @rule-number)">
+ <xsl:apply-templates select="key('bison:ruleByNumber', @rule-number)">
<xsl:with-param name="point" select="@point"/>
</xsl:apply-templates>
<xsl:apply-templates select="lookaheads"/>
<xsl:with-param name="search" select="$search"/>
<xsl:with-param name="replace" select="$replace"/>
</xsl:call-template>
- </xsl:when>
+ </xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$subject"/>
+ <xsl:value-of select="$subject"/>
</xsl:otherwise>
- </xsl:choose>
+ </xsl:choose>
</xsl:template>
</xsl:stylesheet>