Lines 3-16
Link Here
|
3 |
<target name="testValidate"> |
3 |
<target name="testValidate"> |
4 |
<xmlvalidate warn="false"> |
4 |
<xmlvalidate warn="false"> |
5 |
<fileset dir="xml" includes="**/about.xml"/> |
5 |
<fileset dir="xml" includes="**/about.xml"/> |
6 |
<dtd publicID="-//stevo//DTD doc 1.0//EN" |
6 |
<dtd publicID="-//stevo//DTD doc 1.0//EN" |
7 |
location="xml/doc.dtd"/> |
7 |
location="xml/doc.dtd"/> |
8 |
</xmlvalidate> |
8 |
</xmlvalidate> |
9 |
</target> |
9 |
</target> |
10 |
|
10 |
|
11 |
<target name="testDeepValidate"> |
11 |
<target name="testDeepValidate"> |
12 |
<ant dir="xml" |
12 |
<ant dir="xml" |
13 |
antfile="validate.xml" |
13 |
antfile="validate.xml" |
14 |
target="testValidate"/> |
14 |
target="testValidate"/> |
15 |
</target> |
15 |
</target> |
Lines 62-68
Link Here
|
62 |
</xmlcatalog> |
62 |
</xmlcatalog> |
63 |
</xmlvalidate> |
63 |
</xmlvalidate> |
64 |
</target> |
64 |
</target> |
65 |
|
65 |
|
66 |
<target name="xmlcatalogpath-override"> |
66 |
<target name="xmlcatalogpath-override"> |
67 |
<xmlvalidate warn="false"> |
67 |
<xmlvalidate warn="false"> |
68 |
<fileset dir="xml" includes="**/about.xml"/> |
68 |
<fileset dir="xml" includes="**/about.xml"/> |
Lines 75-81
Link Here
|
75 |
</xmlcatalog> |
75 |
</xmlcatalog> |
76 |
</xmlvalidate> |
76 |
</xmlvalidate> |
77 |
</target> |
77 |
</target> |
78 |
|
78 |
|
79 |
<target name="xmlcatalogfiles"> |
79 |
<target name="xmlcatalogfiles"> |
80 |
<xmlvalidate warn="false"> |
80 |
<xmlvalidate warn="false"> |
81 |
<fileset dir="xml" includes="**/about.xml"/> |
81 |
<fileset dir="xml" includes="**/about.xml"/> |
Lines 86-92
Link Here
|
86 |
</xmlcatalog> |
86 |
</xmlcatalog> |
87 |
</xmlvalidate> |
87 |
</xmlvalidate> |
88 |
</target> |
88 |
</target> |
89 |
|
89 |
|
90 |
<target name="xmlcatalogpath"> |
90 |
<target name="xmlcatalogpath"> |
91 |
<xmlvalidate warn="false"> |
91 |
<xmlvalidate warn="false"> |
92 |
<fileset dir="xml" includes="**/about.xml"/> |
92 |
<fileset dir="xml" includes="**/about.xml"/> |
Lines 113-126
Link Here
|
113 |
<target name="testSchemaBad"> |
113 |
<target name="testSchemaBad"> |
114 |
<xmlvalidate warn="false"> |
114 |
<xmlvalidate warn="false"> |
115 |
<fileset dir="xml" includes="endpiece2.xml"/> |
115 |
<fileset dir="xml" includes="endpiece2.xml"/> |
116 |
|
116 |
|
117 |
<attribute name="http://xml.org/sax/features/validation" |
117 |
<attribute name="http://xml.org/sax/features/validation" |
118 |
value="true"/> |
118 |
value="true"/> |
119 |
<attribute name="http://apache.org/xml/features/validation/schema" |
119 |
<attribute name="http://apache.org/xml/features/validation/schema" |
120 |
value="true"/> |
120 |
value="true"/> |
121 |
</xmlvalidate> |
121 |
</xmlvalidate> |
122 |
</target> |
122 |
</target> |
123 |
|
123 |
|
124 |
<target name="testIso2022Jp"> |
124 |
<target name="testIso2022Jp"> |
125 |
<xmlvalidate warn="false" file="xml/iso-2022-jp.xml"/> |
125 |
<xmlvalidate warn="false" file="xml/iso-2022-jp.xml"/> |
126 |
</target> |
126 |
</target> |
Lines 129-132
Link Here
|
129 |
<xmlvalidate warn="false" file="xml/utf-8.xml"/> |
129 |
<xmlvalidate warn="false" file="xml/utf-8.xml"/> |
130 |
</target> |
130 |
</target> |
|
|
131 |
|
132 |
<!-- Tests property element with XML file that satisfies schema --> |
133 |
<target name="testProperty.validXML"> |
134 |
|
135 |
<!-- Converts path to URL format --> |
136 |
<pathconvert dirsep="/" property="xsd.file"> |
137 |
<path> |
138 |
<pathelement location="xml/doc.xsd"/> |
139 |
</path> |
140 |
</pathconvert> |
141 |
|
142 |
<xmlvalidate file="xml/endpiece-noSchema.xml" lenient="false" |
143 |
failonerror="true" warn="true"> |
144 |
|
145 |
<attribute name="http://apache.org/xml/features/validation/schema" |
146 |
value="true"/> |
147 |
|
148 |
<property |
149 |
name="http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation" |
150 |
value="${xsd.file}"/> |
151 |
</xmlvalidate> |
152 |
</target> |
153 |
|
154 |
|
155 |
<!-- Tests property element with XML file that fails schema validation --> |
156 |
<target name="testProperty.invalidXML"> |
157 |
|
158 |
<!-- Converts path to URL format --> |
159 |
<pathconvert dirsep="/" property="xsd.file"> |
160 |
<path> |
161 |
<pathelement location="xml/doc.xsd"/> |
162 |
</path> |
163 |
</pathconvert> |
164 |
|
165 |
<xmlvalidate file="xml/endpiece-noSchema-invalid.xml" lenient="false" |
166 |
failonerror="true" warn="true"> |
167 |
|
168 |
<attribute name="http://apache.org/xml/features/validation/schema" |
169 |
value="true"/> |
170 |
|
171 |
<property |
172 |
name="http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation" |
173 |
value="${xsd.file}"/> |
174 |
</xmlvalidate> |
175 |
</target> |
176 |
|
131 |
</project> |
177 |
</project> |
|
|
178 |
|