<[EMAIL PROTECTED]> wrote: > """ > I was looking for something similar (XML to DTD inference) but I didn't > find anything related in python. Trang > (http://www.thaiopensource.com/relaxng/trang-manual.html#introduction), > on the other hand seems impressive after a few non-trivial tests. It > would be neat to have it ported in python, at least the inference part. > > """ > > If you're OK with RELAX NG rather than DTD as the schema output > (probably a good idea if you're using namespaces), consider > Examplotron, which I've used on many such production tasks. > > http://www-128.ibm.com/developerworks/xml/library/x-xmptron/ > > It's XSLT rather than Python, but the good news is that XSLT is easy to > invoke from Python using tools such as 4Suite. > > http://uche.ogbuji.net/tech/akara/nodes/2003-01-01/python-xslt
Neat, though non-trivial XSLT makes my head spin. Just for kicks, I rewrote in python Michael Kay's DTDGenerator (http://saxon.sourceforge.net/dtdgen.html), though as the original it has several limitations on the accuracy of the inferred DTD. George -- http://mail.python.org/mailman/listinfo/python-list