Hmmmm,  that's a specific point of view.

I'm not aware on the previous discussions about CDATA.
I'm just looking at the W3C XML specifications and the DOM 3 specifications.
They both support CDATA, they both define rules for it. A CDATA
is allowed at any place where charatcer data may occure.

Thus, a generic tool like XML encryption shall support CDATA in every
aspect and shall not raise own restrictions about the usage. That's why
the original author of XMLCipher and myself were looking at the most
generic serializer (and obviously Xerces is the first place to look for
such a tool :-)  )


Some other thoughts (outside the current xmlsec discussion):

If it is just "syntax sugar" and Parsers can replace it with Text... why
does
DOM defines an own Node type for it (wouldn't Text be enough)?
If a Parser works according to the XML Specs it produces CDATA
nodes and a serializer shall be able to reproduce the XML document
with CDATA.

If CDATA was meant as an aid to simplify authoring then there is no need
to have an own node type because it could be all done in a text node. But
no specification (XML nor DOM) explicitly states that, DOM 3 even has
detailled information how to deal with CDATA sections.

It is a quite different thing how applications use CDATA, there may be
different ways to use it. And it is the applications decisions how it is
used.
Sure, there are good designs and not so good designs but as long as they
are in the scope of the specs every usage is valid.


Regards,
Werner

----- Original Message -----
From: "Elliotte Rusty Harold" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, January 04, 2004 4:36 PM
Subject: Re: XMLCipher - enhancement for content encryption


> At 11:05 AM +0100 1/4/04, Werner Dittmann wrote:
>
> >It might happen that the receiver needs the information that some
> >data was a CDATA section (we do not know what type of
> >applications will use XML Encryption and how they deal
> >with the XML documents).
>
>
> If that's the case, then somebody is making a mistake. You should
> *never* depend in any way on the information that the content was in
> a CDATA section as opposed to using character or entity references.
> See http://www.cafeconleche.org/books/effectivexml/chapters/15.html
> for deeper discussion of this issue.
> --
>
>    Elliotte Rusty Harold
>    [EMAIL PROTECTED]
>    Effective XML (Addison-Wesley, 2003)
>    http://www.cafeconleche.org/books/effectivexml
>
http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA

Reply via email to