Xpath Orbeon表单:替换表单字段中的空白

Xpath Orbeon表单:替换表单字段中的空白,xpath,replace,whitespace,orbeon,Xpath,Replace,Whitespace,Orbeon,我需要关于Orbeon表单中使用的xpath表达式的帮助。我正在向web服务传递值,需要将其结果加载到静态映像中。因此,对于它的计算值,我使用如下公式 concat( 'http://192.168.25.14:8084/OrbeonRouter/rest/qr?type=1&title=', xxf:instance('fr-form-instance')/VARASection/ctrlTitle, '&docID=', xxf:instanc

我需要关于Orbeon表单中使用的xpath表达式的帮助。我正在向web服务传递值,需要将其结果加载到静态映像中。因此,对于它的计算值,我使用如下公式

concat(
    'http://192.168.25.14:8084/OrbeonRouter/rest/qr?type=1&title=',
    xxf:instance('fr-form-instance')/VARASection/ctrlTitle,
    '&docID=',
    xxf:instance('fr-form-instance')/VARASection/docID
)
我正在传递我的服务的title和docID参数的表单字段值。我需要替换
xxf:instance('fr-form-instance')/VARASection/ctrlTitle
字符串中单词之间的空格(不是尾随空格或前导空格,而是标题之间的空格)


我甚至尝试了
规范化空间(xxf:instance('fr-form-instance')/varasecotion/ctrlTitle)
,但没有成功。

您可以使用
encode-for-uri()
函数:

concat(
    'http://192.168.25.14:8084/OrbeonRouter/rest/qr?type=1&title=',
    encode-for-uri(xxf:instance('fr-form-instance')/VARASection/ctrlTitle),
    '&docID=',
    encode-for-uri(xxf:instance('fr-form-instance')/VARASection/docID)
)