- From: <lee@sq.com>
- Date: Fri, 20 Jun 97 13:08:04 EDT
- To: w3c-sgml-wg@w3.org
James wrote: > I don't see much difference between > <!doctype foo system "foo.dtd"> > and > <!doctype foo [ > <!entity % e system "foo.dtd"> > %e; > ]> > It doesn't make much sense to me to allow one and not the other. Well, you don't _have_ to have two ways to do something :-) If all XML processors have to interpret a subset, then I personally would favour the second form above, as it allows a useful generalisation of CATALOG files (having them declare entities instead of using FPIs, for example, and havingthem in XML), and is simpler to explain from a process point of view. I was thinking of writing an xpp, a preprocessor that simply expanded all entity references, did file inclusion etc., possibly adding procinsts <?XPP-FILE "filename" line-number> for error reporting. > I think the complexity with PEs comes from allowing them inside > declarations. Allowing PEs which contain 0 or more complete > declarations seems unproblematic. > > If PEs are dropped (or disallowed inside declarations), I don't think > conditional sections would be much use. Yes. (I was going to do them in XPP) Maybe I could use SPAM instead of writing XPP, come to think of it? If there was a readily available multiplatform tool that expanded PEs, handled file inclusion and marked sections, they could be taken out of the XML spec and put in an entirely separate document, no? If marked sections are retained, I agree that PEs are needed. I would also support a totally string-replacement oriented definition of PEs, rather like troff's good old \*x, as this is easy to specify and implement. E.g., for a Simple Parameter Entity Reference: [BNF omitted] A Parameter Entity Definition associates a string with a given Parmeter Entity Name. If multiple Parameter Entity Definitions are encountered for the same Parameter Entity Name name, all but the first are ignored. Parameter Entity Reference ::= '%' name ';' where the name must already have been defined in a Parameter Entity Definition. A Parameter Entity Reference is immediately replaced with the string associated with the given _name_ in the corresponding Parameter Entity Definition. Parsing resumes at the start of that string. When the end of that string is reached, the XML processor shall continue to read the input starting immediately after the ';' in the Parameter Entity Reference. A Parameter Entity Reference may appear anywhere that markup is allowed: * inside a DTD * inside a prolog * as a guard for a marked section (qv) Similar definitions would be needed for a PE used to include a file. Lee
Received on Friday, 20 June 1997 13:08:15 UTC