You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Sylvain Wallez <sy...@anyware-tech.com> on 2003/08/01 16:31:53 UTC
[Woody] explicit in
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 ?
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
Re: [Woody] explicit in
Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Bruno Dumon wrote:
>On Fri, 2003-08-01 at 16:31, Sylvain Wallez wrote:
>
>
<snip/>
>>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 ;-)
>
Kewl again ;-)
>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.
>
This totally makes sense :
- in XMLForm, I used <xf:label> on <xf:groups> to produce the <label> of
a <fieldset>
- an aggregate field, being a leaf from the GUI point of view, must have
its label, format, etc.
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
Re: [Woody] explicit in
Posted by Bruno Dumon <br...@outerthought.org>.
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