William F. Hammond writes:
 > Parser output is a nice linear stream.  My impression is that
 > processors are NOT expected to seek but just to make one pass through it.
 > (Then I believe that some processors construct the whole thing in
 > memory as a tree.)
its quite common to use a tree-based approach. DSSSL does this,
highly recommended!!!

 > 1.  Megginson's sgmlspl/sgmlspm comes with docs that may be used to
 > test the package.  The two enclosed demo processors are:
 >    (a) DocBook to LaTeX
 >    (b) DocBook to HTML
you probably want to look at Norm Walsh's  DocBook DSSSL
specifications, if this area interests you. they go way beyond what
Megginson did. they cover Docbook -> HTML, and Docbook -> TeX/RTF/MIF.