W3C home > Mailing lists > Public > w3c-sgml-wg@w3.org > June 1997

In defense of PEs (but not in XML) (was Re: Parameter entities vs. GI name groups)

From: Rick Jelliffe <ricko@allette.com.au>
Date: Sat, 21 Jun 1997 14:56:31 +1000
Message-Id: <199706210456.OAA27254@jawa.chilli.net.au>
To: <w3c-sgml-wg@w3.org>
 
> From: len bullard <cbullard@hiwaay.net>
 
> David G. Durand wrote:
> > 
> > the harders thing about learning PEs is that the string
> > substitution model is _not_ correct.
> 
> Please explain this.  String substitution is 
> precisely what they appear to be.  So, I am missing 
> something and wish tutoring.

Even though I don't think XML particularly needs PEs, I think they are being wrongly criticised because they are not like CPP
macros.  If you demand CPP macros, use them at your server!

PEs are very well-behaved "macros".  The constraints on their placement make them less easy to abuse. In particular, they stop a
"macro" from including text that goes outside the scope of the current production.   So when you read a DTD and you see a parameter
entity reference, you always know that you can skip over it and visually keep parsing: it will not contain any nasty suprises.   


Rick Jelliffe
Received on Saturday, 21 June 1997 01:26:08 EDT

This archive was generated by hypermail pre-2.1.9 : Wednesday, 24 September 2003 10:04:43 EDT