xforms:output - should value and ref/bind be mutally exclusive?

I find the @value attribute of xforms:output extremely useful for 
formatting/modifying values for output.

Often though I find when replacing an xforms:output's @ref with a @value 
xpath I get caught out because the model item properties like relevant 
stop getting translated down onto the control.

A workaround is to wrap the xforms:output in a group, eg

    <xforms:output ref="data"/>

becomes

    <xforms:group ref="data">
        <xforms:output value="concat('[',.,']')"/>
    </xforms:group>

but this is a bit of a pain because I then need to make changes to my 
CSS to accurately simulate the original output. The alternative of using 
a calculate on a bind is troublesome (particularly inside a repeat) 
because it requires changes to the instance data.

The spec states that the @value attribute has no effect if a binding 
attribute is present (8.1.5). Wouldn't it be more useful to state that 
if both are present, model item properties are applied to the resulting 
control, but the output value is determined by the @value expression 
rather than the node? In which case you could simply write:

    <xforms:output ref="data" value="concat('[',.,']')"/>

Adrian

Received on Wednesday, 2 August 2006 00:45:11 UTC