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

Uche Ogbuji uche.ogbuji@fourthought.com
Mon, 08 Jul 2002 22:15:18 -0600


> A quick search (i.e. 'find PyXML-0.7.1 -perm +111') doesn't turn up any 
> general-purpose applications of the sort I'm looking for - sorry if it's 
> there and I missed it (but why not 'chmod +x' it?).
> 
> Anyhow, I think it'd be immensely useful to include a command-line tool that 
> performs at least the following functions:
> 
>   * XML validation - returns a nonzero error code and
>     pretty/useful error message if validation fails

The 4xml command in 4Suite CVS does this, except for the error code return, 
which is a good idea.  Do you have some suggestions for good error codes to 
use?

http://4suite.org/docs/4SuiteCVS.xml


>   * XML document "flattening" (i.e. writes out copy of parsed
>     document, inlining external entities, potentially applying
>     DTD attribute defaults, and potentially also validating).
>     This would be even more useful, if it supported XInclude.

4xml does all this, including XInclude support.


>   * Listing URIs of all external entities referenced (defined
>     would be okay, too, but only as an option)

Doesn't do this yet, but if you post a feature request on the 4Suite SF 
feature request tracker, I can try to add it soon.

You're right that these features are very handy, which is why I added 4xml  :-)


-- 
Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
Track chair, XML/Web Services One Boston: http://www.xmlconference.com/
The many heads of XML modeling - http://adtmag.com/article.asp?id=6393
Will XML live up to its promise? - http://www-106.ibm.com/developerworks/xml/li
brary/x-think11.html