emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Indentation contest nxml vs xml-mode


From: Drew Adams
Subject: RE: Indentation contest nxml vs xml-mode
Date: Thu, 6 Mar 2008 19:31:51 -0800

> Though as Jason (I believe) pointed out when we discussed it 
> last time whitespace is not significant (most of the time ...) in 
> XHTML, only in XML. But it is sometimes -- and those times are
> really hard to detect since they might depend on the style sheet, or?

The significance or not of whitespace is not something up for a vote or a
beauty contest. It is well-defined for XML. And XHTML is XML.

What you might be trying to say is that many programs that use XHTML code do
not, themselves, detect or make use of whitespace that is, technically
speaking, significant (in terms of XML). That is another matter entirely.

Whether you or a Web browser does or does not actually distinguish between
two documents that differ in significant XML whitespace is not the point. 

There is a big difference between XML documents or fragments being
indistinguishable in terms of significant whitespace and their being
distinguishable. XML tools and databases go to great pains to preserve and
restore significant whitespace, even when they sacrifice insignificant
whitespace.

It's fine to have tools that also let you preserve insignificant whitespace
(that's sometimes important), or that also let you sacrifice whitespace that
is significant in terms of its XML meaning but might not be significant to
you. But tools should at a minimum have a mode that lets you preserve
significant whitespace. And indentation should not gratuitously alter
significant whitespace. Doing that would be akin to TAB indenting text in
the middle of a Lisp string.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]