Date: Tue, 20 Aug 2002 16:57:12 -0400 From: Adam Turoff <ziggy@panix.com> To: Dylan Carlson <absinthe@pobox.com> Cc: freebsd-doc@FreeBSD.ORG Subject: Re: 'tidy' equiv for sgml? Message-ID: <20020820205712.GA28162@panix.com> In-Reply-To: <200208201414.55535.absinthe@pobox.com> References: <200208201414.55535.absinthe@pobox.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Aug 20, 2002 at 02:14:55PM -0400, Dylan Carlson wrote: > Curious if there is a tidy equivalent for SGML/XML source. Equivalent how? Something that pretty prints, something that applies consistent formatting, or something that identifies errors? Jade comes with sgmlnorm and sx (osgmlnorm and osx in the case of OpenJade), which properly parse an SGML document and produce a canonical output document. [o]sgmlnorm produces an SGML document (SGML rules for open/close tags, as your declaration and DTD allow), and [o]sx produces an XMLified version of your document. Another feature of these tools is that the single output file reflects entity inclusion -- if you have multiple documents included through <!ENTITY> declarations, they'll appear as appropriate in the output file. Unfortunately, neither of these tools handle indenting or pretty-printing the output. Feeding an SGML document through [o]sx, is a good first step; feeding that output through a Perl/Java/Python/C program to add the appropriate amount of pretty-printing is a trivial task. Z. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020820205712.GA28162>