[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Streaming XML (WAS: More on taming SAX (was Re: [xm
* Alan Gutierrez <alan-xml-dev@e...> [2004-12-27 18:36]: > * Karl Waclawek <karl@w...> [2004-12-27 18:22]: > > > Alan Gutierrez wrote: > > > > In these cases, it doesn't buy me anything to have the whole > > > document in memory, since I'm either assembling some sort of > > > AST, or just responding to events, any state that is build up is > > > application specific. > > > That is why this whole discussion isn't that interesting to me. > > Streaming XML, or the documents verus events debate? I've kind > of found the ins and outs of events to be entertaining. > > > Is you SAX library publicly accessible? > > Uh, sure. No, but, I'm working toward an open source release of > any one thing I've been hacking at. > > I tried to make work available before and it wasn't all that > easy to do. License choices, build scripts, and documentation. > > Tricky. Okay. http://engrm.com/svn/open/trunk/sax-strategy/ Take a peek. There are no applications here, just the library. (I feel I'm only now knocking out two useful applications with this library, and they are over in an Eclipse window soiled with squiggly red lines.) Here is Strategy, based off the above URI. src/main/java/com/agtrz/sax/strategy/Strategy.java It's hard to see the singtuare for all the outdated Javadoc. Try these to see the signature. src/main/java/com/agtrz/sax/strategy/ForwardStrategy.java src/main/java/com/agtrz/sax/strategy/ForwardNormalizedStrategy.java src/main/java/com/agtrz/sax/strategy/DecoratorStrategy.java Event contains a Lexeme, here's an AbstractEvent. src/main/java/com/agtrz/sax/strategy/AbstractElement.java All the lexemes has Mutable and Immutable (or Basic) implementations. The Mutable ones are used to create caches of objects so garbage collection is avoided. Here are two workhorse strategies. src/main/java/com/agtrz/sax/strategy/SAXInterceptor.java src/main/java/com/agtrz/sax/strategy/RecordingInterceptor.java This evolved recently, one is attached to each Event and Campaign. The seek methods search parents or self until the key is found. I've said this is Perlish. I feel no shame. src/main/java/com/agtrz/sax/strategy/Variables.java I string together Strategy compositions with this this. src/main/java/com/agtrz/sax/strategy/StrategyConnector.java Finally, I was going to wait until this class settled down, and create an langauge, in XML, to describe the composition. Using this class, the construction of a Strategy composition isn't so terribly ugly, is nicely recursive. src/main/java/com/agtrz/sax/strategy/Strategies.java Application code is on its way. -- Alan Gutierrez - alan@e...
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|