Update:
The issue still persists although it is not quite the same as before. Below is an example of what is being input, what is being output and what I want to have output
An example of the input:
<p><span style="font-size: medium">Product description text</span></p>
Current output:
<p><span style="font-size: medium">Product description text</span></p>
Intended output:
<p><span style="font-size: medium">Product description text</span></p>
.
Using CDATA has helped as it allows me to input '<' but as seen in the output above, even when using disable-output-escaping, it has changed in the output
.
.
Original question:
The error I'm getting is "'<', hexadecimal value 0x3C, is an invalid attribute character"
What I'm trying to do is replace all occurrences of < ; and > ; with < and > respectively.
To keep this as simple as possible, here is the code for just lt;:
<xsl:variable name="lt">
<xsl:text><</xsl:text>
</xsl:variable>
<xsl:variable name="lthex">&lt;</xsl:variable>
<xsl:copy-of select="ew:replacestring(products_description/node(),$lthex,$lt)"/>
I've tried various things in place of text e.g. value-of etc.
I know there's nothing wrong with the code format and the vb code linked to it because I'm using it multiple times to replace and output elsewhere
The problem with this though is that I want < and > to literally be ouput, not a code which is then seen by the browser and changed
.
If you need more information just ask (I'm struggling to explain this very well)
Any help will be appreciated
<xsl:text disable-output-escaping="yes"><![CDATA[<]]></xsl:text>
This is because <
is illegal (and that's why your app is complaining). For >
, you can use:
<xsl:text disable-output-escaping="yes">></xsl:text>