diff options
author | buraq <buraq@epfl.ch> | 2003-10-29 09:18:45 +0000 |
---|---|---|
committer | buraq <buraq@epfl.ch> | 2003-10-29 09:18:45 +0000 |
commit | f6dab0da8d27f605677fe295a57ffa8a4f410b63 (patch) | |
tree | 820e4ab5307ffc39c103aa5c099d5b9cb5508e9c /doc/faq/scala-faq.xhtml.xsl | |
parent | b960d0b0e58b06d26d17e94d807e2de1b80ceccf (diff) | |
download | scala-f6dab0da8d27f605677fe295a57ffa8a4f410b63.tar.gz scala-f6dab0da8d27f605677fe295a57ffa8a4f410b63.tar.bz2 scala-f6dab0da8d27f605677fe295a57ffa8a4f410b63.zip |
initial
Diffstat (limited to 'doc/faq/scala-faq.xhtml.xsl')
-rw-r--r-- | doc/faq/scala-faq.xhtml.xsl | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/doc/faq/scala-faq.xhtml.xsl b/doc/faq/scala-faq.xhtml.xsl new file mode 100644 index 0000000000..94620fba8e --- /dev/null +++ b/doc/faq/scala-faq.xhtml.xsl @@ -0,0 +1,101 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + <xsl:include href="xhtml.templates.xsl"/> + <xsl:output method="html"/> + + <xsl:template match="/"> + <html> + <body bgcolor="#FFFFFF"> + <xsl:apply-templates/> + </body> + </html> + + </xsl:template> + + <xsl:template match="faq"> + <table> + <tr><th>Table of Contents</th></tr> + <xsl:for-each select="./section"> + <tr> + <td> + <a> + <xsl:attribute name="href"> + <xsl:value-of select="generate-id(.)"/> + </xsl:attribute> + <xsl:number/>. <xsl:value-of select="@title"/> + + </a> + </td> + </tr> + <xsl:for-each select="./entry"> + <tr> + <td> + <a> + <xsl:attribute name="href"> + <xsl:call-template name="entry.getId"/> + </xsl:attribute> + <xsl:call-template name="entry.fullName"/> + </a> + </td> + </tr> + </xsl:for-each> + </xsl:for-each> + </table> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="section"> + <p/><p/> + <xsl:param name="id"/> + <a> + <xsl:attribute name="name"> + <xsl:value-of select="generate-id()"/> + </xsl:attribute> + <xsl:number/>. <xsl:value-of select="@title"/> + </a> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="entry"> + <p> + <a> + <xsl:attribute name="name"> + <xsl:call-template name="entry.getId"/> + </xsl:attribute> + <xsl:call-template name="entry.fullName"/> + </a> + <br/> + <xsl:apply-templates select="./answer"/> + </p> + </xsl:template> + + <xsl:template match="seealso"> + <a> + <xsl:attribute name="href"> + <xsl:value-of select="concat('#',@ref)"/> + </xsl:attribute> + <xsl:for-each select="id(@ref)"> + <xsl:call-template name="entry.fullName"/> + </xsl:for-each> + </a> + </xsl:template> + + <xsl:template name="entry.fullName"> + <xsl:number level="multiple" count="section|entry"/>. + <xsl:value-of select="./question"/> + </xsl:template> + + <xsl:template name="entry.getId"> + <xsl:choose> + <xsl:when test="string(@id)"> + <xsl:value-of select="@id"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="generate-id()"/> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + +</xsl:stylesheet> |