tags:

views:

17

answers:

1
+1  Q: 

xquery - file test

My xquery script opens several files. One of the files is sometimes missing. I need to test whether the file exists before I try to open it. (something like -f in bash or perl).

Is it possible?

+1  A: 

Use this standard XPath 2.0 function:

doc-available(yourURL)
Dimitre Novatchev