External Variables for XQuery

Oxygen general issues.
ajwei810192
Posts: 2
Joined: Thu Nov 25, 2010 1:50 am

External Variables for XQuery

Post by ajwei810192 »

Hi,

Not sure if what I am doing here is possible, I am trying to allow users to search through my xml files dynamically using external variables. However, I am wondering if it is possible to set it up dynamically allow user input from the external variable set up screen in oXygen. Could I set external variables with dynamic values and test them with oXygen?

Thanks for your help.
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: External Variables for XQuery

Post by adrian »

Hello,

What do you understand by "external variables"?
Are you referring to environment variables of the operating system or to Oxygen's "Editor Variables" or is it something else?

Could you provide more exemplified details of what you're trying to do?

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
ajwei810192
Posts: 2
Joined: Thu Nov 25, 2010 1:50 am

Re: External Variables for XQuery

Post by ajwei810192 »

Yeah, my subject may have been a huge overview of what I was trying to do here.

I have a line of declaration here:

Code: Select all

declare variable $searchTerms as xs:string external;
, and then the flwor procedure defining what I want to search for based on the dynamic $searchTerms.

I have sort of solved the problem of allowing users dynamically input search term by successfully adding a "parameter" using ${ask('Please enter the search term', searchTerms)} in the parameter configuration setup provided by oXygen.

What I want to know is, how can I deploy this so others can use this on the web and see the pop up window I have set up on oXygen so their results can be generated dynamically based on their input?
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: External Variables for XQuery

Post by adrian »

So in short, if I understood correctly, you want to share your transformation configuration so that other people can use this XQuery transformation with the dynamic parameter value obtained from the popup window that you have configured. Did I get this right?

One possibility is to:
1. Create a new project, import all the required files to this project. It would be best if the imported files would be in the same folder or a subfolder of the project folder to have simple relative paths in the project.

2. In the Configure Transformation Scenario dialog switch to "Project Scenarios". All global scenarios will be automatically duplicated to the project scenarios so you should manually remove the extra scenarios that you do not need in the project(from all scenario type categories).

3. Open the XQuery and associate it as usual with the transformation scenario(now located in the project) that was configured with the dynamic parameter.

4. If you're running Oxygen 11.2 you should also make sure to Save the project(This is automatic in v12).

Now you can distribute the XQuery file with the Oxygen project file(XPR) that includes the scenario with the dynamic parameter.

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