[XML-SIG] problem with demo/xmlproc/dtd2schema.py

Joseph Wayne Norton norton@alum.mit.edu
Tue, 26 Feb 2002 16:19:37 +0900


Hello.

I just installed PyXML from the latest CVS checkout using python 2.1.2
on the linux platform.

Just for demo purposes, I tried running the dtd2schema.py demo utility
on the FIXML DTD (contained in the following bundle -
http://www.fixprotocol.org/cgi-bin/Spec.cgi?menu=4). However, I ran
into 2 issues listed below.

Any idea on where the problem might lie?
 
thanks,

- joe n.


1) I modifed the parsers/xmlplus/utils.py file by adding the missing
   locator parameter.

    class ErrorPrinter(xmlapp.ErrorHandler):
       """An error handler that prints out warning messages."""

    def __init__(self, locator, level = 0, out = sys.stderr):
        self.locator = locator
        self.level = level
        self.out = out

2) The reported errors seem correct but the warnings do not make sense
   to me.  I'm not able to see the corresponding issue in the dtd
   file.

norton@namaste:~/src/fix-doc$ /usr/local/Python-2.1.2/bin/python /home/norton/work/workbench/obj\
> /linux/PyXML-0.7/demo/xmlproc/dtd2schema.py fixml4.3v1.0.dtd.orig 

dtd2schema.py

Loading DTD...
WARNING: Attribute 'FIXTag' defined more than once at fixml4.3v1.0.dtd.orig:1292:1
WARNING: Attribute 'FIXTag' defined more than once at fixml4.3v1.0.dtd.orig:2178:1
WARNING: Attribute 'FIXTag' defined more than once at fixml4.3v1.0.dtd.orig:2621:26
WARNING: Attribute 'DataType' defined more than once at fixml4.3v1.0.dtd.orig:2622:26
WARNING: Attribute 'Value' defined more than once at fixml4.3v1.0.dtd.orig:2623:26
ERROR: Token 'NextDay' defined more than once at fixml4.3v1.0.dtd.orig:2707:16
WARNING: Attribute 'FIXTag' defined more than once at fixml4.3v1.0.dtd.orig:3954:2
WARNING: Attribute 'DataType' defined more than once at fixml4.3v1.0.dtd.orig:3955:2
WARNING: Attribute 'Value' defined more than once at fixml4.3v1.0.dtd.orig:3956:2
ERROR: Token 'M1' defined more than once at fixml4.3v1.0.dtd.orig:4203:95
ERROR: Token 'M2' defined more than once at fixml4.3v1.0.dtd.orig:4203:95
ERROR: Token 'MT' defined more than once at fixml4.3v1.0.dtd.orig:4203:95
Doing reverse-engineering...
Writing out schema