cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject Re: [Woody] explicit <wi:style> in <wt:widget>
Date Fri, 01 Aug 2003 14:47:40 GMT
On Fri, 2003-08-01 at 16:31, Sylvain Wallez wrote:
> Continuing my file format polishing...
> 
> Currently, any markup inside a <wt:widget> is copied as is, but 
> surrounded by a <wi:style> by WoodyTransformer, i.e.
>   <wt:widget id="foo">
>     <popup/>
>   </wt:widget>
> 
> is transformed into :
>   <wi:widget id="foo">
>     <wi:style><popup/></wi:style>
>     <wi:label>fooValue</wi:label>
>   <wi:widget>
> 
> I found several annoyances related to the fact that <wi:style> isn't 
> explicit in the template :
> - it appears automagically and thus is a bit confusing...
> - it forbids the use of attributes for styling (e.g. class) unless 
> they're placed on a dummy element
> - we agreed that <wt:field> could contain visual characteristics of the 
> widget, such as <wi:label>. This means that wi: markup inside 
> <wi:widget> should not be included in the produced <wi:style> while 
> non-wi: markup should. Confusing...
> 
> For these reasons, I propose to make <wi:style> explicit in the template 
> file, e.g. :
>   <wt:widget ref="foo"> <!-- new "ref" attribute !! -->
>     <wi:style class="bar" variant="popup"/>
>     <wi:label>overriden label</wi:label>
>   </wt:wiget/>
> 
> Thoughts ?

Again: yeah, it is better ;-)

While I'm thinking of it, there is a somewhat similar situation in the
form definition files: widgets that have child widgets, such as wd:form
and wd:repeater, currently have these child widgets listed immediately
inside the wd:form and wd:repeater elements. It would be better to wrap
those inside a wd:children element (or similar), so that forms and
repeaters can have other configuration elements too.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Mime
View raw message