Date: Sat, 21 Feb 2015 20:48:02 +0100 From: Christoph Brinkhaus <c.brinkhaus@t-online.de> To: freebsd-doc@FreeBSD.org Subject: Re: igor and xmllint Message-ID: <20150221194802.GA923@esprimo.local> In-Reply-To: <54E8C018.1080202@freebsd.org> References: <20150221165145.GA2107@esprimo.local> <54E8C018.1080202@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Feb 21, 2015 at 12:27:52PM -0500, Allan Jude wrote: > On 2015-02-21 11:51, Christoph Brinkhaus wrote: > > Hello, > > > > I have read the fdp-primer but I am not sure about > > the verification of xml files. > > > > In the quick start section igor is mentioned which > > works well. Unfortunaltely I have overlooked it first > > because it is just mentioned once. > > > > In the other sections the files are checked by xmllint. > > On by system I have problems with xmllint. Even the self > > generated file a.txt can not be checked as below: > > > > xmllint --valid --noout /home/chris/Projekte/a.txt > > > > The response is > > > > /home/chris/Projekte/a.txt:2: validity error : Validation failed: no DTD found ! > > <info>abc</info> > > ^ > > > > > > Does igor included the functions of xmllint or not? > > Is it necessary to verify a document ifirst by xmllint > > and then by igor? Or is the test using igor enough? > > > > I am using FreeBSD for about one year. Therefore I am not > > able to generate big documents which are valuable in terms > > of the content. > > > > I can help in changing docuemnts and by translating to German. > > > > Kind regards, > > > > Christoph > > _______________________________________________ > > freebsd-doc@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-doc > > To unsubscribe, send any mail to "freebsd-doc-unsubscribe@freebsd.org" > > > > igor is a perl script written by a FreeBSD Docs developer to catch > common mistakes. It looks to make you followed the conventions like two > spaces after a period, the correct indent level, catches common typos > and incorrect forms of works from the wordlist. > > It is not the same as xmllint, which checks the validity of the xml. > > XML documents require a DTD, which defines which elements are valid for > use in the document. > > A typical article will look something like this: > > <?xml version="1.0" encoding="iso-8859-1"?> > <!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook XML V5.0-Based > Extension//EN" > "http://www.FreeBSD.org/XML/share/xml/freebsd50.dtd"> > <article xmlns="http://docbook.org/ns/docbook" > xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" > xml:lang="en"> <info> > > which allows all of the docbook elements to be used. > > -- > Allan Jude > Dear Allan, thank you for the quick answer. I have a problem verifying existing xml files as /usr/doc/en_US.ISO8859-1/books/handbook # xmllint --valid --noout book.xml book.xml:14: warning: failed to load external entity "http://www.FreeBSD.org/XML/share/xml/freebsd50.dtd" ]> ^ book.xml:18: element book: validity error : No declaration for attribute xmlns of element book xml:lang="en"> ^ book.xml:18: element book: validity error : No declaration for attribute xmlns:xlink of element book xml:lang="en"> ^ and so on. From my understanding the catalog files in /usr/doc/share/xml/ should handle that. I will dig the correct command line parameter. Kind regards, Christoph
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150221194802.GA923>