From: Ian S. <Ian...@ar...> - 2003-03-26 16:36:21
|
Chris, >>Ian, this looks great! Super-elegant implementation of a dope idea. Now >>do you want to do it with the geotools feature model? Thanks, much appreciated. I think its very possible to do with the geotools feature model. I'll give it a shot, maybe today. >> might be nice is to also have it be able to return a string, instead of >> just writing to the output. The best way to handle that is use a ByteArrayOutputStream. The Transformer is dependant upon an OutputStream or Writer (or File). You can obtain the String from ByteArrayOutputStream.toString(). >> Another thing to keep in mind as well is that a formatting option would be really nice. Absolutely, I put the nasty formatting in there just to show the results off. A nice technique would be to use two different OutputVisitor classes, one which formats, one which doesn't (instead of if/else stuff). Ian |