GNOME Bugzilla – Bug 624167
xsltproc should (optionaly) error out on parser errors
Last modified: 2011-03-29 14:30:43 UTC
I would like to see xsltproc to return !=0 when a parser error occured. This would spare gtk-doc to run xmllint over input files too. Could this be done unconditionally, or should it happen only when an extra flag has bee passed to xsltproc? xsltproc --path /home/ensonic/projects/gnome/gtk-doc/tests/bugs/docs --nonet --xinclude --stringparam gtkdoc.bookname tester --stringparam gtkdoc.version 1.15.1 /home/ensonic/projects/gnome/gtk-doc/gtk-doc.xsl ../tester-docs.xml; echo $? ../xml/tester.xml:591: parser error : Opening and ending tag mismatch: para line 578 and refsect2 </variablelist></refsect2> ^ ... 0 where xmllint --noout --xinclude ../tester-docs.xml; echo $? whould yield 1
No such problem with: $ xsltproc --version Using libxml 20708, libxslt 10126 and libexslt 815 xsltproc was compiled against libxml 20705, libxslt 10126 and libexslt 815 libxslt 10126 was compiled against libxml 20705 libexslt 815 was compiled against libxml 20705 under Mac OS X, and with: $ xsltproc --version Using libxml 20708, libxslt 10126 and libexslt 815 xsltproc was compiled against libxml 20708, libxslt 10126 and libexslt 815 libxslt 10126 was compiled against libxml 20708 libexslt 815 was compiled against libxml 20708 under Debian GNU/Linux. I get an exit status = 4 in case of a parser error in the XSLT file and an exit status = 6 in case of a parser error in the XML file. I haven't used any particular option.
Oh, this work now indeed: > xsltproc --version Using libxml 20707, libxslt 10124 and libexslt 813