Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   CDATA question (http://www.velocityreviews.com/forums/t168560-cdata-question.html)

Razvan 01-11-2005 10:45 AM

CDATA question
 


Hi !





Quote from www.w3schools.com:

CDATA is text that will NOT be parsed by a parser. Tags inside the text
will NOT be treated as markup and entities will not be expanded.


However I just inserted a character entity inside an attribute and the
entity was expanded by XML Spy. Who's right ? XML SPY or the w3schools
?




Regards,
Razvan


David Carlisle 01-11-2005 11:04 AM

Re: CDATA question
 
"Razvan" <mihai11@mailcity.com> writes:

> Hi !
>
>
>
>
>
> Quote from www.w3schools.com:
>
> CDATA is text that will NOT be parsed by a parser. Tags inside the text
> will NOT be treated as markup and entities will not be expanded.
>
>
> However I just inserted a character entity inside an attribute and the
> entity was expanded by XML Spy. Who's right ? XML SPY or the w3schools
> ?
>
>
>
>
> Regards,
> Razvan


The quote is presumably about CDATA sections <![CDATA[....]]> where it
is true that the (only) effect is that < and & no longer start markup
but are just treated as normal characters.

Entity and character references are expanded in attribute values. The
fact that the DTD declarations of attributes use the same word CDATA
is a historic artifact coming from SGML but there isn't really any
connection between these two uses of the word in an XML context.

David



All times are GMT. The time now is 04:44 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.