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

Re: BUG?? - please help (JavaScript inside CDATA)

Subject: Re: BUG?? - please help (JavaScript inside CDATA)
From: juggy@xxxxxxx
Date: Sat, 3 Jun 2000 14:47:17 +0200
javascript inside cdata
Hi,

On 30 May 2000, at 14:01, Dan Morrison wrote:

> juggy@xxxxxxx wrote:
> > 
> > Hi there,
> > 
> > I just discovered something that appears to be a nasty bug. I am
> > using the MSXMLDOM in a ASP to convert XML + XSl to HTML.
> 
> First, thanks for reminding me what an issue it can be learning a
> third language by way of a second!
> 
> I've noticed the high number of German (and Italian, and...)
> contributors to this group and XML resources in general before.
> Sometimes I've wondered how hard this can be, but decided that it's
> the syntax of the code in question that we're both looking at, and the
> language shouldn't be an issue.
> 
> Your code showed that there's a LOT of context in the variable names
> (and content) used in examples which is very important. By this I mean
> I had to think a lot harder about what you were doing than usual.
> Luckily my German is still good enough to hold up a conversation
> (although I can't spell)...
Sorry about that, but if I start changing my complete file to English 
before I send it, I wouldn't ever get finished. But I'll try to give 
shorter examples and put them down in English.
> 
> 
> SO.. Language issues aside, what you're trying looks OK. 
> We assume you're using the updated MSXML. (RIGHT?!)
> 
> My suspicions would fall upon the & characters that appear once or
> twice in your CDATA. I know CDATA is supposed to be safe from parsing,
> but in many implimentations, it's NOT.
> 
> The attitude I've seen here is that "&" IS, to all intents and
> purposes the same thing as & and (the numerical version which I
> can never remember). This means that parsers are a bit too keen to
> escape it for internal representation. As a keen client-side scripter,
> I disagree, but just work around it. Often I write code that writes
> code that writes code (jumping through three languages on the way). I
> prefer to do my own escaping. There are some output-method settings
> which I believe help.
> 
> SO, see if you get better results if your content strings have no &
> characters in them.
Nope, it doesn't make a difference.
> Also try
>   <xsl:script language="JavaScript">
>     <xsl:comment>
>       <![CDATA[

>         ... ..
Doesn't work: "Object expected"??. 
> As it's 
>   A: more correct. 
>   B: safer from the parser.
s.above.
> If not, what was the view-source output when you did it client-side?
It's perfectly correct - it just has the wrong strings at the wrong 
places.
> Paste that page into a syntax-coulouring editor and it may throw some
> light on things.
> 
> .dan.
> 

Thanks dan, but I haven't got further. I believe that there is 
someting wrong with the MSXML. Maybe find a more up-to-date 
version, though I'm VERY keen on running updates.


Juggy
 
> :=====================:====================:
> : Dan Morrison        : The Web Limited    :
> :  http://here.is/dan :  http://web.co.nz  :
> :  dman@xxxxxxxx      :  danm@xxxxxxxxx    :
> :  04 384 1472        :  04 495 8250       :
> :  025 207 1140       :                    :
> :.....................:....................:
> : If ignorance is bliss, why aren't more people happy?
> :.........................................:
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.