[DOC-SIG] Re: What does this mean for Python?

Paul Prescod papresco@technologist.com
Thu, 12 Mar 1998 10:31:33 -0500


Okay, let's play acronym expansion. (BTW, with so much XML/SGML activity
projected for the next few months, I think we really should have a
mailing list or SIG for now, I'll keep doc-sig in the loop as I was
instructed the last time we discuss this stuff)

Fredrik Lundh wrote:
> 
> >1) SAX driver for xmllib

SAX ("Simple API for XML") is an event-driven API for getting
information out of SGML documents.

http://www.microstar.com/XML/SAX/

It has all of the usual benefits of APIs. You can swap in your favourite
(fastest, or most convenient) parser.

> >2) xmlproc uses SAX natively instead of using a driver, although it
> >   will probably need to add some things beyond SAX later

xmlproc is Lars' software. When he says he "uses it natively" instead of
"through a driver", I think he means that his software is not yet set up
to drop in someone else's parser easily.

> >That gives us well-formedness-checking and a simple standardized
> >event-based API.

Well-formedness-checking is simple syntactic checking. SAX is the
simple, standradized event-based API.

> >Building on that I'd planned on making:
> >
> >1) A simple ESIS outputter, for demo/testing purposes.

ESIS is a simple linearized format for the output of SGML documents
where every element starts on a line, attributes are on their own lines
and so forth. ESIS is not SGML. It's like a "pickle" of SGML. I would
encourage Lars to use a newer XML linearization format:

http://www.jclark.com/xml/canonxml.html

> >2) A grove builder, eventually with DOM support, although there are
> >   things I dislike about DOM.

A grove is an abstract model for the in-memory representation of SGML
documents. The DOM ("Document Object Model") is a world wide web
consortium API for accessing the contents of an SGML document. In other
words the grove represents the data model and the DOM is a particular
API for providing access to it.

So where SAX concentrates on generating *events* for stream-based
handling of documents, the DOM is an API for explicitly traversing and
navigating an in-memory tree.

> >3) A validator.

A validator reads the declarations in the document type definition and
verifies that the document conforms to it.

Paul Prescod  - http://itrc.uwaterloo.ca/~papresco

Our lives shall not be sweated from birth until life closes;
Hearts starve as well as bodies; give us bread, but give us roses.
    - http://www.columbia.edu/~melissa/petronella/songs/bread-roses.html

_______________
DOC-SIG  - SIG for the Python Documentation Project

send messages to: doc-sig@python.org
administrivia to: doc-sig-request@python.org
_______________