Scenario with user-supplied output name

Post here questions and problems related to oXygen frameworks/document types.
martindholmes
Posts: 107
Location: Victoria, BC, Canada

Scenario with user-supplied output name

Fri Jul 10, 2015 1:32 am

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

Re: Scenario with user-supplied output name

Fri Jul 10, 2015 3:46 pm

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

Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: No registered users and 2 guests