addi wrote: > Diwaker Gupta wrote: > > > > The reason I don't want to use any IDE for this cleanup task, and > > instead a tool like Tidy, is that things can be automated much more > > easily. We can schedule clean-ups periodically, add targets to the > > build process to do it automatically -- there's a lot of flexibility > > in how we go about it.
But we cannot do such cleanup automatically. I do agree that we can have tools to assist us, even stand-alone build targets. > > Using an XSL transform for cleanup is attractive because we don't need > > any external utility; Forrest is all about XML processing anyywas :-) > > > > So I'm +1 on either Tidy or XSL (personally, I prefer Tidy since in my > > experience its much smarter and faster). -0 on jEdit plugins and such. > > I would say that I am +1 on XSL, +0 on Tidy and -0 on any IDE/editor. I am > doing more research to see if I can come up with a solution that leaves the > blank lines in. Turns out that Tidy has a config option vertical-spacing, > but that puts a blank line after every element closing tag so it ends up > looking pretty weird and adding lots of lines we wouldn't want. You can try > it out by adding "vertical-spacing=yes" to your config.txt file. I am mainly > not so keen on tidy at the moment because I am having trouble with it not > wanting to process due to errors that need to be resolved and it is giving me > a headache to figure out what the hell it wants from me, whereas the XSL just > works and stays "native" to Forrest, as it were. > > I wish there was a way in the xsl to preserve-space a blank line. Any xml > experts out there have any ideas? I don't know diddly about xsl. Expert, no. I wonder if Saxon has better indenting. Google found discussion about whitespace and blank lines http://saxon.sourceforge.net/saxon7.4/changes.html By the way, there is a tool called CodeWrestler started by a fellow ASF committer. It is a framework for adding code management modules. For example there is one module whose sole job is to strip trailing whitespace from a set of files. I like this approach. http://henning.schmiedehausen.org/wingnut-diaries/archives/14 -David