David - You are right about the illogic of the second paragraph - that
is a major criticism of that approach.
But I don't think selecting all and deselecting say "red" works any
differently. I put together a sample database and html to
illustrate: So all five colors start off selected and all cars are
listed as expected. But if I deselect "red" then all five cars are
still listed. Briefly - Rainbow+car = red, green, blue, yellow;
Rainbow+minus+red+car = green, blue, yellow; and so on.
Note that if I had included "not_red" as a Color tag in the Rainbow
+minus+red+car item then pretty much the same behavior would result. I
am reminded that it is basically impossible to implement a NOT using
only AND & OR. Some sort of exclusionary filter is necessary. - Jim
{
"items" : [
{
"label" : "Rainbow+minus+yellow+car",
"type" : "Car",
"Colors" : [
"red",
"blue",
"green"
],
"id" : "Rainbow minus yellow car"
},
{
"label" : "Rainbow+minus+blue+car",
"type" : "Car",
"Colors" : [
"red",
"green",
"yellow"
],
"id" : "Rainbow minus blue car"
},
{
"label" : "Rainbow+minus+green+car",
"type" : "Car",
"Colors" : [
"red",
"blue",
"yellow"
],
"id" : "Rainbow minus green car"
},
{
"label" : "Rainbow+car",
"type" : "Car",
"Colors" : [
"red",
"blue",
"green",
"yellow"
],
"id" : "Rainbow car"
},
{
"label" : "Rainbow+minus+red+car",
"type" : "Car",
"Colors" : [
"blue",
"green",
"yellow"
],
"id" : "Rainbow minus red car"
}
]
}
<html>
<head>
<title>Car Colors Example</title>
<link href="cars2.js" type="application/json" rel="exhibit/data" />
<script src="http://static.simile.mit.edu/exhibit/api-2.0/exhibit-
api.js"
type="text/javascript"></script>
<style>
</style>
</head>
<body>
<h1>Car Colors Example</h1>
<table width="100%">
<tr valign="top">
<td ex:role="viewPanel">
<div ex:role="view"></div>
</td>
<td width="25%">
<div ex:role="facet" ex:expression=".Colors" ex:facetLabel="Colors"
ex:selection="red; blue; green; yellow" ></div>
<!--<div ex:role="facet" ex:expression=".Colors"
ex:facetLabel="Colors"></div>-->
</td>
</tr>
</table>
</body>
</html>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SIMILE Widgets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/simile-widgets?hl=en
-~----------~----~----~----~------~----~------~--~---