From owner-freebsd-doc@FreeBSD.ORG Fri Jun 1 10:16:16 2012 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id D62BF1065674; Fri, 1 Jun 2012 10:16:16 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 5497EB7E37; Fri, 1 Jun 2012 10:12:42 +0000 (UTC) Message-ID: <4FC8959A.8020008@FreeBSD.org> Date: Fri, 01 Jun 2012 03:12:42 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120506 Thunderbird/12.0.1 MIME-Version: 1.0 To: "Simon L. B. Nielsen" References: <201205302046.q4UKka2f062416@repoman.freebsd.org> <20120530222837.GA94334@dormouse.experts-exchange.com> <4FC7BDE9.40602@FreeBSD.org> <4FC814BB.90507@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.5pre OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Eitan Adler , freebsd-doc@freebsd.org, wblock@freebsd.org, Thierry Thomas , Jason Helfman Subject: Re: cvs commit: ports/security/vuxml vuln.xml X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jun 2012 10:16:16 -0000 On 06/01/2012 02:55, Simon L. B. Nielsen wrote: > On Fri, Jun 1, 2012 at 2:02 AM, Doug Barton wrote: >>> On Thu, 31 May 2012, Doug Barton wrote: >>> >>>> On 05/31/2012 09:28 AM, Warren Block wrote: >>>>> Sorry, I missed the original post and am not quite sure what is being >>>>> checked. At present, igor doesn't know XML at all. My hope is that >>>>> some existing XML validator can be used to check tagging and indentation >>>>> of DocBook XML, and igor can just check for documentation-specific >>>>> problems. >>>> >>>> xmllint does a pretty good job of validation. Not sure how much it helps >>>> with indentation, but it's a good place to start. >> >> To amplify that slightly, since "The Fine Manual" leaves something to be >> desired ... >> >> xmllint --noout --dtdvalid http://www.vuxml.org/dtd/vuxml-1/vuxml-11.dtd >> vuln.xml >> >> is what you want to validate that the file matches the DTD (the current >> version passes). There is no way to use xmllint to "validate the >> whitespace," but you could theoretically use the --format option as part >> of 'make validate'. Note, that would require a one-time commit to change >> the current format into what --format outputs, since they are pretty >> dramatically different. > > Just a note, DTD check is unfortunately rather far from validating > that VuXML entries are valid... Right ... the question I was responding to was, "How can we confirm that the XML is right?" which is a different question altogether. The wacky default whitespace conventions that we have for that file could be "fixed" (where that really means standardized on a differently wacky schema) by the --format option of xmllint. That would take the "human error" element out of the whitespace issue altogether, and avoid the need to validate it since it would always be standard. Validating against the DTD is probably also a good step to add, since if it doesn't at least pass that test, further attempts to validate the entries themselves are probably fruitless. IOW, adding xmllint to the mix will probably do more good than harm, although we need to be careful that we understand what it is, and isn't doing for us. Doug -- This .signature sanitized for your protection