Thread: [Ejtools-cvs] CVS: website/stylesheets debug.xsl,NONE,1.1 faq2xhtml.xsl,NONE,1.1 layout.xsl,NONE,1.1
Brought to you by:
letiemble
From: Laurent E. <let...@us...> - 2002-04-18 21:02:21
|
Update of /cvsroot/ejtools/website/stylesheets In directory usw-pr-cvs1:/tmp/cvs-serv7008 Added Files: debug.xsl faq2xhtml.xsl layout.xsl links2xhtml.xsl Log Message: Initial Import --- NEW FILE: debug.xsl --- <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:template match="*"> <xsl:copy-of select="."/> </xsl:template> </xsl:stylesheet> --- NEW FILE: faq2xhtml.xsl --- <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:template match="faqlist"> <html> <head> <title><xsl:value-of select="@title"/></title> </head> <body> <xsl:apply-templates/> </body> </html> </xsl:template> <xsl:template match="section"> <h1><xsl:value-of select="@title"/></h1> <xsl:apply-templates/> </xsl:template> <xsl:template match="question"> <h3><xsl:value-of select="."/></h3> </xsl:template> <xsl:template match="answer"> <xsl:copy-of select="node()"/> </xsl:template> </xsl:stylesheet> --- NEW FILE: layout.xsl --- <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- This stylesheet gets an xml conformant html page which has the additional <section> tag in the head --> <xsl:output method="html" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" indent="yes" doctype-system="http://www.w3.org/TR/html4/loose.dtd"/> <xsl:template match="html"> <html> <head> <!-- copy the head to get title and meta data --> <xsl:copy-of select="head/node()"/> <!-- change styles --> <style type="text/css"> <xsl:comment> p,ul,dl,ol,td,dd { color: rgb(90,90,90); font-family:Arial,Helvetica,sans-serif; font-size: 10pt; } pre,tt { color: rgb(90,90,90); font-family:Courier, monospace; font-size: 10pt; } h1 { color: rgb(90,90,90); font-family:Arial,Helvetica,sans-serif; font-size: 16pt; } h2 { color: rgb(90,90,90); font-family:Arial,Helvetica,sans-serif; font-size: 14pt; } h3 { color: rgb(90,90,90); font-family:Arial,Helvetica,sans-serif; font-size: 12pt; } h4 { color: rgb(90,90,90); font-family:Arial,Helvetica,sans-serif; font-size: 11pt; } dt { color: rgb(90,90,90); font-family:Arial,Helvetica,sans-serif; font-size: 11pt; font-weight: bold; } a:link { color: rgb(0,0,144); background-color: rgb(255,255,255); text-decoration: none; font-weight: bold; } a:visited { color: rgb(0,0,144); background-color: rgb(255,255,255); text-decoration: none; font-weight: bold; } a:active { color: rgb(0,0,144); background-color: rgb(255,255,255); text-decoration: underline; font-weight: bold; } a:hover { color: rgb(0,0,144); background-color: rgb(255,255,255); text-decoration: underline; font-weight: bold; } td img { line-height:0; vertical-align:bottom; } </xsl:comment> </style> <!-- preload all needed xweb images --> <script language="JavaScript" type="text/javascript"> <xsl:comment>Begin <!-- the section buttons --> <xsl:for-each select="//img[contains(@xwebtype,'activeSection')]"> <xsl:value-of select="@name"/> = new Image( <xsl:value-of select="@width"/>, <xsl:value-of select="@height"/>); <xsl:value-of select="@name"/>.src = "<xsl:value-of select="@src"/>"; </xsl:for-each> <!-- the page buttons for the currently active section --> <xsl:for-each select="//section[@active='true']"> <xsl:for-each select=".//img[@xwebtype='active']"> <xsl:value-of select="@name"/> = new Image( <xsl:value-of select="@width"/>, <xsl:value-of select="@height"/>); <xsl:value-of select="@name"/>.src = "<xsl:value-of select="@src"/>"; </xsl:for-each> </xsl:for-each> End</xsl:comment> </script> </head> <body bgcolor="#FFFFFF"> <!-- the header --> <center> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td align="left"> <img src="{//file[@id='logo']/@src}" border="0" alt="logo"/> </td> <td align="center"> <xsl:for-each select="//section[@active='true']"> <xsl:for-each select="img[@xwebtype='banner']"> <img src="{@src}" name="{@name}" border="0" alt="section banner" width="{@width}" height="{@height}"/> </xsl:for-each> </xsl:for-each> </td> <td align="right"><a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=49088&type=4" border="0" alt="SourceForge Logo"/></a></td> </tr> </table> </center> <!-- the spacer and body --> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr height="5"> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr bgcolor="#5A5A5A" height="5"> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr height="5"> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td valign="top"><img src="{//file[@id='spacer']/@src}" alt="" width="5" height="5"/></td> <td valign="top"> <table cellspacing="0" cellpadding="0" border="0"> <!-- Blank line before navigation --> <tr> <td><img src="{//file[@id='spacer']/@src}" alt="" width="5" height="15"/></td> </tr> <xsl:apply-templates mode="nav" select="section"/> </table> </td> <td valign="top"><img src="{//file[@id='spacer']/@src}" alt="" width="10" height="5"/></td> <td valign="top"> <br/> <xsl:copy-of select="body/node()"/> </td> <td valign="top"> <img src="{//file[@id='spacer']/@src}" alt="" width="5" height="5"/> </td> </tr> </table> </body> </html> </xsl:template> <xsl:template match="section" mode="nav"> <tr> <td align="center"> <a> <xsl:attribute name="href"><xsl:value-of select="@src"/></xsl:attribute> <xsl:choose> <xsl:when test="@active='true' "> <xsl:for-each select="img[@xwebtype='activeSection']"> <!-- should select exactly one --> <img src="{@src}" name="{@name}" border="0" alt="{concat(@alt, ' (active section)')}" width="{@width}" height="{@height}"/> </xsl:for-each> </xsl:when> <xsl:otherwise> <xsl:attribute name="onMouseOver"><xsl:text>document.</xsl:text><xsl:value-of select="img[@xwebtype='normalSection']/@name"/><xsl:text>.src='</xsl:text><xsl:value-of select="img[@xwebtype='activeSection']/@src"/><xsl:text>';</xsl:text></xsl:attribute> <xsl:attribute name="onMouseOut"><xsl:text>document.</xsl:text><xsl:value-of select="img[@xwebtype='normalSection']/@name"/><xsl:text>.src='</xsl:text><xsl:value-of select="img[@xwebtype='normalSection']/@src"/><xsl:text>';</xsl:text></xsl:attribute> <xsl:for-each select="img[@xwebtype='normalSection']"> <!-- should select exactly one --> <img src="{@src}" name="{@name}" border="0" alt="{concat(@alt, ' (section)')}" width="{@width}" height="{@height}"/> </xsl:for-each> </xsl:otherwise> </xsl:choose> </a> </td> </tr> <xsl:if test="@active='true' "> <xsl:apply-templates mode="nav" select="entry"/> </xsl:if> </xsl:template> <xsl:template match="entry" mode="nav"> <!-- we ignore the first entry (it is addressed by the section button) --> <xsl:if test="position() != 1"> <tr> <td align="center"> <a> <xsl:attribute name="href"><xsl:value-of select="@src"/></xsl:attribute> <xsl:choose> <xsl:when test="@active"> <xsl:for-each select="img[@xwebtype='active']"> <!-- should select exactly one --> <img src="{@src}" name="{@name}" border="0" alt="{concat(@alt, ' (active)')}" width="{@width}" height="{@height}"/> </xsl:for-each> </xsl:when> <xsl:otherwise> <xsl:attribute name="onMouseOver"><xsl:text>document.</xsl:text><xsl:value-of select="img[@xwebtype='normal']/@name"/><xsl:text>.src='</xsl:text><xsl:value-of select="img[@xwebtype='active']/@src"/><xsl:text>';</xsl:text></xsl:attribute> <xsl:attribute name="onMouseOut"><xsl:text>document.</xsl:text><xsl:value-of select="img[@xwebtype='normal']/@name"/><xsl:text>.src='</xsl:text><xsl:value-of select="img[@xwebtype='normal']/@src"/><xsl:text>';</xsl:text></xsl:attribute> <xsl:for-each select="img[@xwebtype='normal']"> <!-- should select exactly one --> <img src="{@src}" name="{@name}" border="0" alt="{@alt}" width="{@width}" height="{@height}"/> </xsl:for-each> </xsl:otherwise> </xsl:choose> </a> </td> </tr> </xsl:if> </xsl:template> </xsl:stylesheet> --- NEW FILE: links2xhtml.xsl --- <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:template match="links"> <html> <head> <title><xsl:value-of select="@title"/></title> </head> <body> <h1><xsl:value-of select="description"/></h1> <dl> <xsl:apply-templates select="link"/> </dl> </body> </html> </xsl:template> <xsl:template match="link"> <dt> <a href="{@url}"><xsl:value-of select="@title"/></a> </dt> <dd> <xsl:value-of select="."/> </dd> </xsl:template> </xsl:stylesheet> |