Miguel, I did NOT check in the modifications I made to style.xsl because I wanted you to test it before. The modified version was in my previous mail, you must have missed it :)
I send it again with this mail. Nicolas ----- Original Message ----- From: "Miguel" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, December 15, 2004 6:49 PM Subject: Re: [Jmol-developers] Problem building Jmol-web Nicolas wrote: > I have modified the xsl script to do something similar : > > for the header part, just add an<html-head> tag in the <document>/<body> > part with everything you want to see in the header (use <angle > brackets>). This did not work. I see in source/doc/style.xsl that there is no definition for html-head. Q: Did you make a change to the stylesheet and forget to check it in? I will experiment with it. Miguel ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ Jmol-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jmol-developers
<?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html" indent="yes"/> <xsl:param name="lang" select="'en'"/> <xsl:param name="project_xml" select="'project.xml'"/> <xsl:template match="document"> <xsl:apply-templates/> </xsl:template> <xsl:template match="document/body"> <xsl:if test="/document/properties/title"> <br/> <h1><xsl:value-of select="/document/properties/title"/></h1> </xsl:if> <xsl:if test="header"> <xsl:apply-templates select="header"/> </xsl:if> <xsl:variable name="numberOfSections" select="count(.//section)"/> <xsl:if test='$numberOfSections > 1'> <xsl:for-each select=".//section"> <small> <xsl:if test="@title"> <xsl:variable name="level" select="count(ancestor::*)"/> <xsl:choose> <xsl:when test='$level=2'> <a href="[EMAIL PROTECTED]"><xsl:value-of select="@title"/></a><br/> </xsl:when> <xsl:when test='$level=3'>      <a href="[EMAIL PROTECTED]"><xsl:value-of select="@title"/></a><br/> </xsl:when> </xsl:choose> </xsl:if> </small> </xsl:for-each> </xsl:if> <br/> <xsl:apply-templates select="section"/> <xsl:if test="footer"> <br/> <xsl:apply-templates select="footer"/> </xsl:if> </xsl:template> <!-- Process a section in the document. Nested sections are supported --> <xsl:template match="document//section"> <xsl:variable name="level" select="count(ancestor::*)"/> <xsl:choose> <xsl:when test='$level=2'> <a name="[EMAIL PROTECTED]"><h2><xsl:value-of select="@title"/></h2></a> </xsl:when> <xsl:when test='$level=3'> <a name="[EMAIL PROTECTED]"><h3><xsl:value-of select="@title"/></h3></a> </xsl:when> <xsl:when test='$level=4'> <a name="[EMAIL PROTECTED]"><h4><xsl:value-of select="@title"/></h4></a> </xsl:when> <xsl:when test='$level>=5'> <h5><xsl:copy-of select="@title"/></h5> </xsl:when> </xsl:choose> <blockquote> <xsl:apply-templates/> </blockquote> </xsl:template> <!-- Paragraphs are separated with one empty line --> <xsl:template match="p"> <p><xsl:apply-templates/><br/></p> </xsl:template> <xsl:template match="url"> <a href="{.}"><xsl:copy-of select="."/></a> </xsl:template> <xsl:template match="email"> <a href="mailto:{.}"><xsl:copy-of select="."/></a> </xsl:template> <xsl:template match="html-head"> <xsl:apply-templates/> </xsl:template> <xsl:template match="/"> <xsl:variable name="project" select="document($project_xml)/project"/> <xsl:text disable-output-escaping="yes"><html lang="</xsl:text> <xsl:value-of select="$lang" disable-output-escaping="yes"/> <xsl:text disable-output-escaping="yes">"></xsl:text> <head> <xsl:choose> <xsl:when test="/document/properties/title"><title><xsl:value-of select="/document/body/title"/></title></xsl:when> <xsl:when test="/document/body/title"><title><xsl:value-of select="/document/body/title"/></title></xsl:when> <xsl:otherwise><title><xsl:value-of select="$project/title"/></title></xsl:otherwise> </xsl:choose> <link rel="stylesheet" type="text/css" href="[root]/default.css"/> <xsl:apply-templates select="/document/body/html-head"/> </head> <body> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top"> <xsl:apply-templates select="$project/links"/> <hr/> </td> </tr> <tr> <td> <h1> <xsl:choose> <xsl:when test="/document/body/title"><xsl:value-of select="/document/body/title"/></xsl:when> <xsl:otherwise><xsl:value-of select="$project/title"/></xsl:otherwise> </xsl:choose> </h1> </td> </tr> <tr> <td> <xsl:apply-templates select="document/body"/> <br/> <hr/> </td> </tr> <xsl:if test="$project/notice"> <tr> <td align="center"> <xsl:for-each select="$project/notice"> <small><xsl:copy-of select="."/><br/> <br/></small> </xsl:for-each> </td> </tr> </xsl:if> </table> </body> <xsl:text disable-output-escaping="yes"></html></xsl:text> </xsl:template> <!-- UL is processed into a table using graphical bullets --> <!-- <xsl:template match="ul"> <table border="0" cellpadding="2" cellspacing="2"> <tr><td colspan="2" height="5"></td></tr> <xsl:apply-templates/> </table> </xsl:template> --> <!-- <xsl:template match="ul/li"> <tr> <td align="left" valign="top"> <img src="images/blueball.gif" alt="*"/> </td> <td align="left" valign="top"><xsl:apply-templates/></td> </tr> </xsl:template> --> <xsl:template match="screenshots"> <table border="0" cellpadding="2" cellspacing="2"> <tr><td colspan="2" height="5"></td></tr> <xsl:apply-templates/> </table> </xsl:template> <xsl:template match="screenshot"> <tr> <td align="left" valign="middle"> <a href="[EMAIL PROTECTED]"> <img src="[EMAIL PROTECTED]" width="200" alt="Jmol screenshot"/> </a> </td> <td align="left" valign="middle"><xsl:apply-templates/></td> </tr> </xsl:template> <xsl:template match="appletParameterList"> <table border="1" cellpadding="2" cellspacing="2"> <tr> <th align="center" valign="middle"> NAME= </th> <th align="center" valign="middle">VALUE=</th> </tr> <xsl:apply-templates/> </table> </xsl:template> <xsl:template match="appletParameterList/param"> <tr> <td align="center" valign="top"> <xsl:value-of select="@name"/> </td> <td align="left" valign="top"><xsl:apply-templates/></td> </tr> </xsl:template> <xsl:template match="section"> <br /> </xsl:template> <xsl:template match="br"> <br /> </xsl:template> <xsl:template match='@* | node()'> <xsl:copy> <xsl:apply-templates select='@* | node()'/> </xsl:copy> </xsl:template> <xsl:template match="appletExample"> <pre> <xsl:value-of select='@* | node()'/> </pre> <xsl:value-of disable-output-escaping="yes" select='@* | node()'/> </xsl:template> <xsl:template match="contributors"> <blockquote><xsl:text> </xsl:text> <xsl:for-each select="contributor" > <xsl:value-of select="name" /> (<a href="mailto:{email}"><xsl:value-of select="email" /></a>)<br/><xsl:text> </xsl:text> </xsl:for-each> </blockquote> </xsl:template> <xsl:template match="changes"> <h3><xsl:value-of select="@version" /></h3> <ul> <xsl:for-each select="change" > <li> <xsl:value-of select="." /><xsl:if test="@contributor"> (<xsl:value-of select="@ contributor" />)</xsl:if> </li> </xsl:for-each> </ul> </xsl:template> </xsl:stylesheet>
