[Doc-SIG] Producing output

David Goodger goodger@users.sourceforge.net
Tue, 11 Sep 2001 22:59:31 -0400


[Paul, referring to my explanation that XML isn't just one format]
> Um. It wasn't obvious to me. And it still isn't. What are we talking
> about here?

Tony was talking about XML to TeX translators, and ReportLabs PDF
engine taking XML input. I thought people might get the impression
that there is such a thing as a simple "XML to TeX translator", when
there isn't (not without specific support files, anyway). XML itself
provides only the basic building blocks; each application defines its
own set of tags, their grammar and their meaning.

When somebody says "XML" it's not sufficient. They have to specify
their schema or tagset and its grammar, and the semantics too. The
grammar part is done via a DTD (Document Type Definition), which
defines the tags being used and how they relate. The DPS DTD is
provided in the spec directory, in gpdi.dtd, ppdi.dtd, and
soextblx.dtd. We might have a "DPS XML to TeX translator" someday, or
it may be a direct TeX output formatter component for the DPS.

> I know very little about XML, and I didn't see XML as of particular
> relevance for writing an output formatter.

It's not necessarily relevant, you're correct.

> I'm expecting to just be tree-walking a data structure (which may be
> a DOM, but who cares?).

Correct. And when required (or patches submitted), the dps/nodes.py
classes will grow appropriate methods to make this easier.

> Style sheets, namespaces and the like don't fit into my picture at
> all.

Style sheets (XSLT files) are one means of doing translations from XML.
I'm not familiar with XSLT, but the Python standard library has no
XSLT engine yet, so they're not really an option (yet).

> (*Must* get round to reading the code!)

(*Must* get round to writing more docs!)

-- 
David Goodger    goodger@users.sourceforge.net    Open-source projects:
 - Python Docstring Processing System: http://docstring.sourceforge.net
 - reStructuredText: http://structuredtext.sourceforge.net
 - The Go Tools Project: http://gotools.sourceforge.net