[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Include files

Subject: RE: Include files
From: "Nanto, Dan" <dnanto@xxxxxxxxxx>
Date: Tue, 19 Dec 2000 11:35:57 -0700
xsl file date
We had a similar problem here, but we used templates to solve it, rather
than java script.  The way that we got around it was to have a specific set
of templates for formatting dates, amounts etc.  

	<!-- This template will print out a formated date -->	
	<xsl:template name="formatedDate">
		<xsl:param name="month"/>
		<xsl:param name="day"/>
		<xsl:param name="year"/>
		
		<xsl:value-of select="$month"/>&nbsp;<xsl:value-of
select="$day"/>, <xsl:value-of select="$year"/>
		
	</xsl:template>

Then we would call those templates passing in the data that needed to be
formatted.

	<xsl:call-template name="formatedDate">
		<xsl:with-param name="month"><xsl:value-of
select="dateMade/monthName"/></xsl:with-param>
		<xsl:with-param name="day"><xsl:value-of
select="dateMade/dayOfMonth"/></xsl:with-param>
		<xsl:with-param name="year"><xsl:value-of
select="dateMade/longYear"/></xsl:with-param>
	</xsl:call-template>


-----Original Message-----
From: Steve Reynolds [mailto:sreynolds@xxxxxxxxxxx]
Sent: Tuesday, December 19, 2000 10:24 AM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject:  Include files


I have a number of XSL files that format lots of different XML documents
that contain "result sets/recordsets" from stored procedures.
The result set in the XML doc has certain formatting issues (dates, currency
symbols etc).
I want to use some Java script to format the dates, numbers etc. However, I
want to have a common file that contains the java script for all these
functions (so I have only one place to make code changes). How do I include
the java script file in my XSL files so that I can call the functions in the
java script file from the XSL file?.
Thanks
Steve



Steven Reynolds
Technical Consultant
MATRA Systems (UK) Ltd
Home Farm, Leigh Road
Eastleigh, Hants SO50 9EU
Registered in Cardiff No. 2642797
Tel: (+44) (0)2380 684 700 
Fax: (+44) (0)2380 619 828 
Help desk: (+44) (0)2380 684 701



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

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.