Re: [Xsltforms-support] Experimental Component control (Was: A couple of questions about subforms)
Brought to you by:
alain-couthures
From: Alain C. <ala...@ag...> - 2013-06-05 20:46:24
|
Eric, >> Currently, the default instance of a subform is merged with the one >> in the main form while, from a component, it has its own id. That's >> why those functions don't work with subforms even if their name would >> say so ... ;-) > That's what I had guessed but can you elaborate on this instance merge? For subforms, models already with the same ids in the main form are merged: instances are merged and bindings are added in the main form. Merging instances is similar: if the corresponding id already exists in the main form, it is ignored; if not, it is added. The default model without an id and the default instance without an id are merged as if they had the same id. > > I had the feeling that the context node in the master form was becoming > the instance of the subform, is that what you mean? No, in a subform, instances are identical but scoping is effective and "." references the context node. > > Couldn't subform-instance() and subform-context() be pointers to the > subform default instance and context node without changing the behaviour > of this "merge"? Yes, that's possible but I would say that subform-instance() should be useless unless, depending on the different situations, a component would also be used as a subform. >> XSLTForms is a versatile product which can very easily be extended at >> any level (I know I'm not the only one doing this...)! > Sounds impressive... > > Well, XSLT is powerful and Javascript can now do a lot of things! -Alain |