xsl-list
[Top] [All Lists]

Re: [xsl] value-of select - then multiply

2008-06-18 17:30:58
<xsl:value-of select="(Work_Location_longitude/position() - 1) * 15"/>

If there are three WLL elements, then WLL/position() returns the sequence
(1,2,3), and subtracting one from this sequence is an error.

Oh right, of course you'd need to stick it in something like a for-each and then not specify the element name specifically. Or maybe use count() instead of position() depending on what the OP wanted to achieve.

It always seems so obvious once your mistakes have been pointed out ;-)

Cheers,
Adam.


--~------------------------------------------------------------------
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>
--~--