Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] TagSoup, malformed comments and XOM

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: John Cowan <cowan AT ccil.org>
  • To: Steve Loughran <steve.loughran AT gmail.com>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] TagSoup, malformed comments and XOM
  • Date: Thu, 29 Jun 2006 09:40:57 -0400

Steve Loughran scripsit:

> Arguably: its a design-defect in XML that propagates down the food chain
> http://issues.us.apache.org/bugzilla/show_bug.cgi?id=17262

In XML's early days, it mattered very much that it be 100%
SGML-compatible, so that existing SGML tools could parse it properly.
It still matters, although now some of the adjustment has been on the
SGML side.

Anyway, in SGML a comment could appear inside any declaration and had "--"
at the start and the end of it. So this was a legal DOCTYPE declaration:

<!DOCTYPE html -- HyperText Markup Language -- SYSTEM "html.dtd">

An empty declaration like "<!>" was also legal. So from the SGML
viewpoint, an XML comment is an SGML empty declaration with a single
SGML comment in it. Obviously, a comment that's terminated by "--"
can't contain any occurrences of "--". So there you go.

--
John Cowan cowan AT ccil.org http://ccil.org/~cowan
Sound change operates regularly to produce irregularities;
analogy operates irregularly to produce regularities.
--E.H. Sturtevant, ca. 1945, probably at Yale




Archive powered by MHonArc 2.6.24.

Top of Page