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: Thu, 30 Nov 2006 16:25:11 -0800
Message-ID: <E254B0A7E0268949ABFE5EA97B7D0CF402856F8F@usa7061ms01.na.xerox.net>
To: <jeacott@hardlight.com.au>
Cc: "www-forms" <www-forms@w3.org>

Thank you.  I am using the word "selected" in a confusing way here.
I didn't mean the thing that is expressible using the proposed CSS3
pseudo-element ::repeat-index, but instead an application-specific
definition of selected, which in my example below is dependent on the
value of an attribute on the repeated node.

-----Original Message-----
From: Jason [mailto:jeacott@hardlight.com.au] 
Sent: Thursday, November 30, 2006 4:20 PM
To: Klotz, Leigh
Cc: www-forms
Subject: Re: Styling based on instance data

I think Chiba lets you do this by preprocessing and exposing this detail

in a css hookable way.

<xf:repeat xf:appearance="full"...>
<table class="compact-repeat valid | invalid readonly |
readwrite optional | required">
<tr class="repeat-item"> (has additional 'repeat-index' here
when selected)

sorry this doesnt help you with pure a xform, but then I guess with a 
pure xforms there is no guarantee that the platform that supports xforms

also supports css, or anything else you might be using.


Klotz, Leigh wrote:
> Itwouldbeniceif you could use CSS to style the background of repeat
> items yellow if they are "selected" in the data using some magical CSS
> XPath selector:
> <style type="text/css">
> e/@selected))] { background-color: yellow; }
>   ...
> </style>
> <repeat class="lines" nodeset="lines/line">
>   <input ref="@selected">
>     <label class="columnHeader">X</label>
>   </input>
>   <output ref="date">
>     <label class="columnHeader">Date</label>
>   </output>
>   <output ref="name">
>     <label class="columnHeader">Name</label>
>   </output>
> </repeat>
Received on Friday, 1 December 2006 00:25:35 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:55 UTC