[XML-SIG] prepare_input_source and relative path
uche.ogbuji at fourthought.com
Tue Feb 8 00:33:01 CET 2005
On Mon, 2005-02-07 at 18:17 +0100, Sylvain Thénault wrote:
> On Monday 07 February à 10:04, Uche Ogbuji wrote:
> > file:///base + file:relative.xml -> file:///base/relative.xml
> > Since the file scheme's semantics are so wooly. But this wouldn't make
> > sense if you replaced "file" with "http".
> yep. But notice my patch doesn't change anything in that case, which
> will so behave according to urlparse.urljoin's behaviour:
> >>> urlparse.urljoin('file:///base', 'file:relative.xml')
> >>> urlparse.urljoin('file:///base', 'http:relative.xml')
Bleah. I guess that's why Mike Brown has had to create fixed versions
of all the Python stdlib URI functions for 4Suite :-)
> > Then there's the matter of a base URI given as
> > /base
> > in 4Suite we require all base URIs to be proper base URIs (so they must
> > at least have a scheme). I think this is a reasonable restriction based
> > on RFC requirements. Is there a valid user case where there would not
> > be a proper base URI, anyway?
> always having proper URI as base sounds like a reasonable restriction to
> me too, and I can't see user case where it would not. But we may have
> backward compat problem here if decide to care about it. Maybe
> InputSource.setSystemId could check for scheme presence, and if not add
> a file: and issue a deprecation warning ?
I do like the idea of a deprecation warning for this case, but what
about backwards compat? The warnings module dates from Python 2.1.
Uche Ogbuji Fourthought, Inc.
http://uche.ogbuji.net http://4Suite.org http://fourthought.com
Use CSS to display XML - http://www.ibm.com/developerworks/edu/x-dw-x-xmlcss-i.html
Introducing the Amara XML Toolkit - http://www.xml.com/pub/a/2005/01/19/amara.html
Be humble, not imperial (in design) - http://www.adtmag.com/article.asp?id=10286
Querying WordNet as XML - http://www.ibm.com/developerworks/xml/library/x-think29.html
Manage XML collections with XAPI - http://www-106.ibm.com/developerworks/xml/library/x-xapi.html
Default and error handling in XSLT lookup tables - http://www.ibm.com/developerworks/xml/library/x-tiplook.html
Packaging XSLT lookup tables as EXSLT functions - http://www.ibm.com/developerworks/xml/library/x-tiplook2.html
More information about the XML-SIG