[XML-SIG] value error when parsing XML

Mike Brown mike at skew.org
Tue Aug 3 00:57:56 EDT 2004


Ajay Brar wrote:
> i get a value error when parsing an xml file. This is because it can't 
> find the DTD -
> ValueError: unknown url type: ../um_xml/um.dtd
> 
>  From what i have discovered in the archives, this happens when your XML 
> and DTD file are not in your current directory
> i have the directory structure
> home
>       user - this is where i am running the script from
>       um_xml- this is where the xml and dtd are
> 
> can someone please tell me how i can workaround this problem. the script 
> executes fine when the xml and dtd files are in user/. But i don't 
> really want to put them there.
> any ideas?
> 

The "current directory" / "where you are running the script from"
has no bearing on the interpretation of URLs in the document (not
directly, anyway).

If both files are in the same location, you only need to refer to the
DTD via the URL um.dtd (no add'l path info prepended to it).



More information about the Python-list mailing list