Hi Experts,

Can you help advise on what I can do with the below

Piece of code is as below:

<xsl:for-each select="Products/Product[Name='Fruits']/Location[substring(Type,1,3) != 'NSW']">
<Fruits>
<xsl:value-of select="."/>
</Fruits>
</xsl:for-each>

The result I'm getting have spaces on Fruits even though my input does not have any

Input:
<Products>
<Product>
<Name>Fruits</Fruits>
<Location>
<Type>Apple</Type>
<Value/>
</Location>
</Product>
</Products>


Output:
<Fruits> Apple </Fruits>


there are lots of unwanted spaces inside the Fruits tag.
This is working in my other environment so I'm not sure why it's not working on my other environment.
I also tried to convert dos2ux but still same result.

"substring" syntax/code in the for-each I think is not working.
Can you share what you think ifs the flaw in this line? It is working in other instances.

Thanks!
Appreciate your help