Description of problem: According to 'man xsltproc', the program should exit with status 6 if the input document had errors. Yet I ran into a case where xsltproc complained to stderr about a problem in the document but still exited with status 0. Version-Release number of selected component (if applicable): libxslt-1.1.26-3.fc14.x86_64 How reproducible: 100% Steps to Reproduce: 1. On the attached file (from libvirt.git commit v0.8.8-320-g6c9e89b): $ /usr/bin/xsltproc --stringparam pagename $name --nonet --html ../docs/site.xsl formatdomain.html.in > /dev/null 2. echo $? Actual results: formatdomain.html.in:356: HTML parser error : Unexpected end tag : vcpu required attributes, the attribute <code>vcpu</vcpu> specifies vcpu id, 0 Expected results: If anything is printed to stderr, that represents a bug in the input document, and should be reflected as non-zero exit status (and according to the man page, I think status 6 is most appropriate for this particular error). Additional info:
Created attachment 489210 [details] buggy xml document (used </vcpu> instead of the intended </code> on line 356)
In the above example, I had done 'export name=formatdomain.html'; I'm also attaching the site.xml used to reproduce the problem.
Created attachment 489211 [details] additional file used in reproduction example
paphio:~/libvirt/docs -> xsltproc --stringparam pagename page --html ../docs/site.xsl formatdomain.html.in > /dev/null paphio:~/libvirt/docs -> echo $? 0 paphio:~/libvirt/docs -> xsltproc --stringparam pagename page ../docs/site.xsl formatdomain.html.in > /dev/null [.... a bunch of errors to stderr ] formatdomain.html.in:2337: parser error : Premature end of data in tag html line 1 ^ unable to parse formatdomain.html.in paphio:~/libvirt/docs -> echo $? 6 paphio:~/libvirt/docs -> The "problem" is --html, it asks xsltproc to use the libxml2 HTML parser to generate the input tree (instead of using the XML parser, XSLT is actually not defined for HTML input, it's a libxslt/xsltproc extension). The libxml2 HTML parser has to be tolerant, there is no way around as nearly no real deployed HTML is "well formed", and well the behaviour of HTML parser in browsers are tolerant to the extreme hiding the fact. I'm not sure it's really a bug per see, we should augment the man page to express the fact that when asking for HTML input parsing that those checks are disabled, currently we just say: --html The input document is an HTML file. Daniel
This message is a notice that Fedora 14 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 14. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At this time, all open bugs with a Fedora 'version' of '14' have been closed as WONTFIX. (Please note: Our normal process is to give advanced warning of this occurring, but we forgot to do that. A thousand apologies.) Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, feel free to reopen this bug and simply change the 'version' to a later Fedora version. Bug Reporter: Thank you for reporting this issue and we are sorry that we were unable to fix it before Fedora 14 reached end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged to click on "Clone This Bug" (top right of this page) and open it against that version of Fedora. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping