cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Boag/CAM/Lotus" <Scott_B...@lotus.com>
Subject Re: JDOM and Thank You :)
Date Thu, 27 Apr 2000 17:45:59 GMT

I don't believe JDOM will work with Xalan, or any other XSLT processors
that I know of, unless you produce SAX events (or a DOM) from the JDOM.
Xalan can't use JDOM internally, for one reason, because you can't traverse
up from a Node, and, for another, I believe it is important for Xalan to be
compatible with the DOM (including the interface model, which allows Xalan
to walk many tree implementations).  Cocoon should really use SAX2, and it
should not care about tree object models, in my opinion.

-scott




                                                                                         
                            
                    Mike Engelhart                                                       
                            
                    <mengelhart@eart        To:     cocoon-dev@xml.apache.org         
                               
                    htrip.com>              cc:     (bcc: Scott Boag/CAM/Lotus)       
                               
                                            Subject:     Re: JDOM and Thank You :)       
                            
                    04/27/2000 01:15                                                     
                            
                    PM                                                                   
                            
                    Please respond                                                       
                            
                    to cocoon-dev                                                        
                            
                                                                                         
                            
                                                                                         
                            



Brett D. McLaughlin wrote:

> JDOM is an /alternative/ to DOM and SAX.  It provides a fast,
> Java-optimized method of reading, writing, and manipulating XML.  (Btw,
> the PowerPoint slides just went up on the website - check
> download/docs.  PDF coming in an hour or so).  DOM is trying to be a
> cross-platform, 100% accurate representation of an XML document.  We
> don't believe that in most cases, Java developers need that.  THey want
> an intuitive, usable means of accessing XML data.
>
> For example:
>
> <dom-code>
> // This does *not* work, even though it is intuitive
> String elementValue = element.getValue();
> // This works (most of the time!)
> String elementValue = element.getFirstChild().getValue();
> </dom-code>
awww yeah!!!

Thanks for this!  I hated the W3C DOM API!!!! Apparently you and Jason did
too :-)

one question -have you tested it's interoperability with Cocoon 1.x (and/or
2.x)??
Scenario:
I'm about to rewrite some code to take data from a result set and want to
put it directly into an XML fragment rather than an intermediate ArrayList.
Can I use JDOM for this and hand a Node off to an XSP page for further
processing using Xerces??  Please??? :-)

thanks again...

mike






Mime
View raw message