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

Must XML be SGML compatible? (Was: An incompatible CData idea)

  • From: Jarle Stabell <jarle.stabell@d...>
  • To: xml-dev@i...
  • Date: Tue, 28 Oct 1997 19:54:06 +0100

cdata compatibility
First of all, thanks for the quick and helpful replies I got about CData.

I knew about the CData marked section (soon I may also be able to remember
its syntax :-)), but it had slipped my notice that CData isn't allowed in
XML content models.

David Durand wrote:

>The marked section approach (SGML name for above ugly syntax) has all the
>advantages except that it's ugly (and thus arguably not as easy as it could
>be). But it is SGML compatible this way, and your proposal cannot be made
>compatible, so is not suitable for XML.

(My "ranting" below is of course not meant "against" Mr. Durand in any way,
who wrote a very clear and helpful answer to my original posting)

I find the requirement that XML must be SGML compatible a bit hard to swallow.

We all know the drawbacks of being compatible, that XML will not be as
clean/beautiful and easy to read/write/learn/teach as it could be if this
requirement was not present.
If XML becomes a great success, most XML users in five (?) years time will
likely not care about SGML compatibility (today they probably don't know
about XML and SGML at all, although many of them probably know (about) HTML.)

I don't see many benefits of being SGML (syntax) compatible (except for
some obscure "political reasons"), nearly the only thing I (not being a
SGML guru!) can think of are:

* The ability of using non-XML-aware SGML tools on XML documents.

How long will this benefit be of any substantial value?

If XML becomes very popular, I guess all SGML vendors will upgrade their
tools in a very short time, as explicitly supporting XML will be a nice
thing to have on the feature list (and is easy to implement if you already
have the SGML machinery).
One of the benefits may be that parsing XML documents will run noticeably
faster with a XML-specfic parser than a general SGML parser.

Perhaps most of the SGML vendors will do something similar to:

If This_is_a_XML_document Then //Aha!
irrespective of whether XML is SGML compatible or not?


(considering running for cover... :) )

Just to point out a small point re my suggestion:

<Element1><Element2*>This is a CData section.<Test>.</Element2></Element1>

is equivalent to

<Element1><Element2><![CDATA[This is a CData

and not to the shorter:
<Element1><![CDATA[This is a CData section.<Test>.]]</Element1>

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/
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...)


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.
First Name
Last Name
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.