Re: Yelp Speedup



Shaun McCance wrote:

I think the only sensible way forward is to have XSLT
modules never import or include anything.  The only
XSLT files that do includes or imports would be the
top-level driver files, like db2html.xsl, and any of
the stylesheets under utils.

Patch is attached which removes imports from the three
files: 1) db-label.xsl 2) db-title.xsl 3) db-xref.xsl

Any reason to import instead of include?  Does anything
in the gettext.xsl stylesheet override templates for the
parent/driver stylesheet?

I've changed the <xsl:import> to an <xsl:include> in the
patch for html/db2html.xsl.

Then I should add to xsldoc a way to document that
an XSLT file depends on another, even though it isn't
explicitly imported.  People making custom stylesheets
using my stuff can look at the documentation and see
what they need to include to make each module work.

Not sure how your inline documentation works, I think you
will have to make a patch for this...

For right now, we just need to check if any of the
stylesheets under utils would be broken by removing
the imports from the common files.  Assuming they
work (or assuming they get fixed), we commit this
patch and throw a big "WE LOVE DON" party.

Patch also adds an <xsl:include> for gettext.xsl in
utils/chunks.xsl, but not in utils/credits.xsl or
utils/ids.xsl since they only use common/db-common.xsl.


--
Brent Smith <gnome nextreality net>
IRC: smitten
? gnome-doc-prepare
? install-sh
? missing
? mkinstalldirs
? py-compile
? doc/xslt/Makefile
? doc/xslt/Makefile.in
? doc/xslt/C/db-title.xml
? doc/xslt/C/db2html-bibliography.xml
? doc/xslt/C/db2html-l10n.xml
? doc/xslt/C/db2html-refentry.xml
? doc/xslt/C/l10n-numbers.xml
? sandbox/mallard/install-sh
? sandbox/mallard/missing
? sandbox/mallard/mkinstalldirs
Index: xslt/docbook/common/db-label.xsl
===================================================================
RCS file: /cvs/gnome/gnome-doc-utils/xslt/docbook/common/db-label.xsl,v
retrieving revision 1.20
diff -u -r1.20 db-label.xsl
--- xslt/docbook/common/db-label.xsl	25 Nov 2005 20:20:15 -0000	1.20
+++ xslt/docbook/common/db-label.xsl	17 Dec 2005 18:51:30 -0000
@@ -21,7 +21,9 @@
                 xmlns:msg="http://www.gnome.org/~shaunm/gnome-doc-utils/l10n";
                 exclude-result-prefixes="doc"
                 version="1.0">
-<xsl:import href="../../gettext/gettext.xsl"/>
+
+<!-- if you are including this stylesheet from another stylesheet, you must
+     also include the ../../gettext/gettext.xsl stylesheet for localisation -->
 
 <doc:title>Automatic Labels</doc:title>
 
Index: xslt/docbook/common/db-title.xsl
===================================================================
RCS file: /cvs/gnome/gnome-doc-utils/xslt/docbook/common/db-title.xsl,v
retrieving revision 1.10
diff -u -r1.10 db-title.xsl
--- xslt/docbook/common/db-title.xsl	25 Nov 2005 20:20:15 -0000	1.10
+++ xslt/docbook/common/db-title.xsl	17 Dec 2005 18:51:31 -0000
@@ -21,7 +21,9 @@
                 xmlns:msg="http://www.gnome.org/~shaunm/gnome-doc-utils/l10n";
                 exclude-result-prefixes="doc"
                 version="1.0">
-<xsl:import href="../../gettext/gettext.xsl"/>
+
+<!-- if you are including this stylesheet from another stylesheet, you must
+     also include the ../../gettext/gettext.xsl stylesheet for localisation -->
 
 <doc:title>Common Utilities for Titles</doc:title>
 
Index: xslt/docbook/common/db-xref.xsl
===================================================================
RCS file: /cvs/gnome/gnome-doc-utils/xslt/docbook/common/db-xref.xsl,v
retrieving revision 1.19
diff -u -r1.19 db-xref.xsl
--- xslt/docbook/common/db-xref.xsl	25 Nov 2005 20:20:15 -0000	1.19
+++ xslt/docbook/common/db-xref.xsl	17 Dec 2005 18:51:31 -0000
@@ -20,7 +20,9 @@
                 xmlns:doc="http://www.gnome.org/~shaunm/xsldoc";
                 exclude-result-prefixes="doc"
                 version="1.0">
-<xsl:import href="../../gettext/gettext.xsl"/>
+
+<!-- if you are including this stylesheet from another stylesheet, you must
+     also include the ../../gettext/gettext.xsl stylesheet for localisation -->
 
 <doc:title>Common Cross Reference Utilities</doc:title>
 
Index: xslt/docbook/html/db2html.xsl
===================================================================
RCS file: /cvs/gnome/gnome-doc-utils/xslt/docbook/html/db2html.xsl,v
retrieving revision 1.26
diff -u -r1.26 db2html.xsl
--- xslt/docbook/html/db2html.xsl	25 Nov 2005 20:20:15 -0000	1.26
+++ xslt/docbook/html/db2html.xsl	17 Dec 2005 18:51:31 -0000
@@ -21,7 +21,7 @@
                 xmlns="http://www.w3.org/1999/xhtml";
 		exclude-result-prefixes="doc"
                 version="1.0">
-<xsl:import href="../../gettext/gettext.xsl"/>
+<xsl:include href="../../gettext/gettext.xsl"/>
 
 <doc:title>DocBook to HTML conversion</doc:title>
 
Index: xslt/docbook/utils/chunks.xsl
===================================================================
RCS file: /cvs/gnome/gnome-doc-utils/xslt/docbook/utils/chunks.xsl,v
retrieving revision 1.2
diff -u -r1.2 chunks.xsl
--- xslt/docbook/utils/chunks.xsl	27 Mar 2005 22:55:40 -0000	1.2
+++ xslt/docbook/utils/chunks.xsl	17 Dec 2005 18:51:31 -0000
@@ -21,6 +21,7 @@
 
 <xsl:output method="text" encoding="utf-8"/>
 
+<xsl:include href="../../gettext/gettext.xsl"/>
 <xsl:include href="../common/db-chunk.xsl"/>
 <xsl:include href="../common/db-xref.xsl"/>
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]