normalize-space and processing-instruction
Posted: Tue Feb 27, 2018 7:06 pm
Hi,
I have some xml with processing instructions and I need to normalize the space and retain the pi. This is the xml
<title>L<?lwrc?>e<?lwrc?> Blanc's blog</title>
When I apply normalize-space the space between the 2nd <?lwrc?> and B goes missing so if I output without the pi I get
<title>LeBlanc's blog</title>
and with
<title>L<?lwrc?>e<?lwrc?>Blanc's blog</title>
I did see somewhere that the pi is counted as a space in certain circumstances which seems to be the case here. I need to normalize as there can/will be spacing elsewhere that needs addressing.
Has anyone any idea how to get 'round this?
Thanks
I have some xml with processing instructions and I need to normalize the space and retain the pi. This is the xml
<title>L<?lwrc?>e<?lwrc?> Blanc's blog</title>
When I apply normalize-space the space between the 2nd <?lwrc?> and B goes missing so if I output without the pi I get
<title>LeBlanc's blog</title>
and with
<title>L<?lwrc?>e<?lwrc?>Blanc's blog</title>
I did see somewhere that the pi is counted as a space in certain circumstances which seems to be the case here. I need to normalize as there can/will be spacing elsewhere that needs addressing.
Has anyone any idea how to get 'round this?
Thanks