-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Paul Everitt writes:
Chris wrote:
<?ztml #var arg ?>
Ahh, tis nuthin better than seeing a patch accompany a proposal :^)
Here's my main beef with this. The ostensible goal of the XML syntax is to make it parse-able by new tools. Unfortunately, a valid use of the current syntax:
<font size="<!--#var font_size-->">
which is legal, would become:
Sorry, I think this ain't legal, too. It's ok with sgml (at least nsgmls doesn't complain), but the XML specs say you can't use "<" inside attribute values at all.
<font size="<?ztml #var arg ?>">
which *not* valid XML...is it? That is, can you have markup inside markup?
I don't believe so, but have CC'ed this to the XML-SIG where the real experts hang out. PIs have to be outside other markup; I suspect the XML way of handling your second case would be to define an entity:
<font size="&arg;">
This is unfortunate for the application of HTML templating, because it collides with the use of entities in HTML. It also makes things difficult because the entity would have to be declared at the beginning of the file in the DOCTYPE declaration. Making the templating identical to XML, while keeping it conveniently human-editable, may not be possible.
What about this: <?ztml store("var arg") ?><font size="&ztml;"> where &ztml; is a dummy entity declared once in the DTD. This should be valid XML. The DTML engine then interprets the PI as "I store this string as a DTML command, then next time I encounter &ztml; I replace it with the results of the DTML command". I admit that this is less editable/readable than the current DTML syntax, but it's quite close, especially if the "store" PI is kept close to the &ztml; "placeholder". For the "simple" case of DTML commands within character data Chris' proposal still works: <P> ...plain text ... <?ztml "var arg" ?> ... </P> without the "cmd" assignment can be "executed" and replaced immediately without the entity stunt, and it is valid XML. Regards .co. +------------------------------------------------------- daisy bytes! --------+ Carsten Oberscheid co@daisybytes.su.uunet.de digital document processing http://www.pweb.de/daisybytes.su electronic publishing -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 5.5.3i for non-commercial use <http://www.pgpi.com> iQA/AwUBNrHbHowjR4jmR8/DEQKZpgCguMJhCDXh/sHIcP+uCeqz3PpF/PMAoP4U btpPwlkRa66yQC9vahx904oU =ibSb -----END PGP SIGNATURE-----
I've moved this BACK to the Zope list, this is getting tooooo XML-oriented for the problem I'm trying to fix :-) On Fri, Jan 29, 1999 at 06:00:29PM +0100, Carsten Oberscheid wrote:
<font size="<!--#var font_size-->">
which is legal, would become:
Sorry, I think this ain't legal, too. It's ok with sgml (at least nsgmls doesn't complain), but the XML specs say you can't use "<" inside attribute values at all.
No this isn't legal, I know that much. I'm not really sure that there's a "quick" solution to creating a fully well-formed XML solution... but read more below.
What about this:
<?ztml store("var arg") ?><font size="&ztml;">
where &ztml; is a dummy entity declared once in the DTD. This should be valid XML. The DTML engine then interprets the PI as "I store this string as a DTML command, then next time I encounter &ztml; I replace it with the results of the DTML command".
Hmm, I like this! It fixes the well-formed XML side, without creating a huge mish-mash of new syntax. &ztml; should always be null util ti's first initialized.... this would let you do neat things I think!
I admit that this is less editable/readable than the current DTML syntax, but it's quite close, especially if the "store" PI is kept close to the &ztml; "placeholder". For the "simple" case of DTML commands within character data Chris' proposal still works:
<P> ...plain text ... <?ztml "var arg" ?> ... </P>
without the "cmd" assignment can be "executed" and replaced immediately without the entity stunt, and it is valid XML.
Bless you for such a well formed option! What does everyone else think of gthis? It's a bit more "shoe-horning" into the parser, but perhaps ... I don't know it shouldn't that hard <handwave 1.3> :-) Chris -- | Christopher Petrilli | petrilli@amber.org
participants (2)
-
Carsten Oberscheid -
Christopher G. Petrilli