Concise question, concise answer:
Forget the XML syntax, use JXPath instead of JEXL for expressions... Like:
<document> #foreach $header in {request/headers} #if {starts-with($header/name, 'X-'} <paragraph bold="true"> #else <paragraph> #end The header called "{$header/name}" has value "{$header/value}" </paragraph> #end </document>
ah, neat! :)
of course, why not use Jelly with JXPath as the EL? -pete