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
