Scripting and XML

Simon St.Laurent SimonStL at
Sun Oct 19 03:52:06 BST 1997

XML at this point seems to be exceptionally well written for a model in which 
the data is passive and gets processed by an outside application - the 
parser/application combination.  It doesn't seem like it will work very well, 
however, with a model that is rapidly growing more popular in the HTML world: 
scripts included in the same document as the data.  While this blending of 
data and processor is admittedly a little unusual, it is becoming standard 
practice more and more often.  The W3C's Document Object Model proposals 
explicitly include XML, leading me to plot out the development of programs 
that take advantage of this powerful new tool.  (Or, at least it will be a 
powerful new tools when they figure out what it should look like and someone 
implements it.)

The rather gigantic problem I'm having is that scripting languages, including 
ECMAScript/JavaScript, use all kinds of markup characters.  In their context, 
a < character just means "less than".  I suppose I can use 
<![CDATA[...script...]]> inside the SCRIPT tags and hope that the vendors 
implement this properly, but it would be a heck of a lot easier to be able to 
declare <!ELEMENT SCRIPT CDATA>.  I never thought I'd complain about the SGML 
goodies that got dropped to make XML intelligible to ordinary humans and 
parsers, but it's happened. This seems like an easy thing to fix, and 
something that would bring XML more in line with other W3C projects. 

Any thoughts?

Simon St.Laurent
Dynamic HTML: A Primer

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as:
To (un)subscribe, mailto:majordomo at the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list