After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 624167 - xsltproc should (optionaly) error out on parser errors
xsltproc should (optionaly) error out on parser errors
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks: 623971
 
 
Reported: 2010-07-12 13:07 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2011-03-29 14:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Stefan Sauer (gstreamer, gtkdoc dev) 2010-07-12 13:07:15 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
Comment 1 Vincent Lefevre 2011-03-29 14:07:07 UTC
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.
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2011-03-29 14:30:43 UTC
Oh, this work now indeed:

> xsltproc --version
Using libxml 20707, libxslt 10124 and libexslt 813