Click here to get back home

How does this work? (CDATA)

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
How does this work? (CDATA) test9991014 05-06-2008
Posted by Gus Richter on May 6, 2008, 8:07 pm
Please log in for more thread options
Stefan Ram wrote:
>> In XHTML, Script and Style element contents must be wrapped within a
>> CDATA marked section to avoid expansion of entities < and & as start of
>
> These characters can also be encoded by other
> well-known means without »CDATA«.

XHTML _will_ expand the entities.
Javascript does _not_ want them expanded.
The CDATA marked sections will _avoid_ expansion of the entities in the
XHTML document _within the CDATA marked sections_.

--
Gus

Posted by Jonathan N. Little on May 6, 2008, 10:54 pm
Please log in for more thread options
Gus Richter wrote:

> XHTML _will_ expand the entities.
> Javascript does _not_ want them expanded.
> The CDATA marked sections will _avoid_ expansion of the entities in the
> XHTML document _within the CDATA marked sections_.
>

One good reason why those how do not understand the ramifications of
using XHTML should stick to HTML.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Posted by Jukka K. Korpela on May 7, 2008, 2:08 am
Please log in for more thread options
Scripsit test9991014@yahoo.com:

> While visiting the apple.com page, I noticed an unusual
> form behavior that seems pretty nice, but looking at the
> source (below) it is unclear how it works. Is there a tutorial
> that explains it? Thanks.

You'll find plenty of JavaScript tutorials, mostly poor, on the net.
JavaScript is not HTML. Followups trimmed.

> <script type="text/javascript">
> // <![CDATA[

If _this_ puzzles you, as "(CDATA)" on the Subject line suggests, then
you have a problem with HTML as well. You can simply read the HTML
specs, specifically
http://www.w3.org/TR/xhtml1/#h-4.8

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/


Similar ThreadsPosted
Would UBB thread work for this? March 9, 2006, 2:13 pm
How to get MAP to work with mouseover April 10, 2006, 10:59 pm
CSS positioning: why does this work? May 15, 2006, 2:12 pm
favicon doesn't work in IE6 October 8, 2006, 11:48 pm
This work on your browser? January 8, 2007, 1:27 am
Does my menu work in IE7? March 29, 2007, 9:51 am
Why didn't the include work? April 6, 2007, 8:12 am
2nd List Doesn't Work March 30, 2008, 11:34 pm
Re: Why this html doesn't work? May 26, 2008, 1:38 am
window.open(...) does not work September 9, 2004, 12:28 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap