XC0012: XProc does not get access to directory on Mac

Questions about XML that are not covered by the other forums should go here.
afuchs
Posts: 19
Joined: Mon May 19, 2014 11:38 am

XC0012: XProc does not get access to directory on Mac

Post by afuchs »

Hello,

I am new to XProc, and hope therefore that this is something elementary, which can be solved in two clicks.
I have added to my pipeline, which worked well, read and wrote files in its directory, a p:directory-list step.

Code: Select all

<p:directory-list path="'IN'"/>
(I have changed 'IN' to many different things including an empty string. It does not make a difference.)
Now it fails with the message:

Code: Select all

Engine name: Add-on for Calabash XProc Engine
Severity: error
Description: err:XC0012 : XC0012 It is a dynamic error if the contents of the directory path are not available to the step due to access restrictions in the environment in which the pipeline is run.
I work on a Mac.
I have added OxygenXML as well as /opt/homebrew/calabash and also ruby to the "Full Disc Access" list.

What am I doing wrong?

Thank you in advance,
Alexey
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: XC0012: XProc does not get access to directory on Mac

Post by adrian »

Hi,

I'm afraid that this may be a macOS security problem rather than an XProc problem. Check if it does have access to the folder where the pipeline is run.
In the macOS settings under "Privacy and Security" check both "Full Disk Access" and "Files and Folders" (check for Documents or Desktop depending on where your files are located)
Note that if you run Calabash from the command line, you may also have to add to those lists the "java" executable that it is using.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
afuchs
Posts: 19
Joined: Mon May 19, 2014 11:38 am

Re: XC0012: XProc does not get access to directory on Mac

Post by afuchs »

Hi Adrian,

Thank you for the reply. It probably is a Mac security issue, but it cannot be something that is uncommon, I guess.
I have added calabash and java and jar to the "Full Disk Access" list, but it does not solve the problem I'm afraid.
I would be very thankful for any further suggestions.

Best,
Alexey
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: XC0012: XProc does not get access to directory on Mac

Post by adrian »

Hi,

My best guess is that it's not looking for the files in the expected location.
Try other values for p:directory-list/@path. I see that @path is of type xsd:anyURI:
http://www.datypic.com/sc/xproc/e-p_directory-list.html
Perhaps try an absolute file URL, or an absolute file path (should work on macOS).

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply