On Mar 25, 2006, at 8:14 AM, P T Withington wrote:

> On 2006-03-25 11:02 EST, P T Withington wrote:
>
>> To add attributes to a dataset or dataset instance,
>> you put them in a trait and then inherit the trait.  This lets you
>> have tags whose body is special, but still extend those tags.
>
> So let me make a strawman illustration (just thinking out loud):
>
> <trait name="datasetMethods">
>   <handler name="ondata">
>     ...
>   </handler>
> </trait>
>
> <dataset name="myData" extends="datasetMethods">
>     <items><item>A</item></items>
> </dataset>
>
> [Using extends in an instance implies the instance is an instance  
> of the tag but with the traits listed in extends.  This is  
> certainly heavier that the data/model idea that Jim/Oliver proposed.]

I think this is a neat idea -- it's a nice tie-in between traits and  
this problem.

However, from a learnability perspective I think we should also have  
the verbose syntax in place:

  <dataset name="myData" type="direct">
     <data><items><item>A</item></items></data>
     <handler name="ondata"> ... </handler>
</dataset>

Then as a backward compatibility step, we can have a @type value of  
"direct-inline" meaning the data is given inline. And the default  
value for @type would be direct-inline, so that the old syntax:

  <dataset name="myData>
    <items><item>A</item></items>
  </dataset>

would be shorthand for stating type="direct-inline".

_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to