crossley 02/01/08 02:34:06
Modified: src/documentation/stylesheets/printer_skin document2html.xsl
site2xhtml.xsl
Added: src/documentation/stylesheets/printer_skin book2menu.xsl
Log:
Resurrect the "build printer-docs". We seemed to lose it after gaining
the ability to build docs using the Commandline context. Anyway, these
stylesheet mods do some simple things to bring it back.
i.e. Remove the side-panel buttons and return to the glorious hyperlink
blue underlined text. Replace the Section banners with h* headings.
Revision Changes Path
1.2 +19 -122
xml-cocoon2/src/documentation/stylesheets/printer_skin/document2html.xsl
Index: document2html.xsl
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/documentation/stylesheets/printer_skin/document2html.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- document2html.xsl 3 Jan 2002 12:31:01 -0000 1.1
+++ document2html.xsl 8 Jan 2002 10:34:06 -0000 1.2
@@ -48,135 +48,23 @@
<!-- ====================================================================== -->
<xsl:template match="s1">
- <div align="right">
- <table border="0" width="98%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="9" height="7" valign="bottom" align="right"><img
src="images/bar-top-left.gif" width="9" height="7" vspace="0" hspace="0"
border="0"/></td>
- <td background="images/bar-border-top.gif"><img src="images/void.gif"
width="1" height="5" vspace="0" hspace="0" border="0"/></td>
- <td width="9" height="7" valign="bottom" align="left"><img
src="images/bar-top-right.gif" width="9" height="7" vspace="0" hspace="0"
border="0"/></td>
- </tr>
- <tr>
- <td width="9" background="images/bar-border-left.gif"><img
src="images/void.gif" width="9" height="1" vspace="0" hspace="0" border="0"/></td>
- <td width="100%" bgcolor="#0086b2">
- <font size="+1" face="arial,helvetica,sanserif" color="#ffffff">
- <img src="images/void.gif" width="5" height="5" vspace="0" hspace="0"
border="0"/><b><xsl:value-of select="@title"/></b></font>
- </td>
- <td width="9" background="images/bar-border-right.gif"><img
src="images/void.gif" width="9" height="1" vspace="0" hspace="0" border="0"/></td>
- </tr>
- <tr>
- <td width="9" height="12" valign="top" align="right"><img
src="images/bar-bottom-left.gif" width="9" height="12" vspace="0" hspace="0"
border="0"/></td>
- <td background="images/bar-border-bottom.gif"><img src="images/void.gif"
height="12" vspace="0" hspace="0" border="0"/></td>
- <td width="9" height="12" valign="top" align="left"><img
src="images/bar-bottom-right.gif" width="9" height="12" vspace="0" hspace="0"
border="0"/></td>
- </tr>
- </table>
- <table border="0" width="98%" cellspacing="0" cellpadding="0">
- <tr>
- <td>
- <font face="arial,helvetica,sanserif"
color="#000000"><xsl:apply-templates/></font>
- </td>
- </tr>
- </table>
- </div>
- <br/>
+ <h1><xsl:value-of select="@title"/></h1>
+ <font face="arial,helvetica,sanserif"
color="#000000"><xsl:apply-templates/></font>
</xsl:template>
<xsl:template match="s2">
- <div align="right">
- <table border="0" width="95%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="9" height="7" valign="bottom" align="right"><img
src="images/bar-top-left.gif" width="9" height="7" vspace="0" hspace="0"
border="0"/></td>
- <td background="images/bar-border-top.gif"><img src="images/void.gif"
width="1" height="5" vspace="0" hspace="0" border="0"/></td>
- <td width="9" height="7" valign="bottom" align="left"><img
src="images/bar-top-right.gif" width="9" height="7" vspace="0" hspace="0"
border="0"/></td>
- </tr>
- <tr>
- <td width="9" background="images/bar-border-left.gif"><img
src="images/void.gif" width="9" height="1" vspace="0" hspace="0" border="0"/></td>
- <td width="100%" bgcolor="#0086b2">
- <font face="arial,helvetica,sanserif" color="#ffffff">
- <img src="images/void.gif" width="5" height="5" vspace="0" hspace="0"
border="0"/><b><xsl:value-of select="@title"/></b></font>
- </td>
- <td width="9" background="images/bar-border-right.gif"><img
src="images/void.gif" width="9" height="1" vspace="0" hspace="0" border="0"/></td>
- </tr>
- <tr>
- <td width="9" height="12" valign="top" align="right"><img
src="images/bar-bottom-left.gif" width="9" height="12" vspace="0" hspace="0"
border="0"/></td>
- <td background="images/bar-border-bottom.gif"><img src="images/void.gif"
width="1" height="12" vspace="0" hspace="0" border="0"/></td>
- <td width="9" height="12" valign="top" align="left"><img
src="images/bar-bottom-right.gif" width="9" height="12" vspace="0" hspace="0"
border="0"/></td>
- </tr>
- </table>
- <table border="0" width="95%" cellspacing="0" cellpadding="0">
- <tr>
- <td>
- <font face="arial,helvetica,sanserif"
color="#000000"><xsl:apply-templates/></font>
- </td>
- </tr>
- </table>
- </div>
- <br/>
+ <h2><xsl:value-of select="@title"/></h2>
+ <font face="arial,helvetica,sanserif"
color="#000000"><xsl:apply-templates/></font>
</xsl:template>
<xsl:template match="s3">
- <div align="right">
- <table border="0" width="90%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="9" height="7" valign="bottom" align="right"><img
src="images/bar-top-left.gif" width="9" height="7" vspace="0" hspace="0"
border="0"/></td>
- <td background="images/bar-border-top.gif"><img src="images/void.gif"
width="1" height="5" vspace="0" hspace="0" border="0"/></td>
- <td width="9" height="7" valign="bottom" align="left"><img
src="images/bar-top-right.gif" width="9" height="7" vspace="0" hspace="0"
border="0"/></td>
- </tr>
- <tr>
- <td width="9" background="images/bar-border-left.gif"><img
src="images/void.gif" width="9" height="1" vspace="0" hspace="0" border="0"/></td>
- <td width="100%" bgcolor="#0086b2">
- <font size="-1" face="arial,helvetica,sanserif" color="#ffffff">
- <img src="images/void.gif" width="5" height="5" vspace="0" hspace="0"
border="0"/><b><xsl:value-of select="@title"/></b></font>
- </td>
- <td width="9" background="images/bar-border-right.gif"><img
src="images/void.gif" width="9" height="1" vspace="0" hspace="0" border="0"/></td>
- </tr>
- <tr>
- <td width="9" height="12" valign="top" align="right"><img
src="images/bar-bottom-left.gif" width="9" height="12" vspace="0" hspace="0"
border="0"/></td>
- <td background="images/bar-border-bottom.gif"><img src="images/void.gif"
width="1" height="12" vspace="0" hspace="0" border="0"/></td>
- <td width="9" height="12" valign="top" align="left"><img
src="images/bar-bottom-right.gif" width="9" height="12" vspace="0" hspace="0"
border="0"/></td>
- </tr>
- </table>
- <table border="0" width="90%" cellspacing="0" cellpadding="0">
- <tr>
- <td>
- <font face="arial,helvetica,sanserif"
color="#000000"><xsl:apply-templates/></font>
- </td>
- </tr>
- </table>
- </div>
- <br/>
+ <h3><xsl:value-of select="@title"/></h3>
+ <font face="arial,helvetica,sanserif"
color="#000000"><xsl:apply-templates/></font>
</xsl:template>
<xsl:template match="s4">
- <div align="right">
- <table border="0" width="85%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="9" height="7" valign="bottom" align="right"><img
src="images/bar-top-left.gif" width="9" height="7" vspace="0" hspace="0"
border="0"/></td>
- <td background="images/bar-border-top.gif"><img src="images/void.gif"
width="1" height="5" vspace="0" hspace="0" border="0"/></td>
- <td width="9" height="7" valign="bottom" align="left"><img
src="images/bar-top-right.gif" width="9" height="7" vspace="0" hspace="0"
border="0"/></td>
- </tr>
- <tr>
- <td width="9" background="images/bar-border-left.gif"><img
src="images/void.gif" width="9" height="1" vspace="0" hspace="0" border="0"/></td>
- <td width="100%" bgcolor="#0086b2">
- <font size="-2" face="arial,helvetica,sanserif" color="#ffffff">
- <img src="images/void.gif" width="5" height="5" vspace="0" hspace="0"
border="0"/><b><xsl:value-of select="@title"/></b></font>
- </td>
- <td width="9" background="images/bar-border-right.gif"><img
src="images/void.gif" width="9" height="1" vspace="0" hspace="0" border="0"/></td>
- </tr>
- <tr>
- <td width="9" height="12" valign="top" align="right"><img
src="images/bar-bottom-left.gif" width="9" height="12" vspace="0" hspace="0"
border="0"/></td>
- <td background="images/bar-border-bottom.gif"><img src="images/void.gif"
width="1" height="12" vspace="0" hspace="0" border="0"/></td>
- <td width="9" height="12" valign="top" align="left"><img
src="images/bar-bottom-right.gif" width="9" height="12" vspace="0" hspace="0"
border="0"/></td>
- </tr>
- </table>
- <table border="0" width="85%" cellspacing="0" cellpadding="0">
- <tr>
- <td>
- <font face="arial,helvetica,sanserif"
color="#000000"><xsl:apply-templates/></font>
- </td>
- </tr>
- </table>
- </div>
- <br/>
+ <h4><xsl:value-of select="@title"/></h4>
+ <font face="arial,helvetica,sanserif"
color="#000000"><xsl:apply-templates/></font>
</xsl:template>
<!-- ====================================================================== -->
@@ -334,7 +222,16 @@
<!-- ====================================================================== -->
<xsl:template match="figure">
- <p align="center"><img src="{@src}" alt="{@alt}" border="0" vspace="4"
hspace="4"/></p>
+ <p align="center">
+ <xsl:choose>
+ <xsl:when test="string(@width) and string(@height)">
+ <img src="{@src}" alt="{@alt}" width="{@width}" height="{@height}" border="0"
vspace="4" hspace="4"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <img src="{@src}" alt="{@alt}" border="0" vspace="4" hspace="4"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </p>
</xsl:template>
<xsl:template match="img">
@@ -377,4 +274,4 @@
<br/>
</xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>
1.2 +2 -0
xml-cocoon2/src/documentation/stylesheets/printer_skin/site2xhtml.xsl
Index: site2xhtml.xsl
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/documentation/stylesheets/printer_skin/site2xhtml.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- site2xhtml.xsl 3 Jan 2002 12:31:01 -0000 1.1
+++ site2xhtml.xsl 8 Jan 2002 10:34:06 -0000 1.2
@@ -82,12 +82,14 @@
</td>
</tr>
<xsl:copy-of select="/site/menu/node()|@*"/>
+<!--
<tr>
<td valign="top" align="left">
<img border="0" height="14" hspace="0"
src="images/close.gif" vspace="0" width="120"/>
<br/>
</td>
</tr>
+-->
</table>
</td>
<td>
1.1
xml-cocoon2/src/documentation/stylesheets/printer_skin/book2menu.xsl
Index: book2menu.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:param name="resource"/>
<xsl:template match="book">
<menu>
<xsl:apply-templates/>
</menu>
</xsl:template>
<xsl:template match="project">
</xsl:template>
<xsl:template match="menu[position()=1]">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="menu">
<tr>
<td align="left" valign="top">
----------
<br/>
<b><xsl:value-of select="@label"/></b>
</td>
</tr>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="menu-item">
<xsl:if test="not(@type) or @type!='hidden'">
<tr>
<td align="left" valign="top">
<xsl:choose>
<xsl:when test="@href=$resource">
<xsl:value-of select="@label"/>
</xsl:when>
<xsl:otherwise>
<a href="{@href}"><xsl:value-of select="@label"/></a>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:if>
</xsl:template>
<xsl:template match="external">
<xsl:if test="not(@type) or @type!='hidden'">
<tr>
<td align="left" valign="top">
<a href="{@href}"><xsl:value-of select="@label"/></a>
</td>
</tr>
</xsl:if>
</xsl:template>
<xsl:template match="node()|@*" priority="-1"/>
</xsl:stylesheet>
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]