You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2003/12/09 22:07:03 UTC
cvs commit: cocoon-2.1/src/webapp/samples/common/style/xsl/html complex-page2html.xsl
vgritsenko 2003/12/09 13:07:03
Modified: src/webapp/samples/common/style/xsl/html
complex-page2html.xsl
Log:
remove spaces generated on <strong>, <link> elements.
two-space align.
Revision Changes Path
1.3 +130 -140 cocoon-2.1/src/webapp/samples/common/style/xsl/html/complex-page2html.xsl
Index: complex-page2html.xsl
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/common/style/xsl/html/complex-page2html.xsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- complex-page2html.xsl 12 May 2003 13:19:27 -0000 1.2
+++ complex-page2html.xsl 9 Dec 2003 21:07:03 -0000 1.3
@@ -13,151 +13,141 @@
<xsl:param name="contextPath" select="string('/cocoon')"/>
- <xsl:template match="/">
- <html>
- <head>
- <title>Apache Cocoon @version@</title>
- <link rel="SHORTCUT ICON" href="favicon.ico"/>
- <link href="{$contextPath}/styles/main.css" type="text/css" rel="stylesheet"/>
- <xsl:apply-templates select="document/header/style"/>
- <xsl:apply-templates select="document/header/script"/>
- </head>
- <body>
- <table border="0" cellspacing="2" cellpadding="2" align="center" width="100%">
- <tr>
- <td width="*">The Apache Software Foundation is proud to present...</td>
- <td width="40%" align="center"><img border="0" src="{$contextPath}/images/cocoon.gif"/></td>
- <td width="30%" align="center">Version: <b>@version@</b></td>
- </tr>
- </table>
-
- <table border="0" cellspacing="2" cellpadding="2" align="center" width="100%">
- <tr>
- <td width="50%">
- <h2><xsl:value-of select="document/header/title"/></h2>
- </td>
- <td width="25%">
- <xsl:apply-templates select="document/header/tab"/>
- </td>
- <td nowrap="nowrap" align="right">
- Orthogonal views:
- <a href="?cocoon-view=content">Content</a>
-  
- <a href="?cocoon-view=pretty-content">Pretty content</a>
-  
- <a href="?cocoon-view=links">Links</a>
- </td>
- </tr>
- </table>
+ <xsl:template match="/">
+ <html>
+ <head>
+ <title>Apache Cocoon @version@</title>
+ <link rel="SHORTCUT ICON" href="favicon.ico"/>
+ <link href="{$contextPath}/styles/main.css" type="text/css" rel="stylesheet"/>
+ <xsl:apply-templates select="document/header/style"/>
+ <xsl:apply-templates select="document/header/script"/>
+ </head>
+ <body>
+ <table border="0" cellspacing="2" cellpadding="2" align="center" width="100%">
+ <tr>
+ <td width="*">The Apache Software Foundation is proud to present...</td>
+ <td width="40%" align="center"><img border="0" src="{$contextPath}/images/cocoon.gif"/></td>
+ <td width="30%" align="center">Version: <b>@version@</b></td>
+ </tr>
+ </table>
+
+ <table border="0" cellspacing="2" cellpadding="2" align="center" width="100%">
+ <tr>
+ <td width="50%">
+ <h2><xsl:value-of select="document/header/title"/></h2>
+ </td>
+ <td width="25%">
+ <xsl:apply-templates select="document/header/tab"/>
+ </td>
+ <td nowrap="nowrap" align="right">
+ Orthogonal views:
+ <a href="?cocoon-view=content">Content</a>
+  
+ <a href="?cocoon-view=pretty-content">Pretty content</a>
+  
+ <a href="?cocoon-view=links">Links</a>
+ </td>
+ </tr>
+ </table>
+
+ <p>
+ <xsl:choose>
+ <xsl:when test="document/body/row">
+ <table width="100%">
+ <xsl:apply-templates select="document/body/*"/>
+ </table>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="document/body/*"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </p>
+
+ <p class="copyright">
+ Copyright © @year@ <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+ All rights reserved.
+ </p>
+ </body>
+ </html>
+ </xsl:template>
- <p>
- <xsl:choose>
- <xsl:when test="document/body/row">
- <table width="100%">
- <xsl:apply-templates select="document/body/*"/>
- </table>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="document/body/*"/>
- </xsl:otherwise>
- </xsl:choose>
- </p>
+ <xsl:template match="style">
+ <link type="text/css" rel="stylesheet" href="{@href}"/>
+ </xsl:template>
+
+ <xsl:template match="script">
+ <script type="text/javascript" src="{@href}"/>
+ </xsl:template>
+
+ <xsl:template match="tab">
+ <a href="{@href}"><i><xsl:value-of select="@title"/></i></a> 
+ </xsl:template>
+
+ <xsl:template match="row">
+ <tr>
+ <xsl:apply-templates select="column"/>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="column">
+ <td valign="top">
+ <h4 class="samplesGroup"><xsl:value-of select="@title"/></h4>
+ <p class="samplesText"><xsl:apply-templates/></p>
+ </td>
+ </xsl:template>
- <p class="copyright">
- Copyright © @year@ <a href="http://www.apache.org/">The Apache Software Foundation</a>.
- All rights reserved.
+ <xsl:template match="section">
+ <xsl:choose> <!-- stupid test for the hirachy deep -->
+ <xsl:when test="../../../section">
+ <h5><xsl:value-of select="title"/></h5>
+ </xsl:when>
+ <xsl:when test="../../section">
+ <h4><xsl:value-of select="title"/></h4>
+ </xsl:when>
+ <xsl:when test="../section">
+ <h4 class="samplesGroup"><xsl:value-of select="title"/></h4>
+ </xsl:when>
+ </xsl:choose>
+ <p>
+ <xsl:apply-templates select="*[name()!='title']"/>
</p>
- </body>
- </html>
- </xsl:template>
-
- <xsl:template match="style">
- <link type="text/css" rel="stylesheet" href="{@href}"/>
- </xsl:template>
-
- <xsl:template match="script">
- <script type="text/javascript" src="{@href}"/>
- </xsl:template>
-
- <xsl:template match="tab">
- <a href="{@href}"><i><xsl:value-of select="@title"/></i></a> 
- </xsl:template>
-
- <xsl:template match="row">
- <tr>
- <xsl:apply-templates select="column"/>
- </tr>
- </xsl:template>
-
- <xsl:template match="column">
- <td valign="top">
- <h4 class="samplesGroup"><xsl:value-of select="@title"/></h4>
- <p class="samplesText"><xsl:apply-templates/></p>
- </td>
- </xsl:template>
-
- <xsl:template match="section">
- <xsl:choose> <!-- stupid test for the hirachy deep -->
- <xsl:when test="../../../section">
- <h5><xsl:value-of select="title"/></h5>
- </xsl:when>
- <xsl:when test="../../section">
- <h4><xsl:value-of select="title"/></h4>
- </xsl:when>
- <xsl:when test="../section">
- <h4 class="samplesGroup"><xsl:value-of select="title"/></h4>
- </xsl:when>
- </xsl:choose>
- <p>
- <xsl:apply-templates select="*[name()!='title']"/>
- </p>
- </xsl:template>
-
- <xsl:template match="source">
- <div style="background: #b9d3ee; border: thin; border-color: black; border-style: solid; padding-left: 0.8em;
- padding-right: 0.8em; padding-top: 0px; padding-bottom: 0px; margin: 0.5ex 0px; clear: both;">
- <pre>
- <xsl:value-of select="."/>
- </pre>
- </div>
- </xsl:template>
-
- <xsl:template match="link">
- <xsl:text> </xsl:text>
- <a href="{@href}">
- <xsl:apply-templates/>
- </a>
- <xsl:text> </xsl:text>
- </xsl:template>
-
- <xsl:template match="strong">
- <xsl:text> </xsl:text>
- <b>
- <xsl:apply-templates/>
- </b>
- <xsl:text> </xsl:text>
- </xsl:template>
-
- <xsl:template match="anchor">
- <a name="{@name}">
- <xsl:apply-templates/>
- </a>
- </xsl:template>
-
-<!-- <xsl:template match="table">
- <table border="1" cellspacing="3" cellpadding="3">
- <xsl:apply-templates/>
- </table>
- </xsl:template> -->
+ </xsl:template>
+ <xsl:template match="source">
+ <div style="background: #b9d3ee; border: thin; border-color: black; border-style: solid; padding-left: 0.8em;
+ padding-right: 0.8em; padding-top: 0px; padding-bottom: 0px; margin: 0.5ex 0px; clear: both;">
+ <pre>
+ <xsl:value-of select="."/>
+ </pre>
+ </div>
+ </xsl:template>
+
+ <xsl:template match="link">
+ <a href="{@href}">
+ <xsl:apply-templates/>
+ </a>
+ </xsl:template>
+
+ <xsl:template match="strong">
+ <b>
+ <xsl:apply-templates/>
+ </b>
+ </xsl:template>
+
+ <xsl:template match="anchor">
+ <a name="{@name}">
+ <xsl:apply-templates/>
+ </a>
+ </xsl:template>
+
<xsl:template match="para">
- <p>
- <xsl:apply-templates/>
- </p>
+ <p>
+ <xsl:apply-templates/>
+ </p>
</xsl:template>
- <xsl:template match="*|@*|node()|text()" priority="-1">
- <xsl:copy><xsl:apply-templates select="*|@*|node()|text()"/></xsl:copy>
- </xsl:template>
+ <xsl:template match="*|@*|node()|text()" priority="-1">
+ <xsl:copy><xsl:apply-templates select="*|@*|node()|text()"/></xsl:copy>
+ </xsl:template>
</xsl:stylesheet>