[PATCH sgml-doctools 2/2] Using xsltproc rather than xmlto enables using correct stylesheets

Dan Nicholson dbn.lists at gmail.com
Tue Mar 22 13:36:53 PDT 2011


On Tue, Mar 22, 2011 at 7:20 AM, Gaetan Nadon <memsize at videotron.ca> wrote:
> As explained in xorg-docs:
>    Xmlto is a script that selects the appropriate back-end
>    based on options and tools availability.
>
>    Xmlto uses an xsl "fragment" which is not compatible with
>    the standard use of xsl stylesheets. The customization for
>    xhtml and fo cannot be used with xsltproc in that context.
>    It makes adoption of docbook features like olink and profiling
>    significantly more difficult.
>
>    The tools that xmlto invokes will be called directly by the makefile,
>    which are xmllint for validation, xsltproc, and w3m for text format.
>
> The xorg styleheets no longer have to be xmlto "fragments" and can now
> be true customization stylesheet of docbook xsl.
>
> Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
> ---
>  xorg-fo.xsl    |    4 +++-
>  xorg-xhtml.xsl |    1 +
>  2 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/xorg-fo.xsl b/xorg-fo.xsl
> index c14fc40..85890f6 100644
> --- a/xorg-fo.xsl
> +++ b/xorg-fo.xsl
> @@ -7,7 +7,9 @@
>        http://docbook.sourceforge.net/release/xsl/current/doc/fo/
>  -->
>
> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
> +<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
> +
>
>                        <!-- Reference Pages HTML/FO Parameters -->
>
> diff --git a/xorg-xhtml.xsl b/xorg-xhtml.xsl
> index 9841fb5..1c8d6c6 100644
> --- a/xorg-xhtml.xsl
> +++ b/xorg-xhtml.xsl
> @@ -8,6 +8,7 @@
>  -->
>
>  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
> +<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/>
>
>                        <!-- Reference Pages HTML/FO Parameters -->
>

Oh, yeah this seems like a good fix. I'm not sure why I was using the
stub before. Seems like the whitespace fixes (especially for non-xsl
files) should be in a separate commit, but I don't really care.

Reviewed-by <dbn.lists at gmail.com>


More information about the xorg-devel mailing list