conditional formatting in XSLT

K

kevin bailey

hi there,

if i have this in my XSLT file..

<input style="width:150pt;" value="">


are there any suggestions as to how i might get the value of 150 from
another element value?


thanks for any pointers,

kev bailey




this is the whole file



<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsl:template match="/">
<html>
<head />
<body>
<xsl:for-each select="halo_form">
<xsl:for-each select="form_field">
<xsl:if test="position()=1">
<table border="1">
<thead>
<tr>
<td width="159">field_label</td>
<td width="114">field_datatype</td>
<td width="74">field_height</td>
<td width="71">field_width</td>
<td width="71">Data Entry</td>
</tr>
</thead>
<tbody>
<xsl:for-each select="../form_field">
<tr>
<td width="159">
<xsl:for-each
select="field_label">
<xsl:apply-templates />
</xsl:for-each>
</td>
<td width="114">
<xsl:for-each
select="field_datatype">
<xsl:apply-templates />
</xsl:for-each>
</td>
<td width="74">
<xsl:for-each
select="field_height">
<xsl:apply-templates />
</xsl:for-each>
</td>
<td width="71">
<xsl:for-each
select="field_width">
<xsl:apply-templates />
</xsl:for-each>
</td>
<td width="71">
<xsl:for-each
select="field_datatype">
<input
style="width:150pt; " value="">
<xsl:attribute
name="value"><xsl:value-of select="." /></xsl:attribute>
</input>
</xsl:for-each>
</td>
</tr>
</xsl:for-each>
</tbody>
</table>
</xsl:if>
</xsl:for-each>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top