Salute,
during our migration from orbeon 3.9 to orbeon 4.4 we encountered a problem including instances into a model using xf:include. We used to have xf:includes containing one or more xf:instances together with xf:actions that would fill those instances on ev:event xforms-model-construct-done. Those fragments were reused in several models of different xforms by way of including them in a xf:model element in the 'head'-tag of the xform. This worked with orbeon 3.9 as we surrounded the instances and actions with a root tag - an useless dummy element necessary only to make the include well-formed xml. With orbeon 4.4 this ceased working. The xforms coding inside the dummy root-element is not being processed any more. The instances do not appear in the xforms inspector and the actions are not executed. This seems to imply that any xf:include in orbeon 4.4 can only contain one single element, which would reduce the possibilities of encapsulation a lot. Is this the case or are we missing out on something? We would appreciate any help on how to get our includes to work again, as they are pretty numerous. Attached a working example for orbeon 3.9. For 4.4 please adapt the page-flow.xml. Kind regards, Heinrich -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. xforms-load-model.tgz (1K) Download Attachment |
Administrator
|
Hi Heinrich,
Have you tried using the xpointer attribute on the xi:include (see link below)? This looks like a cleaner way to do it, as it would allow you to include multiple elements, and get a proper resulting file where the xf:instance are directly inside the xf:model. http://wiki.orbeon.com/forms/doc/developer-guide/processors-xinclude#TOC-The-xpointer-attribute Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hoi Alex,
thanks for your answer. No we didn't try the xpointer-attribute yet. But now we do! And it's working perfect. The doc says that the entire document will be loaded before performing the xpath. Is there some kind of caching for this document, so that we can imagine some sort of single library-document which we pull out the element-fragments where ever we need them? Cheers Heinrich On 01/08/14 03:23, Alessandro Vernet wrote: > Hi Heinrich, > > Have you tried using the xpointer attribute on the xi:include (see link > below)? This looks like a cleaner way to do it, as it would allow you to > include multiple elements, and get a proper resulting file where the > xf:instance are directly inside the xf:model. > > http://wiki.orbeon.com/forms/doc/developer-guide/processors-xinclude#TOC-The-xpointer-attribute > > Alex > > ----- -- Before printing this e-mail, think about our environmental responsibility. -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Heinrich,
Caching depends on which piece of code is using the result of the XInclude transformation. In the best case scenario, caching takes place based on the URLs and last modified dates of all the files used to produce the result. But if XInclude processing needs to take place, then the document referred to by the xpointer attribute will be loaded every time. You can see this in the code: http://goo.gl/kMlsHf -Erik |
Free forum by Nabble | Edit this page |