cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <>
Subject RE: Woody: dependent widget
Date Mon, 24 Nov 2003 18:29:04 GMT
On Mon, 2003-11-24 at 16:20, wrote:
> Hello,
> The template file does preserve any tags inside wt:widget, but it's not
> possible for instance to define the id attribute of an item:value as the
> item:values are only defined in the form definition file. 
> What should I modify if I want to use my own id attribute inside an html
> input field instead of using the generated ID as it is done in
> woody-field-styling.xsl.  
> Instead of : 
>    <input id="{generate-id()}" type="checkbox" value="{@value}"
> name="{$id}">
> I would like to use:
> 	<input id="{@id}" type="checkbox" value="{@value}" name="{$id}">
> but therefore I need to assign an id attribute in my definition such as:
> 	<wd:item value="option1" id="001"/>
> But this id attribute is not preserved by the Woody transformer and hence my
> problem...
> I think in general it would be useful if the Woody transformer copies all
> attributes of the <wd:*> tags to the <wi:*> tags.

It's not so easy to do this. Or actually, it's not so difficult either,
but it will require to store an extra Attributes object for each
selection list item, and it will consume some extra processing time too.

But how about an entirely different approach, such as "{$id}.{@value}"
or "{$id}.{position()}" or something?

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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message