C.107 XmlLintTask

The XmlLintTask checks syntax (lint) one or more XML files against an XML Schema Definition.

Note: This assumes that the DOM extension is loaded in PHP5 since this is used to drive the validation process.

Table C.140: Attributes

schemaStringPath to XSD filen/aYes
fileStringPath to XML filen/aNo
haltonfailureBooleanStops the build when validation failstrueNo
useRNGBooleanSet to Yes if the Schema is in the n Relax NG formatfalseNo

C.107.1 Examples

<xmllint schema="schema.xsd" file="config.xml"/>

Validate one XML file against one XSD file.

<xmllint schema="schema.xsd">
  <fileset dir=".">
    <include name="**/config.xml"/>

Validate more XML files against one XSD file.

<fileset dir="./sources" id="sources">
  <include name="main.xml"/>
  <include name="chapter*.xml"/>
  <include name="appendix*.xml"/>
<property name="docbook.relaxng" 

<xmllint schema="${docbook.relaxng}" useRNG="yes">
  <fileset refid="sources" />

Validate a set of DocBook files against the DocBook RNG grammar

C.107.2 Supported Nested Tags