This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Computed HTML Attribute Value


Having trouble with testXSLT using JavaScript to compute the value of an
HTML attribute, it crashes trying to do this transform. I would like to
know if I am doing something illegal or is it a problem with testXSLT.
Is there another way to get a computed value assigned to an HTML attribute?

Here "delayed-start-time/text()" is in seconds and I need it displayed in
hours.


    <xsl:element name="input">
     <xsl:attribute name="type">text</xsl:attribute>
     <xsl:attribute name="name">new_delay_hr</xsl:attribute>
     <xsl:attribute name="value">
      <script language="JavaScript">
       <xsl:value-of select="delayed-start-time/text()"/>/3600;
      </script>
     </xsl:attribute>
     <xsl:attribute name="size">2</xsl:attribute>
    </xsl:element>hr

HTML I am looking for (assuming 18000 seconds):

<input type="text" name="new_delay_hr" value="5" size="2"/>hr

Tom Gilbert
tom@cartanova.com


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]