Skip to content

Instantly share code, notes, and snippets.

@ebruchez
Created February 28, 2018 00:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ebruchez/22d3ac081d1f76dd073fbbda937a9eb1 to your computer and use it in GitHub Desktop.
Save ebruchez/22d3ac081d1f76dd073fbbda937a9eb1 to your computer and use it in GitHub Desktop.
Standalone test form for #3477 "Improve performance or large forms in Form Builder"
<xh:html xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
xmlns:xbl="http://www.w3.org/ns/xbl"
xmlns:xxbl="http://orbeon.org/oxf/xml/xbl">
<xh:head>
<xf:model id="model">
<xf:instance id="instance">
<xh:html>
<xh:head>
<xf:model id="model">
<xf:instance id="instance">
<value>40</value>
</xf:instance>
</xf:model>
<xbl:xbl>
<xbl:binding id="fr-foo" element="fr|foo">
<xbl:implementation>
<xf:model>
<xf:instance>
<open>false</open>
</xf:instance>
</xf:model>
</xbl:implementation>
<xbl:template>
<xh:div>
<xf:trigger id="my-trigger">
<xf:label>Open/Close</xf:label>
<xf:setvalue event="DOMActivate" ref="instance()" value="not(xs:boolean(.))"/>
</xf:trigger>
<xf:switch xxf:xforms11-switch="true" caseref="instance()" id="my-switch">
<xf:case value="false()" id="my-case-closed"/>
<xf:case value="true()" id="my-case-open">
<xbl:content/>
</xf:case>
</xf:switch>
</xh:div>
</xbl:template>
</xbl:binding>
</xbl:xbl>
</xh:head>
<xh:body>
<fr:foo xxf:update="full" id="foo-1">
<xh:span>
<fr:foo xxf:update="full" id="foo-1-1">
<xh:span>
Foo 1.1 content!
</xh:span>
</fr:foo>
</xh:span>
</fr:foo>
</xh:body>
</xh:html>
</xf:instance>
</xf:model>
</xh:head>
<xh:body>
<xf:group id="my-group">
<xxf:dynamic ref="." id="my-dynamic"/>
</xf:group>
</xh:body>
</xh:html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment