Scenario with user-supplied output name

Post here questions and problems related to oXygen frameworks/document types.
martindholmes
Posts: 176
Joined: Wed Apr 20, 2005 5:43 pm
Location: Victoria, BC, Canada

Scenario with user-supplied output name

Post by martindholmes »

Hi there,

I need a scenario to work in the following way:

1. Get some user information before starting (using ${ask})

2. Pass this into the scenario, which eventually creates an output document whose name is based on one of the user input variables.

3. Open the output document in Oxygen.

I can frame this as an XSLT transformation only, or as an ant task which calls Saxon. The hard bit is getting access to that user-input supplied through ${ask} in order to get Oxygen to open the document automatically.

Any idea how I might do that?

Cheers,
Martin
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Scenario with user-supplied output name

Post by adrian »

Hi,

I'm guessing (from your question on the other thread) that the output document is generated with xsl:result-document.
If that's the case, I'm afraid there is no direct way to tell Oxygen what to open when the transformation has finished.

One way to do this indirectly (with the help of the stylesheet) would be to write into a fixed file (e.g. output.xml) the name of the dynamic output filename (e.g. <filename>myfile.xml</filename>) and use the editor variable

Code: Select all

${xpath_eval(doc('output.xml')/filename/text())}
to obtain it afterwards from that file. If Oxygen is associated with .xml files, you can use the ${xpath_eval()} in the Other location field after enabling Open in Browser/System Application.

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