* Validate all documents of a database against the specified schema, using the supplied feature:
<syntaxhighlight lang="xquery">
for $city in db:openpre('cities')
return validate:xsd($city, 'city.xsd',
map { 'http://javax.xml.XMLConstants/feature/secure-processing': true() }