web/hosts/www/tutorial Makefile.in,NONE,1.1 tutorial.xsl,NONE,1.1
Stefan Seefeld <[email protected]>
| Newsgroups | gmane.comp.video.fresco.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvs/fresco/web/hosts/www/tutorial
In directory purcel:/tmp/cvs-serv17585/hosts/www/tutorial
Added Files:
Makefile.in tutorial.xsl
Log Message:
build the fresco tutorial as part of the website
--- NEW FILE: Makefile.in ---
srcdir := @abs_srcdir@
fresco_doc := @fresco_doc@/src
include ../../../config.mk
all:
$(MAKE) -f $(fresco_doc)/Makefile xsl=$(srcdir)/tutorial.xsl
install: all
mkdir -p $(sitedir)/root/tutorial
mkdir -p $(sitedir)/root/tutorial/figures
cp *.html $(sitedir)/root/tutorial/
cp figures/*.png $(sitedir)/root/tutorial/figures/
cp $(topdir)/xsl/tutorial.css $(sitedir)/root/tutorial/
clean:
rm -rf *.html figures
--- NEW FILE: tutorial.xsl ---
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
xmlns:exsl="http://exslt.org/common"
extension-element-prefixes="exsl"
version="1.0">
<xsl:import href="/org/fresco.org/share/docbook/html/chunk.xsl"/>
<xsl:param name="suppress.navigation">1</xsl:param>
<xsl:param name="html.stylesheet" select="'tutorial.css'"/>
<xsl:param name="root.filename" select="'intro'"/>
<!--
<xsl:param name="toc.list.type">ol</xsl:param>
-->
<xsl:param name="generate.toc">
appendix toc
article toc
book figure,table,example,equation
chapter
part toc
preface toc
qandadiv toc
qandaset toc
reference toc
section toc
set toc
</xsl:param>
<xsl:template name="fresco.frames">
<html>
<head>
<title>The Fresco Tutorial</title>
</head>
<frameset rows="90,*">
<frame src="header.html" frameborder="0"/>
<frameset cols="20%, 50%, 30%">
<frame src="toc.html" name="index"/>
<frame src="intro.html" name="body"/>
<frame src="" name="annotate"/>
</frameset>
<noframes>
<p>sorry, this site requires frames</p>
</noframes>
</frameset>
</html>
</xsl:template>
<xsl:template name="fresco.logo">
<body bgcolor="#ffffff"
style="margin: 0px 0px 0px 0px ; padding: 0px 0px 0px 0px ; background-color: #ffffff; margin: 0px; padding: 0px;"
leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="blueBack" summary="Our top banner for logo and short-links to popular items.">
<tr class="blueBack">
<td class="blueBack" width="150" align="center">
<img border="0" height="1" width="150" src="/glyphs/blank_dot.png" alt=""/>
</td>
<td class="blueBack" width="100%" align="left">
<img border="0" height="1" width="1" src="/glyphs/blank_dot.png" alt=""/>
</td>
</tr>
<tr class="blueBack">
<td class="blueBack" align="center">
<a href="/index.html" target="_top"><img border="0" height="56" src="/glyphs/f_l.png" width="95" alt="Fresco logo"/></a>
</td>
<td class="blueBack" align="left">
<a href="/index.html" target="_top"><img border="0" src="/glyphs/f_t.png" alt="Fresco title" width="309" height="46"/></a>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" class="shadow">
<img border="0" height="6" width="1" src="/glyphs/blank_dot.png" alt=""/>
</td>
</tr>
</table>
</div>
</body>
</xsl:template>
<xsl:template match="*" mode="process.root">
<exsl:document href="index.html"
method="html"
encoding="ISO-8859-1"
indent="yes">
<xsl:call-template name="fresco.frames"/>
</exsl:document>
<exsl:document href="toc.html"
method="html"
encoding="ISO-8859-1"
indent="yes">
<html>
<xsl:call-template name="html.head"/>
<body>
<xsl:apply-templates select="." mode="toc"/>
</body>
</html>
</exsl:document>
<exsl:document href="header.html"
method="html"
encoding="ISO-8859-1"
indent="yes">
<html>
<xsl:call-template name="html.head"/>
<xsl:call-template name="fresco.logo"/>
</html>
</exsl:document>
<xsl:apply-templates select="."/>
</xsl:template>
<xsl:template name="component.title">
<xsl:param name="node" select="."/>
<h2 class="title">
<a href="http://wiki.fresco.org/index.cgi/tutorial-{.}" target="annotate"><img src="/glyphs/annotate.png"/></a>
<xsl:call-template name="anchor">
<xsl:with-param name="node" select="$node"/>
<xsl:with-param name="conditional" select="0"/>
</xsl:call-template>
<xsl:apply-templates select="$node" mode="object.title.markup">
<xsl:with-param name="allow-anchors" select="1"/>
</xsl:apply-templates>
</h2>
</xsl:template>
<xsl:template name="subtoc">
<xsl:param name="nodes" select="NOT-AN-ELEMENT"/>
<xsl:variable name="subtoc">
<xsl:element name="{$toc.list.type}">
<xsl:apply-templates mode="toc" select="$nodes"/>
</xsl:element>
</xsl:variable>
<xsl:variable name="depth">
<xsl:choose>
<xsl:when test="local-name(.) = 'section'">
<xsl:value-of select="count(ancestor::section) + 1"/>
</xsl:when>
<xsl:when test="local-name(.) = 'sect1'">1</xsl:when>
<xsl:when test="local-name(.) = 'sect2'">2</xsl:when>
<xsl:when test="local-name(.) = 'sect3'">3</xsl:when>
<xsl:when test="local-name(.) = 'sect4'">4</xsl:when>
<xsl:when test="local-name(.) = 'sect5'">5</xsl:when>
<xsl:when test="local-name(.) = 'refsect1'">1</xsl:when>
<xsl:when test="local-name(.) = 'refsect2'">2</xsl:when>
<xsl:when test="local-name(.) = 'refsect3'">3</xsl:when>
<xsl:when test="local-name(.) = 'simplesect'">
<!-- sigh... -->
<xsl:choose>
<xsl:when test="local-name(..) = 'section'">
<xsl:value-of select="count(ancestor::section)"/>
</xsl:when>
<xsl:when test="local-name(..) = 'sect1'">2</xsl:when>
<xsl:when test="local-name(..) = 'sect2'">3</xsl:when>
<xsl:when test="local-name(..) = 'sect3'">4</xsl:when>
<xsl:when test="local-name(..) = 'sect4'">5</xsl:when>
<xsl:when test="local-name(..) = 'sect5'">6</xsl:when>
<xsl:when test="local-name(..) = 'refsect1'">2</xsl:when>
<xsl:when test="local-name(..) = 'refsect2'">3</xsl:when>
<xsl:when test="local-name(..) = 'refsect3'">4</xsl:when>
<xsl:otherwise>1</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="subtoc.list">
<xsl:choose>
<xsl:when test="$toc.dd.type = ''">
<xsl:copy-of select="$subtoc"/>
</xsl:when>
<xsl:otherwise>
<xsl:element name="{$toc.dd.type}">
<xsl:copy-of select="$subtoc"/>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:element name="{$toc.listitem.type}">
<xsl:variable name="label">
<xsl:apply-templates select="." mode="label.markup"/>
</xsl:variable>
<xsl:copy-of select="$label"/>
<xsl:if test="$label != ''">
<xsl:value-of select="$autotoc.label.separator"/>
</xsl:if>
<a>
<xsl:attribute name="href">
<xsl:call-template name="href.target"/>
</xsl:attribute>
<xsl:attribute name="target">
<xsl:text>body</xsl:text>
</xsl:attribute>
<xsl:apply-templates select="." mode="title.markup"/>
</a>
<xsl:if test="$toc.listitem.type = 'li'
and $toc.section.depth > $depth and count($nodes)>0">
<xsl:copy-of select="$subtoc.list"/>
</xsl:if>
</xsl:element>
<xsl:if test="$toc.listitem.type != 'li'
and $toc.section.depth > $depth and count($nodes)>0">
<xsl:copy-of select="$subtoc.list"/>
</xsl:if>
</xsl:template>
</xsl:stylesheet>