""" Er, do you mean to generate a Relax NG (or possibly a DTD in fact) from some XML file??
If you do mean this then just think of that how you could generate grammar from some paragraphs of English text... Sorta non-trivial, if possible at all, isn't it? :-) """ Very well put. However, for RELAX NG there is a tool that might work for the OP: Examplotron. See: http://www-128.ibm.com/developerworks/xml/library/x-xmptron/ As I show in that article, you can use Examplotron from any XSLT processor, including one invoked through Python API. -- Uche http://copia.ogbuji.net -- http://mail.python.org/mailman/listinfo/python-list