W3C home > Mailing lists > Public > xproc-dev@w3.org > February 2011

RE: Choosing a primary input doc by selecting a file from a dir?

From: <vojtech.toman@emc.com>
Date: Mon, 28 Feb 2011 03:52:56 -0500
To: <xproc-dev@w3.org>
Message-ID: <3799D0FD120AD940B731A37E36DAF3FE32B54CE735@MX20A.corp.emc.com>

Option 1 is only possible by creating a custom "open-file-dialog" step. If you use standard Swing JFileChooser, I think this should be rather easy to do as the JFileChooser API is synchronous/blocking. Once the step displays the file open dialog, the execution stops until the user submits/closes the dialog.

However, if you are using some kind of asynchronous API (event/callback-based) to select the file, or if you are in a web application environment, then you will get into trouble, because in that case, there is no way you can suspend the execution of the pipeline until a certain event occurs. To my knowledge, there are no publicly available XProc implementations capable of asynchronous or event-driven execution.

Personally, if I had to choose between option 1 and 2, I would choose 2 as that one seems like the most natural and safe way to do this. I would try to avoid adding interactivity to the pipelines; for the same reasons that you don't do this in XSLT or XQuery.


Vojtech Toman
Consultant Software Engineer
EMC | Information Intelligence Group

> -----Original Message-----
> From: xproc-dev-request@w3.org [mailto:xproc-dev-request@w3.org] On
> Behalf Of Manfred Staudinger
> Sent: Sunday, February 27, 2011 11:02 AM
> To: XProc Dev
> Subject: Re: Choosing a primary input doc by selecting a file from a
> dir?
> Hi again,
> The question I posted yesterday asks for
> 1. start the XProc pipeline (calabash) and from inside the pipeline
> 2. choose the primary input doc by selecting a certain file from the
> dir
> But it would be equally useful to me to have sort of a shell which
> 1. let me choose a certain file from a directory, and
> 2. starts the XProc with _that_ file specified for the primary input.
> Regards,
> Manfred
Received on Monday, 28 February 2011 08:55:29 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:08 UTC