Thank you. Its more clear to me now. But why FFF is included, bit AAA is not?
Originally posted by Mapraputa Is: You probably confuse "following" axis with "descendant". What you expect is "descendant"; "following" means "all the nodes following the context node in the document order".
Part of the tree looks like - AAA / \ / \ BBB(1c) XXX / | \ / | \ CCC ZZZ FFF(1a)(1b) \ \ GGG I denoted the text a bit differently. The three 1s became 1a, 1b and 1c. When I ran the template in XML Spy - <xsl:template match="/"> <xsl:apply-templates select="//ZZZ/following::*"/> </xsl:template> I got 1a, 1b and the 2s. I _didn't_ get 1c. I think 1c is a text node, which descends from BBB. It's not clear to me whether 1c follows ZZZ or not. Any ideas? Thanks, Dan
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
BTW, the Apache Xalan XSLT processor gave me the same result (no 1c).
Leverager of our synergies
Joined: Aug 26, 2000
Not sure what 1c is, but if it is empty element, you may not to get it in the output because it is empty. Have you tried XPath Visualizer? Very tool.
Joined: Jul 09, 2001
Mapraputa, 1C is text following the </FFF> tag. It will be held in a text node and its parent is BBB. BBB, therefore, will have the following children (and maybe several empty text nodes), in this order - CCC,ZZZ,FFF and 1C. So, isn't 1C in the following axis of ZZZ? Thanks, Dan