Thorsten Scherler wrote: > Hi all, > > I played around with > $FORREST_HOME/etc/tidy-xml.pl > in a custom project where I need to clean up the white spaces.
At Forrest we do not use that old experiment. Probably should remove it, as is seems to confuse. See my answer to Gavin a few weeks ago. There is an "xmlformat" task in main/build.xml which uses etc/xmlformat.conf I did heaps of work with this just before our last release, and found it to be much much better than using tidy. -David > For now we have not set the encoding in our configuration, this however > can lead to problems in combination with > add-xml-decl: yes > > If you have a xml file that did not had a xml declaration, tidy will add > one and use the default encoding which is "us-ascii". > > I needed to add "char-encoding: utf8" to the config to get rid of > invalid character error that all my utf-8 characters had thrown. > > Another thing is the indent of all attributes. IMO that it just too much > since if you have an element with 5 attributes you will have it now in 6 > lines. > > I propose the following change: > Index: etc/tidy-config.txt > =================================================================== > --- etc/tidy-config.txt (revision 748122) > +++ etc/tidy-config.txt (working copy) > @@ -1,8 +1,9 @@ > add-xml-decl: yes > +char-encoding: utf8 > input-xml: yes > output-xml:yes > indent: auto > -indent-attributes: yes > +indent-attributes: no > indent-spaces: 2 > write-back: yes > preserve-entities: yes > > wdyt? > > salu2 > -- > Thorsten Scherler <thorsten.at.apache.org> > Open Source Java <consulting, training and solutions> > > Sociedad Andaluza para el Desarrollo de la Sociedad > de la Informaci??n, S.A.U. (SADESI) > > > >