无法使用包含文字 'password' 的名称创建 属性

Unable to create property with name containing literal 'password'

在属性-local.xml 文件中,我创建了一些属性。这些属性用于形成 URL 表单数据将发送到的位置。属性如下:

<property as="xs:string" name="streamlyne.protocol">http</property>

<property as="xs:string" name="streamlyne.username">uname</property>
<property as="xs:string" name="streamlyne.pass">gesundheit</property>

<property as="xs:string" name="streamlyne.host">127.0.0.1:8090</property>

<property as="xs:string" name="streamlyne.api.path">ekualiti-kc/remoting/api/orbeonforms</property>
<property as="xs:string" name="streamlyne.api.action">saveFormData</property>

发送属性如下:

<property as="xs:string" name="oxf.fr.detail.process.save-draft.S2S_Forms.*">   
    save
    then send(
        uri = "{xxf:property('streamlyne.protocol')}://{xxf:property('streamlyne.username')}:{xxf:property('streamlyne.pass')}@{xxf:property('streamlyne.host')}/{xxf:property('streamlyne.api.path')}/{xxf:property('streamlyne.api.action')}/{xxf:get-request-parameter('propsalID')}",
        replace  = "none",
        method   = "post",
        content  = "xml",
        annotate = "id"
    )
    then success-message("save-success")
    recover error-message("save-error")
</property>

以上配置工作正常。

问题:

我想将密码 属性 的名称设为 streamlyne.password。当我尝试这样做时,保存操作失败了。所以我把名字改成了streamlyne.password1。又失败了。是否有任何约定,不将文字 password 放在 属性 名称属性中?我知道这听起来很傻。但我很确定将 属性 名称重命名为 pass 效果很好!

确实,xxf:property() 不 return 包含字符串 "password" 的值属性。这样做是为了防止表单作者访问您希望 Orbeon Forms 了解的属性值,但您不一定希望表单作者知道,比如 oxf.http.ssl.keystore.password.

所以在你的情况下,我只建议使用另一个名称(如你所建议的 pass,或 secret)。