XSLT for clogp_vml demo


<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="html" indent="yes" />
    <xsl:template match="Clogp">
      <HTML><HEAD><TITLE>Clogp (VML version)</TITLE>
      
      <SCRIPT LANGUAGE="JavaScript">        
var newWindow = null
function makeNewWindow(smi) {
        if ((newWindow == null) || (newWindow.closed)) {
              newWindow = window.open("/dayhtml/java/lj.html","StartingJava",
                                              "HEIGHT=330,WIDTH=350")
        }
        newWindow.setSmilesInApplet();
} 
      </SCRIPT>
<xml:namespace prefix="v"/>
<object id="VMLRender" classid="CLSID:10072CEC-8CC1-11D1-986E-00A0C955B42E" width="0" height="0"></object>
<style>
 v\:* {behavior=url(#VMLRender)}
/* Default style for all chart text elements - deviations are issued in-line */
 p.Chart {position=absolute; font-size=8pt; font-family="times"; color=black; text-align=right}
/* Miscellaneous document styles */
 p.copy {font-size=8pt; font-style=italic}
</style>
    </HEAD>
      <BODY BGCOLOR="#FFFFFF">
      <CENTER>
        <H2>
          CLOGP
        </H2>
        Calculation of hydrophobicity as Log P(o/w). Biobyte Algorithm Version <xsl:value-of select="Result/ClogpVersion"/>
        <BR/>
        <HR/>
        <DIV ALIGN="RIGHT">
          <A HREF="/dayhtml/doc/clogp/index.html">Manual</A>
        </DIV>
        <FORM NAME="smilesForm" METHOD="GET" ACTION="/mariner/servlet/clogp_vml">
          SMILES: <xsl:text disable-output-escaping="yes">&lt;INPUT NAME=&quot;smiles&quot; SIZE=&quot;30&quot; VALUE=&quot;</xsl:text><xsl:value-of select="SMILES"/><xsl:text disable-output-escaping="yes">&quot;&gt;</xsl:text>
          <INPUT TYPE="BUTTON"  VALUE="JavaGRINS" ONCLICK="makeNewWindow('smilesForm.smiles')"></INPUT>
          <BR/>
          <INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Submit"></INPUT>
        </FORM>
        <BR/>
        <HR/>
        <VML/>
      <xsl:apply-templates select="logPstar"/>
      <TABLE BORDER="0" cellspacing="0">
        <xsl:apply-templates select="SMILES"/>
        <xsl:apply-templates select="ATOM_NUM"/>
        <xsl:apply-templates select="ISOC-ID"/>
        <xsl:apply-templates select="FRAG-ID"/>
        <xsl:apply-templates select="H-COUNT"/>
        <xsl:apply-templates select="RING"/>      
      </TABLE><BR/>
      <TABLE BORDER="1" cellspacing="0" cellpadding="5">
        <xsl:apply-templates select="Rows"/>
        <xsl:apply-templates select="Result"/>
      </TABLE><BR/><HR/>
      </CENTER>
      <IMG SRC="/dayicon/sunburst-94x42.gif" WIDTH="94" HEIGHT="42" ALIGN="BOTTOM"/>
        <A href="/" target="_top">
          Daylight Chemical Information Systems, Inc.
        </A>
        <BR/><EM>info@daylight.com</EM>
      </BODY>    
    </HTML>
    </xsl:template>

    <xsl:template match="logPstar">
      <BR/><B>LogPstar found</B> : <xsl:value-of select="."/><BR/><BR/>
    </xsl:template>

    <xsl:template match="Rows">
        <TR BGCOLOR="#AAAAFF">
          <TD><B>Class</B></TD>
          <TD><B>Type</B></TD>
          <TD><B>Log(P) Contribution Description</B></TD>
          <TD><B>Comment</B></TD>
          <TD><B>Value</B></TD>
        </TR>
        <xsl:apply-templates select="*"/>
    </xsl:template>

    <xsl:template match="Row">
      <TR>
          <xsl:apply-templates select="*"/>
      </TR>
    </xsl:template>

    <xsl:template match="Result">
      <TR BGCOLOR="#AAAAFF">
        <TD>
          <B>Result</B>
        </TD>
        <TD>
          <xsl:value-of select="Type"/>
        </TD>
        <TD>
          <xsl:value-of select="Synopsis"/>
        </TD>
        <TD>-</TD>
        <TD ALIGN="RIGHT">
          <xsl:value-of select="Clogp"/>
        </TD>
      </TR>
    </xsl:template>
    
    <xsl:template match="Value">
      <TD ALIGN="RIGHT">
          <xsl:value-of select="."/>
      </TD>
    </xsl:template>

    <xsl:template match="*">
      <TD>
          <xsl:value-of select="."/>
      </TD>
    </xsl:template>

    <xsl:template match="SMILES">
          <TR>
            <TD>
              <B>SMILES:</B>
            </TD>
            <TD>
              <TT><xsl:value-of select="."/></TT>
            </TD>
          </TR>
        </xsl:template>

        <xsl:template match="ATOM_NUM">
          <TR>
            <TD>
              <B>Atom #:</B>
            </TD>
            <TD>
              <TT><xsl:value-of select="."/></TT>
            </TD>
          </TR>
        </xsl:template>
 
        <xsl:template match="ISOC-ID">
          <TR>
            <TD>
              <B>Isolating Carbon ids: </B>
            </TD>
            <TD>
              <TT><xsl:value-of select="."/></TT>
            </TD>
        </TR>
        </xsl:template>
       
        <xsl:template match="FRAG-ID">
          <TR>
            <TD>
              <B>Polar Fragment ids: </B>
            </TD>
            <TD>
              <TT><xsl:value-of select="."/></TT>
            </TD>
        </TR>
      </xsl:template>

        <xsl:template match="H-COUNT">
          <TR>
            <TD>
              <B>Hydrogen on atoms: </B>
            </TD>
            <TD>
              <TT><xsl:value-of select="."/></TT>
            </TD>
        </TR>
      </xsl:template>
        
        <xsl:template match="RING">
          <TR>
            <TD>
              <B>Ring atom <xsl:value-of select="substring-before(., ':')"/></B>
            </TD>
            <TD>
              <TT><xsl:value-of select="substring-after(., ': ')"/></TT>
            </TD>
        </TR>
      </xsl:template>

    </xsl:stylesheet>

Last modified: Wed Mar 7 07:32:22 MST 2001