select1 and whitespace handling

Hi,

when trying to fix a bug in Mozilla XForms I came across the following
problem:

How should whitespace before and after a non-whitespace characters be
handled when matching a xf:select1/xf:value to the bound node? Please
have a look at the following testcase, which shows what I mean better
than many words:

https://bug533174.bugzilla.mozilla.org/attachment.cgi?id=495947

I also have some screenshots how Chiba and Orbeon handle this:

Orbeon: https://bug533174.bugzilla.mozilla.org/attachment.cgi?id=495949
Chiba: https://bug533174.bugzilla.mozilla.org/attachment.cgi?id=495948

Seems like there's no consensus on this :)

What's "the right thing" to do?
a) Strip all whitespace before and after non-whitespace characters from
xf:value and the bound node when doing the comparison? OR
b) Compare the two string literally, including whitespace?

I think option a) would be more intuitive for web developers.

What's the proposed implementation?

Philipp

Received on Tuesday, 7 December 2010 21:59:41 UTC