Re: [Xsltforms-support] Subform mechanism implementation in XSLTForms
Brought to you by:
alain-couthures
From: Alain C. <ala...@ag...> - 2012-07-01 20:28:11
|
Le 27/06/2012 19:25, C. M. Sperberg-McQueen a écrit : > If (as I think I understand) the right way to do subforms is still > a matter for experimentation, then this is one place where I > might suggest an alternative. I think it might be useful if the > calling subform were able to specify one or more IDs of > constructs in the subform and have those count as the subform > body. > > So instead of > > <xforms:load if="@selected != 'true'" show="embed" targetid="subform" > resource="books.xml"/> > > the call in writers.xml might read > > <xforms:load if="@selected != 'true'" show="embed" targetid="subform" > resource="books.xml#bookdetails"/> > > And the books.xml subform would include (for example): > > <xf:repeat id="bookdetails" nodeset="book"> > > This would allow the subform to contain material like standard > navigation bars and headers, for when it's loaded in a stand-alone > way, without those navigation bars and headers cluttering up > the main form (which presumably already has a header and > navigation bar of its own, if that's the style used by the project > in question. > > If the caller does not specify an ID, then taking the children of > /html/body makes sense to me. I know that such a facility is already possible with betterform and I will surely consider it for XSLTForms soon! > >> When loaded from a main form, the model part of the subform is added to >> the model part of the main form. Conflicting ids in models are merged by >> XSLTForms: instances, submissions and bindings are added into the >> corresponding model of the main form. Conflicting ids in instances, >> submissions and bindings are supported by ignoring the conflicting >> elements in the subform. > So one way to make something in the subform NOT be included > in the main form would be to give it an ID that conflicts with an ID > in the main form? Yes, but only for instances, submissions and bindings! Thanks! -Alain |