Re: EcmaScript, gone?

Subject: Re: EcmaScript, gone?
From: Paul Prescod <papresco@xxxxxxxxxxxxxxxx>
Date: Thu, 27 Aug 1998 23:51:38 -0500
Francois Belanger wrote:
> The XSL draft use of <define-script> was fine but imposing the use of
> ECMAScript was not. The need to address this issue is urgent IMHO as
> extensibility is making a user much more comfortable in embracing XSL as
> she knows she can write a script if she runs into a specific situation
> not addressed by the current spec.

I agree that the system must be made extensible somehow. I was never
comfortable with the sprinkling of Javascript syntax, and the new XSL
makes me think that we may be able to get away without it. As you probably
know, there is a stylesheet-related concept called a "behaviour sheet."
What if we allow "behaviour sheets" to modify the XML tree before it is
displayed. Then the Javascript code would be nicely segmented and executed
completely separately. XSL would remain completely declarative (like
pre-Javascript HTML), but the fundamental flexiblity would be available
(like post-DOM web pages). So let's say you want a part of the document to
display the current time. You would convert into a my:time element, and
then write a little behaviour that renders my:time elements as the current
time. This is an extra step, but it will have benefits that will become
evident over time: more robust editors, more reliable transformations,
stylesheets that work even when your Javascript has a bug, etc.
> This would also open up to other languages and even let mix different
> languages within the same stylesheet. I personally use XSL server-side
> and built a XSL parser (based on 1st draft) in Perl that was using
> <define-script language="Perl"> to extend it's functionality. I'm not
> aware of any server-side ECMAScript implementation (and not sure if even
> I'm interested in one).

Netscape has had a server side JavaScript implementation for a long time.
ECMAScript seems at least as appropriate a language for server side
manipulations as Perl.
 Paul Prescod  -

Everything I touch turns into Python.

 XSL-List info and archive:

Current Thread