[gnome-doc-utils/mallard: 68/87] Fix some issues with the change in the cache file



commit 6c64233783af900ae760eee1c31d60aa15761cf3
Author: Shaun McCance <shaunm gnome org>
Date:   Thu Dec 11 12:34:39 2008 -0600

    Fix some issues with the change in the cache file
---
 sandbox/mallard/html/Makefile         |    2 +-
 xslt/mallard/html/mal2html-inline.xsl |   30 +++++++++++++++++++++++++++---
 xslt/mallard/html/mal2html-page.xsl   |   11 +++++++----
 3 files changed, 35 insertions(+), 8 deletions(-)

diff --git a/sandbox/mallard/html/Makefile b/sandbox/mallard/html/Makefile
index f49ba30..a45cbef 100644
--- a/sandbox/mallard/html/Makefile
+++ b/sandbox/mallard/html/Makefile
@@ -16,7 +16,7 @@ mallard.cache : $(specs) $(xslts)
 $(pages) : mallard.cache $(xslts)
 $(pages) : %.xhtml : ../../../doc/mallard/C/%.xml
 	xsltproc -o $@ \
-	  --stringparam mal.cache_file `pwd`/mallard.cache \
+	  --stringparam mal.cache.file `pwd`/mallard.cache \
 	  ../../../xslt/mallard/html/mal2html.xsl $<
 
 figures:
diff --git a/xslt/mallard/html/mal2html-inline.xsl b/xslt/mallard/html/mal2html-inline.xsl
index aeeabec..8999f59 100644
--- a/xslt/mallard/html/mal2html-inline.xsl
+++ b/xslt/mallard/html/mal2html-inline.xsl
@@ -46,7 +46,7 @@ Outputs the contents of an inline element
 
 FIXME
 -->
-<xsl:template mode="mal2html.inline.content.mode" match="*">
+<xsl:template mode="mal2html.inline.content.mode" match="node()">
   <xsl:apply-templates/>
 </xsl:template>
 
@@ -166,16 +166,40 @@ span.var { font-style: italic; }
 
 <!-- = key = -->
 <xsl:template mode="mal2html.inline.mode" match="mal:key">
-  <!-- FIXME: keycombo -->
   <xsl:call-template name="mal2html.span"/>
 </xsl:template>
 
+<!-- = keyseq = -->
+<xsl:template mode="mal2html.inline.mode" match="mal:keyseq">
+  <xsl:call-template name="mal2html.span"/>
+</xsl:template>
+
+<!-- = keyseq % mal2html.inline.content.mode = -->
+<xsl:template mode="mal2html.inline.content.mode" match="mal:keyseq">
+  <xsl:variable name="joinchar">
+    <xsl:choose>
+      <xsl:when test="@type = 'sequence'">
+        <xsl:text> </xsl:text>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:text>+</xsl:text>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:for-each select="* | text()[normalize-space(.) != '']">
+    <xsl:if test="position() != 1">
+      <xsl:value-of select="$joinchar"/>
+    </xsl:if>
+    <xsl:apply-templates mode="mal2html.inline.mode" select="."/>
+  </xsl:for-each>
+</xsl:template>
+
 <!-- = link = -->
 <xsl:template mode="mal2html.inline.mode" match="mal:link">
   <xsl:call-template name="mal2html.span"/>
 </xsl:template>
 
-<!-- = linke % mal2html.inline.content.mode = -->
+<!-- = link % mal2html.inline.content.mode = -->
 <xsl:template mode="mal2html.inline.content.mode" match="mal:link">
   <xsl:choose>
     <xsl:when test="normalize-space(.) != ''">
diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl
index 3d2a73b..855f940 100644
--- a/xslt/mallard/html/mal2html-page.xsl
+++ b/xslt/mallard/html/mal2html-page.xsl
@@ -282,10 +282,13 @@ REMARK: Describe this template
         </xsl:for-each>
         <!-- FIXME: exclude pagelinks -->
         <xsl:for-each select="$guidelinks">
-          <xsl:call-template name="mal2html.page.pagelink">
-            <xsl:with-param name="source" select="$node"/>
-            <xsl:with-param name="target" select="."/>
-          </xsl:call-template>
+          <xsl:variable name="xref" select="@xref"/>
+          <xsl:for-each select="$mal.cache">
+            <xsl:call-template name="mal2html.page.pagelink">
+              <xsl:with-param name="source" select="$node"/>
+              <xsl:with-param name="target" select="key('mal.cache.key', $xref)"/>
+            </xsl:call-template>
+          </xsl:for-each>
         </xsl:for-each>
 
         <xsl:if test="($pagelinks or $guidelinks) and ($inlinks or $outlinks)">



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