XML PI = FSI ? (was In defense of PEs ...)

What about this:
------------------------------------------------------------------------
----------------SOF
<?XML server-macro="cpp" ?>
 
#define TEXT  ( q | emph | name )
#define LINKS ( xref | a | link)
<!DOCTYPE book SYSTEM "book.dtd"
[
	<!ELEMENT book - - ( #PCDATA | TEXT | LINKS)*>
]>
#undefine TEXT
#undefine LINKS

<book>blah</book>
------------------------------------------------------------------------
-----------------EOF

In other words, what about forgetting about PEs and just let the
document nominate its own server-side macro-preprocessor.  One of these
could be SGML PEs, but that is a system matter. The XML documents
delivered to the notional client would have the macros expanded or the
PEs dereferenced.  (That gives us supply-side includes as well.)

<!ATTLIST #NOTATION XML  
	-- XML encoding PI --
	version          NUTOKEN                "1.0"
	encoding       NUTOKEN                "utf-8"
	server-macro  ( PE | CPP | M4 | ...)  PE --
	...
>

One of the reasons for SGML entities is to allow notatations. If
notation info for NDATA is supplied out of band by MIME headers or by
self-identifying files, and if client-side general external entities
are being superceded by xml-links, then maybe we can just forget PEs
also.  Maybe, for XML,  stupid macro-replacement notionally performed
at the server side is all that is needed.

Which raises the interesting parallel, that the XML encoding PI is
really an inline version of the FSI (at least, of the contents of the
FSI pseudo-start-tag).  

In which case, if the construct is already in XML, why not allow XML
links to be FSIs?


Rick Jelliffe

p.s. To give a flavour of the SGML from the Web TC, here is the above
example with the new SGML header, and a SEEALSO application
requirements parameter. An editor application editing this document
could stick any resources given in the SEEALSO parameter into the
Help... menu of the editor automatically!
------------------------------------------------------------------------
----------------SOF
<?XML version="1.0" encoding="8859-2" server-macro="cpp" ?>
<!SGML PUBLIC "IDN//W3C.ORG//SD XML Version 1.0//EN">

#define TEXT ( q | emph | name )
#define LINKS ( xref | a | link)
<!DOCTYPE book SYSTEM "book.dtd"
	SEEALSO SYSTEM "http://www.w3.org/help/how-to-use-book-DTD.html"
[
	<!ELEMENT book - - ( #PCDATA | TEXT | LINKS)*>
]>
#undefine TEXT
#undefine LINKS

<book>blah</book>
------------------------------------------------------------------------
-----------------EOF

Received on Saturday, 21 June 1997 14:50:41 UTC