torsten's .NET blog In the end, everything is a gag [Ch. Chaplin]
# Saturday, April 26, 2003
It's a hack?
Everything familar with MSXML3 and transformations know about a "feature" of the : it cannot output something without escaping. And the story goes on for .NET. If you have to produce html with xml transform you have a big problem: you get a correcly url formatted link within the xml source that you have to write to an <A>element as the href attribute. How about "&" signs in the url? They are escaped with "&" which result in wrong formatted url's. The normal way you can use to write element content to html output without escaping:

<xsl:value-of select="urlElement" disable-output-escaping="yes"></xsl:value-of>

Now the non-working version to write a valid <A> element:

<A><xsl:attribute name="href"><xsl:value-of select="urlElement" disable-output-escaping="yes"/></xsl:attribute>Link</A>

And here is the code to work around (name it a hack):

<xsl:text disable-output-escaping="yes">&lt;a href='</xsl:text><xsl:value-of disable-output-escaping='yes' select=url'/><xsl:text>'></xsl:text>Link Text<xsl:text disable-output-escaping='yes'>&lt;/a></xsl:text>

Technorati tags:  | 
Saturday, April 26, 2003 10:34:14 PM (W. Europe Standard Time, UTC+01:00)    #  Comments [0]  | 
Navigation

Like RSS Bandit? Make a donation to help support its development and maintenance. As little as 1€ will help.

Make payments with PayPal - it's fast, free and secure!
On this page....
<April 2003>
SunMonTueWedThuFriSat
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

SUBSCRIBE RSS GeoURL e-mail

Search
Categories
Blogroll
[Feed] Dare Obasanjo
Dare Obasanjo aka Carnage4Life
[Feed] Clemens Vasters
[Feed] Omar Shahine
[Feed] Tom Mertens

newtelligence dasBlog 2.1.8102.813

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

WOT Notar

Join WebHost4Life.com