W3C home > Mailing lists > Public > xproc-dev@w3.org > December 2017

Fwd: Calabash: pipeline prints itself, Morgana: access denied error

From: Achim Berndzen <achim.berndzen@xml-project.com>
Date: Sun, 10 Dec 2017 12:14:44 +0100
Message-Id: <57C5E601-D419-4132-BAA0-1F58FA699B42@xml-project.com>
To: XProc Dev <xproc-dev@w3.org>
Hi Andreas,

> Am 10.12.2017 um 08:40 schrieb Andreas Mixich <mixich.andreas@gmail.com>:
> If I try to run the pipeline via *MorganaXProc* I get an `access denied` error:
> 	err:XD0011: Couldnt load document 'file:/S:/Users/me/Eigene%20Projekte/eBook/You-Dont-Know-JS/': S:\Users\me\Eigene Projekte\eBook\You-Dont-Know-JS (Zugriff verweigert)
> My security configuration for this path looks like this:
> ```xml
> <mox:SecurityControl operation="read_resource" path="file:/S:/Users/me/Eigene%20Projekte/" allowed="true"/>
> <mox:SecurityControl operation="read_resource" path="file:/S:/Users/me/Eigene%20Projekte/eBook/You-Dont-Know-JS/" allowed="true"/>
> ```

The access denied error has nothing to do with the security system in MorganaXProc. It raises "Security exception ...". Access denied comes from your OS (Windows) telling you, there is no FILE called "S:\Users\me\Eigene Projekte\eBook\You-Dont-Know-JS" (This names a DIRECTORY, so you can not use if as uri for p:load).

I guess your problem results from a wrong context node in p:load: The p:iteration-source on the inner p:for-each produces a sequence of c:file-documents, so the xpath expression

      <p:with-option name="href" select="concat(c:directory/@xml:base, c:directory/c:file[contains(@name,'.md')])"/>

will always return an empty sequence. I guess what you want is something like:

<p:variable name="current-directory" select="...">
	<p:iteration-source select="c:file[ends-with(@name,'.md')]" />

		<p:with-option name="href" select="concat($current-directory,c:file/@name)" />

Hope that helps. 

Greetings from Wolfenb├╝ttel,


Achim Berndzen

<xml-project /> Achim Berndzen
Kleine Breite 26a
38302 Wolfenb├╝ttel, Germany

Received on Sunday, 10 December 2017 11:15:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:17:35 UTC