Re: Syntax for controlling warnings?

Stefan Seefeld <[email protected]> Tue, 28 Mar 2006 09:44:20 -0500
Newsgroups gmane.text.xml.xmlroff.general
Message-ID <[email protected]>
Tony Graham wrote:
> As threatened, I have added "warning mode" to FoLibfoContext so you can select
> to suppress certain types of warnings.
> 
> xmlroff now defaults to setting "warning mode" so it suppresses "unsupported
> property" messages (which makes redundant a large part of libfo-compat.xsl).

Awesome !

> You can currently set the warning mode on the xmlroff command line using '-w
> <integer>', similarly to how you can set the debug level.
> 
> Magic numbers for debug level is fine (or, at least, not too bad) since if
> you're debugging, you're going to be exposed to all sorts of gory details
> anyway.
> 
> Magic numbers for warning mode seems less fine, since even casual users might
> want to set the warning mode.

I think this is fine, even for casual users, as long as the various levels
are well documented (for example in the 'xmlroff --help' message).

That said, I think textual mode attributes are fine, too. In particular,
if they can be accumulate, such as in 'xmlroff -w fo -w property ...'.

For the actual messages please keep in mind that these may be used for
regression tests, so it would be good to avoid any runtime data such as
process-ids, dates, etc.
In fact, if these messages have some substructure (e.g. start with the
line in the input at which the problem occured, it might be good to
formalize the message structure to allow third party tools to develop
parsers so xmlroff can be wrapped in a gui. (I'm thinking in particular
of gcc's errors / warnings, and how these can be transformed into
links in an emacs or eclipse console...)

Regards,
		Stefan


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642