File reference using a Transformation Scenario

Issues related to W3C XQuery.
jkcool
Posts: 1

File reference using a Transformation Scenario

Tue Oct 18, 2011 8:07 am

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

Re: File reference using a Transformation Scenario

Tue Oct 18, 2011 10:03 am

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

Return to “XQuery”

Who is online

Users browsing this forum: No registered users and 0 guests