企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# C.114 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.148:聽Attributes NameTypeDescriptionDefaultRequired`schema``String`Path to XSD filen/aYes`file``String`Path to XML filen/aNo`haltonfailure``Boolean`Stops the build when validation fails`true`No`useRNG``Boolean`Set to Yes if the Schema is in the n Relax NG format`false`No C.114.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"/> </fileset> </xmllint> ``` 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"/> </fileset> <property name="docbook.relaxng" value="/usr/share/xml/docbook/schema/rng/5.0/docbookxi.rng"/> <xmllint schema="${docbook.relaxng}" useRNG="yes"> <fileset refid="sources" /> </xmllint> ``` Validate a set of DocBook files against the DocBook RNG grammar C.114.2 Supported Nested Tags - `fileset`