On Thu, 9 Feb 2012 15:13:48 +0100
Alex Fernandez <alejandro...@gmail.com> wrote:

> Hi Steve,
> 
> On 2/5/12, Rob Oakes <lyx-de...@oak-tree.us> wrote:
> > Extremely good point, I'm also more comfortable with the HTML export
> > available in LyX. I initially was interested in eLyXer because I
> > thought I might be able to use it to help with an import filter as
> > well. I'm not sure that it can, though. As you note in your email,
> > it doesn't create a document model.
> 
> I am not sure what you mean by "document model". For the record,
> eLyXer creates an in-memory representation of the complete LyX
> document since version 0.36 (released back in 2009):
>   http://elyxer.nongnu.org/changelog.html
> When using the --lowmem option, this in-memory representation is
> created and flushed for each document block independently. Otherwise
> you load the entire document in memory.
> 
> Alex.

I'm pretty sure he meant "Document Object Model", or DOM, the object
hierarchy used to express HTML web pages.

http://en.wikipedia.org/wiki/Document_Object_Model

http://www.w3.org/DOM/

DOM forms an in-memory tree, and has functions to locate the current
node's first child, last child, next sibling, previous sibling, and
parent. Using those, if you think of the current node as a "checker"
you can move throughout the tree, you can get anywhere using those five
functions. What's also ultra-cool about it is you can recurse the tree
with an iterative loop -- very cool. Using DOM, instead of doing
complex algorithms with stacks in order to do everything in one pass,
you can have a second, third, fourth, infinitieth byte of the apple,
traversing the tree over and over again, doing one little task each
time, often with later traverses dependent on the changes made by the
earlier.

But each of these nodes takes memory, and using DOM as opposed to SAX
(an event driven parse method for HTML/XML) will outrun memory at a
certain document size.

HTH

SteveT

Reply via email to