xsl-list
[Top] [All Lists]

RE: Confused by xsl:for-each

2004-11-25 06:44:06
<xsl:value-of select="count(//a)"/> will do it.

-----Original Message-----
From: Joe Fawcett [mailto:joefawcett(_at_)hotmail(_dot_)com]
Sent: 25 November 2004 13:41
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] Confused by xsl:for-each



From: "Robert Soesemann" <rsoesemann(_at_)sapient(_dot_)com>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject: RE: [xsl] Confused by xsl:for-each
Date: Thu, 25 Nov 2004 14:36:37 +0100

Hi,

Although you say this should work, it does not. The select="//a" seems
not to work.
When I write

<xsl:value-of select="number(.)"/> I get 1 for one td
BUT <xsl:value-of select="number(//a) I get 0, although there are two
<a..> inside <td>.

Whats wrong here.

Are you sure there are no namespaces lying about?

On a separate note it would be more effficient to select td/a or ./a or 
descendant::a.

--

Joe



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