xsl-list
[Top] [All Lists]

Re: [xsl] document function cached?

2013-02-07 14:54:27
But position() would return a number and it seems such an obvious way to use it as an index...

Nice btw to use the select on a message, saves some typing!

MIchel
----- Original Message ----- From: "David Carlisle" <davidc(_at_)nag(_dot_)co(_dot_)uk>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Cc: "Michel Hendriksen" <michel(_dot_)hendriksen(_at_)42(_dot_)nl>
Sent: Thursday, February 07, 2013 18:26 PM
Subject: Re: [xsl] document function cached?


On 07/02/2013 17:17, Michel Hendriksen wrote:
<xsl:message><xsl:value-of
select="$file-nbn-set/nbn-set/nbn[position()]"/></xsl:message>


a filter of /foo/bar[position()] with a numeric value

is short for the boolean test

 /foo/bar[position()=position()]

so the test is always true.

Also xsl:message has a select attribute so you can use

<xsl:message select="$file-nbn-set/nbn-set/nbn[position()=5]"/>

David

--
google plus: https:/profiles.google.com/d.p.carlisle

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




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