p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   XML (http://p2p.wrox.com/forumdisplay.php?f=91)
-   -   Is CDATA same as xsd:String (http://p2p.wrox.com/showthread.php?t=71162)

rajat_aggarwal03 October 24th, 2008 01:10 AM

Is CDATA same as xsd:String
Hi All,

I was just wondering if a CDATA section defined in a DTD is same as using xsd:string to define an element in XSD?

Please help!!!!

Thanks and Regards,

Rajat Aggarwal

rajesh_css October 24th, 2008 02:47 AM

PCDATA is parsed character data.
Text found between the start tag and the end tag of an XML element.
PCDATA is text that WILL be parsed by a parser. The text will be examined by the parser for entities and markup.

CDATA means character data.
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.

xsd:string its a string datatype which will be parsed and this is of type

mhkay October 24th, 2008 01:05 PM

>a CDATA section defined in a DTD

I think you are confusing different concepts here.

CDATA sections are not defined in a DTD. However, DTDs do use very similar keywords for two other (but different) concepts: CDATA is one of the attribute types available (the others are ID, IDREF, NMTOKENS, etc), and #PCDATA can be included in a content model for elements to indicate that it can contain text (rather than or as well as child elements). Both of these concepts are quite similar to the XML Schema concept of xs:string.

Michael Kay
Author, XSLT 2.0 and XPath 2.0 Programmer's Reference

All times are GMT -4. The time now is 09:03 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.