At 11:07 -0400 12/8/2002, Vadim Gritsenko wrote: > > From: Jesse Reynolds [mailto:[EMAIL PROTECTED]] >> >> Thanks Vadim >> >> I've changed the code to mention the correct URL, but it is still not >> working. I am confused about why it isn't working. Either: >> >> a) My code is not doing the right thing >> b) Xerces has a bug >> c) I need to make a similar change to another piece of code in cocoon >as well. >> > > Any suggestions?
Okay, because i copied the sitemap from the samples and not copied the common dir over too. Having done that, now I'm just gettng a prettier "unsupported encoding" message. I know my JVM supports MacRoman encoded characters, as I've written some test java code and it works perfectly. 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? Or is there somewhere else in Cocoon that I need to fix this perhaps? the diff of JaxpParser.java once again: bash-2.04# diff ./src/java/org/apache/cocoon/components/parser/JaxpParser.java.orig ./src/java/org/apache/cocoon/components/parser/JaxpParser.java 138a139,141 > /** do we want to allow all possible text encodings recognised >by current JVM? */ > protected boolean allowJavaEncodings; > 205a209,214 > > // Pick up "allow-java-encodings" to allow the use of additional > // character encodings supported by current JVM (eg "MacRoman") > // Jesse Reynolds 2002.08.10 > this.allowJavaEncodings = >params.getParameterAsBoolean("allow-java-encodings", true); > 215a225,233 > } > > if (this.allowJavaEncodings) { > try { > >this.reader.setFeature("http://xml.org/sax/features/allow-java-encodings", >true); > } catch (SAXException e) { > getLogger().warn("SAX2 driver does not support >feature: 'allow-java-encodings' "+ > >"('http://xml.org/sax/features/allow-java-encodings')"); > } and the full output of sitemap.log when requesting a very simple page with encoding="MacRoman" in the XML decln: DEBUG (2002-08-16) 08:08.56:177 [sitemap.generator.file] (/cocoon/afringe/wonka.xml) HttpProcessor[8080][4]/FileGenerator: processing file wonka.xml DEBUG (2002-08-16) 08:08.56:179 [sitemap.generator.file] (/cocoon/afringe/wonka.xml) HttpProcessor[8080][4]/FileGenerator: file resolved to file:/usr/local/jakarta-tomcat-4.0.4/webapps/cocoon/afringe/wonka.xml DEBUG (2002-08-16) 08:08.56:185 [sitemap.generator.file] (/cocoon/afringe/wonka.xml) HttpProcessor[8080][4]/FileGenerator: Got SAXException; Rethrowing cause exception org.xml.sax.SAXParseException: The encoding "MacRoman" is not supported. at org.apache.avalon.excalibur.xml.JaxpParser.fatalError(JaxpParser.java, Compiled Code) at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java, Compiled Code) at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument(DefaultEntityHandler.java, Compiled Code) at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java, Compiled Code) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java, Compiled Code) at org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java, Compiled Code) at org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStreamSource.java, Compiled Code) at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java, Compiled Code) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java, Compiled Code) at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java, Compiled Code) at org.apache.cocoon.www.afringe.sitemap_xmap.matchN10064(sitemap_xmap.java, Compiled Code) at org.apache.cocoon.www.afringe.sitemap_xmap.process(sitemap_xmap.java, Compiled Code) at org.apache.cocoon.www.afringe.sitemap_xmap.process(sitemap_xmap.java, Compiled Code) at org.apache.cocoon.sitemap.Handler.process(Handler.java, Compiled Code) at org.apache.cocoon.sitemap.Manager.invoke(Manager.java, Compiled Code) at org.apache.cocoon.www.sitemap_xmap.matchN10357(sitemap_xmap.java, Compiled Code) at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java, Compiled Code) at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java, Compiled Code) at org.apache.cocoon.sitemap.Handler.process(Handler.java, Compiled Code) at org.apache.cocoon.sitemap.Manager.invoke(Manager.java, Compiled Code) at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java, Compiled Code) at org.apache.cocoon.Cocoon.process(Cocoon.java, Compiled Code) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java, Compiled Code) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java, Compiled Code) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java, Compiled Code) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java, Compiled Code) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, Compiled Code) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java, Compiled Code) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java, Compiled Code) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, Compiled Code) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java, Compiled Code) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java, Compiled Code) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java, Compiled Code) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java, Compiled Code) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java, Compiled Code) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java, Compiled Code) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, Compiled Code) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java, Compiled Code) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java, Compiled Code) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, Compiled Code) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java, Compiled Code) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java, Compiled Code) at java.lang.Thread.run(Thread.java, Compiled Code) DEBUG (2002-08-16) 08:08.57:562 [sitemap.transformer.xslt] (/cocoon/afringe/wonka.xml) HttpProcessor[8080][4]/TraxTransformer: Using stylesheet: 'file:/usr/local/jakarta-tomcat-4.0.4/webapps/cocoon/afringe/error2html.xsl' in org.apache.cocoon.transformation.TraxTransformer@bc22685d, last modified: 998973544000 -- Jesse Reynolds - Virtual Artists Pty Ltd - http://www.va.com.au Email: jesse (at) va.com.au > Website Development Phone: +61 (0)8 8223 2288 > Web & Email Hosting Web: http://jesse.va.com.au > Streaming Media Hosting > Telehousing / Colocation --------------------------------------------------------------------- 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]>