From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: Indentation contest nxml vs xml-mode Date: Thu, 6 Mar 2008 19:31:49 -0800 Message-ID: <002101c88003$c7e4b190$0600a8c0@us.oracle.com> References: <47D03AE7.8070408@gmail.com> <00a601c87fba$febc3150$0600a8c0@us.oracle.com> <47D06DBC.3050800@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1204860822 25959 80.91.229.12 (7 Mar 2008 03:33:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Mar 2008 03:33:42 +0000 (UTC) Cc: "'Lennart Borgman \(gmail\)'" , 'Emacs Devel' To: "'Jason Rumney'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 07 04:34:08 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JXTLT-0002Qf-6j for ged-emacs-devel@m.gmane.org; Fri, 07 Mar 2008 04:34:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXTKu-0000w9-Um for ged-emacs-devel@m.gmane.org; Thu, 06 Mar 2008 22:33:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JXTKr-0000vs-B5 for emacs-devel@gnu.org; Thu, 06 Mar 2008 22:33:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JXTKp-0000vC-PF for emacs-devel@gnu.org; Thu, 06 Mar 2008 22:33:28 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXTKp-0000v1-ER for emacs-devel@gnu.org; Thu, 06 Mar 2008 22:33:27 -0500 Original-Received: from agminet01.oracle.com ([141.146.126.228]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JXTKl-00084c-9F; Thu, 06 Mar 2008 22:33:23 -0500 Original-Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m273XI73016226; Thu, 6 Mar 2008 21:33:19 -0600 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m26C323m012927; Thu, 6 Mar 2008 20:33:17 -0700 Original-Received: from inet-141-146-46-1.oracle.com by acsmt351.oracle.com with ESMTP id 3603145411204860711; Thu, 06 Mar 2008 19:31:51 -0800 Original-Received: from dradamslap1 (/141.144.88.222) by bhmail.oracle.com (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 06 Mar 2008 19:31:51 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <47D06DBC.3050800@gnu.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Thread-Index: Ach/2FEU0JnOoJ9HSmO024vgob0gmAAJOmpQ X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:91582 Archived-At: > Drew Adams wrote: > >> Try indenting the following in nxml-mode and xml-mode: > >> > >> > >> > >> Duh > >> > >> > >> > >> > >> I think xml-mode wins here. (For the record, I did not write that; Lennart did. I wrote that both indentation styles shown are poor.) > This has been discussed here before. Try it with some real elements... > > > > Duh > > > > > Which indentation looks more correct now? Again, neither is great, IMO. It is not obvious with your indentation that is a child of . I would always indent a child inside its parent, unless there is no choice. Try reading a 10-page XML schema whose indentation doesn't help you see the hierarchy. Indentation is important to human readers, even when it is insignificant in terms of XML semantics. > nxml's indentation is based on the fact that you are using > in a way that suggests that it has inline, not block semantics. What are "inline" and "block" semantics? There are no semantics implied by XML indentation, unless indenting changes significant whitespace (which it should not). Of course, anyone or any program is free to add additional semantics (their own interpretation) to code, but there is no such difference in the XML standards.