PHP Classes

File: xmlSiteMaker/content/xslt/fp-page.xsl

Recommend this page to a friend!
  Classes of Ilya Nemihin  >  xmlSiteMaker  >  xmlSiteMaker/content/xslt/fp-page.xsl  >  Download  
File: xmlSiteMaker/content/xslt/fp-page.xsl
Role: Auxiliary data
Content type: text/plain
Description: xslt transformation
Class: xmlSiteMaker
Offline site generator based on XML
Author: By
Last change:
Date: 19 years ago
Size: 2,673 bytes
 

Contents

Class file image Download
<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="html" indent="no" /> <xsl:template match="/page-of-site"> <html> <head> <link rel="stylesheet" href="style.css"/> </head> <body> <table width="700" align="center" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="3" align="center" valign="top"> <span class="top">xmlSiteMaker</span> <p/> <xsl:call-template name="info"/> <p/> </td> </tr> <tr> <td colspan="3" bgcolor="000"></td> </tr> <tr> <td width="350" align="center" valign="top"> <b>content</b><p/> <xsl:call-template name="menu-list"/> </td> <td width="1" bgcolor="#000"></td> <td width="350" align="center" valign="top"> <b>news</b><p/> <xsl:call-template name="news-list"/> </td> </tr> <tr> <td colspan="3" bgcolor="000"></td> </tr> <tr> <td align="center" colspan="3"><small>(sorry for my english, but I think that not-good-english is better that nothing-english, I'll be happy to receive your spell-corrections)</small></td> </tr> <tr> <td colspan="3" align="center"><small> <!-- (c) --> <xsl:value-of select="/page-of-site/common/year"/>, <xsl:value-of select="/page-of-site/common/name"/>, <a href="mailto:{/page-of-site/common/email}"><xsl:value-of select="/page-of-site/common/email"/></a> </small></td> </tr> </table> </body> </html> </xsl:template> <xsl:template name="info"> <xsl:apply-templates select="/page-of-site/page-content/@*|/page-of-site/page-content/node()" mode="content"/> </xsl:template> <!-- content --> <xsl:template match="@*|node()" mode="content"> <xsl:copy> <xsl:apply-templates select="@*|node()" mode="content"/> </xsl:copy> </xsl:template> <xsl:template match="link" mode="content"> <a href="{@id}.html"><xsl:value-of select="."/></a> </xsl:template> <xsl:template name="menu-list"> <xsl:for-each select="/page-of-site/pages/page"> <a href="{@id}.html"><xsl:value-of select="@name"/></a><br/> <xsl:value-of select="@descr"/> <p/> </xsl:for-each> </xsl:template> <xsl:template name="news-list"> <xsl:for-each select="/page-of-site/news/news-item"> <!-- // crash on win // read: http://archive.gingerall.cz/archives/public/sablot2002/msg01777.html <xsl:sort order="descending" select="position()"/> --> <xsl:value-of select="date"/> <br/> <xsl:value-of select="text"/> <p/> </xsl:for-each> </xsl:template> </xsl:stylesheet>