[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Attn Mike Kay (was using dom.Document as SAXON source)
> The other problem I've encountered is with XMLEmitter, which calls > close() on the Writer it is using inside the endDocument() method. > I'm not sure if this is a good idea, mainly because that class is > not responsible for calling open() (or init()) in the first place. > It also prevents people from outputting more data using that writer. This area has been problematic for a while, I've never quite sorted out a satisfactory approach that works well in all cases. If I don't close the writer, it sometimes doesn't get flushed and output is therefore lost. If I do close it, it stops it being used again, and in the case of System.out it seems to mean that subsequent output to System.out gets lost. The correct approach is probably roughly along the lines of: if the user supplies a writer, it's the user's responsibility to close it after use, if they supply a filename, it's the system's. Any suggestions welcome. Mike Kay P.S. As those of you on the SAXON mailing list will know, SAXON 5.1 is now available: includes bug fixes and multithreading. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|