RE: [xsl] XPath Question

Subject: RE: [xsl] XPath Question
From: Ryan Graham <Ryan.Graham@xxxxxxxxxxxxx>
Date: Wed, 31 Dec 2003 11:34:14 -0700
>Given the following xml,
><p style="Normal" tabs="0.2 1.2 2.2">
>	Once upon a time, there was a <b>dark</b> and <i>stormy</i> sea.
>Nobody could be<br/>
>	certain what lay beneath it's churning surface.<br/>
>		<tab/>One<tab/>Green<tab/>Octopus<br/>
>		<tab/>Two<tab/>Red<tab/>Sharks<br/>
>	Or something far more sinister?
>how do I say, from inside a br-match template:
>"The number of br nodes, of the parent axis's p node, that have
>immediately preceding siblings that are tab nodes"
>I tried this, (and many other things besides) but it didn't work...
><xsl:variable name="rows"

This is not a valid Xpath statement. You need to use a predicate:


This will return the number "2" given your source XML.


 XSL-List info and archive:

Current Thread