From owner-freebsd-doc Tue Aug 20 13:57:16 2002 Delivered-To: freebsd-doc@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 09C2737B401 for ; Tue, 20 Aug 2002 13:57:13 -0700 (PDT) Received: from mail1.panix.com (mail1.panix.com [166.84.1.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id 44CBA43E70 for ; Tue, 20 Aug 2002 13:57:13 -0700 (PDT) (envelope-from ziggy@panix.com) Received: from panix2.panix.com (panix2.panix.com [166.84.1.2]) by mail1.panix.com (Postfix) with ESMTP id 614424874A; Tue, 20 Aug 2002 16:57:12 -0400 (EDT) Received: (from ziggy@localhost) by panix2.panix.com (8.11.3nb1/8.8.8/PanixN1.0) id g7KKvC800433; Tue, 20 Aug 2002 16:57:12 -0400 (EDT) Date: Tue, 20 Aug 2002 16:57:12 -0400 From: Adam Turoff To: Dylan Carlson Cc: freebsd-doc@FreeBSD.ORG Subject: Re: 'tidy' equiv for sgml? Message-ID: <20020820205712.GA28162@panix.com> References: <200208201414.55535.absinthe@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200208201414.55535.absinthe@pobox.com> User-Agent: Mutt/1.4i Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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 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