in input XML I have a tag
<name>Sample " '</name>
in XSL I transform this tag with:
<xsl:variable name="productName" select="substring($elemXPath/name,1,50)"/>
<someTag someAttr="{$productName}"/>
When I run XSLT the output is:
<someTag someAttr="Sample " '"/>
but I'd like to get
<someTag someAttr="Sample " '"/>
instead. I don't want to wrap every use of input data with separate escaping template because there is a waste number of such a places in my xslt.
I tried to encode apostrophes in the input file but when I put
<name>Sample '</name>
to the input file then I got
<someTag someAttr="Sample &apos;"/>
instead of
<someTag someAttr="Sample '"/>
My question is how to force/configure XSLT to encode apostrophes as it does for quotes?