Orbeon Forms:替换表单字段中的空格
Orbeon Forms: Replacing whitespace in form fields
我需要有关 Orbeon Forms 中使用的 xpath 表达式的帮助。我正在将值传递给 Web 服务,并且需要将它的结果加载到静态图像。所以对于它的计算值,我使用 follow
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
)
我正在为我的服务的标题和 docID 参数传递表单字段值。我需要替换 xxf:instance('fr-form-instance')/VARASection/ctrlTitle
字符串中单词之间的空格(不是尾随或前导空格,而是标题之间的空格)。
我什至试过 normalize-space(xxf:instance('fr-form-instance')/VARASection/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)
)
我需要有关 Orbeon Forms 中使用的 xpath 表达式的帮助。我正在将值传递给 Web 服务,并且需要将它的结果加载到静态图像。所以对于它的计算值,我使用 follow
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
)
我正在为我的服务的标题和 docID 参数传递表单字段值。我需要替换 xxf:instance('fr-form-instance')/VARASection/ctrlTitle
字符串中单词之间的空格(不是尾随或前导空格,而是标题之间的空格)。
我什至试过 normalize-space(xxf:instance('fr-form-instance')/VARASection/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)
)