[xquery-talk] Position operator

Ronald Bourret rpbourret at rpbourret.com
Mon Jan 23 00:22:42 PST 2006


I'm missing something obvious here.

Suppose book.xml contains multiple title elements. Why does:

    doc("book.xml")//title[1]

return a sequence of all title elements and:

    (doc("book.xml")//title)[1]

return the first title element? I would have thought both queries would 
return the first title element.

Thanks,

-- Ron



More information about the talk mailing list