ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craeg Strong <>
Subject Re: Adding support for XMLCatalog in EjbJar
Date Sat, 24 May 2003 01:19:06 GMT

I don't see anything obviously wrong with
your code.  

My suggestion would be to code up some simple
unit tests and start there.  Once you find the
problem, add a unit test to cover that scenario.

One of the more difficult problems I had to work
around was the fact that a new SAX parser would be
created to parse every new file.  The XMLcatalog
had to be separately added to every one of them.
( Where are JavaScript's prototypes when you need 
them? :)

I am not sure if this is what you are running into.
Good luck,


> I've taken a first stab at adding support for nested <xmlcatalog>
> elements within <ejbjar>, but I'm running into some problems I thought
> I'd run by the list.
> First glance, it appeared pretty easy.  Add a few methods and insert
> the following bit of code in the execute method:
> if (xmlCatalog !žull) {
>     saxParser.getXMLReader().setEntityResolver(xmlCatalog);
> }
> Since saxParser gets passed into the various vendor-specific deployment
> tool classes, I thought that would do the trick.  But it's not (why
> would I be writing this otherwise :-) ?).  The problem is that I'm not
> familiar enough with SAX; previous hacking involved adding XMLCatalog
> support to tasks that used DOM.  Also, I'm not intimately familiar with
> the inner workings of the*
> classes.
> So I thought I'd throw this out there and see if I'm doing something
> stupid/easily fixed.  Diff included below for full disclosure.
> Thanks,
> Kyle
<snip>code fragment</snip>

View raw message