输出数据中不存在的Orbeon输入字段?

时间:2018-08-13 07:55:04

标签: variables input orbeon transient

我正在尝试构建一个为用户提供两个替代表单部分的表单-假设“ registration from”仅包含一个用于输入开始日期的日期字段,而“ registration from”则包含一个用于开始日期的日期字段一个日期字段作为结束日期。

我的XSD指示输出中只能显示这些部分之一。为了方便用户,我的想法是添加一个附加的下拉菜单,该菜单提供两个选项“从”和“从-到”,并基于显示相应部分的值。

问题是我不知道如何在不显示下拉菜单中的值的情况下添加该下拉菜单?

感谢卢卡斯

1 个答案:

答案 0 :(得分:0)

所以我通过在模型中使用实例来解决它,所以看起来很像这样:

<xf:model id="fr-form-model" xxf:expose-xpath-types="true">
    <xf:var name="elementName" value="//control-1"/>  
        <xf:instance id="DDinstance">
            <value/>
        </xf:instance>
        
        <!-- Main instance -->
        <xf:instance id="fr-form-instance" xxf:exclude-result-prefixes="#all" xxf:index="id">
            <form>
                <section-1>
                    <section-2>
                      ...     
                    </section-2>
                    <section-3>
                      ...      
                    </section-3>
                </section-1>
            </form>
        </xf:instance>

我完全删除了下拉菜单的绑定。 在下拉定义中,我通过引用DDinstance替换了对绑定的引用:

 <fr:dropdown-select1 xmlns:xxbl="http://orbeon.org/oxf/xml/xbl" id="control--control" ref="instance('DDinstance')">
                                ...
 </fr:dropdown-select1>

相关问题