What are the implications of doing:

/article

vs

fn:collection()/article

or 

fn:doc()/article

?

Seems like the first one shouldn't be allowed since no context is specified, 
yet it seems to work. Is that part of the XQuery spec or is that part of the 
1.0-ml dialect? (seems so because when I specify 1.0 I get an error). What is 
happening behind the scenes when no context is specified? From a stach trace it 
looks like fn:collection() is inserted behind the scenes. If so, what's the 
thinking for that doing that?

Also, it looks like this is a way to be able to write somewhat dynamic XQuery 
by doing something like this:

let $query := /article/title

return fn:collection()/$query

Which apparently is the equivalent of fn:collection()//article/title



Thanks,
Ryan
                                          
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to