> So if I have something like this:
> <S>
> <R>
> <A/> *
> <A/> *
> <S>
> <R><A/> * </R>
> <R><A/></R>
> </S>
> </R>
> <R>
> <A>
> <R>
> </S>
>
> It should count 3 A's, the ones I marked.
>
> Is there a way to do that in xpath alone?
When you say XPath alone, do you mean without
recursion?
Are you looking for something like this:
<xsl:template match="/">
<xsl:text>My whole document has </xsl:text>
<xsl:value-of select="count(//S/R[1]/A)" />
<xsl:text> A's that are the child of an S's first
R</xsl:text>
</xsl:template>
If so, just beware of the '//'
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- counting problem
- KRokicki - Thu, 13 Jun 2002 12:29:43 -0400 (EDT)
- Bryan Schnabel - Thu, 13 Jun 2002 16:11:34 -0400 (EDT) <=
|
|