conditional formatting in XSLT

Discussion in 'XML' started by kevin bailey, Aug 13, 2003.

  1. kevin bailey

    kevin bailey Guest

    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>
    kevin bailey, Aug 13, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Henry

    data grid conditional row formatting

    Brian Henry, Jul 8, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    2,076
    Brian Henry
    Jul 8, 2004
  2. chuckdfoster
    Replies:
    3
    Views:
    2,772
    Scott Allen
    Mar 9, 2005
  3. Replies:
    2
    Views:
    10,397
    FatherJ
    Oct 29, 2007
  4. Not Me

    Gridview - conditional formatting

    Not Me, Feb 9, 2006, in forum: ASP .Net
    Replies:
    9
    Views:
    6,792
    code_monkey
    Nov 8, 2006
  5. Alec S.
    Replies:
    10
    Views:
    10,083
    Alec S.
    Apr 16, 2005
Loading...

Share This Page