| '''Examples'''
|
* {{Code|validate:xsd('doc.xml', 'doc.xsd')}} validates the document {{Code|doc.xmxml}} against the specified schema {{Code|doc.xsd}}.
* The following example demonstrates how a document can be validated against a schema without resorting to local or remote URIs:
<pre class="brush:xquery">
| '''Errors'''
|{{Error|BXVA0001|XQuery Errors#Functions Errors}} the addressed document cannot be validated against the given DTD.
|-
| '''Examples'''
|
* {{Code|validate:xsd('doc.xml', 'doc.dtd')}} validates the document {{Code|doc.xml}} against the specified DTD file {{Code|doc.dtd}}.
* The following example validates a document against a DTD specified as string:
<pre class="brush:xquery">
let $doc := <root/>
let $dtd := '<!ELEMENT root (#PCDATA)>'
return validate:dtd($doc, $dtd)
</pre>
|-
|}