Advertisement
hcarpri

orbeon duplicated dynamic html title

Jul 22nd, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.93 KB | None | 0 0
  1. <xh:html xmlns:xh="http://www.w3.org/1999/xhtml"
  2. xmlns:ev="http://www.w3.org/2001/xml-events"
  3. xmlns:exf="http://www.exforms.org/exf/1-0"
  4. xmlns:fb="http://orbeon.org/oxf/xml/form-builder"
  5. xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
  6. xmlns:saxon="http://saxon.sf.net/"
  7. xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
  8. xmlns:sql="http://orbeon.org/oxf/xml/sql"
  9. xmlns:xf="http://www.w3.org/2002/xforms"
  10. xmlns:xi="http://www.w3.org/2001/XInclude"
  11. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  12. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  13. xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
  14. xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
  15. fr:data-format-version="4.0.0">
  16. <xh:head>
  17. <xh:title/>
  18. <xf:model id="fr-form-model" xxf:expose-xpath-types="true">
  19.  
  20. <!-- Main instance -->
  21. <xf:instance id="fr-form-instance" xxf:exclude-result-prefixes="#all" xxf:index="id">
  22. <form>
  23. <section-header>
  24. <section-2>
  25. <it-sum/>
  26. <it-count/>
  27. <section-3/>
  28. </section-2>
  29.  
  30. </section-header>
  31. </form>
  32. </xf:instance>
  33.  
  34. <!-- Bindings -->
  35. <xf:bind id="fr-form-binds" ref="instance('fr-form-instance')">
  36. <xf:bind id="section-header-bind" name="section-header" ref="section-header">
  37. <xf:bind id="section-2-bind" ref="section-2" name="section-2">
  38. <xf:bind id="section-3-bind" ref="section-3" name="section-3">
  39. <xf:bind id="section-3-iteration-bind" ref="section-3-iteration"
  40. name="section-3-iteration">
  41. <xf:bind id="it-number-bind" ref="it-number" name="it-number" type="xf:decimal"/>
  42. </xf:bind>
  43. </xf:bind>
  44. <xf:bind id="it-sum-bind" ref="it-sum" name="it-sum" xxf:default="xs:decimal(0)"
  45. calculate="sum($it-number[string() castable as xs:decimal],xs:decimal(0))"/>
  46. <xf:bind id="it-count-bind" ref="it-count" name="it-count" calculate="count($it-number)"
  47. readonly="false()"/>
  48. </xf:bind>
  49.  
  50. </xf:bind>
  51. </xf:bind>
  52.  
  53. <!-- Metadata -->
  54. <xf:instance xxf:readonly="true" id="fr-form-metadata" xxf:exclude-result-prefixes="#all">
  55. <metadata>
  56. <application-name>yform</application-name>
  57. <updated-with-version>2018.2.3.201905172253 PE</updated-with-version>
  58. <form-name>htmllabel</form-name>
  59. <title xml:lang="en"/>
  60. <description xml:lang="en"/>
  61. </metadata>
  62. </xf:instance>
  63.  
  64. <!-- Attachments -->
  65. <xf:instance id="fr-form-attachments" xxf:exclude-result-prefixes="#all">
  66. <attachments>
  67. <css mediatype="text/css" filename="" size=""/>
  68. <pdf mediatype="application/pdf" filename="" size=""/>
  69. </attachments>
  70. </xf:instance>
  71.  
  72. <!-- All form resources -->
  73. <!-- Don't make readonly by default in case a service modifies the resources -->
  74. <xf:instance id="fr-form-resources" xxf:readonly="false" xxf:exclude-result-prefixes="#all">
  75. <resources>
  76. <resource xml:lang="en">
  77. <it-sum>
  78. <label/>
  79. <hint/>
  80. </it-sum>
  81. <it-count>
  82. <label/>
  83. <hint/>
  84. </it-count>
  85. <it-number>
  86. <label>Number</label>
  87. <hint/>
  88. </it-number>
  89. <section-header>
  90. <label>&lt;div class="form-table--head"&gt; &lt;div class="content-left"&gt; &lt;p class="property--title"&gt;&lt;/p&gt;&lt;span class="property--qty"&gt;{$itCount} counted&lt;/span&gt; &lt;div class="box-info box-link-popup hidden-xs"&gt; &lt;div class="box__popup" tabindex="-1"&gt; &lt;p&gt;Options:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Option 1.&lt;/li&gt; &lt;li&gt;Option 2.&lt;/li&gt; &lt;li&gt;Option 3.&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;p class="property--amount property--amount-xs"&gt;{$itSum} &amp;euro;&lt;/p&gt; &lt;/div&gt; &lt;div class="content-right"&gt; &lt;p class="property--amount hidden-xs"&gt;{$itSum} &amp;euro;&lt;/p&gt; &lt;div class="header-menu"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#"&gt;Do something&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Do something&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Do something&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;</label>
  91. </section-header>
  92. <section-2>
  93. <label>section-summary</label>
  94. <help/>
  95. </section-2>
  96. <section-3>
  97. <label>section-iteration</label>
  98. </section-3>
  99.  
  100. </resource>
  101. </resources>
  102. </xf:instance>
  103. <xf:instance xxf:readonly="true" xxf:exclude-result-prefixes="#all" id="section-3-template">
  104. <section-3-iteration>
  105. <it-number/>
  106. </section-3-iteration>
  107. </xf:instance>
  108.  
  109. </xf:model>
  110. </xh:head>
  111. <xh:body>
  112. <fr:view>
  113. <fr:body xmlns:xbl="http://www.w3.org/ns/xbl" xmlns:p="http://www.orbeon.com/oxf/pipeline"
  114. xmlns:oxf="http://www.orbeon.com/oxf/processors">
  115. <fr:section id="section-header-section" bind="section-header-bind">
  116. <xf:label ref="$form-resources/section-header/label" mediatype="text/html">
  117. <fr:param type="ControlValueParam">
  118. <fr:name>itSum</fr:name>
  119. <fr:controlName>it-sum</fr:controlName>
  120. </fr:param>
  121. <fr:param type="ControlValueParam">
  122. <fr:name>itCount</fr:name>
  123. <fr:controlName>it-count</fr:controlName>
  124. </fr:param>
  125. </xf:label>
  126. <fr:section id="section-2-section" bind="section-2-bind">
  127. <xf:label ref="$form-resources/section-2/label"/>
  128. <fr:grid id="grid-2-grid">
  129. <fr:c x="1" y="1" w="6">
  130. <xf:output id="it-sum-control" bind="it-sum-bind">
  131. <xf:label ref="$form-resources/it-sum/label"/>
  132. <xf:hint ref="$form-resources/it-sum/hint"/>
  133. <xf:alert ref="$fr-resources/detail/labels/alert"/>
  134.  
  135.  
  136. </xf:output>
  137. </fr:c>
  138. <fr:c x="7" y="1" w="6">
  139. <xf:output id="it-count-control" bind="it-count-bind">
  140. <xf:label ref="$form-resources/it-count/label"/>
  141. <xf:hint ref="$form-resources/it-count/hint"/>
  142. <xf:alert ref="$fr-resources/detail/labels/alert"/>
  143.  
  144.  
  145. </xf:output>
  146. </fr:c>
  147. </fr:grid>
  148. <fr:section id="section-3-section" bind="section-3-bind" repeat="content"
  149. template="instance('section-3-template')"
  150. apply-defaults="true"
  151. fb:initial-iterations="first">
  152. <xf:label ref="$form-resources/section-3/label"/>
  153. <fr:grid id="grid-1-grid">
  154. <fr:c x="1" y="1" w="6">
  155. <fr:number xmlns="http://orbeon.org/oxf/xml/form-builder"
  156. xmlns:xxbl="http://orbeon.org/oxf/xml/xbl"
  157. xmlns:NumberSupport="java:org.orbeon.xbl.NumberSupportJava"
  158. id="it-number-control"
  159. bind="it-number-bind">
  160. <xf:label ref="$form-resources/it-number/label"/>
  161. <xf:hint ref="$form-resources/it-number/hint"/>
  162. <xf:alert ref="$fr-resources/detail/labels/alert"/>
  163.  
  164.  
  165. </fr:number>
  166. </fr:c>
  167. <fr:c x="7" y="1" w="6"/>
  168. </fr:grid>
  169. </fr:section>
  170. </fr:section>
  171. </fr:section>
  172. </fr:body>
  173. </fr:view>
  174. </xh:body>
  175. </xh:html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement