[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: disable-output-escaping don't work with CDATA spl

Subject: Re: disable-output-escaping don't work with CDATA spl chars (XSL)
From: karl Rajangam <karl_rajangam@xxxxxxxxx>
Date: Tue, 29 Mar 2005 08:31:09 -0800 (PST)
cdata disable output escaping
Thanks for the reply. I have 2 points to add here

Although, my xslt convertion of 
<AccomUnitName
StrippedName="aparthotel_g__246_tzens"><![CDATA[Aparthotel
G&#246;tzens]]></AccomUnitName> 

results in: Aparthotel G&#246;tzens 
in the javascript array (and so in html) 

instead of the correct value: Aparthotel Gvtzens

(1)
the xslt correctly displays the value when directly
used, I mean

<title><xsl:value-of select="AccomUnitName"
disable-output-escaping="yes"/></title> - WORKS FINE!!

(2) But while generating javascript like:

var accList=new Array(
<for-each ...> 
......
><xsl:value-of select="AccomUnitName"
disable-output-escaping="yes"/>
....

</for-each>
);

The array results like:

var accList=new Array("xyz,123,Aparthotel
G&#246;tzens");
 
Iam clue less why it works in direct html generation &
not while generating javascript? would be happy if you
could spot what might be the error. thanks in adv &
sorry for the trouble.

regards,
karl


--- David Carlisle <davidc@xxxxxxxxx> wrote:
> 
> CDATA _only_ affects the meaning of < and & so it is
> doing nothing in
> your source file (and XSLT will see teh same input
> whether or not it is
> there.
> By "special chars" you seem to mean accented letters
> but these are not
> "special" in XML  they are just normal character
> data.
> 
> Similarly, disable-output-escaping, when it works at
> all only affects
> the escaping of characters that need to be escaped,
> which typically is
> again just < and &.
> 
> That said, it might be that your posting has been
> mangled by an
> over-zealous mail system (this would not be the
> first time)/
> 
> Your posting (by the time it arrived here at least)
> claimed to be in ASCII:
> 
> Content-Type: text/plain; charset=us-ascii
> 
> 
> But your sample of your "bad" output
> was	
>   results in:
>   Aparthotel Gvtzens
> which looks OK on my latin-1 screen, although
> strictly speaking isn't
> ascii.
> 
> the "correct output"
> arrives here as
> 
>   then Iam getting the correct output: 
>   Aparthotel GC6tzens
> 
> 
> Which here looks like an accented A and a paragraph
> sugn, but is
> probably the right utf8 for that letter.
> 
> 
> Unless you used entity references in the unput eg 
> "& ouml;" then using
> a CDATA section around this string should make no
> difference at all to
> the output.
> 
> David
> 
> 	
> 
>
________________________________________________________________________
> This e-mail has been scanned for all viruses by
> Star. The
> service is powered by MessageLabs. For more
> information on a proactive
> anti-virus service working around the clock, around
> the globe, visit:
> http://www.star.net.uk
>
________________________________________________________________________
> 
> 


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.