Re: [xsl] HTTP authentication support

Subject: Re: [xsl] HTTP authentication support
From: Elliotte Harold <elharo@xxxxxxxxxxxxxxx>
Date: Mon, 03 Sep 2007 13:49:59 -0400
Colin Paul Adams wrote:
"Elliotte" == Elliotte Harold <elharo@xxxxxxxxxxxxxxx> writes:

Elliotte> Which, if any, processors support HTTP authentication in Elliotte> the URLs they retrieve? Both for the initial document Elliotte> and documents retrieved by the document() function?

    Elliotte> For my current needs I only need to retrieve
    Elliotte> authenticated documents from one site, so a single
    Elliotte> command line option would be sufficient. However longer
    Elliotte> term I'd like to be able to retrieve documents from
    Elliotte> multiple sites with different usernames and
    Elliotte> passwords. Thus either an extended document function or
    Elliotte> support for https://user:pass@host/ style URLs would be
    Elliotte> required.

How are you suggesting these should work?

The simplest approach is merely to recognize URLs in the form https://user:pass@host/

This could be implemented in a current processor without any spec changes.

The alternative would be a new document function (initially in an extension namespace until XSLT 2.1) with two extra arguments. E.g.

document($uri-sequence as item()*, $base-node as node()) as node()*, $username as string, $password as string)

Details are probably a little off, but that's the idea.

-- Elliotte Rusty Harold elharo@xxxxxxxxxxxxxxx Java I/O 2nd Edition Just Published!

Current Thread