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 584064 - gtkdoc-mkhtml breaks when given documents whose first line is "<?xml"
gtkdoc-mkhtml breaks when given documents whose first line is "<?xml"
Status: RESOLVED NOTABUG
Product: gtk-doc
Classification: Platform
Component: general
1.11
Other Mac OS
: Normal normal
: ---
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2009-05-28 00:27 UTC by Jim Meyer
Modified: 2009-05-31 05:10 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
/opt/local/etc/xml/catalog file (784 bytes, application/xml)
2009-05-28 19:43 UTC, Jim Meyer
Details
opensuse 11.1 catalog (10.04 KB, text/plain)
2009-05-28 20:15 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
Details

Description Jim Meyer 2009-05-28 00:27:06 UTC
I'm working on building evolution-data-server on MacOS. I have gtk-doc-1.11 installed courtesy of MacPorts. Lines 63-67 of gtkdoc-mkhtml read:

if $is_xml; then
  /opt/local/bin/xsltproc $path_arg --nonet --xinclude \
      --stringparam gtkdoc.bookname $module \
      --stringparam gtkdoc.version "1.11" \
      "$@" $gtkdocdir/gtk-doc.xsl $document || exit $?

Unfortunately, line 6 of $gtkdocdir/gtk-doc.xsl is:

  <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>

This causes gtkdoc-mkhtml to barf on any document which starts with "<?xml" as that sets $is_xml true, which then calls xsltproc with "--nonet" and the gtk-doc.xsl file which imports http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl

Unfortunate. =\

--j
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2009-05-28 07:51:33 UTC
Hmm, if a file starts with "<?xml", then it is (or should be) xml right? Could you please clarify your expectation? Is the package you are trying to build mixing xml and sgml - if so, please file a bug there - that would be unsupportable.
Comment 2 Jim Meyer 2009-05-28 08:13:55 UTC
To my (quite limited) understanding, XML is a subset of SGML; thus, an SGML document can legitimately begin "<?xml" (or, for that matter, "<html"). I've spent some time reading around in http://validator.w3.org/docs/sgml.html and
http://www.w3.org/MarkUp/SGML/ though I certainly wouldn't claim authority.

However, my point still stands for XML documents.
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2009-05-28 09:52:10 UTC
Nope, neither is a subset of the other.

http://en.wikipedia.org/wiki/XML
"XML began as a simplified subset of the Standard Generalized Markup Language (SGML), ..."

Please also post the error that you are getting here.
Comment 4 Jim Meyer 2009-05-28 19:42:55 UTC
We'll change the title to make it more clear and invite less discussion of the lineage of XML and SGML.

The error looked like this:

*** Building HTML ***
rm -rf ./html 
mkdir ./html
cd ./html && gtkdoc-mkhtml libebook ../libebook-docs.sgml
I/O error : Attempt to load network entity http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"
compilation error: file /opt/local/share/gtk-doc/data/gtk-doc.xsl line 6 element import
xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl

As implied previously, the file "../libebook-docs.sgml" begins "<?xml" which triggers the code copied into the initial notice.

I've found other information which indicates that it should be able to look this up in the xml catalog; I'll attach mine for perusal.
Comment 5 Jim Meyer 2009-05-28 19:43:52 UTC
Created attachment 135511 [details]
/opt/local/etc/xml/catalog file
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2009-05-28 20:15:32 UTC
Created attachment 135515 [details]
opensuse 11.1 catalog

The catalog references further catalogs and so on.
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2009-05-28 20:16:16 UTC
To me that sounds like an issue with your xml catalog setup. Can you convert docbook to html normaly? Where does your xml-catalog come from? I attach the one from my distro for reference.
Comment 8 Jim Meyer 2009-05-29 02:42:42 UTC
It came from MacPorts. I'm not sure from which port. I don't normally convert from docbook to html that I'm aware of.

If you're fairly certain it's my catalog, feel free to resolve. I solved my problem and have invested the time I can to run this down and/or remedy my ignorance.

Comment 9 Stefan Sauer (gstreamer, gtkdoc dev) 2009-05-30 17:55:30 UTC
I am quite sure. After all gtk-doc is just calling xsltproc and if you would complain there, they would come to same conclussion.
Comment 10 Jim Meyer 2009-05-31 05:10:16 UTC
For posterity and the search engines:

Turns out this line was missing from my catalog:

<nextCatalog catalog="/opt/local/share/xsl/docbook-xsl/catalog.xml" />

Uninstalling and reinstalling MacPorts docbook-xsl port fixed it.

--j