Newbie: config file import, and http-request

I'm beginning to experiment with replacing Ant with XProc.  One of my key items involves accessing an HTTPS server.  Of course, I don't want my credential details getting into the repository, so I would like to have a config file that provides username and password.

As near as I can figure, it should look like this (auth.xml):
<?xml version="1.0"?>
<c:param-set xmlns:c="">
 <c:param name="uri" value="https://[uri]"/>
 <c:param name="username" value="[name]"/>
 <c:param name="password" value="[pw]"/>

The early scratchings for the http-request as follows (fetch.xpl):

<?xml version="1.0"?>
<p:declare-step xmlns:c="" xmlns:p="" name="mir.fetch" version="1.0">
 <p:output port="result"/>
 <p:parameters name="parameters">
   <p:input port="parameters">
     <p:document href="auth.xml"/>
 <p:variable name="query" select="'version.xml'"/>
 <p:variable name="uri" select="//c:param[@uri]/@value"><p:pipe port="parameters" step="pipeline"/></p:variable>
 <p:variable name="username" select="//c:param[@username]/@value"><p:pipe port="parameters" step="pipeline"/></p:variable>
 <p:variable name="password" select="//c:param[@password]/@value"><p:pipe port="parameters" step="pipeline"/></p:variable>
   <p:input port="source">
       <c:request href="$uri$query" method="Get" detailed="true" username="$username" password="$password" auth-method="Basic"/>

But of course that doesn't work at all.  Two things immediately spring to mind:

1. Surely there's a better way than the ugly variable assignments.

2. Much to my surprise, variable substitution doesn't work. One doesn't use $variablename as in XSLT.  But I can't see that using concat() would work.  Do I end up using a bunch of ugly with-params?

What I want at this point is exceedingly simple: to get the URI, username, and pw from a file, and return the results of querying that uri.  If I'm on the right track, great; if not, can someone point me the right direction?

Thanks in advance!

Received on Tuesday, 21 September 2010 09:25:04 UTC