I don't think using Stax will help. It is not woodstox that breaks app engine but the stax api itself.
Ben Gidley www.gidley.co.uk [email protected] On Fri, Apr 17, 2009 at 11:07 AM, Christian Köberl < [email protected]> wrote: > > While analyzing the Google App Engine problem with Stax I tried to > eliminate the dependency to Woodstox (because i thought it was the problem). > I found it quite easy to remove the dependency and use "plain" Stax. So I > thought: why is this dependency necessary? In my opinion frameworks (like > Tapestry) should minimize dependencies. So why is Woodstox used instead of > Stax? Is this a performance reason or simply just the feature of parsing the > DTD header? > > Here are the steps to replace Woodstox with Stax (see also > http://derkoe.wordpress.com/2009/04/16/tapestry-51-woodstox/) > * use XMLInputFactory instead of XMLInputFactory2 in TemplateParserImpl > * remove inputFactory.configureForSpeed(); in TemplateParserImpl > * use XMLStreamReader instead of XMLStreamReader2 in StaxTemplateParser > * change the dtd() method StaxTemplateParser to (this could be nicer): > private void dtd() throws XMLStreamException > { > String dtd = reader.getText(); > String[] dtdElements = dtd.split(" "); > if(dtdElements.length > 3) > { > String rootName = dtdElements[1]; > String publicId = null; > String systemId = null; > if("PUBLIC".equals(dtdElements[2])) > { > publicId = dtdElements[3]; > if(dtdElements.length > 4) > systemId = dtdElements[4]; > } > else if("SYSTEM".equals(dtdElements[2])) > { > systemId = dtdElements[3]; > } > tokenAccumulator.add(new DTDToken(rootName, publicId, > systemId, getLocation())); > } > } > > -- > Chris > -- > View this message in context: > http://n2.nabble.com/Woodstox-dependency-needed--tp2645025p2645025.html > Sent from the Tapestry Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
