This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: JavaScript access to <xsl:script> results
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: "Smothers, Brian" <Brian dot Smothers at fmr dot com>
- Cc: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 13 Mar 2002 16:32:42 +0000
- Subject: Re: [xsl] JavaScript access to <xsl:script> results
- Organization: Jeni Tennison Consulting Ltd
- References: <D9C7F1AC480BD511B8A600508BCF505E02761D2F@MSGMRO578NTS.fmr.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi Brian,
> Thanks... if I couldn't do it my way (and apparently I can't), I was
> going to do the little rewrite using the DOM and calculate the
> values directly from the XML data.
>
> If I do this, however, what the heck do I need XSL for?
> Seems more trouble than it's worth...
WD-XSL (which is what you're using) is always more trouble than it's
worth! XSLT is more trouble than it's worth if all you're using XSLT
for is a wrapper around JavaScript functions.
What XSLT is good at is transforming XML into another text-based
format, especially a different markup language. If you were creating
your pie charts in SVG, for example, then XSLT would be a good tool
for the job.
I was going to say "perfect" but unfortunately XPath doesn't have much
in the way of support for trigonometric functions, which you need in
order to create pie charts in SVG - implementing trigonometric
extension functions is a good use for JavaScript within XSLT (see
http://www.exslt.org/math/).
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list