Bug 20232 - Fails to compile, xml does not validate
Summary: Fails to compile, xml does not validate
Status: RESOLVED FIXED
Alias: None
Product: ConsoleKit
Classification: Unclassified
Component: Daemon (show other bugs)
Version: unspecified
Hardware: Other All
: medium critical
Assignee: william.jon.mccann
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-20 05:43 UTC by Michael Biebl
Modified: 2009-07-16 14:17 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Build log (39.92 KB, text/plain)
2009-02-20 05:43 UTC, Michael Biebl
Details

Description Michael Biebl 2009-02-20 05:43:48 UTC
Created attachment 23132 [details]
Build log 

Running
./configure --enable-docbook-docs && make results in a failing build.

Complete build log attached.

There is also a Debian bug filed at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=516253
Comment 1 william.jon.mccann 2009-02-20 09:01:40 UTC
Yeah, I've noticed this too.  Kinda strange since it used to work.  Any ideas?  Thanks.
Comment 2 Michael Biebl 2009-02-21 15:47:02 UTC
(In reply to comment #1)
> Yeah, I've noticed this too.  Kinda strange since it used to work.  Any ideas? 

I'm not an expert in XML/XSLT, so I don't have any advice without looking into it first myself, sorry.
Comment 3 Daniel Leidert 2009-03-03 03:05:38 UTC
xmlto used to validate XML documents via `xmllint >/dev/null --xinclude --postvalid' However, this does not resolve entities and thus may fail in certain situations, where we have a valid XML document. So this is a bug. It was fixed in Debian (and will be fixed in the upcoming 0.0.22 release) by adding the --noent switch for xmllint, so it resolves the entities too. What's happening here is, that the resulting document with resolved entities does not validate and xmllint also clearly shows you, where your DocBook is not valid. Typical mistakes done are:

<listitem>text</listitem> must be <listitem><para>text</para></listitem>
(or <simpara> instead of <para>)

<variablelist role="params"/> is not valid, as <variablelist> must have
a <varlistentry> child (it's not an empty element)

<refsect1> contents must not be mixed <para>|<variablelist> and <refsect2> - it can only be *first* content (like <para> or <variablelist>) and then *only* <refsect2>, but not <para> between the <refsect2>

Fix those issues to get a valid DocBook XML file. You can test the result with:

xmllint --noout --noent --valid

As long as xmllint complains, your XML is not valid.


I would further suggest, that you add the following code to your configure.ac:

AC_ARG_VAR([XMLTO],[Define/override the `xmlto' location.])
AC_ARG_VAR([XMLTO_FLAGS],[Define/override `xmlto' options, like `--skip-validation'.])

(this works nice in addition to AC_PATH_PROG) and in doc/Makefile.am use

$(XMLTO) $(XMLTO_FLAGS) ...

to let the user/maintainer workaround buggy XML if necessary (like in this case). However, you should create a check-target to check your DocBook XML:

check-local:
	xmllint --noout --noent --valid ConsoleKit.xml

to catch buggy XML before you make a distribution tarball.

Regards, Daniel
Comment 4 william.jon.mccann 2009-07-16 14:17:15 UTC
Hopefully fixed now in master.  Thanks for the advice!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.