View Single Post
  #10 (permalink)  
Old November 18th, 2009, 03:20 PM
mhkay's Avatar
mhkay mhkay is offline
Wrox Author
Points: 13,605, Level: 50
Points: 13,605, Level: 50 Points: 13,605, Level: 50 Points: 13,605, Level: 50
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,065
Thanks: 0
Thanked 119 Times in 117 Posts
Default

It looks as if you are trying to group adjacent paragraphs having the same tag name, which is very straightforward in XSLT 2.0 using <xsl:for-each-group group-adjacent=""/>. It's (much) more difficult in XSLT 1.0, but you will be able to find examples by googling for "positional grouping" or "sibling recursion".
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
Reply With Quote