RE: Styling based on instance data

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 UTC