emacs-devel
[Top][All Lists]
Advanced

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

Re: enriched-mode and switching major modes.


From: Eli Zaretskii
Subject: Re: enriched-mode and switching major modes.
Date: Fri, 24 Sep 2004 12:59:19 +0200

> From: Oliver Scholz <address@hidden>
> Date: Wed, 22 Sep 2004 12:01:27 +0200
> Cc: address@hidden, address@hidden, address@hidden, address@hidden
> 
> 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
> 
> <h1>Some <em>meaningless</em> text</h1>
> 
> 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)?




reply via email to

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