Sylvain ThÃnault wrote: > - prepare_input_source('relative.xml', '/base') -> /base/relative.xml > the sf submitted patch fix this one to.
Under no circumstances should '/base' + 'relative.xml' == '/base/relative.xml'. It would only be an acceptable result if you had '/base/' instead of '/base'. > - prepare_input_source('file:relative.xml', '/base') -> > file:/base/relative.xml Same here. This is incorrect. > this allow to have a xml file containing relative system identifiers > such as: > > <!ENTITY plans SYSTEM "file:plans.xml"> (1) 'file:plans.xml' is not a relative URI reference. (2) The result of merging the reference 'file:plans.xml' with *any* base URI must be 'file:plans.xml'. RFC 3986 sec. 5 governs this resolution. > <!ENTITY chatbot SYSTEM "chatbot.xml"> > > where parse(open('path to my xml file')) should not fail as it currently > does. Trust me, you'll find that it is much easier to implement RFC 3986 sec. 5 than it is to work around bugs in urllib and urlparse. I suggest porting Absolutize() and BaseJoin() from 4Suite's Ft.Lib.Uri. -Mike _______________________________________________ XML-SIG maillist - XML-SIG@python.org http://mail.python.org/mailman/listinfo/xml-sig