[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: counting problem
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|