cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <>
Subject Re: cvs commit: cocoon-2.1/src/blocks/woody/samples/xsl/html woody-default.xsl
Date Mon, 01 Sep 2003 16:44:45 GMT
On Sun, 2003-08-31 at 23:16, Steven Noels wrote:
> Sylvain Wallez wrote:
> > Furthermore, use of attributes ensures uniqueness of styling type, which 
> > is not guaranteed with nested elements.
> > 
> > E.g. what happens if we write :
> > <wt:widget id="foo">
> >  <wi:styling>
> >    <textarea rows="10"/>
> >    <password size="20"/>
> >  </wi:styling>
> > </wt:widget>
> > 
> > Will this widget be rendered as a textarea or as a password ? With 
> > "textarea" or "password" being defined by the unique "type" attribute, 
> > this problem cannot happen.

One hypothetical case where this might be useful is when a selection
list is dynamically assigned to a widget, so that then both a text-style
and a list-style can be used depending on the presence of selection-list
data. Of course this is a very special use-case which could then use a
special style-type.

I like the wi:styling/@type proposal, I would start making some changes
in that regard, unless I would then be interfering with stuff you are

> Well, it will be up to the stylesheet to define what will happen. And 
> since we can't control how people will make use of that stylesheet (edit 
> it, or better: import it), I was thinking to just give them an isolated 
> zone where they can add any styling info they want,

that zone exists and is the wi:styling element, not?

>  which most likely 
> will be copied verbatim to the output form.

verbatim? Then the form could as well be a static XML file. The XSLT
will at least need to put the widget's value in there. For selection
lists, it's more complicated.

If you really want to build up custom HTML for each individual widget
yourself, I think it might be better to use a JXGenerator-based

>  Your suggestion hints at 
> having some definitive list of style widgets, something which I doubt 
> will happen.

Nope, that won't happen, but the current situation isn't any good

>  Or we are in a mutual misunderstanding, of course. ;-)
> > Or do we want <wi:styling> to be able to hold different styling 
> > directives and let the layout stylesheet decide which one is best ? 
> > Mmmh... too much magic...
> Definitely. People should be prepared to do some XSL hacking, but we 
> shouldn't provide them with anything but a very basic stylesheet.

AFAICS, Sylvain's proposal will only cause the stylesheet to become

Bruno Dumon                   
Outerthought - Open Source, Java & XML Competence Support Center                

View raw message