Question about ant task when using FileSets
DJ Gregor <[email protected]> Tue, 28 Jun 2005 00:34:45 -0400
| Newsgroups | gmane.text.xml.xframe.xsddoc |
|---|---|
| Message-ID | <[email protected]> |
I had a problem using the ant task in the latest release (0.8-beta)
with nested FileSets. It worked fine if I specified a single, specific
file to convert, but it would never run against any of my files in the
nested FileSets. I tracked it down to this code, which always returned
null on my XML schema files:
if (!root.getLocalName().equals("schema") ||
!root.getNamespaceURI().equals(Task.SCHEMA_NS)) {
return null;
}
This was added during this commit:
http://cvs.sourceforge.net/viewcvs.py/xframe/xsddoc/src/net/sf/xframe/
xsddoc/Task.java?r1=1.21&r2=1.22
No matter what I did, I could not get any of my schema files to pass
either of the tests in that if statement. I did verify that the
FileSets were matching the files I wanted. After commenting out the
test above everything worked out great.
So, here's my question: what do I have to do to make this work? I'm
including the top of one of my XSD files. These verify properly in
XMLMind, they work with xsddoc, and they work fine with Castor.
<?xml version="1.0" encoding="UTF-8"?>
<!-- target package ::= org.opennms.netmgmt.xml.eventconf -->
<schema targetNamespace="http://xmlns.opennms.org/xsd/eventconf"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:this="http://xmlns.opennms.org/xsd/eventconf"
xmlns:ns2="http://www.w3.org/1999/xhtml"
xmlns:ns="http://www.w3.org/2001/XMLSchema"
xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty">
<annotation>
<documentation>Version: $Id$</documentation>
</annotation>
<element name="events">
<complexType>
... snip ...
Thanks,
- djg
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click