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]

using script functions on value-of select


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

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