[XML-SIG] RE: [Zope] - XML-style DTML code

Lars Marius Garshol larsga@ifi.uio.no
29 Jan 1999 17:01:23 +0100


* Paul Everitt
| 
| <font size="<!--#var font_size-->">
| [...]
| <font size="<?ztml #var arg ?>">
| 
| which *not* valid XML...is it?

Neither of these are well-formed XML, since '<'s are not allowed in
attribute values. The spec is less clear than it ought to be on this[1],
perhaps, but xmlproc, XP, Lark and the Sun XML parser are all in
agreement that this isn't allowed. 

AElfred allows it, but then some checks have been left out of AElfred,
ostensibly for class file size reasons.

| That is, can you have markup inside markup?

No. Even if you write 

  <font size="&lt;?ztml #var arg ?>">

the PI in the attribute won't be recognized as one.
 
However, not knowing Zope I don't think this is fatal if Zope
substitutes this before any XML/HTML parsers see the result. If you're
trying to use XML/HTML/SGML syntax for a preprocessor then maybe that
isn't the way to go.

* Andrew M. Kuchling
|
| 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 right, yes.

--Lars M.

[1] The relevant part is a WFC to production 41 in section 3.1.