Then I have:
<xsl:for-each select="/hw.list/list.subgroup[@letter=starts-with(@letter,$gpLETTER)]">
This is garbage, though I think it might just work by accident: the rules for comparing a node-set to a boolean are pretty strange (and they change in 2.0, because no-one thought anyone would seriously want to do it). I'm sure you want
select="/hw.list/list.subgroup[starts-with(@letter,$gpLETTER)]">
So, I have added this:
<xsl:for-each select="/hw.list/list.subgroup[@letter=starts-with(@letter,$gpLETTER) OR @letter=starts-with(@letter,'##']">
XPath, like XML, is case-sensitive. When I wrote "or", I meant "or", I didn't mean "OR".
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference