enclosing xhtml:td tag with xhtml:group in xhtml:repeat

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

enclosing xhtml:td tag with xhtml:group in xhtml:repeat

Alexander Žaťko
I am attempting to control the style of table cells content within repeat. When I enclose the (text) content in different groups (as shown below) the result is rendered as expected:

<xhtml:td>
    <xforms:group ref="../*[position()][../@valid = 'true']" id="one">
        <xforms:output value="xxforms:context('one')"/>
    </xforms:group>
    <xforms:group ref="../*[position()][../@valid = 'false']" id="two">
        <xhtml:span class="error">
            <xforms:output value="xxforms:context('two')"/>
        </xhtml:span>
    </xforms:group>
</xhtml:td>

However, enclosing also the td element ignores the groups and both cells are displayed:

    <xforms:group ref="../*[position()][../@valid = 'true']" id="one">
<xhtml:td>
        <xforms:output value="xxforms:context('one')"/>
</xhtml:td>
    </xforms:group>
    <xforms:group ref="../*[position()][../@valid = 'false']" id="two">
<xhtml:td class="error">
         <xforms:output value="xxforms:context('two')"/>
</xhtml:td>
    </xforms:group>

I do not think the xhtml:td should change the context for the xforms:group ref expressions as the two languages should be independent?

A.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: enclosing xhtml:td tag with xhtml:group in xhtml:repeat

Erik Bruchez
Administrator
Alex,

Currently, using xforms:group around xforms:td simply doesn't work. One
reason for this is that xforms:group produces an xhtml:span around
xhtml:td. Upon receiving this (which is invalid (X)HTML), the browser
moves the span outside of the table element in the DOM. This in the end
messes up relevance.

It would not be impossible to make this work, for example by detecting
that particular case and producing different markup, but for now you
should prefer a solution that does not involve surrounding xhtml:td with
xforms:group.

In the future, AVTs would also allow dealing nicely with your requirement.

-Erik

Alexander Zatko wrote:

> I am attempting to control the style of table cells content within
> repeat. When I enclose the (text) content in different groups (as shown
> below) the result is rendered as expected:
>
> <xhtml:td>
>     <xforms:group ref="../*[position()][../@valid = 'true']" id="one">
>         <xforms:output value="xxforms:context('one')"/>
>     </xforms:group>
>     <xforms:group ref="../*[position()][../@valid = 'false']" id="two">
>         <xhtml:span class="error">
>             <xforms:output value="xxforms:context('two')"/>
>         </xhtml:span>
>     </xforms:group>
> </xhtml:td>
>
> However, enclosing also the td element ignores the groups and both cells
> are displayed:
>
>     <xforms:group ref="../*[position()][../@valid = 'true']" id="one">
> <xhtml:td>
>         <xforms:output value="xxforms:context('one')"/>
> </xhtml:td>
>     </xforms:group>
>     <xforms:group ref="../*[position()][../@valid = 'false']" id="two">
> <xhtml:td class="error">
>          <xforms:output value="xxforms:context('two')"/>
> </xhtml:td>
>     </xforms:group>
>
> I do not think the xhtml:td should change the context for the
> xforms:group ref expressions as the two languages should be independent?
>
> A.
>
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws