escaping of characters in xsl:attribute
Hello!
I have a problem with escaping of characters when using xsl:attribute, this is an example of my xsl
<a href="/{../../@sFolder}/{../@sFolder}/{@sFolder}/" class="breadcrumb">
<xsl:attribute name="title" >
<xsl:value-of select="@sTitle" disable-output-escaping="yes"/>
</xsl:attribute>
<xsl:value-of select="@sTitle" disable-output-escaping="yes"/>
</a>
my xml document looks like this, with the value of document title already encoded. (if I dont escape the title I just get questionmarks for some characters like #260; and #321; when i print in outside an xsl:attribute)
<level4 nStructureID="661" nParentID="658" nRootID="1" nStructOrder="661" nStructLevel="4" nTemplateID="6" nSiteID="1" nContentID="667" sTitle="New Congenbill #26032;#30340;#24247;#37329;#25552;#21333;" sFolder="newcongenbill" nLanguageID="1" dtLiveDate="20080528" dtArchiveDate="20090528" dtDocDate="" dtDeleteDate="20100528" dtClosingDate="" />
this will produce the following html:
<a href="/shippingebrief/chineselanguageebrief/newcongenbill/" class="breadcrumb" title="New Congenbill &#26032;&#30340;&#24247;&#37329;&a mp;#25552;&#21333;">New Congenbill #26032;#30340;#24247;#37329;#25552;#21333;</a>
but what I want is:
<a href="/shippingebrief/chineselanguageebrief/newcongenbill/" class="breadcrumb" title="New Congenbill #26032;#30340;#24247;#37329;#25552;#21333;">New Congenbill #26032;#30340;#24247;#37329;#25552;#21333;</a>
There is an extra text amp; appended to the tooltip.
When i print the text in the browser then it works fine but in the tooltip its creating a problem.
I am using ASP.
Is this a bug or the expected behaviour and if so, is there some workaround?
Thanks for your reply.
Thanks,
Pramod Bhagat
|