[PATCH sgml-doctools] Set stylesheet to provide XML profiling support

Matt Dew matt at osource.org
Sun Nov 7 11:42:50 PST 2010


On Fri, Nov 5, 2010 at 7:22 PM, Gaetan Nadon <memsize at videotron.ca> wrote:
> From: Matt Dew <matt at osource.org>
>
> Produces the same generated files when profiling is not used.
>
> Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
> ---
>  Makefile.am                     |    9 +-
>  Xorg_profile-chunk-html.xsl     |   17 ++
>  Xorg_profile-chunk-xhtml.xsl    |   17 ++
>  Xorg_profile-no-chunk-html.xsl  |   17 ++
>  Xorg_profile-no-chunk-xhtml.xsl |   17 ++
>  Xorg_profile-pdf.xsl            |   17 ++
>  Xorg_profile-txt.xsl            |   23 +++
>  xorg.xsl                        |  346 +++++++++++++++++++++++++++++++++++----
>  8 files changed, 433 insertions(+), 30 deletions(-)
>  create mode 100644 Xorg_profile-chunk-html.xsl
>  create mode 100644 Xorg_profile-chunk-xhtml.xsl
>  create mode 100644 Xorg_profile-no-chunk-html.xsl
>  create mode 100644 Xorg_profile-no-chunk-xhtml.xsl
>  create mode 100644 Xorg_profile-pdf.xsl
>  create mode 100644 Xorg_profile-txt.xsl
>
> diff --git a/Makefile.am b/Makefile.am
> index 049abac..152b440 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -21,7 +21,14 @@
>
>  sgmldir = $(prefix)/share/sgml/X11
>
> -dist_sgml_DATA = defs.ent xorg.css xorg.xsl
> +dist_sgml_DATA =                       \
> +       defs.ent                        \
> +       xorg.xsl                        \
> +       xorg.css                        \
> +       Xorg_profile-chunk-xhtml.xsl    \
> +       Xorg_profile-no-chunk-xhtml.xsl \
> +       Xorg_profile-pdf.xsl            \
> +       Xorg_profile-txt.xsl
>
>  pkgconfigdir = $(datadir)/pkgconfig
>  pkgconfig_DATA = xorg-sgml-doctools.pc
> diff --git a/Xorg_profile-chunk-html.xsl b/Xorg_profile-chunk-html.xsl
> new file mode 100644
> index 0000000..8de16d1
> --- /dev/null
> +++ b/Xorg_profile-chunk-html.xsl
> @@ -0,0 +1,17 @@
> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
> +<!-- This file is just a placeholder.
> +
> +     When docbook .xsl and .dtd files are installed locally, catalog files are
> +     also installed that point to them.  In these catalog files are rewrite rules
> +     that instruct xslt processors, xsltproc in our case, how to substitute
> +     local copies of the docbook files for the online versions.
> +     Setting XML_CATALOG_FILE tells xsltproc where the master catalog file is.
> +
> +     The preferred way to refer to the online files would be to directly pass
> +     the xsl location to xsltproc.  However, we use xmlto and xmlto requires
> +     a local file.   Therefore we use this localfile, to serve as a pointer
> +     to the online version.

<snip>

Gaetan,
  After looking at that comment a bit more I think I'd like to remove
one sentence from the comment in the Xorg_profile*.xsl files:

"Setting XML_CATALOG_FILE tells xsltproc where the master catalog file is."

Since we don't need or currently use this environment var, that
sentence might confuse people.
New:
------
When docbook .xsl and .dtd files are installed locally, catalog files are
also installed that point to them.  In these catalog files are rewrite rules
that instruct xslt processors, xsltproc in our case, how to substitute
local copies of the docbook files for the online versions.

The preferred way to refer to the online files would be to directly pass
the xsl location to xsltproc.  However, we use xmlto and xmlto requires
a local file.   Therefore we use this local file, to serve as a pointer
to the online version.
-------

Matt


More information about the xorg-devel mailing list