[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice
Subject:    RE: killu and dtd: typo and missing tag description
From:       Nicolas GOUTTE <nicog () snafu ! de>
Date:       2001-02-20 8:53:32
[Download RAW message or body]

Sorry, but that is completely wrong!

You seems to have missed the concept of CDATA sections in XML.
Please look at section 2.7 of the XML specification ( http://www.w3.org/TR/REC-xml )

In CDATA sections, you *do not* and you even *cannot* code characters as entities! \
Even <, > and & are *not* coded! Empty CDATA sections are allowed, so this XML file \
is valid!

CDATA sections are *not* comments. In general, tags starting with <! are not comments \
(cf. <!DOCTYPE ), just <!-- starts a comment.

-----Original Message-----
From:	Thomas Zander [SMTP:zander@planescape.com]
Sent:	Monday, February 19, 2001 7:27 PM
To:	koffice@max.tat.physik.uni-tuebingen.de
Subject:	Re: killu and dtd: typo and missing tag description

On Sunday 18 February 2001 10:45, Werner Trobin wrote:

> > And in the document description file "documentinfo.xml"
> > ---------------------------------
> > ...
> > <about>
> > <abstract><![CDATA[]]></abstract>
> > <title></title>
> > </about>
> > ..
> > 
> > The CDATA has only to be in the dtd description files not in
> > a realy xml file. Am I right ? I know that in this case it is
> > only a comment <! ...>. But shouldn't  it be removed ???

Correct.

> 
> No. This is legal XML, AFAIK. You can store "plain text" this
> way and you don't have to encode the entities (<, >, &, ").

It is not, <!-- something --> would be.

But the first question was what the text CDATA was doing there. And basically 
I think that Enno is right, it is not nice to put it there, even if meant as 
a comment..

In a DTD the CDATA is meant a character data. And everything can be placed 
there, but not the characters < & (and sometimes the > ), they have to be 
encoded or they will be interpreted as XML tag-characters.

Basically the above XML-code is incorrect and the parser would have every 
right to completely ignore the whole file since it is not a valid XML file.

-- 
Thomas


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic