Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XSLT: escaping double quote

Tags:

xslt

quote

I have XSLT code like:

<xsl:if test="product_name='3" Magnifier'">
             <attribute name="Business Unit">
             Consumer
             </attribute>   
</xsl:if>

the value 3" Magnifier (has quote), I couldn't compare it with product name because of quote ambiguity. So how to escape double quote & resolve ambiguity.

Thanks.

like image 791
Raj Avatar asked Feb 05 '15 10:02

Raj


People also ask

How do I replace in XSLT?

XSLT replace is deterministic and does string manipulation that replaces a sequence of characters defined inside a string that matches an expression. In simple terms, it does string substitution in the specified place by replacing any substrings. Fn: replace function is not available in XSLT1.


1 Answers

<xsl:if test="product_name='3&quot; Magnifier'">
like image 188
michael.hor257k Avatar answered Sep 30 '22 06:09

michael.hor257k