xquery version "1.0"; declare xmlspace = strip; (: The above line will be the XQuery way to strip whitespace :) { doc("BibAdapted.xml")/bib/book[@year>2002] }