Re: AI-46: Make an explanation of the BP 24 issue

At 05:20 07/12/06, Yves Savourel wrote:
>
>Hi everyone,
>
>Here is a first try for some extra explanations for BP 24:
>
>
>Why do this:
>
>Some XML documents are used to store different types of data for the 
>purpose such as exchange or export. In some cases such data is
>itself XML data. For example, some XHTML content stored in a database can 
>be exported to an XML container file for localization and
>re-imported back into the database.
>
>Storing such XML data inside XML elements as text content (i.e. with its 
>markup tags escaped), has several drawbacks:
>
>- Any handling of the data is made difficult by the impossibility to 
>separate text from markup without extra processing.
>
>- Often, such content is put in CDATA sections, which has its own set of 
>issues. See Best Practice 20: Avoiding CDATA sections

Some more points:

- If there is a process turning markup into escaping,
  there is the danger of double escaping.

- Escaped markup obviously doesn't get checked for well-formedness
  (or validity).

I think namespaces should be mentioned, as one possible solution.
And we should clearly note that the use of escaping for literal
examples of markup is an exception to this BP.

Regards,     Martin.


#-#-#  Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University
#-#-#  http://www.sw.it.aoyama.ac.jp       mailto:duerst@it.aoyama.ac.jp     

Received on Thursday, 6 December 2007 05:21:45 UTC