Re: Custom parser classloader problem
Geoff Longman <[email protected]> Wed, 1 Feb 2006 02:14:19 -0500
| Newsgroups | gmane.comp.ide.eclipse.spindle.devel |
|---|---|
| Message-ID | <[email protected]> |
I have checked in changes to the spindle-parser module that bring it up to xerces 2.7.1 All test run, but.. they are pitiful tests. I'll have to add some more soon. Geoff On 1/31/06, Geoff Longman <[email protected]> wrote: > I think I'll get an exception if I try to access the DOM view from the > SSE model when the document is malformed. I know I can query the SSE > model and find out the file is malformed before getting the DOM view > though. > > The model isn't broken, it's knows nothing about DOM, but the adapter > that wraps the underlying SSE model will break. > > Spindle currently does not process malformed documents (it just marks > the errors), but it does handle invalid documents. I think this is a > good way to go. No way are you going to get past the xml parse in > Tapestry at runtime if the document is malformed. > > On 1/31/06, Hugo Palma <[email protected]> wrote: > > > > On 31/01/06, Geoff Longman <[email protected]> wrote: > > > > > There is another option however, if IntelliJ can provide this offset > > > > > info itself then that mechanism can be wrapped with an > > > > > IDOMModelSource/IDOMModel that culls the source location info directly > > > > > from IntelliJ. > > > > > > > > I think it can. IntelliJ provides a cool abstraction for the source > > > > structure that's called PSI(Program Source Interface). For xml files > > there > > > > are XmlDocument and XmlElement interfaces that among other thing > > provide > > > > information about the offset of elements, attributes, atart and end > > tags, > > > > and so on. > > > > > > Do they have a DOM view of the PSI nodes? Although I guess if you > > > have PSI interfaces ofr all the DOMy bits you can wrap PSI stuff in > > > DOM interfaces. > > > > There is no DOM view. I'd have to wrap the DOM stuff myself. > > > > > > > One thing I have not figured out yet is how to handle malformed xml. > > > > > > I'm not near the source right now but I need to think about how to get > > > the problems from the IDOMModelSource if the file is malformed. > > > Spindle isn't interested in the DOM (and I guess a DOM should not be > > > available to Spindle) if the file is malformed. > > > > In IntelliJ, even if the file is malformed i'm able to construct the PSI > > view of the resource, so i don't think i would have much problems there. Of > > course if you use Xerces you won't be able to parse a malformed file. As i > > see it, it makes sense to allow a IDOMModelSource to be malformed, it's just > > the implementation behind it that has to be flexible enough to allow it, no > > Xerces here. What happens if you ask the Eclipse source model the DOM view > > when the file is malformed ? > > > > > > > > > -- > The Spindle guy. http://spindle.sf.net > Get help with Spindle: > http://lists.sourceforge.net/mailman/listinfo/spindle-user > Blog: http://jroller.com/page/glongman > Feature Updates: http://spindle.sf.net/updates > -- The Spindle guy. http://spindle.sf.net Get help with Spindle: http://lists.sourceforge.net/mailman/listinfo/spindle-user Blog: http://jroller.com/page/glongman Feature Updates: http://spindle.sf.net/updates ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642