Jesse Reynolds wrote: > At 22:10 -0400 15/8/2002, Vadim Gritsenko wrote: > >> Jesse Reynolds wrote: >> >>> >>> And I've made the changes to JaxpParser.java as Vadim has suggested >>> to get it to tell Xerces to "allow-java-encodings" but it just >>> doesn't seem to work. >>> >>> Perhaps a bug in Xerces? >> >> >> >> Jesse, >> >> Please note: you have patched >> org/apache/cocoon/components/parser/JaxpParser.java file, but stack >> trace shows org.apache.avalon.excalibur.xml.JaxpParser class. >> >> As you can see in org.apache.cocoon.components.parser.Parser: >> * @deprecated The Avalon XML Parser is now used inside Cocoon. This role >> * will be removed in future releases. >> >> >> Vadim > > > > Thanks Vadim! > > I was wondering about that, but not being a seasoned java developer I > wasn't 100% on whether the class path should equal the sourcecode > path. Now I know :-) > > So, what should I try adding the allow-java-encodings code to now do > you think? I can't see any other file called JaxpParser.java in the > source, so does this mean I have to edit the source code of Avalon XML > Parser or something?
:) You've got this part right. But it's not Avalon XML Parser, it's Avalon XML Parser Component which wraps JAXP parser into Component. Source is located at: http://cvs.apache.org/viewcvs.cgi/jakarta-avalon-excalibur/xmlbundle/src/java/org/apache/avalon/excalibur/xml/Attic/JaxpParser.java?rev=1.3&content-type=text/vnd.viewcvs-markup You don't have to compile all Excalibur, you can just patch and compile this class (add some System.out.println to see what's going on!) and put it under webapp/WEB-INF/classes/org/apache/..., and it will be loaded from there before old class. > How come Xerces still appears in the stacktrace if we're no longer > using it or is Avalon not actually a parser, just something like a > different wrapper for Xerces or whatever? Mentioned Component will instantiate available JAXP parser and use it. You can see it in the source code you were patching (piece factory.newSAXParser().getXMLReader() instantiates Xerces). . Vadim --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>