Johan Sundström wrote:
> On 2/28/07, David Karger <[EMAIL PROTECTED]> wrote:
>   
>> David Huynh wrote:
>>     
>>> I have just refactored the Exhibit 2.0 development branch to support
>>> more flexible layouts, e.g.,
>>>
>>> - Change <body ex:ondataload="window.exhibit =
>>> Exhibit.create('President');"> to
>>>
>>>     <body>
>>>        <div ex:role="exhibit-collection" ex:itemTypes="President"></div>
>>>       
>> how about
>> <div ex:role="exhibit-collection" ex:selection=".type = 'President'">
>> leaves room for more complex selection criteria later.
>>     
>
> Or ex:role="collection" (I agree about your point of needless exhibit
> prefixes in the ex: namespace). Regarding ex:selection, I think this
> would force us to come up with a syntax for member-of-set for the
> query, to cater ex:itemTypes="President,VicePresident" which works
> now. Not that that would be bad, but the trouble of David's finite
> amount of time might suggest it won't happen soon. :-)
>   
Yes, I've thought about ex:selection. The idea here is to let 
ex:itemTypes support the 80% of the cases, and then let ex:selection 
catch the rest. You can also mix them, e.g.,

    <div ex:role="collection" ex:itemTypes="Publication" 
ex:selection="later(.date, offsetDate(now, -1, 'year'))"></div>

will give you publications in the last year (we don't have the later and 
offsetDate functions and the now variable yet). And then you can make 
more complex selections, e.g.,

    <div ex:role="collection" ex:itemTypes="Publication" 
ex:selection="and(.spotlight, later(.date, offsetDate(now, -1, 
'year')))"></div>

where .spotlight is a boolean property you use to spotlight your 
publications.

David

_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to