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]

RE: Javascript as an Include file in xsl


One caveat on this way of deploying the javascript: depending on your server
arrangement (and a few other things) caching can make it more difficult to
debug your pages, since changes do not universally trigger a cache refresh. 

You might want to develop with the javascript in-lined in the xsl in a
single, included file, and then change the contents to the script definition
below for deployment.

Mark

----------------------------------------------------------------------------
----
 
Mark Feblowitz                                   [t] 617.715.7231
Frictionless Commerce Incorporated     [f] 617.495.0188 
XML Architect                                     [e]
mfeblowitz@frictionless.com
400 Technology Square, 9th Floor 
Cambridge, MA 02139 
www.frictionless.com  
 

 -----Original Message-----
From: 	Mark Feblowitz  
Sent:	Wednesday, October 10, 2001 2:02 PM
To:	'xsl-list@lists.mulberrytech.com'
Subject:	RE: [xsl] Javascript as an Include file in xsl

If it's all client-side, you can have the resultant html reference a
javascript file on the server:

	<script language="javascript" src="/content/scripts/common.js"/>

In addition to the maintenance benefits, you get big performance gains in
not having to put the javascript into the DOM during XSL processing, and in
the ability of the client to cache the javascript file.

 

Mark Feblowitz
XML Architect
Frictionless Commerce Incorporated
400 Technology Square, 9th floor
Cambridge, MA 02139
(617) 715-7231
mfeblowitz@frictionless.com


-----Original Message-----
From: Berent, Tom (MAN-Nashville-Corporate) [mailto:Tom.Berent@cox.com]
Sent: Wednesday, October 10, 2001 1:47 PM
To: 'XSL-List@lists.mulberrytech.com'
Subject: [xsl] Javascript as an Include file in xsl


I been brought into an existing project that is XML/XSL based. Even with
limited XSL experience, I see a huge maintenance nightmare evolving.
According to the consultants working on the project with us, they have found
no way to put needed client side JavaScript functions into an include file.
So all JavaScript functions are being duplicated on every page.  Since the
maintenance of this product will fall on my shoulders, I want to find a
better solution.  Is there a way to include a .js file that the XSLT parser
will accept?  Thank you for your time.

Tom Berent
Senior Software Engineer
Manheim Interactive (Nashville)
(p) 615-781-4497


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

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

 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]