W3C home > Mailing lists > Public > www-forms@w3.org > December 2006

RE: Styling based on instance data

From: Klotz, Leigh <Leigh.Klotz@xerox.com>
Date: Tue, 12 Dec 2006 10:10:58 -0800
Message-ID: <E254B0A7E0268949ABFE5EA97B7D0CF4028D3321@usa7061ms01.na.xerox.net>
To: <mark.birbeck@x-port.net>, "Roland Merrick" <roland_merrick@uk.ibm.com>
Cc: "www-forms" <www-forms@w3.org>, <www-forms-request@w3.org>

Mark,
The validation and schema description issues of the mip: namespace seem
troublesome.
What do you think about using child elements of bind instead of
overloading the attribute namespace?
Using the existing pattern where the IDREF attribute has the same name
as the element holding the ID, we might get something like this:

<xf:state id="overdue" />

<xf:bind nodeset="books/toread/book">
  <xf:xyz state="overdue" constraint="..." />
</xf:bind>

Unfortunately this leaves the unnamed element xyz, and nothing springs
to mind.

Or, perhaps with a nod to Mozilla's custom data types [1], we might
consider a way to declare pseudo-attributes to be added to the InfoSet
of controls bound to nodes:

<xf:bind nodeset="books/toread/book">
  <xf:attribute name="overdue" value="'true'" relevant="..." />
</xf:bind>

<style type='text/css'>
  xf|*[overdue='true'] { color: red; }
</style>

<input ref="books/toread/book"><label>Book to read</label></input>

Leigh.

[1]
http://developer.mozilla.org/en/docs/XForms:Custom_Controls#Custom_Data_
Types


Mark Birbeck wrote:
]then it would be great to be able to capture that. So, perhaps we
]could do something like this:
]
]  <xf:state id="overdue" />
]
]  <xf:bind nodeset="books/toread/book" mip:overdue="..." />
]  <xf:bind nodeset="books/read/book" mip:overdue="..." />
Received on Tuesday, 12 December 2006 18:11:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:08 GMT