stephan 2003/05/04 12:00:44 Modified: src/webapp/samples/i18n simple.xsl site2html.xsl Log: Correct identation. Revision Changes Path 1.2 +94 -73 cocoon-2.1/src/webapp/samples/i18n/simple.xsl Index: simple.xsl =================================================================== RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/i18n/simple.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- simple.xsl 9 Mar 2003 00:11:09 -0000 1.1 +++ simple.xsl 4 May 2003 19:00:44 -0000 1.2 @@ -1,76 +1,97 @@ <?xml version="1.0" encoding="UTF-8"?> -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:template match="root"> + <page language="[EMAIL PROTECTED]"> + <title> + <xsl:value-of select="title"/> + </title> + <h2> + <font color="navy"> + <xsl:value-of select="title"/> + </font> + <xsl:apply-templates select="form"/> + </h2> + <h5> + <xsl:value-of select="sub-title"/> + </h5> + <hr align="left" noshade="noshade" size="1"/> + <small> + <font color="red"> + <i> + <xsl:apply-templates select="annotation"/> + </i> + </font> + </small> + <xsl:apply-templates select="content"/> + <hr align="left" noshade="noshade" size="1"/> + <xsl:apply-templates select="bottom"/> + </page> + </xsl:template> + + <xsl:template match="menu"> + <font size="-1"> + <xsl:for-each select="item"> + <xsl:apply-templates select="."/> + <xsl:if test="position() != last()"> + <xsl:text> | </xsl:text> + </xsl:if> + </xsl:for-each> + </font> + </xsl:template> + + <xsl:template match="link"> + <a href="{href}"> + <xsl:value-of select="normalize-space(title)"/> + </a> + </xsl:template> + + <xsl:template match="item/title"> + <font color="maroon"> + <xsl:copy-of select="normalize-space(.)"/> + </font> + </xsl:template> + + <xsl:template match="content"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="para"> + <p> + <font color="navy"><b><xsl:number format="0. "/><xsl:value-of select="@name"/></b>: <xsl:value-of select="@title"/></font> + <br/> + <font size="-1"> + <xsl:apply-templates select="text() | strong"/> + </font> + </p> + </xsl:template> + + <xsl:template match="strong"> + <b> + <xsl:apply-templates select="text()"/> + </b> + </xsl:template> + + <xsl:template match="bottom"> + <small> + <b> + <xsl:value-of select="copyright"/> + </b> + </small> + </xsl:template> + + <xsl:template match="form"> + <form> + <xsl:copy-of select="@*"/> + <xsl:apply-templates/> + </form> + </xsl:template> + + <xsl:template match="input"> + <input> + <xsl:copy-of select="@*"/> + <xsl:apply-templates/> + </input> + </xsl:template> - <xsl:template match="root"> - <page language="[EMAIL PROTECTED]"> - <title> - <xsl:value-of select="title" /> - </title> - <h2> - <font color="navy"> - <xsl:value-of select="title"/> - </font> - <xsl:apply-templates select="form" /> - </h2> - <h5><xsl:value-of select="sub-title"/></h5> - <hr align="left" noshade="noshade" size="1"/> - <small><font color="red"><i><xsl:apply-templates select="annotation"/></i></font></small> - - <xsl:apply-templates select="content" /> - - <hr align="left" noshade="noshade" size="1"/> - <xsl:apply-templates select="bottom"/> - </page> - </xsl:template> - - <xsl:template match="menu"> - <font size="-1"> - <xsl:for-each select="item"> - <xsl:apply-templates select="."/> - <xsl:if test="position() != last()"><xsl:text> | </xsl:text></xsl:if> - </xsl:for-each> - </font> - </xsl:template> - - <xsl:template match="link"> - <a href="{href}"><xsl:value-of select="normalize-space(title)"/></a> - </xsl:template> - - <xsl:template match="item/title"> - <font color="maroon"><xsl:copy-of select="normalize-space(.)"/></font> - </xsl:template> - - <xsl:template match="content"> - <xsl:apply-templates /> - </xsl:template> - - <xsl:template match="para"> - <p> - <font color="navy"><b><xsl:number format="0. "/> <xsl:value-of select="@name"/> </b>: <xsl:value-of select="@title"/></font><br/> - <font size="-1"><xsl:apply-templates select="text() | strong"/></font> - </p> - </xsl:template> - - <xsl:template match="strong"> - <b><xsl:apply-templates select="text()"/></b> - </xsl:template> - - <xsl:template match="bottom"> - <small><b><xsl:value-of select="copyright"/></b></small> - </xsl:template> - - <xsl:template match="form"> - <form> - <xsl:copy-of select="@*" /> - <xsl:apply-templates /> - </form> - </xsl:template> - - <xsl:template match="input"> - <input> - <xsl:copy-of select="@*" /> - <xsl:apply-templates /> - </input> - </xsl:template> - </xsl:stylesheet> 1.2 +64 -1 cocoon-2.1/src/webapp/samples/i18n/site2html.xsl Index: site2html.xsl =================================================================== RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/i18n/site2html.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- site2html.xsl 9 Mar 2003 00:11:09 -0000 1.1 +++ site2html.xsl 4 May 2003 19:00:44 -0000 1.2 @@ -1 +1,64 @@ -<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="locale" /> <xsl:param name="page" /> <xsl:template match="site"> <html> <head> <title> <xsl:value-of select="page/title" /> </title> <link rel="stylesheet" href="page.css" type="text/css"/> </head> <body> <table class="path"> <tr> <td> <a href="../../">Apache Cocoon Main</a> > <a href="../">Samples</a> > <span class="current">Internationalization (i18n) and Localization (l10n)</span> </td> </tr> </table> <table class="topline"><tr><td> </td></tr></table> <table cellspacing="0" cellpadding="0" summary="content pane"> <tr> <td width="5" class="navbar"> </td> <td rowspan="2" valign="top" nowrap="nowrap" width="300"> <xsl:apply-templates select="[EMAIL PROTECTED]'menu']"/> </td> <td valign="top" class="navbar" align="left"> Language: <xsl:value-of select="page/@language" /> (<xsl:value-of select="$locale" />) </td> <td width="*" valign="top" class="navbar" align="right"> Page: <xsl:value-of select="$page" /> </td> </tr> <tr> <td> </td> <td class="content" valign="top" colspan="2"> <xsl:apply-templates select="page"/> </td> </tr> </table> <table> <tr> <td class="copyright"> Copyright (c) 1999-2002 <a href="http://www.apache.org/">Apache Software Foundation</a>. All Rights Reserved. </td> </tr> </table> </body> </html> </xsl:template> <xsl:template match="node()|@*" priority="-1"> <xsl:copy> <xsl:apply-templates select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> </xsl:stylesheet> \ No newline at end of file +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + <xsl:param name="locale"/> + <xsl:param name="page"/> + <xsl:template match="site"> + <html> + <head> + <title> + <xsl:value-of select="page/title"/> + </title> + <link rel="stylesheet" href="page.css" type="text/css"/> + </head> + <body> + <table class="path"> + <tr> + <td> + <a href="../../">Apache Cocoon Main</a> >  + <a href="../">Samples</a> >  + <span class="current">Internationalization (i18n) and Localization (l10n)</span> + </td> + </tr> + </table> + <table class="topline"> + <tr> + <td> </td> + </tr> + </table> + <table cellspacing="0" cellpadding="0" summary="content pane"> + <tr> + <td width="5" class="navbar"> </td> + <td rowspan="2" valign="top" nowrap="nowrap" width="300"> + <xsl:apply-templates select="[EMAIL PROTECTED]'menu']"/> + </td> + <td valign="top" class="navbar" align="left"> + Language: <xsl:value-of select="page/@language"/> (<xsl:value-of select="$locale"/>) + </td> + <td width="*" valign="top" class="navbar" align="right"> + Page: <xsl:value-of select="$page"/> + </td> + </tr> + <tr> + <td> </td> + <td class="content" valign="top" colspan="2"> + <xsl:apply-templates select="page"/> + </td> + </tr> + </table> + <table> + <tr> + <td class="copyright"> + Copyright (c) 1999-2002 <a href="http://www.apache.org/">Apache Software Foundation</a>. All Rights Reserved. + </td> + </tr> + </table> + </body> + </html> + </xsl:template> + <xsl:template match="node()|@*" priority="-1"> + <xsl:copy> + <xsl:apply-templates select="@*"/> + <xsl:apply-templates/> + </xsl:copy> + </xsl:template> +</xsl:stylesheet>