Re: CDATA

Hello Mark

In fact, there are two things.
First, the public Amaya releases until now (including Amaya 5.3) didn't treat 
the CDATA tag and only its content was preserved and attached to the parent 
element. The current CVS version of Amaya preserves this tag and its content 
and creates a specific element in the document tree (for XML documents only).
The second thing is that script languages are not (yet) supported in Amaya, so 
they are not executed.

Regards

Laurent Carcone
Amaya team


> My understanding is that the CDATA tag is to circumvent parser problems =
> with unescaped characters, like <,  which are meant to operate in their =
> mathematical capacities rather than in their text capacities.
> 
> The problem that I am experiencing is that in AMAYA 5.3 CDATA is acting =
> as a "bit bucket of oblivion" - the code that is enclosed is totally =
> ignored. The code is a simple JavaScript code which checks the level of =
> a user's browser. Below a certain level, a window appears informing the =
> user of the availability of an updated browser version. In order not to =
> make a nuisance of itself, the checking routine writes a simple cookie =
> to a user's computer which it later checks so as not to run again when =
> the page reloads. This cookie lasts only for the duration of the =
> browsing session. The code uses a > symbol in its mathematical sense, so =
> this routine needs to be 'masked' from an XML parser. The syntax that I =
> am using is this:
>   <script type=3D"text/javascript"  xml:space=3D"preserve" =
> language=3D"Javascript1.2">
>   <![CDATA[
>                                   .
>                                   .  the actual JavaScript code is =
> inserted here
>                                   .
>   ]]>
>   </script>
> The code is not executing at all, and if I use comment markers, <!-- ... =
> -->, the result is identical. So, the questions are these: is my syntax =
> incorrect? -or- is this an implementation 'bug' in AMAYA -or- is this a =
> design 'bug' in the functioning of CDATA?=20
>                                                                          =
>    - Mark
> Mark Lee
> Smithsonian Institution
> Electronic HelpDesk & Software Distribution System Webmaster
> mlee@sivm.si.edu
> 

Received on Wednesday, 23 January 2002 09:28:59 UTC