File reference using a Transformation Scenario

Issues related to W3C XQuery.
jkcool
Posts: 1
Joined: Tue Oct 18, 2011 7:59 am

File reference using a Transformation Scenario

Post by jkcool »

Hi,

I want to use Transformation Scenario to configure an input xml file to the Xquery that I am writing. I created a new scenario and selected a file. But how do I access it in the Xquery ? i.e inside doc() function.

If I explicitly specify it , we will write doc("input.xml")

I know it is very trivial , but I cannot find it out.


I am using Oxygen 13.0
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: File reference using a Transformation Scenario

Post by Radu »

Hi,

Instead of using doc just try writing the XPath directly.

Example:

Code: Select all

declare variable $oxy:products as document-node() := doc("products.xml");
can be re-written like:

Code: Select all

declare variable $oxy:products as document-node() := /;
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply