xsl-list
[Top] [All Lists]

Re: [xsl] XSLT verbosity (atan2)

2008-03-19 07:29:25


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)

David

________________________________________________________________________
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. 
________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>