Re: [Zope] - Re: [XML-SIG] RE: [Zope] - XML-style DTML code
Surely, xml would allow <'s and >'s within quoted strings? if not, boy is that weird! ----- Original Message ----- From: Lars Marius Garshol <larsga@ifi.uio.no> To: <xml-sig@python.org>; <zope@zope.org> Sent: Friday, January 29, 1999 4:01 PM Subject: [Zope] - Re: [XML-SIG] RE: [Zope] - XML-style DTML code
* 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="<?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.
_______________________________________________ Zope maillist - Zope@zope.org http://www2.zope.org/mailman/listinfo/zope
* Phil Harris | | Surely, xml would allow <'s and >'s within quoted strings? It does not, unfortunately. Well, you can have them in entities, but if you use those entities in the wrong places then you're not well-formed. | if not, boy is that weird! It might be to keep people from thinking that <foo/> inside an attribute value is an element instead of just a string that looks like an element. --Lars M.
participants (2)
-
Lars Marius Garshol -
Phil Harris