]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/www/lambdadelta/xslt/ld_web_ebnf.xsl
EBNF definition of OSN begins ...
[helm.git] / helm / www / lambdadelta / xslt / ld_web_ebnf.xsl
diff --git a/helm/www/lambdadelta/xslt/ld_web_ebnf.xsl b/helm/www/lambdadelta/xslt/ld_web_ebnf.xsl
new file mode 100644 (file)
index 0000000..5599def
--- /dev/null
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ld="http://lambdadelta.info/"
+                xmlns="http://www.w3.org/1999/xhtml"
+>
+
+<xsl:template match="ld:ebnf">
+   <span class="emph ebnf">
+      <xsl:apply-templates/>
+   </span>
+</xsl:template>
+
+<xsl:template match="ld:prod">
+   <xsl:text>&lt;</xsl:text>
+   <xsl:value-of select="@of"/>
+   <xsl:text>&gt;</xsl:text>
+   <xsl:call-template name="sp"/>
+</xsl:template>
+
+<xsl:template match="ld:def">
+   <xsl:text>=</xsl:text>
+   <xsl:call-template name="sp"/>
+</xsl:template>
+
+<xsl:template match="ld:str">
+   <xsl:text>"</xsl:text>
+   <xsl:value-of select="@of"/>
+   <xsl:text>"</xsl:text>
+   <xsl:call-template name="sp"/>
+</xsl:template>
+
+<xsl:template match="ld:chr">
+   <xsl:text>'</xsl:text>
+   <xsl:value-of select="@of"/>
+   <xsl:text>'</xsl:text>
+   <xsl:call-template name="sp"/>
+</xsl:template>
+
+<xsl:template match="ld:or">
+   <xsl:text>|</xsl:text>
+   <xsl:call-template name="sp"/>
+</xsl:template>
+
+<xsl:template match="ld:etc">
+   <xsl:text>...</xsl:text>
+   <xsl:call-template name="sp"/>
+</xsl:template>
+
+<xsl:template match="ld:open">
+   <xsl:text>(</xsl:text>
+   <xsl:call-template name="sp"/>
+</xsl:template>
+
+<xsl:template match="ld:close">
+   <xsl:text>)</xsl:text>
+   <xsl:call-template name="sp"/>
+</xsl:template>
+
+<xsl:template match="ld:star">
+   <xsl:text>*</xsl:text>
+   <xsl:call-template name="sp"/>
+</xsl:template>
+
+<xsl:template match="ld:plus">
+   <xsl:text>+</xsl:text>
+   <xsl:call-template name="sp"/>
+</xsl:template>
+
+<xsl:template match="ld:stop">
+   <xsl:text>;</xsl:text>
+   <xsl:call-template name="sp"/>
+</xsl:template>
+
+</xsl:stylesheet>