[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Getting data to drop into separate column...


Subject: Getting data to drop into separate column...
From: "Paul Telesco" <paul@xxxxxxxxxxx>
Date: Wed, 16 Aug 2000 14:50:56 -0400

Here is the xsl:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
  <xsl:template match="docbody">
    <HTML>
	<body link="#0000FF" vlink="#0000FF" alink="#FF0000">
	<table BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="100%" >
	<tr>
    	<xsl:apply-templates select="*"/>
    	</tr>
	</table>
	<hr/>
	<div align="right"></a></div>

    	</body>
    </HTML>
  </xsl:template>

  <xsl:template match="head">
  	<HEAD>
    		<TITLE> <xsl:value-of select="." /> </TITLE>
	</HEAD>
  </xsl:template>

  <xsl:template match="question">
	<center>
	<div align="center"><br><i>You asked:</i></br></div>
	<center><br><b><font size="+1"> <xsl:value-of select="." />
</font></b></br></center>
 	</center>

	<br></br>
	<table BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="100%" >
	<tr>
	<td ALIGN="LEFT" VALIGN="CENTER" width="5%"><b><font
color="#000000">Rank</font></b></td>


	<td width="95%"></td>

	</tr>
	</table>

  </xsl:template>

  <xsl:template match="result">
	<tr>
	<hr/>
	</tr>

    	<xsl:apply-templates select="rank"/>
    	<xsl:apply-templates select="answer-prefix"/>
    	<xsl:apply-templates select="answer"/>
    	<xsl:apply-templates select="answer-suffix"/>
    	<!-- <xsl:apply-templates select="start-pos"/> -->
    	<!-- <xsl:apply-templates select="end-pos"/> -->
    	<xsl:apply-templates select="doc"/>
    	<xsl:apply-templates select="relevancy"/>


	<br></br>
  </xsl:template>

  <xsl:template match="rank">

	<table ALIGN="LEFT" BORDER="0" CELLSPACING="0" CELLPADDING="0" >
	<tr>
	<td ALIGN="CENTER" bgcolor="#000000"><b><font color="#00CC00"><xsl:value-of
select="." /></font></b></td>
	<td bgcolor="#000000" width="30"></td>

	</tr>
	</table>

  </xsl:template>

  <xsl:template match="answer-prefix">
  	<td ROWSPAN="2"></td>
	<td><xsl:value-of select="." /></td>
  </xsl:template>

  <xsl:template match="keyword">
 	<td ROWSPAN="2"></td>
	<td ALIGN="LEFT" VALIGN="CENTER"><b><font color="#0000FF"><xsl:value-of
select="." /></font></b></td>
  </xsl:template>

  <xsl:template match="answer-suffix">
  	<td ROWSPAN="2"></td>
	<td><xsl:value-of select="." /></td>
  </xsl:template>

  <xsl:template match="start-pos">
  	<br/>
	<!-- <td ALIGN="LEFT" VALIGN="CENTER"><b><font color="#0000BB">Starting
from: <xsl:value-of select="." />,</font></b></td> -->
  </xsl:template>

  <xsl:template match="end-pos">
	<!-- <td ALIGN="LEFT" VALIGN="CENTER"><b><font color="#0000BB">Ending with:
<xsl:value-of select="." />.</font></b></td> -->
  </xsl:template>

  <xsl:template match="doc">
  	<br/>
	<div align="right"><td ALIGN="LEFT" VALIGN="CENTER"><b><font
color="#0000FF"><i><xsl:value-of select="." /></i></font></b></td></div>
  </xsl:template>

  <xsl:template match="relevancy">
	<div align="right"><td ALIGN="LEFT" VALIGN="CENTER"><b><font
color="#AA00BB"> Relevancy: <xsl:value-of select="."
/></font></b></td></div>

  </xsl:template>
</xsl:stylesheet>

This is all well and good, but it produces the "rank" in the same cell of
the table as the rest of the response. I need this to be in a cell to the
left of the results. This is to produce a column down the left side and all
of the results to be centered very neatly.

Any help would be welcome.

Paul Telesco


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread