|
From: Eugene K. <eu...@ja...> - 2005-10-17 01:59:39
|
Hi Colin, Thanks for looking into this. Actually I've created a JIRA, which is not assigned to Jurgen. http://opensource2.atlassian.com/projects/spring/browse/SPR-1333 regards, Eugene Colin Sampaleanu wrote: > I managed to miss this when it was initially posted. We may want to > consider this for 1.3. > > > Eugene Kuleshov wrote: > >> Folks, >> >> I've implemented a sax-based parser for Spring's XML bean definition >> and wonder if you'd be interested to integrate this into Spring >> framework. this class can be used in place of the current DOM-based >> parser as well as an lightweight adapter for runtime app context >> generators such as xslt-based tools or tools like Jacn (even so I >> believe Jacn should directly generate Spring factories without >> intermediate XML representation). >> >> I run all existing tests from xml package and they all seem working >> just fine. That however required to have copies of >> XmlBeanDefinitionReaderand and XmlBeanFactory patched to work with my >> parser. >> >> In my tests this parser is little bit faster then current DOM-based >> parser and in my opinion it is structured little better then DOM-based >> parser. Basically is is sort-of stripped-down Digester (stack-based >> state machine) with declarative definitions for parsing rules. >> Interestingly the same rules could be used with StAX-based parser with >> very minimal changes or even without changes using adapter for SAX >> Attributes instance used in rule params. >> >> Also note that current XmlBeanDefinitionReader class is tight to >> DOM-based API and does not allow to hookup abstract XML parsers (e.g. >> SAX or StAX). This make impossible to substiture custom non-DOM XML >> parser to XmlBeanFactory. >> >> regards, >> Eugene |