XSLT 1.0 escaping double quotes and backslash in a string
问题 I have a string like below and trying to convert into json format: Test "out" and \new Expected output is Test \"out\" and \new I tried by calling templates for escapequote - working fine for escape quotes: <xsl:template name="escapeQuote"> <xsl:param name="pText" select="concat(normalize-space(.), '')" /> <xsl:if test="string-length($pText) >0"> <xsl:value-of select="substring-before(concat($pText, '"'), '"')" /> <xsl:if test="contains($pText, '"')"> <xsl:text>\"</xsl:text> <xsl:call