forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diwaker Gupta <diwa...@apache.org>
Subject Re: genericMarkup contract
Date Sat, 26 Nov 2005 06:04:06 GMT
On Friday 25 November 2005 9:13 pm, Ross Gardler wrote:
> Diwaker Gupta wrote:
> > I'm using the genericMarkup contract, and was wondering if it could be
> > simplified. In particular (and I copy this from index.fv in seed-v2),
> > lets say I want to insert a <hr/> somewhere in my template. For that, I
> > need this XML snippet:
> >
> > 	  <forrest:contract name="genericMarkup">
> >             <forrest:properties contract="genericMarkup">
> >               <forrest:property name="genericMarkup">
> >                 <hr/>
> >               </forrest:property>
> >             </forrest:properties>
> >           </forrest:contract>

> > I find that way too verbose, and confusing. Why is <hr/> sitting in a
> > property?
>
> If it weren't in a property it would have to be in XSL, which would be
> more verbose wouldn't it?

I'm not sure I follow. How is a <hr/> in a forrest:property any different from 
directly under a forrest:contract? Perhaps I'm missing something really 
obvious here, but why can't we simply copy over everything between the 
contract tags (for the genericMarkup contract) verbatim (as CDATA, for 
instance) over into the output?

> > And while I was looking at it, I had another question: since
> > <forrest:properties> is a child element of a <forrest:contract>, why
do
> > we need that contract attribute?
>
> It's gone in the planned POJO version I think (see above). Thorsten will
> correct me if my understanding is incorrect.

POJO? :/ :)

Diwaker
-- 
Web/Blog/Gallery: http://floatingsun.net
On Apache: http://people.apache.org/~diwaker

Mime
View raw message