Mugunth
Mugunth

Reputation: 14499

Passing a URL in a XML file for XSLTransformation in C#

My XSL file contains a line like this.

Click <a href="<xsl:value-of select=""/ROOT/QUERYSTRING""/>"> here </a> to continue...

The value "/ROOT/QUERYSTRING" is populated from a XML which would be any arbitrary URL.

But when I run the transformation, it's throwing an XSLT Compile Error at the line, href = "<xsl stating, "< is unexpected char."

Am I missing any escape chars or something?

Upvotes: 0

Views: 240

Answers (3)

Al.
Al.

Reputation: 712

Rather:

<a>
  <xsl:attribute name="href">
    <xsl:value-of select=""/ROOT/QUERYSTRING""/>
  </xsl:attribute>here
</a>

Upvotes: 1

Homde
Homde

Reputation: 4286

Yah, you need to use & g t; and & lt ; (added spaces otherwise the post parsed it :)

Upvotes: 0

Mugunth
Mugunth

Reputation: 14499

Never mind... got the ans works!

Thanks to http://www.webmasterworld.com/forum26/71.htm

Upvotes: 0

Related Questions