Reputation: 5805
How to strip leading and trailing spaces of a string in XSLT 2.0 (with XPath, thus).
fn:normalize-space is not a solution because it also collapses spaces inside.
fn:normalize-space
Upvotes: 0
Views: 429
Reputation: 167696
Use replace: replace(' a ', '^\s+|\s+$', '').
replace
replace(' a ', '^\s+|\s+$', '')
Upvotes: 3