[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: FW: XML Mail

  • From: "Borden, Jonathan" <jborden@m...>
  • To: "XML Dev" <xml-dev@i...>
  • Date: Sat, 20 Feb 1999 14:54:23 -0500

xml mail example
John Cowan wrote:
>
>
> Robert Hanson wrote:
>
> > Am I wrong in saying that the answer would be that the symbol
> ">" should not
> > show up in the non-XML text anyway?  Wouldn't it be converted
> to an entity
> > reference?  Like this...
> >
> > "]]>" in the text body would become "]]&gt;"

	This is of course how the text "]]>" would be escaped in a text block. The
issue of dealing with "]]>" arises when we are in a CDATA block. In this
case "]]&gt;" remains CDATA, so John's suggestion about creating two CDATA
sections is a good one.

>
> The point was that conversions like ">" becomes "&gt;" aren't
> necessary if you use CDATA sections, only the one bad case of
> "]]>" which is illegal in plain XML character data as well as
> terminating the CDATA section, and so must become something like
> "]]]]><![CDATA[<", which is "]]" followed by "]]>" to end the
> CDATA section plus "<![CDATA[" to start another CDATA section
> plus ">".  There are other ways to do it, of course.
>
> --

	What I have done in XMTP is to CDATA all text based non-xml bodies (i.e.
mime:BODY) but escape the text nodes of mime headers. e.g. Message-ID:
<sample@somewhere> becomes:

<Message-ID >&lt;sample@somewhere&gt;</Message-ID >

as opposed to:

<Message-ID ><[CDATA[<sample@somewhere>]]></Message-ID >

just because, at the moment, this results in an average slightly larger
document (granted just a few bytes) and also because of vague stylistic
leanings. The best reason to <[CDATA[ the bodies is that it makes looking at
enclosed HTML ever so much easier.

Is there a good reason to prefer one over the other for headers?

Jonathan Borden
http://jabr.ne.mediaone.net


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.