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

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



On Fri, Apr 01, 2011 at 09:25:45AM +0800, Daniel Veillard wrote:
> On Thu, Mar 31, 2011 at 11:15:34AM -0600, Eric Blake wrote:
> > On 03/31/2011 07:58 AM, Daniel P. Berrange wrote:
> > > 
> > >  - We run xmllint, but failures in xmllint validation
> > >    are not causing a build failure
> > 
> > We already have code in place to call 'exit 1' on xmllint failure (but
> > not in all places).  However, in my testing, it was xsltproc that is not
> > throwing an error:
> > 
> > $ /usr/bin/xsltproc --stringparam pagename $name --nonet --html
> > ../docs/site.xsl formatdomain.html.in > formatdomain.html.tmp
> > formatdomain.html.in:356: HTML parser error : Unexpected end tag : vcpu
> >         required attributes, the attribute <code>vcpu</vcpu> specifies
> > vcpu id,
> >                                                             ^
> > $ echo $?
> > 0
> 
>   it's because we are using --html, instructing libxml2 underneath to
> use teh HTML parser to load the .html.in . And the HTML parser is just
> reporting errors, not failing on them (as 99% of the HTML around is
> just buggy).
> 
> > 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.
> 
>   Well except for HTML input, remove the --html and see, maybe we could
>   do that in the Makefile and insist on the .html.in being well formed
>   in the first place.
> 
> > I can work around it by sniffing for non-empty stderr; that will look
> > yucky in the makefile, but is probably worth doing.
> 
>   Doesn't sound that great honnestly, try dropping --html instead and
>   see how it goes

Yes, that sounds reasonable. Our site.xsl file is already setup to
output XHTML, so we should treat our input as wellformed XHTML too,
rather than loose HTML.


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


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