Anna Afonchenko wrote:
But when I tried to apply this stylesheet using cocoon, I still got the
empty root element <root/  as a result.

That's because strip-space doesn't apply if the input is delivered through a SAX pipeline (although the spec is a bit ambiguous about this.

Actually, your expression is ugly. What's wrong with
 select="a[following-sibling::*[1][self::a]]"
This means "select a elements where the following element
(disregarding any text node) is also an a element."
This is not quite equivalent to your expression but will give
the same result for your XML source, and it will work regardless
whether whitespace nodes are stripped.
There's half a zillion other possibilities to express the same
or similar conditions. If you give a description of the effect
you want to achieve, a proper expression can be formulated.

J.Pietschmann


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to