diff options
author | Shaun McCance <shaunm@src.gnome.org> | 2004-02-07 00:54:42 +0000 |
---|---|---|
committer | Shaun McCance <shaunm@src.gnome.org> | 2004-02-07 00:54:42 +0000 |
commit | e3f62495e10097219432b5c67cb5acb6cfdc3c25 (patch) | |
tree | fd4a806757557e0ec2c6e437c629b9f23bb67485 | |
parent | 64ded17798a30203ba36d7b863555d8b96b39595 (diff) | |
download | yelp-e3f62495e10097219432b5c67cb5acb6cfdc3c25.tar.gz |
- Free the transformation context. - The cache extension element isn't
* src/yelp-db-pager.c:
* stylesheets/db2html-header.xsl:
- Free the transformation context.
- The cache extension element isn't working, but I hooked it in so I have
more oppurtunity to let GTK+ update itself.
* stylesheets/db2html-navbar.xsl:
- Speed improvement to navbar.prev.
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | src/yelp-db-pager.c | 6 | ||||
-rw-r--r-- | stylesheets/db2html-header.xsl | 13 | ||||
-rw-r--r-- | stylesheets/db2html-navbar.xsl | 6 |
4 files changed, 31 insertions, 5 deletions
@@ -1,5 +1,16 @@ 2004-02-06 Shaun McCance <shaunm@gnome.org> + * src/yelp-db-pager.c: + * stylesheets/db2html-header.xsl: + - Free the transformation context. + - The cache extension element isn't working, but I hooked it in so I have + more oppurtunity to let GTK+ update itself. + + * stylesheets/db2html-navbar.xsl: + - Speed improvement to navbar.prev. + +2004-02-06 Shaun McCance <shaunm@gnome.org> + * stylesheets/db2html-division.xsl: - Fixed blatently wrong chunking in refentry. diff --git a/src/yelp-db-pager.c b/src/yelp-db-pager.c index 282f62a0..d079276c 100644 --- a/src/yelp-db-pager.c +++ b/src/yelp-db-pager.c @@ -337,7 +337,7 @@ db_pager_process (YelpPager *pager) xmlFreeDoc (doc); xsltFreeStylesheet (stylesheet); xmlFreeParserCtxt (ctxt); - + xsltFreeTransformContext (tctxt); yelp_pager_set_state (pager, YELP_PAGER_STATE_FINISHED); g_signal_emit_by_name (pager, "finish"); @@ -516,6 +516,10 @@ xslt_yelp_cache (xsltTransformContextPtr ctxt, xmlNodePtr inst, xsltStylePreCompPtr comp) { + xsltApplyOneTemplate (ctxt, node, inst->children, NULL, NULL); + + while (gtk_events_pending ()) + gtk_main_iteration (); } static void diff --git a/stylesheets/db2html-header.xsl b/stylesheets/db2html-header.xsl index d612884b..06d263cf 100644 --- a/stylesheets/db2html-header.xsl +++ b/stylesheets/db2html-header.xsl @@ -1,6 +1,8 @@ <?xml version='1.0'?><!-- -*- Mode: fundamental; tab-width: 3 -*- --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:yelp="http://www.gnome.org/yelp/ns" + extension-element-prefixes="yelp" version="1.0"> <!-- == header.prefix ====================================================== --> @@ -369,7 +371,16 @@ <xsl:template name="header.number"> <xsl:param name="node" select="."/> - <xsl:apply-templates mode="header.number.mode" select="$node"/> + <xsl:choose> + <xsl:when test="element-available('yelp:cache')"> + <yelp:cache key="header.number"> + <xsl:apply-templates mode="header.number.mode" select="$node"/> + </yelp:cache> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="header.number.mode" select="$node"/> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template mode="header.number.mode" match="appendix"> diff --git a/stylesheets/db2html-navbar.xsl b/stylesheets/db2html-navbar.xsl index e195e2e2..5a183ca6 100644 --- a/stylesheets/db2html-navbar.xsl +++ b/stylesheets/db2html-navbar.xsl @@ -95,18 +95,18 @@ <xsl:value-of select="'titlepage'"/> </xsl:if> </xsl:when> - <xsl:when test="$node/preceding-sibling::*[&is-division;]"> + <xsl:when test="$node/preceding-sibling::*[1][&is-division;]"> <xsl:choose> <xsl:when test="$depth_chunk < $chunk_depth"> <xsl:call-template name="navbar.last"> <xsl:with-param name="node" - select="$node/preceding-sibling::*[&is-division;][1]"/> + select="$node/preceding-sibling::*[1]"/> <xsl:with-param name="depth_chunk" select="$depth_chunk"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of - select="$node/preceding-sibling::*[&is-division;][1]/@id"/> + select="$node/preceding-sibling::*[1]/@id"/> </xsl:otherwise> </xsl:choose> </xsl:when> |