tags:

views:

37

answers:

1

When I call an extension c# function like this:

<xsl:choose>
  <xsl:when test="extension:matches('\d', .)">
    <td bgcolor="#ff00ff">
    <xsl:value-of select="blah"/></td>
  </xsl:when>
  <xsl:otherwise>
    <td><xsl:value-of select="blub"/></td>
  </xsl:otherwise>
</xsl:choose>

Then the functions receives as first argument "\\d".

I would like the function to just get a "\d" as first argument.

Why is this and what can I do?

+1  A: 

It looks like it was my own fault. The debugger shows a double backslash which is not there. I just accidentally switched the order of arguments of the function. Now it works without any escaping.

frast