troubleshooting Question

replace apostrophe XML

Avatar of davidlars99
davidlars99Flag for United States of America asked on
XML
11 Comments2 Solutions1315 ViewsLast Modified:
Hi,

How can I replace apostrophe width \'

It has to be replaced with slash followed by apostrophe

Thanks!

<xslt:stylesheet version="1.0" xmlns:xslt="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
      <xslt:output media-type="text/html" encoding="UTF-8"/>
      <xslt:output method="html"/>
      <xslt:output method="xml" omit-xml-declaration="yes" indent="yes"/>        
        <xslt:output method="html"/>
        
      <xslt:template match="/">
            <table cellpadding="0" cellspacing="0">
                  <xslt:apply-templates select="NewDataSet/Table"/>
            </table>
      </xslt:template>
      
      <xslt:template match="NewDataSet/Table">
            <xslt:variable name="webname">
                  <xslt:value-of select="web_name"/>
            </xslt:variable>
            <xslt:variable name="lookupfield">
                  <xslt:value-of select="lookup_field"/>
            </xslt:variable>
            <xslt:variable name="defcoll">
                  <xslt:value-of select="DEFAULT_COLLECTOR"/>
            </xslt:variable>
            <xslt:variable name="empname">
                  <xslt:value-of select="EMPLOYEE_NAME"/>
            </xslt:variable>                                                                                          
            <tr>
                  <xslt:choose>
                        <xslt:when test="DEFAULT_COLLECTOR">
                              <td onmouseover="a(this)" onmouseout="b(this)" onclick="c(this,'{$defcoll}')"><xslt:value-of select="$empname"/></td>
                        </xslt:when>
                        <xslt:otherwise>
                              <xslt:choose>
                                    <xslt:when test="web_name">
                                          <td onmouseover="a(this)" onmouseout="b(this)" onclick="c(this,'{$webname}')"><xslt:value-of select="$webname"/></td>
                                    </xslt:when>
                                    <xslt:otherwise>
                                          <td onmouseover="a(this)" onmouseout="b(this)" onclick="c(this,'{$lookupfield}')"><xslt:value-of select="$lookupfield"/></td>
                                    </xslt:otherwise>                  
                              </xslt:choose>
                        </xslt:otherwise>
                  </xslt:choose>
            </tr>
      </xslt:template>
            
</xslt:stylesheet>
ASKER CERTIFIED SOLUTION
Gertone (Geert Bormans)
Information Architect
Join our community to see this answer!
Unlock 2 Answers and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros