commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: [jelly] xml pipeline
Date Fri, 13 Dec 2002 15:23:16 GMT
From: "Wannheden, Knut" <>
> Paul,
> > From: Paul Libbrecht []
> >
> > I think there is something such in the xml tag-library (you
> > then define
> > a variable).
> I suppose you're refering to the <xml:parse/> tag.  You can use this tag
> two ways: either you specify the "xml" attribute, where the value has to
> an object of type String (an URI), Reader, or InputStream, or you give the
> document to parse as the tag's body.  But in the latter case the body is
> again evaluated first.  Also my idea was that any tag, not only
> similar ones, should be access their content as XML.  A usecase:
> <xu:assertDocumentsEqual xmls:xu="jelly:xmlunit">
>  <xu:expected evalBody="false">
>   <j:set var="x" value="y"/>
>   <j:set var="x2" value="y2"/>
>  </xu:expected>
>  <xu:actual evalBody="true">
>   <my:getSetupSricpt/>
>  </xu:actual>
> </xu:assertDocumentsEqual>
> (Note the fictional evalBody attribute.)  The previous would be a test
> for the <my:getSetupScript/> tag.  The tag could maybe be used like this:
> <j:eval>
>  <my:getSetupScript/>
> </j:eval>
> which would actually execute the two <j:set/> tags.
> Does this seem too wacky?

:-). No I don't think so. I think we probably need a way to say 'treat this
block of Jelly script as just XML'. I'm not sure exactly why we need this
but a few people seem to hit this issue. Maybe we could just have a special
Jelly-compiler directive of some kind to treat a block as just XML and to
not expand any tags or expressions.

e.g. something like

 <j:set var="x" value="1234"/>


Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts

View raw message