On 18/6/03 22:17, "Peter Royal" <[EMAIL PROTECTED]> wrote:
On Wednesday, June 18, 2003, at 01:34 PM, Pier Fumagalli wrote:
Concise question, concise answer:ah, neat! :)
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>
of course, why not use Jelly with JXPath as the EL?
From <http://jakarta.apache.org/commons/jelly/>
A Jelly script is an XML document which gets parsed into a Script.
From (myself)
Forget the XML syntax
Unless I'm not mistaken, the above example template is _NOT_ a well formed XML document! :-) :-)
Does this mean you wrote a parser to parse SAX-like events in a non-well-formed XML document ?
Sylvain
-- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects } Orixo, the opensource XML business alliance - http://www.orixo.com
