[xquery-talk] Conditional use of fn:error() ?
Yoshi Okamoto
yoshiokamoto at yahoo.com
Mon Jan 21 03:07:36 PST 2013
Dear list subscribers,
I noticed that different XQuery processors (BaseX,
Saxon, XMLPrime, Zorba) return different results for the following queries:
Query A:
fn:error()[false()]
Query B:
error(())[contains('http://....', 'details')]
Query C:
let $url := <url>...</url>
where contains($url, 'details')
return error(())
All except for XMLPrime return an empty sequence.
Query D:
let $url := <url>...</url>
return error(())[contains($url, 'details')]
All except for Zorba return an error.
My original intention was to raise an error whenever a certain condition is true. My questions would be:
- what are the correct results for Query A-D?
- XMLPrime is the implementation that always raises an error. If this behavior should be correct, how would I proceed to only raise errors under a certain condition?
Thank you for your attention and patience.
Best regards
Yoshi OKAMOTO
More information about the talk
mailing list