Date: Mon, 16 Feb 2004 16:29:46 -0500 From: Chuck Swiger <chuck@pkix.net> To: Ceri Davies <ceri@FreeBSD.org> Cc: thierry@pompo.net Subject: Re: Validating docbook articles... Message-ID: <4031364A.2070708@pkix.net> In-Reply-To: <20040216130659.GC617@submonkey.net> References: <8D03FA54-4BA6-11D8-8D97-003065ABFD92@pkix.net> <20040216130659.GC617@submonkey.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Ceri Davies wrote: > On Tue, Jan 20, 2004 at 07:12:50PM -0500, Chuck Swiger wrote: [ ...questions about validating articles... ] > If I recall correctly, DocBook actually does generate them in lower > case, and then the W3C's tidy changes them to uppercase, which seemed > rather perverse to me. It's been some time since I looked at this > though, so I could be mistaken. A quick test (replacing tidy with /bin/cat) suggests that attributes are being generated in uppercase, although I would agree with you that tidy ought to do something when working in -asxml mode. :-) For what it's worth, there's a new version of W3C tidy which does generate the attributes in lower case and when used with docproj articles will validate properly. The www/tidy-devel port isn't quite a drop-in workaround, because: [ ... ] /usr/local/bin/tidy -wrap 90 -m -raw -preserve -f /dev/null -asxml article.html HTML Tidy: unknown option: p HTML Tidy: unknown option: r HTML Tidy: unknown option: s HTML Tidy: unknown option: r HTML Tidy: unknown option: v *** Error code 1 (ignored) ...tidy-devel doesn't understand the -preserve option. Something like the following, as www/tidy-devel/files/patch-console-tidy.c: --- console/tidy.c_orig Mon Feb 16 16:17:54 2004 +++ console/tidy.c Mon Feb 16 16:21:29 2004 @@ -440,6 +440,9 @@ if ( strcasecmp(arg, "xml") == 0) tidyOptSetBool( tdoc, TidyXmlTags, yes ); + else if (strcmp(arg, "preserve") == 0); + /* no-op for backwards compatibility */ + else if ( strcasecmp(arg, "asxml") == 0 || strcasecmp(arg, "asxhtml") == 0 ) { ...seems to do the trick. -- -Chuck
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4031364A.2070708>