W3C home > Mailing lists > Public > www-forms@w3.org > August 2009

interaction between relevant and CSS display: property?

From: C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com>
Date: Thu, 6 Aug 2009 09:19:49 -0600
Message-Id: <DA8F7D72-CD5F-46C3-A4A4-C4F266C39577@blackmesatech.com>
To: www-forms@w3.org
Cc: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>
Working on a simple XForms exercise today, I ran across an
unexpected interaction between the relevant attribute on
the xf:bind element and my CSS stylesheet -- or what looks
to me at first glance like such an interaction.

Following the example shown at


I have used CSS to style fieldset, xf:input, xf:label,
and the CSS pseudo-element xf|input::value with the
values table, table-row, and table-cell, respectively,
for the CSS display property.  This worked rather nicely,
I thought.

But when I added a relevance test to the appropriate
bind elements, I was a little surprised to see that
although the 'relevant' attribute seems to have the
expected effect on the submitted XML (that is,
irrelevant elements are omitted), it doesn't seem to
have any effect on the display, when using the Mozilla
XForms extension.

Is this the prescribed behavior?  A legal behavior? A
shortcoming in the current implementation of the
Mozilla extension?  An error on my part?  Zero or more
of the above?

I had expected (perhaps naively) that the CSS properties
assigned to forms widgets would apply only when the
widgets themselves were relevant, but it appears from
this side of the keyboard that the use of table-related
display properties is overriding the relevance setting,
as far as visibility is concerned.

Does the XForms spec specify the interaction between
the setting of visibility using the 'relevant' attribute
on xf:bind, and the setting of CSS properties?  Is the
behavior I'm seeing a bug in the Mozilla extension?
Or is interaction with style mechanisms explicitly
left implementation-defined or implementation-dependent?

I've tried to replicate the problem using Orbeon, but
there the display: table, display:table-row, and display:
table-cell clauses in my CSS appear to have no effect,
so I haven't succeeded in using Orbeon's implementation
to test for interaction between CSS and XForms

As you can tell, I'm not even sure what questions to ask
here.  If it's a bug in the Mozilla implementation, I
should be raising this on one of their implementation-specific
discussion lists, not here.  But at the moment, I think
I'm mostly trying to learn what obligations the spec
imposes on implementations in situations like this one.
Any illumination readers of this list can throw on
my problem would be gratefully accepted.

I attach the form that illustrates the phenomenon.  When
the table styling is commented out, the selection of the
'Cash' option causes the credit-card number and expiration
date to disappear, but when the CSS table styling is
present, the credit card details are always visible.

* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net

Received on Thursday, 6 August 2009 15:20:28 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:22 UTC