Re: [xsl] XSLT verbosity (atan2)

Subject: Re: [xsl] XSLT verbosity (atan2)
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 19 Mar 2008 14:28:57 GMT
> Is there a way to express this in only a few lines without all the
> verbosity?

note you have several refernces to dx and dy which should presumably by
$dx and $dy.

In XSLT2, which has conditional expressions in xpath, it could be one
line, but sticking with xslt1, then you are pretty much forced to use
xsl:choose, which accounts for most of the verbosity. Although having
said tthat, since you are anyway using an extension function, instead of
a lot of xslt conditionals wrapping 

<xsl:value-of select="exsl:atan2(_$_dx,_$_dy)" />

you could just have

<xsl:value-of select="my:atan2($dx,$dy)" />

where my:atan2 is just written in java to do the right thing (or
whatever extension language your system supports)


The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 

Current Thread