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

Hi,

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.

Regards,
Vojtech


--
Vojtech Toman
Consultant Software Engineer
EMC | Information Intelligence Group
vojtech.toman@emc.com
http://developer.emc.com/xmltech

> -----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