Re: [XBL] content element and locked

On Fri, 12 Jan 2007, Cyril Concolato wrote:
> >
> > [the example in section "4.5. The Final Flattened Tree"]
> >
> > There are two bound elements in that example. One is inside the 
> > other's shadow tree. What would you final flattened tree look like if 
> > you didn't assign the element to a <content> element in both shadow 
> > trees?
>
> In this particular example, the flattened tree (btw, why do you call it 
> final ?) wouldn't be different since the second content assigned to C is 
> not part of it.

It's the "final" flattened tree because it's what gets rendered after 
everything gets processed. Hence, final.

I don't really understand what you mean. "C" is part of the final tree. 
<content> elements never are part of the final flattened tree. If "C" 
wasn't assigned to a <content> element in the nested binding, I don't 
understand how it could be part of the flattened tree at all.


> What is the answer to the question:
>
> In the example, if the binding on Q is removed, one would have to 
> redistribute the nodes for the binding of B ?

Nope, the binding on Q doesn't affect B's binding's shadow tree.


> I think the answer is yes, that's why when applying the binding for Q, 
> one can safely unassign C (i.e. unassign the content element parent of 
> R) because the redistribution of the nodes for the binding of B will 
> reassign the content that was unassigned.

I don't really follow this.


> Is this is correct, you don't have to store multiple content elements 
> per Node ?

Exactly how you implement it is an implementation detail. You don't 
necessarily have to *store* the assignment, since you can derive it 
(there's no way C could be assigned to the second <content> element in the 
first shadow tree if it's assigned to a <content> element in the second 
shadow tree). But conceptually it's still assigned to both.

HTH,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Friday, 12 January 2007 19:20:51 UTC