From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Eli Zaretskii" Newsgroups: gmane.emacs.devel Subject: Re: enriched-mode and switching major modes. Date: Fri, 24 Sep 2004 12:59:19 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <01c4a225$Blat.v2.2.2$afcaa700@zahav.net.il> References: <200409042358.i84Nwjt19152@raven.dms.auburn.edu> <87llfn5ihw.fsf@emacswiki.org> <01c49c75$Blat.v2.2.2$7a37cb00@zahav.net.il> <01c49d70$Blat.v2.2.2$f7cfb860@zahav.net.il> <01c49da7$Blat.v2.2.2$cd5f7160@zahav.net.il> <01c49dc6$Blat.v2.2.2$3b624d40@zahav.net.il> NNTP-Posting-Host: deer.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7BIT X-Trace: sea.gmane.org 1096023743 8092 80.91.229.6 (24 Sep 2004 11:02:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 24 Sep 2004 11:02:23 +0000 (UTC) Cc: boris@gnu.org, emacs-devel@gnu.org, alex@emacswiki.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 24 13:02:06 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CAnq1-0008Ei-00 for ; Fri, 24 Sep 2004 13:02:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CAnw6-0007yE-9B for ged-emacs-devel@m.gmane.org; Fri, 24 Sep 2004 07:08:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CAnw0-0007y9-Gc for emacs-devel@gnu.org; Fri, 24 Sep 2004 07:08:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CAnvy-0007xx-GF for emacs-devel@gnu.org; Fri, 24 Sep 2004 07:08:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CAnvy-0007xu-Bs for emacs-devel@gnu.org; Fri, 24 Sep 2004 07:08:14 -0400 Original-Received: from [192.114.186.15] (helo=balder.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CAnpk-0004WM-Je; Fri, 24 Sep 2004 07:01:48 -0400 Original-Received: from zaretski ([80.230.143.223]) by balder.inter.net.il (Mirapoint Messaging Server MOS 3.3.7-GR) with ESMTP id DUN45346 (AUTH halo1); Fri, 24 Sep 2004 13:01:34 +0200 (IST) Original-To: Oliver Scholz X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 2.2.2 In-reply-to: (message from Oliver Scholz on Wed, 22 Sep 2004 12:01:27 +0200) 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:27532 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:27532 > From: Oliver Scholz > Date: Wed, 22 Sep 2004 12:01:27 +0200 > Cc: boris@gnu.org, eliz@gnu.org, alex@emacswiki.org, emacs-devel@gnu.org > > For simplicity, I focus on elements and character data here and talk > about them as "nodes" in a tree; thus we have "element nodes" and > "text nodes". An XHTML fragment like > >

Some meaningless text

> > Would be regarded as a `h1' element node which has three children: a > text node "Some ", an element node `em' (which has itself a text node > as its single child) an another text node " text". I'm not sure I understand why you want a tree-like representation for that. Is it only so you can find what you call ``the immeditate parent of the current node''? Perhaps it would be better to step back for a moment and describe the operations you will need to perform on fragments of the document text, and only _then_ think about an appropriate data structure. The fact that the XML people came up with a tree does not mean you should follow suit; there might be other appropriate data structures. For example, why not a list (which is a native data structure in ELisp)?