Subject: Re: XML->sexpr ideas
From: Erik Naggum <>
Date: 21 Jan 2004 07:04:58 +0000
Newsgroups: comp.lang.lisp
Message-ID: <>

* Kenny Tilton
| Maybe I just misunderstood.  If quads just give me a link to the
| parent, well, in the case of the DTD, all the entities, elements, and
| attributes had the same parent, the XML dtd document.  So I imagined
| an awful lot of serial searching, repeated over and over again for the
| same message type, and yes, I made a gut determination that I could
| use the names of things as keys to a hash table and turn a record
| expansion into so many keyed lookups.

  You assume way too much.  I lack the information to unwind your many
  assumptions, but you may have noticed that I wrote that QAR would
  point to the element type, like the operator in the CAR of a sexpr.
  This is obviously a symbol-like structure.  For some reason, you have
  read what I wrote to refer to the prolog of an SGML/XML document,
  while I talked about the document instance.  I have written elsewhere
  that the very concept of a DTD was a huge mistake, so I really wish
  you had asked me instead of running with your assumptions.

  Just as Common Lisp is defined on objects in a tree structure, but
  still manages to have clearly defined semantics, I had hoped it would
  be rather obvious that I intend the same to hold true for the SGML
  tree.  Defining element types and processors on them is clearly part
  of the whole approach, and just as Common Lisp systems do not search
  source files linearly for definitions of operators, this part of the
  language is not restricted to being represented with quads.

  But I don't know where to begin to explain things to you so you don't
  assume things without asking.  It is very difficult to predict what
  someone who guesses a lot will need to invalidate an assumption.

| Do we need each child to refer to its parent?


| Why not a format with the parent first and then one or more children
| understood to share the same parent?

  That would require more pointers to be kept around in a stack-like
  structure when traversing the document, while an explicit design goal
  of my approach is to move all this information into the tree.

Erik Naggum | Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.