On Tue, Dec 31, 2002, David Goodger wrote:
> Aahz wrote:
>>
>> Should it be a bug to prohibit this::
>
> Duplicate section names aren't prohibited, but they can't be linked to by
> name. IIRC, level-1 (INFO) system messages are produced, but normally they
> are filtered out of the output.
>
> I'll make a leap and guess that your OpenOffice XML Writer doesn't filter
> system messages. The code that does the filtering is in the Writer,
> although perhaps it ought to be in a separate transform (note to future
> self: think about this). Here's the applicable filter code from
> html4css1.py::
>
> def visit_system_message(self, node):
> if node['level'] < self.document.reporter['writer'].report_level:
> # Level is too low to display:
> raise nodes.SkipNode
Ah. Hmmmm.... I'm thinking I've seen some other useful INFO messages,
but perhaps they were level-2. Anyway, just to be safe, I've done this::
def visit_system_message(self, node):
print node.astext()
This way I won't miss anything. (Previously, I didn't implement
``visit_system_message()``, so it got bumped to ``unknown_visit()`` and
an exception.)
--
Aahz (aa...@py...) <*> http://www.pythoncraft.com/
"There are three kinds of lies: Lies, Damn Lies, and Statistics." --Disraeli
|