[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] Fix several formatting mistakes in doc



On Thu, Mar 31, 2011 at 01:23:01PM -0600, Eric Blake wrote:
> On 03/31/2011 11:18 AM, Daniel P. Berrange wrote:
> >> That looks like a bug in xsltproc (here from Fedora
> >> libxslt-1.1.26-3.fc14.x86_64), since the man page states that $? should
> >> be 6 when there is an error in the document.
> >>
> >> I can work around it by sniffing for non-empty stderr; that will look
> >> yucky in the makefile, but is probably worth doing.
> > 
> > Hmm, so we've actually got two things to validate
> > 
> >  - Welformed XML
> >  - HTML schema compliance
> > 
> > The current xmllint run is doing the latter. We should also
> > run xmllint before xsltproc, so we can validate wellformedness
> > of the input HTML files. Thus avoiding reliance of xsltproc
> > exit status
> 
> Do you have a sample command line for how to make xmllint check that the
> html.in file is well-formed XML?  I just tried:
> 
> $ SGML_CATALOG_FILES='/etc/xml/catalog'   /usr/bin/xmllint --catalogs
> --nonet --format --valid formatcaps.html.in >/dev/null
> formatcaps.html.in:1: validity error : Validation failed: no DTD found !
> <html>
>      ^

  just drop --valid from the command line, xmllint usually doesn't
check validity. But IMHO it's simpler to just drop the --html flag from
xsltproc as suggestedon previous mail

> but that's obviously not right (it works on the post-processed generated
> html document, but that's why we're generating the document, to add in
> the rest of the boilerplate to the xml shell that makes it valid html).

  Yup the input should just be expected to be well-formed not valid,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]