- From: Michael Kay <mike@saxonica.com>
- Date: Thu, 13 Sep 2012 08:21:52 +0100
- To: public-microxml@w3.org
- Message-ID: <50518990.8000806@saxonica.com>
On 13/09/2012 07:29, James Clark wrote: > On Thu, Sep 13, 2012 at 12:07 PM, Liam R E Quin <liam@w3.org > <mailto:liam@w3.org>> wrote: > > > It might be better to forbid newlines in attributes. > > > That's an interesting suggestion. Every option has its problems: > > a) allow newlines but normalizes to spaces (as XML): compatible with > XML, but leaves MicroXML with ugly and surprising > > b) disallow literal newlines: compatible with XML; users can still > include newlines using numeric character references; possibly better > error recovering when a closing quote is missing; maybe a surprising > limitation, but then again lots of programming languages don't allow > literal newlines in string literals > > c) allow newlines but don't normalize them: most useful behaviour but > incompatible with XML > > Currently the spec has (c), but I can see definite advantages to (b). > > Opinions? > > There's a lot of XSLT 2.0 code around that relies heavily on newlines in attribute values; it would be better if they weren't turned into spaces, but it doesn't matter greatly that they are (the main adverse effect is that when you transform a stylesheet, you lose the layout). I don't know if this is a use case worth bothering about, but disallowing literal newlines reduces the set of existing XML documents that are also microXML documents. Michael Kay Saxonica
Received on Thursday, 13 September 2012 07:22:15 UTC