Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP XML
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP XML Using ASP 3 and XML. See also the XML category for more XML discussions not relating to ASP. NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 5th, 2008, 06:09 AM
Registered User
 
Join Date: Sep 2008
Location: , , United Kingdom.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to pramod
Default 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 &amp;#26032;&amp;#30340;&amp;#24247;&amp;#37329;&a mp;#25552;&amp;#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
Reply With Quote
  #2 (permalink)  
Old September 12th, 2008, 09:11 AM
Registered User
 
Join Date: Sep 2008
Location: , , United Kingdom.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to pramod
Default

Hi,

I have found a work around for this and this seems to be working.
This can be placed in the function which calls for translating the xslt.

sTranslate = Replace(sTranslate,"amp;","")

This will get rid of amp; which prevents chinese characters to display.

Regards,
Pramod

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XSL problem with italian characters ciccio XSLT 4 September 6th, 2007 12:10 PM
problems with escaping characters when transformin lookingForAnswer XSLT 0 February 13th, 2007 06:29 PM
XSL Attribute ID jonty XSLT 1 March 28th, 2006 03:53 PM
Accented characters transformation in XSL ROCXY XSLT 3 January 19th, 2006 08:50 AM
onClick as xsl attribute? mlaba XSLT 1 September 10th, 2004 02:36 AM



All times are GMT -4. The time now is 01:21 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.