Bug 23395 - Adding property element to xmlvalidate
Adding property element to xmlvalidate
Status: RESOLVED FIXED
Product: Ant
Classification: Unclassified
Component: Optional Tasks
nightly
All All
: P3 enhancement with 1 vote (vote)
: 1.6.2
Assigned To: Ant Notifications List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2003-09-24 22:15 UTC by _matthewHawthorne
Modified: 2004-11-16 19:05 UTC (History)
1 user (show)



Attachments
patch for XmlValidateTask (11.22 KB, patch)
2003-09-24 22:19 UTC, _matthewHawthorne
Details | Diff
XMLValidateTest patch (4.49 KB, patch)
2003-09-24 22:20 UTC, _matthewHawthorne
Details | Diff
xmlvalidate.xml - patch for test build file (3.45 KB, patch)
2003-09-24 22:20 UTC, _matthewHawthorne
Details | Diff
Test XML file which passes schema validation (293 bytes, text/plain)
2003-09-24 22:21 UTC, _matthewHawthorne
Details
Test XML file which fails schema validation (328 bytes, text/plain)
2003-09-24 22:21 UTC, _matthewHawthorne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _matthewHawthorne 2003-09-24 22:15:09 UTC
I needed a way to set properties on the XMLReader used for validation, by
calling the method XMLReader.setProperty(String, Object).

My need for this was to specify an external schema to validate an XML file with.
 Setting attributes can't get the job done since it only accepts booleans.

It's a fairly simple patch.  It includes a few new methods and an inner classes
in XmlValidateTask which mimic the logic for setAttribute.  I also added some
test cases, and 2 test xml files, one which passes the schema and one which doesn't.
Comment 1 _matthewHawthorne 2003-09-24 22:19:51 UTC
Created attachment 8338 [details]
patch for XmlValidateTask
Comment 2 _matthewHawthorne 2003-09-24 22:20:07 UTC
Created attachment 8339 [details]
XMLValidateTest patch
Comment 3 _matthewHawthorne 2003-09-24 22:20:40 UTC
Created attachment 8340 [details]
xmlvalidate.xml - patch for test build file
Comment 4 _matthewHawthorne 2003-09-24 22:21:13 UTC
Created attachment 8341 [details]
Test XML file which passes schema validation
Comment 5 _matthewHawthorne 2003-09-24 22:21:30 UTC
Created attachment 8342 [details]
Test XML file which fails schema validation
Comment 6 Antoine Levy-Lambert 2004-06-02 21:05:31 UTC
checked into HEAD, will also be in the ANT_16 branch.
Comment 7 Antoine Levy-Lambert 2004-06-02 21:25:09 UTC
Checked into the ANT_16 branch too. Thanks for the submission, sorry that it
took 9 months.