[XML-SIG] Proposal: command-line interface to parser

Lars Marius Garshol larsga@garshol.priv.no
17 Aug 2002 17:53:25 +0200


* Matt G.
| 
|     * Print the status, warning, and error messages to stderr.  I
|       think this is best done by having the parser throw an
|       exception object (with all the relevant information about
|       the error or warning), which the application catches.  I'm
|       a bit lost on the benefit of registering an error handler.

In most languages you can't return to where the exception was thrown
and continue computing, which means that if you want to be able to
continue parsing after errors/warnings this approach is much easier
than using exceptions.

Not that that is very relevant to command-line tools...
 
|     * Make validation an option, rather than a separate command

Sounds reasonable to me.
 
|     * Supply an option to use an SGML catalog file (support
|       exists for both, right?), though I suppose you could
|       try to parse a catalog as an SGML catalog file, when it
|       fails validation as an XML Catalog file.

xvcmd.py and xpcmd.py support both.

| Is anyone unconvinced that another application is warranted or of
| the value of including such an application in PyXML? 

Actually, I think it's a good idea. Use the existing parsers and write
it, then submit it to PyXML, and see if it gets in.

Another thing that might be interesting is a graphical XML parser
front-end. I wrote the beginnings of one, but it needs more work to
become really useful.

-- 
Lars Marius Garshol, Ontopian         <URL: http://www.ontopia.net >
ISO SC34/WG3, OASIS GeoLang TC        <URL: http://www.garshol.priv.no >