]> git.saurik.com Git - bison.git/blobdiff - data/xslt/bison.xsl
style: no longer use backquotes
[bison.git] / data / xslt / bison.xsl
index dc0dd9c516dbe2560c6b87d9d5e00816ffe32f92..10e3305bd7fdc22f976e4ff78b2920e93db38fc3 100644 (file)
@@ -2,9 +2,8 @@
 
 <!--
     bison.xsl - common templates for Bison XSLT.
-    $Id$
 
-    Copyright (C) 2007 Free Software Foundation, Inc.
+    Copyright (C) 2007-2013 Free Software Foundation, Inc.
 
     This file is part of Bison, the GNU Compiler Compiler.
 
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:bison="http://www.gnu.org/software/bison/">
 
+<xsl:key
+  name="bison:symbolByName"
+  match="/bison-xml-report/grammar/nonterminals/nonterminal"
+  use="@name"
+/>
+<xsl:key
+  name="bison:symbolByName"
+  match="/bison-xml-report/grammar/terminals/terminal"
+  use="@name"
+/>
 <xsl:key
   name="bison:ruleByNumber"
   match="/bison-xml-report/grammar/rules/rule"
   <xsl:value-of select="string-length(translate($conflict-data, 's', ''))"/>
 </xsl:template>
 
+<xsl:template name="space">
+  <xsl:param name="repeat">0</xsl:param>
+  <xsl:param name="fill" select="' '"/>
+  <xsl:if test="number($repeat) &gt;= 1">
+    <xsl:call-template name="space">
+      <xsl:with-param name="repeat" select="$repeat - 1"/>
+      <xsl:with-param name="fill" select="$fill"/>
+    </xsl:call-template>
+    <xsl:value-of select="$fill"/>
+  </xsl:if>
+</xsl:template>
+
 </xsl:stylesheet>