Regex 如何在XSLT2.0中去掉字符串的前导空格和尾随空格?

Regex 如何在XSLT2.0中去掉字符串的前导空格和尾随空格?,regex,xslt,xpath,whitespace,xslt-2.0,Regex,Xslt,Xpath,Whitespace,Xslt 2.0,如何在XSLT2.0中去掉字符串的前导空格和尾随空格(因此使用XPath) fn:normalizespace不是一个解决方案,因为它也会折叠内部的空间。使用replace:replace('a','^\s+\s+$,'')使用replace:replace('a','^\s+\s+$,'')

如何在XSLT2.0中去掉字符串的前导空格和尾随空格(因此使用XPath)


fn:normalizespace
不是一个解决方案,因为它也会折叠内部的空间。

使用
replace
replace('a','^\s+\s+$,'')
使用
replace
replace('a','^\s+\s+$,'')