Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - DTD content to represent [Thread Next] Re: DTD content to representTo: NULL Date: 8/2/2007 8:08:00 AM raga wrote: > Hi > > When I have an element as > <book title ="xyz" author = "abc" > > <desc> > <![CDATA[Good book]]> > </desc> > </book > > how exactly the DTD should look like.? That's #PCDATA. The fact that this user has chosen to use a <![CDATA[]]> section rather than escaping individual characters -- neither of which is necessary in this example! -- is strictly a syntactic detail, not semantic, and as far as XML is concerned the two approaches are completely equivalent. Most XML applications don't even attempt to distinguish the two. Declare the element as having text content. Then, if the instance document's text contains characters XML has trouble with, do something appropriate. -- () ASCII Ribbon Campaign | Joe Kesselman /\ Stamp out HTML e-mail! | System architexture and kinetic poetry | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
