Lengthy "xmlto" build step in Cygwin.

Warren Young wyml@etr-usa.com
Fri Jul 1 22:11:00 GMT 2016


On Jul 1, 2016, at 2:52 PM, Hans-Bernhard Bröker wrote:
> 
> Am 01.07.2016 um 20:36 schrieb Warren Young:
> 
>> That means you have the DocBook tools installed but don’t have the
>> DocBook XSL stylesheets installed
> 
> only docbox2x-texi is checked for by winsup/doc/configure.ac.

You’re in a fine position to fix that, then. :)

> At least xmlto surely has to be checked for, too, don't you think?

That and xsltproc, at least.

> And maybe it would be possible to add a check for the docbook-xml45 package

The trick is finding that out portably.

You can’t check for version 4.5 stylesheets specifically, because someday the docs may move to DocBook 5.

You also can’t use Cygwin-specific methods to check for this because the docs are also built on non-Cygwin systems.  The official builds of everything under winsup are in fact cross-compiled on a Fedora box rather than built under Cygwin.

Finally, the stylesheets may be in different locations on different machines.

Probably the most portable method is something like

   if ! grep -q file://.*docbook /etc/xml/catalog
   then
       AC_MSG_ERROR([the DocBook stylesheets are not installed])
   fi

Consider that pseudocode.  (Untested, written off the top of my head.)

> Or, to turn this around: shouldn't one of these packages:
> 
> 	xmlto
> 	dblatex
> 	docbook2x
> 
> formally require package docbook-xml45

Certainly not xmlto or xsltproc, as they’re both used for more than DocBook.

dblatex could, I suppose, but you’ll find that Fedora doesn’t tie those two together, either:

  http://koji.fedoraproject.org/koji/rpminfo?rpmID=7275706

That’s probably because dblatex will consume either XSL or SGML stylesheets, and they don’t want to depend on both.  Plus, as you’ve found, the network fetch option does work; it’s just sllllooooow.

Even if you fix that, there's more than just dblatex for rendering DocBook to PDF, so you’d have to chase all those avenues, too.  For instance, there’s FOP, which isn’t DocBook specific, so making docbook-xsl a dependency of it would be wrong, so you’re left hangnig.

docbook2x is perhaps a better candidate, though I don’t actually see a reason it’s the only possible build option.  I suspect you could do everything it does in pure XSLT, obviating the need for it.  So, you’d still need to call out the need for docbook-xsl in the build instructions.

Bottom line, you just have to know you need these things, if you’re going to work with DocBook.  It’s just part of the learning curve.
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list