[oXygen-user] Showing the XQuery input perspective

Sorin Ristache
Tue Nov 10 09:35:05 CST 2009


The scenario is not embedded in the XQuery file because in Oxygen the 
scenarios are organized at different levels: global scenarios (can be 
associated with any edited file), project scenarios (available only in 
the context of the current project that is loaded in the Project view), 
framework scenarios (available only for the files of that framework: 
DocBook, scenarios, TEI scenarios, XHTML scenarios, etc).

The ${currentFileURL} variable should be used as generic placeholder for 
the variable input source of the scenario. For example if you want to 
run the same XQuery on a set of XML documents the variable source is the 
XML document so you should set ${currentFileURL} in the XML URL field of 
the scenario, you set the path of the XQuery file in the XQUERY URL 
field and you associate this scenario to every XML document _without 
editing the scenario for every XML document of the set_. Just associate 
the scenario with the edited file by selecting the scenario or running 
the scenario from the Configure Transformation Scenario dialog or by 
running it from the Transformation Scenarios view. You make the view 
visible from menu Perspective -> Show View. The current scenario is 
always the selected one in the Configure Transformation Scenario dialog 
or the one that you select and run in the Transformation Scenarios view.

If the scenario does not have a variable input source you set the 
specific paths of the XML and the XQuery in the scenario and it does not 
matter if you associate it with the XML file or with the XQuery file but 
in this case the scenario is not reusable for other input sources 
without editing it.


Regards,
Sorin


Lee, David wrote:
> Thanks, I think I have this working now, mostly ...
> My mistake was I was using a xquery setup against a MarkLogic server,
> and using doc() so I wasnt seeing any "input".
> But changing to a local xquery on a local file it works.
> 
> My main confusion is I am used to Stylus Studio which literally embeds
> the scenarios within the xquery,
> so they are hard-associated.   With Oxygen it looks like scenerios are
> separate from the xquery, I can set {currentFileUrl} as the xquery
> source, but I'm not yet sure how to "associate" one of several scenarios
> which are set for {currentFileUrl} as the "current" one.  It also seems
> that if I want to use a different default input file I have to create a
> separate (global ?) scenario for each case.  It gets rather confusing to
> me how to keep track of these all.
> 
> 
> 
> 
> 
> -----Original Message-----
> From: 
> [mailto:] On Behalf Of Sorin Ristache
> Sent: Tuesday, November 10, 2009 8:28 AM
> To: 
> Subject: Re: [oXygen-user] Showing the XQuery input perspective
> 
> Hello,
> 
> The XSLT/XQuery Input view displays the structure of the XML document 
> that will be processed by the XSLT or the XQuery under development. The 
> XML document comes from the transformation scenario associated with the 
> edited XSLT stylesheet or XQuery file. In case of XQuery if the 
> transformation scenario does not specify an XML document in the XML URL 
> field the XML document can come also from a doc() function call used in 
> the XQuery file. So if your XQuery does not call the doc() function you 
> should set an XML document in your scenario.
> 
> You use the structure of the XML document as the source of drag and drop
> 
> operations for composing XPath expressions. The target of drag and drop 
> is the XSLT editor or the XQuery editor. There is a video demonstration 
> that shows that in action:
> 
> http://www.oxygenxml.com/demo/XslEditing/XSLEditing.html
> 
> 
> Regards,
> Sorin
> 
> 
> Lee, David wrote:
>>
>> I have an XQuery file, and have configured a Transformation Scenerio, 
>> but when I use Perspective -> Show View -> XSLT/XQuery input,
>>
>> I get this note:
>>
>>  
>>
>> *To have a better content completion over the values of 'match', 
>> 'select', and 'test' attributes, please create a scenario for this 
>> stylesheet. The input document must be XML wellformed. *
>>
>>  
>>
>> Whats the magic trick to get the XSLT/XQuery input to show ?
>>
>> Thanks for any suggestions !



More information about the oXygen-user mailing list