Could you share some details of that NPE so we can track it down?
From what I recall, I don't think you even need to call setProject, but that probably wouldn't hurt.
Erik
Kyle Adams wrote:
I'd like to utilize XMLCatalog in a custom task we use, but I'm struggling with implementing it. I've received both <xslt> and <xmlvalidate> to see how they use XMLCatalog, and it appears to be as simple as:
1) Initialize a XMLCatalog data member, ie, private XMLCatalog xmlCatalog = new XMLCatalog()
2) Call the setProject() function on said data member in the init() function of the task, ie, xmlCatalog.setProject(getProject())
3) Provide the method for adding nested xmlcatalog elements:
public void addConfiguredXMLCatalog(XMLCatalog catalog) { xmlCatalog.addConfiguredXMLCatalog(catalog); }
I've gone through each of these steps in our custom task, but when the task tries to parse the XML document (with xmlCatalog set as the EntityResolver), a NullPointer exception is thrown.
Am I missing something here?
Kyle Adams Java Developer Gordon Food Service
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
