Enabling cxf:copy in calabash

Having trouble installing Oxygen? Got a bug to report? Post it all here.
bbfks
Posts: 3
Joined: Tue Jul 17, 2018 5:04 pm

Enabling cxf:copy in calabash

Post by bbfks »

Hello,

I write a pipeline in xproc and simply tried to copy a file.

At first, I tried to p:load and p:store a file, but

Code: Select all

<p:load >
<p:with-option name="href" select="concat('file://Z:/dirA/dirB/in/', $dirName , '/lala.xml')"/>
</p:load>
throws an error err:XC0011 Could not load file. When I use the @select-expression in p:store, it works for saving the file. Also, a relative path like './in/', $dirName , '/lala.xml' works.

Second, I tried to use a copy-step like

Code: Select all

<cxf:copy xmlns:cxf="http://xmlcalabash.com/ns/extensions/fileutils">
<p:with-option name="href" select="concat('./in/', $dirName , '/meta.xml')"/>
<p:with-option name="target" select="concat('./out/', $dirName, '/meta.xml')"></p:with-option>
</cxf:copy>
but these extension (sometimes pxf-Namespace) aren't enabled or not implemented.

So i have three questions:
[*]What is wrong with 'file://Z:/dirA/dir' in p:load?
[*]How can I enable the extension for calabash?
[*]Or, what is the best way to copy a file in Oxygen's calabash?

Thanks
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Enabling cxf:copy in calabash

Post by Radu »

Hi,

I'm not a Calabash expert but I will try to give you some suggestions:
[*]What is wrong with 'file://Z:/dirA/dir' in p:load?
I think you need to use either three slashes or one slash after the "file:" (whichever works). So never use two slashes, because this means that after the two slashes there would be a host name (in this case "Z:" which is incorrect, there are no host names in an URL when you refer content on the local disk.
[*]How can I enable the extension for calabash?
Maybe you can look at the example here:

http://xprocbook.com/book/refentry-49.html
[*]Or, what is the best way to copy a file in Oxygen's calabash?
In addition there is an XProc mailing list on which you could register and ask around:

http://lists.w3.org/Archives/Public/xproc-dev/

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bbfks
Posts: 3
Joined: Tue Jul 17, 2018 5:04 pm

Re: Enabling cxf:copy in calabash

Post by bbfks »

Thanks Radu!

Your advice for my first question is correct: 'file:/Z:/XX' is fine.

The import-statement for the extension doesn't work yet, unfortunately. But I will search teh malinglist.
Post Reply