From 5b5e9a7c3d1018bcfd72498445342719a55b393e Mon Sep 17 00:00:00 2001
From: Antoine Levy-Lambert
The <xmlcatalog> element is used to perform entity resolution.
The <attribute> element is used to set SAX Parser features. -There can be any number of attributes set, as defined here: - http://xml.org/sax/features/ -A feature essentialy changes the mode of the parser. -
+The <attribute> element is used to set parser features.
+Features usable with the xerces parser are defined here :
+ Setting features
+
+SAX features are defined here:
+ http://xml.org/sax/features/
+
Attribute | @@ -116,6 +119,31 @@ A feature essentialy changes the mode of the parser.
The <property> element is used to set properties. +These properties are defined here for the xerces XML parser implementation : + XML Parser properties +Properties can be used to set the schema used to validate the XML file. +
+Attribute | +Description | +Required | +
name | +The name of the feature | +Yes | +
value | +The string value of the property | +Yes | +
@@ -165,9 +193,33 @@ Scan all XML files in the project, using the catalog defined inline. <fileset dir="xml" includes="**/*.xml"/> <attribute name="http://xml.org/sax/features/validation" value="true"/> <attribute name="http://apache.org/xml/features/validation/schema" value="true"/> + <attribute name="http://xml.org/sax/features/namespaces" value="true"/> </xmlvalidate>-Validate all .xml files in xml directory with the parser configured to perform schema validation. Note: The parser must support the
http://apache.org/xml/features/validation/schemafeature. +Validate all .xml files in xml directory with the parser configured to perform schema validation. Note: The parser must support the +
http://apache.org/xml/features/validation/schemafeature. + +
+ +<pathconvert dirsep="/" property="xsd.file"> +<path> + <pathelement location="xml/doc.xsd"/> +</path> +</pathconvert> + +<xmlvalidate file="xml/endpiece-noSchema.xml" lenient="false" + failonerror="true" warn="true"> + <attribute name="http://apache.org/xml/features/validation/schema" + value="true"/> + <attribute name="http://xml.org/sax/features/namespaces" value="true"/> + <property + name="http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation" + value="${xsd.file}"/> +</xmlvalidate> ++
Copyright © 2001-2002,2004 The Apache Software Foundation. All rights