xf:submission:从当前上下文填充标头值

时间:2017-11-07 16:50:24

标签: orbeon xforms

我想在xf:提交中使用当前上下文中的值填充标题。文档说可以使用xpath表达式,但不提供任何示例。

我尝试过使用xsl:value,如下所示,但这并没有填充任何内容。这是填充xf:value的正确语法吗?

<p:for-each href="#attachments" select="//attachment" root="attachments" id="post-document-pages">
    <p:processor name="oxf:xforms-submission">
        <p:input name="submission">
            <xf:submission 
                method="post" 
                resource="http://localhost:8080/is/document/{@documentId}/page" 
                serialization="application/octet-stream">
                <xf:header>
                    <xf:name>Resource-Name</xf:name>
                    <xf:value>
                        <xsl:value-of select="@filename" />
                    </xf:value>
                </xf:header>
            </xf:submission>
        </p:input>
        <p:input name="request"  href="current()" />
        <p:output name="response" ref="post-document-pages" /> 
    </p:processor>

1 个答案:

答案 0 :(得分:2)

<xf:header>内,只需使用:

<xf:value value="[your XForms expression here]"/>