Passing directory parameter to Xquery from Trans Scenario
Posted: Tue Oct 29, 2013 6:33 pm
Oxygen 15 / Windows 7
I have an Xquery that starts with the statement:
for $file in collection("../test_set_001/?select=*.xml");
this finds all the XML files in the directory test_set_001 and runs the remaining statements on them.
What I really want is to be able to set up different Transform scenarios which reference different test set directories.
So I set up a parameter {test_set} and give it value 'test_set_001'
Now I want to replace the above 'collection' statement with one that takes the parameter e.g. something like
for $file in collection (concat ('../', ${test_set}, '?select=*.xml'));
This won't compile. If I put ${test_set} in quotes it doesn't get replaced. This should be simple I guess, but it's not clear from the documentation how substitution works...
any help appreciated.
- thomas
I have an Xquery that starts with the statement:
for $file in collection("../test_set_001/?select=*.xml");
this finds all the XML files in the directory test_set_001 and runs the remaining statements on them.
What I really want is to be able to set up different Transform scenarios which reference different test set directories.
So I set up a parameter {test_set} and give it value 'test_set_001'
Now I want to replace the above 'collection' statement with one that takes the parameter e.g. something like
for $file in collection (concat ('../', ${test_set}, '?select=*.xml'));
This won't compile. If I put ${test_set} in quotes it doesn't get replaced. This should be simple I guess, but it's not clear from the documentation how substitution works...
any help appreciated.
- thomas