This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
using script functions on value-of select
- To: XSL-List at mulberrytech dot com
- Subject: using script functions on value-of select
- From: Erick Cloward <ericklind1 at yahoo dot com>
- Date: Fri, 3 Nov 2000 15:50:37 -0400 (EST)
- Reply-To: xsl-list at mulberrytech dot com
Hi,
I'm trying to run a simple script to format some data
from a value-of select. I'm new to this and I've been
looking everywhere for a solution. Any help is
appreciated.
Here's the xsl:
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/TR/WD-xsl"
language="javascript">
<xsl:template match="/">
<h3>Order Report</h3>
<table cellpadding="3" cellspacing="0">
<tr>
<th><b>Order Status</b></th>
<th><b>View Order</b></th>
<th><b>Order Number</b></th>
<th><b>Order Date</b></th>
<th><b>Submittted By </b></th>
<th><b>User Name</b></th>
</tr>
<xsl:apply-templates select="//orderreport"/>
</table>
</xsl:template>
<xsl:template match="orderreport"
language="VBScript">
<form>
<tr>
<td>
<xsl:element name="input">
<xsl:attribute name="type">button</xsl:attribute>
<xsl:attribute name="value">Order
Status</xsl:attribute>
<xsl:attribute
name="onclick">StatusOpen('<xsl:value-of
select="invoiceid" />');</xsl:attribute>
</xsl:element>
</td>
<td><xsl:element name="input">
<xsl:attribute name="type">button</xsl:attribute>
<xsl:attribute name="value">View
Order</xsl:attribute>
<xsl:attribute
name="onclick">VOOpen('<xsl:value-of
select="invoiceid" />','<xsl:value-of select="name"
/>','<xsl:value-of select="usertid"
/>');</xsl:attribute>
</xsl:element>
</td>
<td><xsl:value-of select="invoiceid" /></td>
<td><xsl:element name="date"><xsl:value-of
select="invoicedate" />
<xsl:eval>formatDate(this)</xsl:eval>
</xsl:element>
</td>
<td><xsl:value-of select="usertid" /></td>
<td><xsl:value-of select="name" /></td>
</tr>
</form>
<xsl:script>
<![CDATA[
function formatDate(idate)
formatDate = formatDateTime(idate,vbshortdate)
end function
]]>
</xsl:script>
</xsl:template>
</xsl:stylesheet>
__________________________________________________
Do You Yahoo!?
From homework help to love advice, Yahoo! Experts has your answer.
http://experts.yahoo.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list