1

My goal is to access an XML document sitting on an FTP server via an XProc. This particular FTP server requires authentication.

I am using the latest version of Calabash (1.1.6-96) on Java 8.

The following XProc works perfectly when authentication is not required:

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step" version="1.0">
    <p:input port="source">
    <p:document href="ftp://ftp.hq.nasa.gov/index.html"/>
    </p:input>
    <p:output port="result"/>
    <p:identity/>
</p:declare-step>

But if you try to access an FTP server that requires authentication:

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step" version="1.0">
    <p:input port="source">
        <p:document href="ftp://user:passwordd@ftp.example.org/example.xml"/>
    </p:input>
    <p:output port="result"/>
    <p:identity/>
 </p:declare-step>

Calabash will return the error:

ERROR: It is a dynamic error if the resource referenced by a p:document element does not exist, cannot be accessed, or is not a well-formed XML document.

Indicating that it cannot access the document.

Strangely, I have an older install of Oxygen (16.0) which came with an older version of Calabash (1.0.*) and the second XProc, which uses authentication, works perfectly fine. So, either something has changed within Calabash, or there is something else related to the older Oxygen/Calabash configuration that just makes it work.

I'm also open to alternative methods for accessing this file. I've already tried swapping out <p:document> for <p:http-request>, but this didn't pan out.

potame
  • 7,597
  • 4
  • 26
  • 33
rexsavior
  • 75
  • 4

0 Answers0