S
shaun roe
Hi,
I am using an XSLT to generate an SVG client-side in Firefox. The user
opens an XML file in Firefox and sees a display.
In doing so, I have to convert from cartesian to polar coordinates, so I
need the sine and cosine functions. Firefox does not seem to recognize
the math: extensions (not too surprising) so I am using a series
expansion of the sin(x) function on the interval 0-90 degrees and
mapping any other value, and the cos function, into this interval with
simple arithmetic to calculate on the full 360 deg range. I use four
terms to get the accuracy I need.
Is there a faster/simpler way, given the constraints of having to use
xslt 1.0 with no extensions, which seems to be the case? or... is there
some way of generating some scripting code in the xslt which would
allow me to access javascript (for example) and still achieve the
'automagic' effect of opening an xml and seeing an svg display?
cheers
shaun
I am using an XSLT to generate an SVG client-side in Firefox. The user
opens an XML file in Firefox and sees a display.
In doing so, I have to convert from cartesian to polar coordinates, so I
need the sine and cosine functions. Firefox does not seem to recognize
the math: extensions (not too surprising) so I am using a series
expansion of the sin(x) function on the interval 0-90 degrees and
mapping any other value, and the cos function, into this interval with
simple arithmetic to calculate on the full 360 deg range. I use four
terms to get the accuracy I need.
Is there a faster/simpler way, given the constraints of having to use
xslt 1.0 with no extensions, which seems to be the case? or... is there
some way of generating some scripting code in the xslt which would
allow me to access javascript (for example) and still achieve the
'automagic' effect of opening an xml and seeing an svg display?
cheers
shaun