W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2005

[whatwg] [wf2] Note about XML attribute value handling

From: Anne van Kesteren <fora@annevankesteren.nl>
Date: Wed, 11 May 2005 01:37:14 +0200
Message-ID: <428145AA.6000803@annevankesteren.nl>
Mikko Rantalainen wrote:
>> Could we perhaps make a note about this in the WF2 specification:
>>   <http://www.w3.org/TR/REC-xml/#AVNormalize>
>> Preferably somewhere close to <input type=hidden>. My weblog used to 
>> run on XHTML and previewed weblog comments where stored inside the 
>> VALUE attribute of a hiddenINPUT element (actually, that is still the 
>> case). As XHTML means the above mentioned XML rule applies all 
>> formatting got lost. That was a major problem for white-space 
>> significant replies. (Replies using the PRE element.)
> <input type="hidden"> works just fine with existing UAs even when one 
> uses application/xhtml+xml provided that all meaningful whitespace has 
> been converted to entities. &#10; for LF, &#13; for CR and so on. PHP, 
> for example, provides function htmlentities() exactly for this purpose.

Really? Why would 'htmlentities' be useful in an XML environment? Also, 
getting HTML *entities* in your XML document doesn't seem like a good thing.

(I'm aware of possible solutions. It's just that you don't normally 
think of this. Even Tim Bray - editor of the XML specification - called 
it "broken as designed".)

  Anne van Kesteren
Received on Tuesday, 10 May 2005 16:37:14 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:41 UTC