[Moin-devel] Formatter Troubles
Ken Kinder
kkinder at rackspace.com
Tue Oct 15 13:09:03 EDT 2002
I've had, and continue to have, a great deal of difficulty writing my
own formatter. I have a mostly working DocBook/XML output formatter, and
here's how it works:
-- As particular methods are called on the formatter for the starting
and ending of elements, I keep track of context.
-- Each of these methods returns a blank string.
-- The document is build through a minidom object that I have to build
dynamicly by painstakingly construct by keeping track of the exact
context of where I am in the document.
-- I modified wiki.py to call formatter.rawtext() when it has raw
unformatted text instead of using the formatter. That's the only way I
can actually capture what's in between the tags.
-- Nothing is outputted until document end.
So, the problem is, I have text like
foo *bar*
What I get is:
<strong></strong>foo bar
Through debug variables, I've absolutely confirmed that strong is called
to open and close before "bar" is sent to rawtext.
Why might this be? Are there any other pitfalls you can think of that
are going to continue to bite me as a struggle mapping the way
formatters work to the way building an XML file via DOM work?
Thanks in advance.
-Ken
--
Ken Kinder
Requirements Manager; Core Team -- Rackspace Managed Hosting(tm)
210-892-4025 x1095
More information about the Moin-devel
mailing list