Return-Path: Delivered-To: apmail-incubator-general-archive@www.apache.org Received: (qmail 66384 invoked from network); 1 Feb 2006 09:00:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Feb 2006 09:00:56 -0000 Received: (qmail 86322 invoked by uid 500); 1 Feb 2006 09:00:51 -0000 Delivered-To: apmail-incubator-general-archive@incubator.apache.org Received: (qmail 86257 invoked by uid 500); 1 Feb 2006 09:00:51 -0000 Mailing-List: contact general-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@incubator.apache.org Delivered-To: mailing list general@incubator.apache.org Received: (qmail 86246 invoked by uid 99); 1 Feb 2006 09:00:51 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Feb 2006 01:00:51 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [216.218.185.16] (HELO bali.sjc.webweaving.org) (216.218.185.16) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Feb 2006 01:00:50 -0800 Received: from bali.sjc.webweaving.org (localhost [127.0.0.1]) by bali.sjc.webweaving.org (8.12.11/8.12.11) with ESMTP id k1190TKZ096332 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 1 Feb 2006 01:00:29 -0800 (PST) (envelope-from mail@leosimons.com) Received: (from lsimons@localhost) by bali.sjc.webweaving.org (8.12.11/8.12.11/Submit) id k1190SNF096331 for general@incubator.apache.org; Wed, 1 Feb 2006 01:00:28 -0800 (PST) (envelope-from mail@leosimons.com) X-Authentication-Warning: bali.sjc.webweaving.org: lsimons set sender to mail@leosimons.com using -f Date: Wed, 1 Feb 2006 01:00:28 -0800 From: Leo Simons To: general@incubator.apache.org Subject: Re: [docs] whitespace and indenting of xml Message-ID: <20060201090028.GB95494@bali.sjc.webweaving.org> Mail-Followup-To: Leo Simons , general@incubator.apache.org References: <20060129052435.GA261@igg.indexgeo.com.au> <20060131050853.GB22534@igg.indexgeo.com.au> <43DFBAEE.2040103@roguewave.com> <20060131222956.GB12595@igg.indexgeo.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060131222956.GB12595@igg.indexgeo.com.au> User-Agent: Mutt/1.5.10i X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on bali.sjc.webweaving.org X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-5.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.0.4 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N How to clean up HTML... Using shell with xmllint (yes, ugly shortcuts below): export cmd="xmllint --html" find . -name '*.html' -exec $cmd \{\} > \{\}.new \; find . -name '*.html' -exec cp \{\}.new \{\} \; svn status | egrep '^\?' | sed -e 's/^\? *//g' | xargs rm (--html not totally necessary if you have valid XML, eg you can format xml as follows: export cmd="xmllint" find . -name '*.xml' -exec $cmd \{\} > \{\}.new \; find . -name '*.xml' -exec cp \{\}.new \{\} \; svn status | egrep '^\?' | sed -e 's/^\? *//g' | xargs rm ) Using shell with tidy: export cmd="tidy -m -i -c -e" find . -name '*.html' -exec $cmd \{\} \; In ant you would create a and then do an of much the same. Both tools have some more interesting options. - LSD On Wed, Feb 01, 2006 at 09:29:56AM +1100, David Crossley wrote: > Martin Sebor wrote: > > > > I'm a little distressed to see the conversion process has messed > > up the formatting of the original HTML that I manually maintained > > for readability. Specifically, many of the terminating tags (such > > as

) are not indented as they ought to be and instead are in > > column 1. I don't suppose there is an easy way to regenerate the > > page so as to preserve more of the original formatting, is there? > > I tried my best to format stuff automatically > as part of the Forrest output process. If it > was raw xml serialiser output then it would have > been even worse. No we cannot retain original > formatting. > > I know that it is not good enough. > > Someone could run all documents through something > like HTML Tidy or Henning's CodeWrestler or perhaps > some XSL. > > I would be pleased to see how they do this, because > i want to add the ability to our future tools. > > On many projects i have seen messy source documents > cause grief with svn diffs - too much clutter and > inconsistent whitespace. > > -David > > --------------------------------------------------------------------- > To unsubscribe, e-mail: general-unsubscribe@incubator.apache.org > For additional commands, e-mail: general-help@incubator.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: general-unsubscribe@incubator.apache.org For additional commands, e-mail: general-help@incubator.apache.org