- From: Ahmed Abdulhadi <abdulhadi.a.ahmed@gmail.com>
- Date: Fri, 22 May 2020 20:07:03 -0400
- To: "Piez, Wendell A. (Fed)" <wendell.piez@nist.gov>
- Cc: "xproc-dev@w3.org" <xproc-dev@w3.org>
- Message-ID: <CAG26oygRm31GuaoAZUjOZatdJYm5oSRJow70PQZEBCitFZ41gA@mail.gmail.com>
Thank You Gerrit and Martin. As Wendell has confirmed, it does indeed work!
Thanks,
Ahmed
On Fri, May 22, 2020 at 6:36 PM Piez, Wendell A. (Fed) <
wendell.piez@nist.gov> wrote:
> XProctors:
>
> This list is so awesome. I have done what Martin shows (using $ask in
> oXygen to bind the file path as an option), so I can confirm that it works.
> Kudos especially to Gerrit and Martin for taking the time to respond so
> capably (to say nothing of the skills), and to the entire oXygen team for
> making it possible. Amazing.
>
> Having said the more important may I sneak in a question? When (oh happy
> day) I migrate to XProc 3.0, what happens to my library of XProc 1.0? Is
> there an XSLT I could run to update my old pipeline files, or other obvious
> migration pathway? I looked in the spec for hints on backward compatibility
> and nothing jumped out.
>
> Thanks! Wendell
>
> -----Original Message-----
> From: Martin Honnen <martin.honnen@gmx.de>
> Sent: Friday, May 22, 2020 2:17 PM
> To: xproc-dev@w3.org
> Subject: Re: [xproc-dev] <none>
>
> On 22.05.2020 19:54, Imsieke, Gerrit, le-tex wrote:
>
> > instead of passing a document on an input port, it is possible to load
> > it from the prompted location. This is what Radu was trying to tell
> > you, by and large.
> >
> > You will declare a p:option for that (not a parameter, as Radu
> > suggested, but that’s just a detail); it seems that $ask is also
> > supported for options.
> >
> > You then use p:load[p:with-option[@name='href'][@select=$your-option]]
> > instead of p:input[@port='source'] inside the pipeline.
> >
> > One issue is that p:load expects a file URI but you will probably get
> > an operating system path from $ask. So on Windows you need to prepend
> > 'file:///' to the absolute path, replace '\' with '/' and at least a
> > space character in the file path (' ') with '%20'.
>
> To spell out what Gerrit suggested, the following works for me with oXygen:
>
> <p:declare-step xmlns:p="
> https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2Fns%2Fxproc&data=02%7C01%7Cwendell.piez%40nist.gov%7Cfbeb053c832a4e4e177308d7fe7c86b0%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C637257683102636635&sdata=tgF6RirqS6gWW79BVQo60JzvsILQto00lZG4dDQsbnI%3D&reserved=0
> "
> xmlns:c="
> https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2Fns%2Fxproc-step&data=02%7C01%7Cwendell.piez%40nist.gov%7Cfbeb053c832a4e4e177308d7fe7c86b0%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C637257683102636635&sdata=qIioKYSoW5Uh8zVQ%2BqieZAEYctzos7GWsKXwceJsI9A%3D&reserved=0"
> version="1.0">
> <p:option name="url"/>
> <p:output port="result"/>
> <p:load>
> <p:with-option name="href" select="$url"/>
> </p:load>
> <p:xslt>
> <p:input port="stylesheet">
> <p:document href="FirstPass.xsl"/>
> </p:input>
> <p:input port="parameters">
> <p:empty/>
> </p:input>
> </p:xslt>
> <p:xslt>
> <p:input port="stylesheet">
> <p:document href="SecondPass.xsl"/>
> </p:input>
> <p:input port="parameters">
> <p:empty/>
> </p:input>
> </p:xslt>
> <p:xslt>
> <p:input port="stylesheet">
> <p:document href="ThirdPass.xsl"/>
> </p:input>
> <p:input port="parameters">
> <p:empty/>
> </p:input>
> </p:xslt>
> </p:declare-step>
>
> In the XProc transformation scenario under "Options" for the "Value"
> field of the "url" I have entered
> ${ask('Url?', url)}
>
> And oXygen then offers a file selection dialog but returns a file: URL
> (due to the type argument "url" in the "ask" call) so there is no need to
> try to use replace to convert a file name into a URL.
>
>
Received on Saturday, 23 May 2020 00:07:27 UTC