In other words, I only want the template for level 2 applied when there
is a following-sibling immediately following a level 1 bullet.
so you need to only select such nodes, or only match on those nodes.
Your code doesn't do either it matches on all level 2 and selects all
following sibling not just immediately following.
simplest is to change the select so I think you want
following-sibling::*[1][self::key:bullet[(_at_)level='2']
^^^^ ^^^^^^
rather than
following-sibling::key:bullet[(_at_)level='2']
in both places where you use it.
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________