[XML-SIG] I am confused...

Martin v. Loewis martin@mira.cs.tu-berlin.de
Sun, 28 Jan 2001 12:17:28 +0100


> However, when I made a prototype program
> and tried to generate page with Python XML tools (xml.*,
> not 4Suite, I used Python 1.5.2) - it was so slow
> that I just thrown the idea out.

Python 1.5.2 did not come with an xml.* package, so I wonder what
exactly you've been using. Perhaps xmllib? That *is* slow.

> So, my main question is:
> 
> - are Python XML tools (and which of them?) up to the task of facilitating
> site-generation with bearable speed?

That probably depends on many things: what exactly you want to
achieve, and what approximately you consider bearable. I personally
haven't tried myself to produce web sites with PyXML, but I haven't
heard complaints about unbearable speed so far.

I'd be really curious as to what transformations you wanted to
achieve, and how exactly you attempted them. E.g. choice of XML parser
matters significantly; there is a number of alternatives in PyXML.

> Right now I need to markup raw material for the articles
> by hand and I want to do it with less keystrokes. Just
> typing tags for '<author>This And This</author>' is not less typing
> How do you solve this?

Smart editors can help. For example, the psgml mode of Emacs can
perform auto-completion of tags (in particular of closing tags, but
also of opening tags if it sees a DTD).

> I am planning to do something like:
> 
> a::This And This
> h::The Headline
> ...
> 
> and then run custom pre-processor which will store this
> in proper format (I hope it will be XML if I find
> fast way to deal with it in Python)

That sounds also like a reasonable thing to do.

> The other way to do the same is to write special mode for Emacs, but
> I am not very proficient in that and I take into consideration that
> if somebody else will need to add material instead of me he will be
> not happy...

That should favour using XML all the time. People use different
editors, right. However, putting XML into a text editor is
straight-forward. Some people may want to use your Emacs macros for
convenience, but they don't *have* to - they might have some other
smart XML editor they know, and the output will still be XML.

Regards,
Martin