Author: manuel
Date: 2007-04-17 12:28:38 -0600 (Tue, 17 Apr 2007)
New Revision: 8078
Modified:
branches/new-xsl/blfs-chunked.xsl
branches/new-xsl/xhtml/lfs-sections.xsl
Log:
Process sect1info from inside sect1 template instead of using footnotes engine.
There is no prefaceinfo or chaoterifo tags in BLFS at this momment.
Modified: branches/new-xsl/blfs-chunked.xsl
===================================================================
--- branches/new-xsl/blfs-chunked.xsl 2007-04-17 17:22:00 UTC (rev 8077)
+++ branches/new-xsl/blfs-chunked.xsl 2007-04-17 18:28:38 UTC (rev 8078)
@@ -23,65 +23,15 @@
<!-- Print CSS Stylesheet -->
<!-- The original template is in {docbook-xsl}/xhtml/docbook.xsl -->
<xsl:template name='user.head.content'>
- <link rel="stylesheet" href="../stylesheets/blfs-print.css"
type="text/css" media="print"/>
+ <link rel="stylesheet" href="../stylesheets/blfs-print.css"
type="text/css"
+ media="print"/>
</xsl:template>
- <!-- Are sections enumerated? 1 = yes, 0 = no -->
+ <!-- Are sections enumerated? 1 = yes, 0 = no
+ Note: Activating this will increase a lot rendering time. -->
<xsl:param name="section.autolabel" select="0"/>
<!-- Do section labels include the component label? 1 = yes, 0 = no -->
<xsl:param name="section.label.includes.component.label" select="0"/>
- <!-- Handle name and date in info section as a footnote -->
-
- <xsl:template name="process.footnotes">
- <xsl:variable name="footnotes" select=".//footnote"/>
- <xsl:variable name="fcount">
- <xsl:call-template name="count.footnotes.in.this.chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="footnotes" select="$footnotes"/>
- </xsl:call-template>
- </xsl:variable>
-
- <!-- Only bother to do this if there's at least one non-table footnote -->
- <xsl:if test="$fcount > 0">
- <div class="footnotes">
- <br/>
- <hr width="100" align="left"/>
- <xsl:call-template name="process.footnotes.in.this.chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="footnotes" select="$footnotes"/>
- </xsl:call-template>
- </div>
- </xsl:if>
-
- <!-- Add this to the footnotes -->
- <xsl:apply-templates
select='prefaceinfo|chapterinfo|sect1info|./sect1[1]/sect1info'
mode='attribution'/>
- </xsl:template>
-
- <xsl:template match='prefaceinfo|chapterinfo|sect1info' mode='attribution'>
- <p class='updated'> Last updated <!-- by
- <xsl:apply-templates select="othername" mode='attribution'/> -->
- on
- <xsl:apply-templates select="date" mode='attribution'/>
- </p>
- </xsl:template>
-
- <xsl:template match='othername' mode='attribution'>
- <xsl:variable name='author'>
- <xsl:value-of select='.'/>
- </xsl:variable>
- <xsl:variable name='nameonly'>
- <xsl:value-of select='substring($author,16)'/>
- </xsl:variable>
- <xsl:value-of select="substring-before($nameonly,'$')" />
- </xsl:template>
-
- <xsl:template match='date' mode='attribution'>
- <xsl:variable name='date'>
- <xsl:value-of select='.'/>
- </xsl:variable>
- <xsl:value-of select="substring($date,7,26)" />
- </xsl:template>
-
</xsl:stylesheet>
Modified: branches/new-xsl/xhtml/lfs-sections.xsl
===================================================================
--- branches/new-xsl/xhtml/lfs-sections.xsl 2007-04-17 17:22:00 UTC (rev
8077)
+++ branches/new-xsl/xhtml/lfs-sections.xsl 2007-04-17 18:28:38 UTC (rev
8078)
@@ -12,6 +12,7 @@
<!-- sect1:
When there is a role attibute, use it as the class value.
+ Process the SVN keywords found in sect1info as a footnote.
Removed unused code. -->
<!-- The original template is in {docbook-xsl}/xhtml/sections.xsl -->
<xsl:template match="sect1">
@@ -29,7 +30,7 @@
<xsl:call-template name="language.attribute"/>
<xsl:call-template name="sect1.titlepage"/>
<xsl:apply-templates/>
- <xsl:call-template name="process.chunk.footnotes"/>
+ <xsl:apply-templates select="sect1info" mode="svn-keys"/>
</div>
</xsl:template>
@@ -54,8 +55,38 @@
<xsl:call-template name="language.attribute"/>
<xsl:call-template name="sect2.titlepage"/>
<xsl:apply-templates/>
- <xsl:call-template name="process.chunk.footnotes"/>
</div>
</xsl:template>
+ <!-- sect1info mode svn-keys:
+ Self-made template to process SVN keywords found in sect1info. -->
+ <xsl:template match="sect1info" mode="svn-keys">
+ <p class="updated">Last updated <!-- by
+ <xsl:apply-templates select="othername" mode="svn-keys"/> -->
+ on
+ <xsl:apply-templates select="date" mode="svn-keys"/>
+ </p>
+ </xsl:template>
+
+ <!-- othername mode svn-keys:
+ Self-made template to process the $LastChangedBy SVN keyword. -->
+ <xsl:template match="othername" mode="svn-keys">
+ <xsl:variable name="author">
+ <xsl:value-of select="."/>
+ </xsl:variable>
+ <xsl:variable name="nameonly">
+ <xsl:value-of select="substring($author,16)"/>
+ </xsl:variable>
+ <xsl:value-of select="substring-before($nameonly,'$')"/>
+ </xsl:template>
+
+ <!-- date mode svn-keys:
+ Self-made template to process the $Date SVN keyword. -->
+ <xsl:template match="date" mode="svn-keys">
+ <xsl:variable name="date">
+ <xsl:value-of select="."/>
+ </xsl:variable>
+ <xsl:value-of select="substring($date,7,26)"/>
+ </xsl:template>
+
</xsl:stylesheet>
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page