Re: Core Attribute Collections

On Thu, 01 Dec 2016 19:44:09 +0100, Erik Bruchez <ebruchez@orbeon.com>  
wrote:

>>
>>>>> Well OK, but wouldn't it better to make it more explicit where  
>>>>> context and model are allowed, rather than allowing them everywhere?
>>
>> At present
>>
>> <model model="m">
>>   <instance model="j" context="..">
>>     <data/>
>>   <instance>
>> </model>
>
> They don't make sense here so I agree they shouldn't be on Common.
>
>> and many other meaningless things are allowed syntactically, and so not  
>> checkable with validating parsers.
>>
>> I would prefer for @model/@context to be in Binding, because they  
>> really are allowed anywhere a binding is allowed, and then specifically  
>> >>mention other non-binding places where they are allowed.
>
> But I also find they don't belong with Binding, because  @ref and @bind  
> really don't make sense on `xf:action` and others elements like that.

Oh I agree. I was suggesting putting them in Binding, so that all Binding  
elements had them automatically, and then other places that also used them  
just listed them specially.

Steven

>
> So maybe:
>
> - we introduce a new Context Attributes including @model/@context
> - Binding implies/includes Context
> - we are specific on which elements Context applies when they don't  
> support Binding
>
> This would include:
>
> - var
> - param
> - body
> - result
> - item
> - choices
> - dialog
> - case
> - submission
> - all action elements which don't have Binding
>  - action
>  - show
>  - hide
>  - setindex
>  - toggle
>  - setfocus
>  - dispatch
>
> I am not sure about:
>
> - send
> - recalculate
> - revalidate
> - rebuild
> - refresh
>
> The last 4 need a model, either implicitly or explicitly, but they do  
> not use an XPath context. In this case, @context would just be harmless  
> >and could still be allowed.
>
> (I went quickly through the elements and might have made mistakes.)
>
> -Erik

Received on Thursday, 1 December 2016 19:19:09 UTC