GNOME Bugzilla – Bug 584064
gtkdoc-mkhtml breaks when given documents whose first line is "<?xml"
Last modified: 2009-05-31 05:10:16 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
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.
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.
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.
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.
Created attachment 135511 [details] /opt/local/etc/xml/catalog file
Created attachment 135515 [details] opensuse 11.1 catalog The catalog references further catalogs and so on.
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.
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.
I am quite sure. After all gtk-doc is just calling xsltproc and if you would complain there, they would come to same conclussion.
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