|Thanks for this - I had found the "following-sibling" axis on a tutorial page somewhere which led me to:
<xsl:when test="not(contains(name(.),'Code')) and .>0">
Your solution demonstrates to me that I have hardly scratched the surface of XPath, and that there are many ways of achieving the same result!
Is there a performance (or other) benefit to using templates apart from the feeling of doing things properly as opposed to my schonky approach?
Can you recommend any sites or good books to get a deeper insight into XPath/XSLT?
Thanks again for your time,
My use of for-each amply demonstrates the adage that when all you have is a hammer...