Subject: Re: EcmaScript, gone?
From: Francois Belanger <francois@xxxxxxxxxxx>
Date: Thu, 27 Aug 98 10:06:54 -0400
|
Paul Prescod wrote on 27/08/98 09:09:
>The chapter on extensibility is not finished yet.
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.
We could maybe use something like <xsl:define-script method="myformat"
language="ECMAScript">, that would allow XSL processor to recognize and
process or ignore the element (and corresponding method calls) if it has
such capabilities. One define-script per method.
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).
As for calling the defined methods, the <xsl:value-of> element seems to
fit the bill with calls like <xsl:value-of
expr="myformat(attribute(first-name))".
Francois Belanger
Sitepak, Bringing Internet Business into Focus
http://www.sitepak.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|