|-
| '''Errors'''
|'''[[XQuery Errors#Functions Errors|BASX0023BXVA0001]]''' is raised if the addressed document cannot be validated against the given schema.
|-
| '''Examples'''
|<code><b>validate:dtd</b>($input as item()) as empty-sequence()</code><br /><code><b>validate:dtd</b>($input as item(), $dtd as xs:string) as empty-sequence()</code>
|-
| '''Summary'''
|Validates the document specified by <code>$input</code>.<br />
<code>$input</code> may be
* an <code>xs:string</code>, containing the path to the resource,
* an <code>xs:string</code>, containing the resource in its string representation, or
* a <code>node()</code>, containing the resource itself.
<code>$schema</code> can be used to specify the DTD for validation. If no DTD is given, <code>$input</code> is required to contain a DTD doctype declaration.<br />
|-
| '''Errors'''
|'''[[XQuery Errors#Functions Errors|BXVA0001]]''' is raised if the addressed document cannot be validated against the given DTD.
|-
|}
=Errors=
{| class="wikitable" width="100%"
! width="5%"|Code
! width="95%"|Description
|-
|<code>BXVA0001</code>
|A document cannot be validated against the specified DTD or XML Schema.
|}