Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The <code>replace</code> function is only available in XSLT version 2.0, not in version 1.0 <a href="http://msdn.microsoft.com/en-us/library/14689742.aspx" rel="noreferrer">which is what Visual Studio uses</a>. Just because you've specified <code>version="2.0"</code> doesn't mean that Visual Studio supports it.</p> <p><a href="http://geekswithblogs.net/Erik/archive/2008/04/01/120915.aspx" rel="noreferrer">Here's a template on codesling that implements string-replace in XSLT 1.0</a>. You should be able to use it but I can't vouch for its efficiency.</p> <p>(Taken from the link above)</p> <pre><code>&lt;xsl:template name="string-replace-all"&gt; &lt;xsl:param name="text"/&gt; &lt;xsl:param name="replace"/&gt; &lt;xsl:param name="by"/&gt; &lt;xsl:choose&gt; &lt;xsl:when test="contains($text,$replace)"&gt; &lt;xsl:value-of select="substring-before($text,$replace)"/&gt; &lt;xsl:value-of select="$by"/&gt; &lt;xsl:call-template name="string-replace-all"&gt; &lt;xsl:with-param name="text" select="substring-after($text,$replace)"/&gt; &lt;xsl:with-param name="replace" select="$replace"/&gt; &lt;xsl:with-param name="by" select="$by"/&gt; &lt;/xsl:call-template&gt; &lt;/xsl:when&gt; &lt;xsl:otherwise&gt; &lt;xsl:value-of select="$text"/&gt; &lt;/xsl:otherwise&gt; &lt;/xsl:choose&gt; &lt;/xsl:template&gt; </code></pre> <p>You'd call it like this:</p> <pre><code>&lt;xsl:otherwise&gt; &lt;td style="border: solid 1px black; background-color:#00CC66;"&gt; &lt;xsl:variable name="FeatureInfo" select="Text" /&gt; &lt;xsl:call-template name="string-replace-all"&gt; &lt;xsl:with-param name="text" select="$FeatureInfo"/&gt; &lt;xsl:with-param name="replace" select="Feature="/&gt; &lt;xsl:with-param name="by" select="TESTING"/&gt; &lt;/xsl:call-template&gt; &lt;/td&gt; &lt;/xsl:otherwise&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload