]> granicus.if.org Git - docbook-dsssl/commitdiff
First cut at supporting a glossary.collection file
authorNorman Walsh <ndw@nwalsh.com>
Fri, 4 Jan 2002 16:08:03 +0000 (16:08 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Fri, 4 Jan 2002 16:08:03 +0000 (16:08 +0000)
xsl/fo/glossary.xsl
xsl/fo/inline.xsl
xsl/fo/param.ent
xsl/fo/param.xweb
xsl/html/glossary.xsl
xsl/html/inline.xsl
xsl/html/param.ent
xsl/html/param.xweb
xsl/params/firstterm.only.link.xml [new file with mode: 0644]
xsl/params/glossary.collection.xml [new file with mode: 0644]

index 1e52ca5cfb44809d5bd8f04abea421542285a623..c5e84b03dadc50058e46224040634a7ed1ca1afa 100644 (file)
@@ -316,6 +316,196 @@ GlossEntry ::=
 </xsl:template>
 
 
+<!-- ==================================================================== -->
+
+<!-- Glossary collection -->
+
+<xsl:template match="glossary[@role='auto']" priority="2">
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+  <xsl:variable name="terms" select="//glossterm[not(parent::glossdef)]|//firstterm"/>
+  <xsl:variable name="collection" select="document($glossary.collection, .)"/>
+
+  <xsl:variable name="preamble"
+                select="*[not(self::title
+                            or self::subtitle
+                            or self::glossdiv
+                            or self::glossentry)]"/>
+
+  <xsl:if test="$glossary.collection = ''">
+    <xsl:message>
+      <xsl:text>Warning: processing automatic glossary </xsl:text>
+      <xsl:text>without a glossary.collection file.</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <fo:block id="{$id}">
+    <xsl:call-template name="component.separator"/>
+
+    <xsl:call-template name="glossary.titlepage"/>
+
+    <xsl:if test="$preamble">
+      <xsl:apply-templates select="$preamble"/>
+    </xsl:if>
+
+    <xsl:choose>
+      <xsl:when test="$collection//glossdiv">
+        <xsl:for-each select="$collection//glossdiv">
+          <!-- first see if there are any in this div -->
+          <xsl:variable name="exist.test">
+            <xsl:for-each select="glossentry">
+              <xsl:variable name="cterm" select="glossterm"/>
+              <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
+                <xsl:value-of select="glossterm"/>
+              </xsl:if>
+            </xsl:for-each>
+          </xsl:variable>
+
+          <xsl:if test="$exist.test != ''">
+            <xsl:apply-templates select="." mode="auto-glossary">
+              <xsl:with-param name="terms" select="$terms"/>
+            </xsl:apply-templates>
+          </xsl:if>
+        </xsl:for-each>
+      </xsl:when>
+      <xsl:otherwise>
+        <fo:list-block provisional-distance-between-starts="{$glossterm-width}"
+                       provisional-label-separation="{$glossterm-sep}"
+                       xsl:use-attribute-sets="normal.para.spacing">
+          <xsl:for-each select="$collection//glossentry">
+            <xsl:variable name="cterm" select="glossterm"/>
+            <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
+              <xsl:apply-templates select="." mode="auto-glossary"/>
+            </xsl:if>
+          </xsl:for-each>
+        </fo:list-block>
+      </xsl:otherwise>
+    </xsl:choose>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="book/glossary[@role='auto']" priority="2.5">
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+  <xsl:variable name="terms" select="//glossterm[not(parent::glossdef)]|//firstterm"/>
+  <xsl:variable name="collection" select="document($glossary.collection, .)"/>
+
+  <xsl:variable name="preamble"
+                select="*[not(self::title
+                            or self::subtitle
+                            or self::glossdiv
+                            or self::glossentry)]"/>
+
+  <xsl:variable name="master-reference">
+    <xsl:call-template name="select.pagemaster"/>
+  </xsl:variable>
+
+  <xsl:if test="$glossary.collection = ''">
+    <xsl:message>
+      <xsl:text>Warning: processing automatic glossary </xsl:text>
+      <xsl:text>without a glossary.collection file.</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <fo:page-sequence id="{$id}"
+                    hyphenate="{$hyphenate}"
+                    master-reference="{$master-reference}">
+    <xsl:attribute name="language">
+      <xsl:call-template name="l10n.language"/>
+    </xsl:attribute>
+    <xsl:if test="$double.sided != 0">
+      <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+    </xsl:if>
+
+    <xsl:apply-templates select="." mode="running.head.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+    <xsl:apply-templates select="." mode="running.foot.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+
+    <fo:flow flow-name="xsl-region-body">
+      <fo:block id="{$id}">
+        <xsl:call-template name="glossary.titlepage"/>
+
+        <xsl:if test="$preamble">
+          <xsl:apply-templates select="$preamble"/>
+        </xsl:if>
+
+        <xsl:choose>
+          <xsl:when test="$collection//glossdiv">
+            <xsl:for-each select="$collection//glossdiv">
+              <!-- first see if there are any in this div -->
+              <xsl:variable name="exist.test">
+                <xsl:for-each select="glossentry">
+                  <xsl:variable name="cterm" select="glossterm"/>
+                  <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
+                    <xsl:value-of select="glossterm"/>
+                  </xsl:if>
+                </xsl:for-each>
+              </xsl:variable>
+
+              <xsl:if test="$exist.test != ''">
+                <xsl:apply-templates select="." mode="auto-glossary">
+                  <xsl:with-param name="terms" select="$terms"/>
+                </xsl:apply-templates>
+              </xsl:if>
+            </xsl:for-each>
+          </xsl:when>
+          <xsl:otherwise>
+            <fo:list-block provisional-distance-between-starts="{$glossterm-width}"
+                           provisional-label-separation="{$glossterm-sep}"
+                           xsl:use-attribute-sets="normal.para.spacing">
+              <xsl:for-each select="$collection//glossentry">
+                <xsl:variable name="cterm" select="glossterm"/>
+                <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
+                  <xsl:apply-templates select="." mode="auto-glossary"/>
+                </xsl:if>
+              </xsl:for-each>
+            </fo:list-block>
+          </xsl:otherwise>
+        </xsl:choose>
+      </fo:block>
+    </fo:flow>
+  </fo:page-sequence>
+</xsl:template>
+
+<xsl:template match="*" mode="auto-glossary">
+  <!-- pop back out to the default mode for most elements -->
+  <xsl:apply-templates select="."/>
+</xsl:template>
+
+<xsl:template match="glossdiv" mode="auto-glossary">
+  <xsl:param name="terms" select="."/>
+
+  <xsl:variable name="preamble"
+                select="*[not(self::title
+                            or self::subtitle
+                            or self::glossentry)]"/>
+
+  <xsl:apply-templates select="title|subtitle"/>
+  <xsl:apply-templates select="$preamble"/>
+  <fo:list-block provisional-distance-between-starts="{$glossterm-width}"
+                 provisional-label-separation="{$glossterm-sep}"
+                 xsl:use-attribute-sets="normal.para.spacing">
+    <xsl:for-each select="glossentry">
+      <xsl:variable name="cterm" select="glossterm"/>
+      <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
+        <xsl:apply-templates select="." mode="auto-glossary"/>
+      </xsl:if>
+    </xsl:for-each>
+  </fo:list-block>
+</xsl:template>
+
+<xsl:template match="glossentry" mode="auto-glossary">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <fo:list-item id="gl.{$id}"
+                xsl:use-attribute-sets="normal.para.spacing">
+    <xsl:apply-templates/>
+  </fo:list-item>
+</xsl:template>
+
 <!-- ==================================================================== -->
 
 </xsl:stylesheet>
index 024015063d6821936f7d1d1ece4f48e3092139cb..d0f21671e41f036412d1794c2e188549ee4c5c50 100644 (file)
 </xsl:template>
 
 <xsl:template match="firstterm">
-  <xsl:call-template name="inline.italicseq"/>
+  <xsl:call-template name="glossterm">
+    <xsl:with-param name="firstterm" select="1"/>
+  </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="glossterm">
+<xsl:template match="glossterm" name="glossterm">
+  <xsl:param name="firstterm" select="0"/>
+
   <xsl:choose>
-    <xsl:when test="@linkend">
+    <xsl:when test="($firstterm.only.link = 0 or $firstterm = 1) and @linkend">
       <fo:basic-link internal-destination="{@linkend}"
                      xsl:use-attribute-sets="xref.properties">
         <xsl:call-template name="inline.charseq"/>
       </fo:basic-link>
     </xsl:when>
 
-    <xsl:when test="$glossterm.auto.link != 0">
+    <xsl:when test="not(@linkend)
+                    and ($firstterm.only.link = 0 or $firstterm = 1)
+                    and $glossary.collection != ''">
+      <xsl:variable name="term">
+        <xsl:choose>
+          <xsl:when test="@baseform"><xsl:value-of select="@baseform"/></xsl:when>
+          <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      <xsl:variable name="cterm"
+           select="(document($glossary.collection,.)//glossentry[glossterm=$term])[1]"/>
+
+      <xsl:choose>
+        <xsl:when test="not($cterm)">
+          <xsl:message>
+            <xsl:text>There's no entry for </xsl:text>
+            <xsl:value-of select="$term"/>
+            <xsl:text> in </xsl:text>
+            <xsl:value-of select="$glossary.collection"/>
+          </xsl:message>
+          <xsl:call-template name="inline.italicseq"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:variable name="id">
+            <xsl:text>gl.</xsl:text>
+            <xsl:choose>
+              <xsl:when test="$cterm/@id">
+                <xsl:value-of select="$cterm/@id"/>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:value-of select="generate-id($cterm)"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:variable>
+          <fo:basic-link internal-destination="{$id}"
+                         xsl:use-attribute-sets="xref.properties">
+            <xsl:call-template name="inline.italicseq"/>
+          </fo:basic-link>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+
+    <xsl:when test="not(@linkend)
+                    and ($firstterm.only.link = 0 or $firstterm = 1)
+                    and $glossterm.auto.link != 0">
       <xsl:variable name="term">
         <xsl:choose>
           <xsl:when test="@baseform">
index b7eca386145a6167c4c9de34f01853cec7240c74..8b9e35b8b27a83e9a2e1b49de7169a03696f6bc3 100644 (file)
@@ -33,6 +33,7 @@
 <!ENTITY default.units SYSTEM "../params/default.units.xml">
 <!ENTITY dingbat.font.family SYSTEM "../params/dingbat.font.family.xml">
 <!ENTITY double.sided SYSTEM "../params/double.sided.xml">
+<!ENTITY firstterm.only.link SYSTEM "../params/firstterm.only.link.xml">
 <!ENTITY footnote.font.size SYSTEM "../params/footnote.font.size.xml">
 <!ENTITY fop.extensions SYSTEM "../params/fop.extensions.xml">
 <!ENTITY formal.object.properties SYSTEM "../params/formal.object.properties.xml">
@@ -54,6 +55,7 @@
 <!ENTITY generate.division.toc SYSTEM "../params/generate.division.toc.xml">
 <!ENTITY generate.index SYSTEM "../params/generate.index.xml">
 <!ENTITY generate.set.toc SYSTEM "../params/generate.set.toc.xml">
+<!ENTITY glossary.collection SYSTEM "../params/glossary.collection.xml">
 <!ENTITY glossterm.auto.link SYSTEM "../params/glossterm.auto.link.xml">
 <!ENTITY graphic.default.extension SYSTEM "../params/graphic.default.extension.xml">
 <!ENTITY hyphenate SYSTEM "../params/hyphenate.xml">
index 5945567af1dea45097a532a84ffdfd90ebdbe73b..68229baff06051c867a67db7c9101e72e75309e2 100644 (file)
@@ -165,15 +165,17 @@ to be incomplete. Don't forget to read the source, too :-)</para>
 &qanda.inherit.numeration;
 </reference>
 
-<reference><title>Linking</title>
-&glossterm.auto.link;
-</reference>
-
 <reference><title>Bibliography</title>
 &biblioentry.item.separator;
 &bibliography.collection;
 </reference>
 
+<reference><title>Glossary</title>
+&glossterm.auto.link;
+&firstterm.only.link;
+&glossary.collection;
+</reference>
+
 <reference><title>Miscellaneous</title>
 &graphic.default.extension;
 &formal.procedures;
@@ -306,6 +308,7 @@ around all these parameters.</para>
 <src:fragref linkend="default.units.frag"/>
 <src:fragref linkend="dingbat.font.family.frag"/>
 <src:fragref linkend="double.sided.frag"/>
+<src:fragref linkend="firstterm.only.link.frag"/>
 <src:fragref linkend="footnote.font.size.frag"/>
 <src:fragref linkend="fop.extensions.frag"/>
 <src:fragref linkend="formal.object.properties.frag"/>
@@ -327,6 +330,7 @@ around all these parameters.</para>
 <src:fragref linkend="generate.division.toc.frag"/>
 <src:fragref linkend="generate.index.frag"/>
 <src:fragref linkend="generate.set.toc.frag"/>
+<src:fragref linkend="glossary.collection.frag"/>
 <src:fragref linkend="glossterm.auto.link.frag"/>
 <src:fragref linkend="graphic.default.extension.frag"/>
 <src:fragref linkend="hyphenate.frag"/>
index 48e574dfccbdfdf320fee712b13372d5a94f6436..afcffdc883e71fd0c8c19b08012ccc6e7bfc74dd 100644 (file)
@@ -212,4 +212,99 @@ GlossEntry ::=
 
 <!-- ==================================================================== -->
 
+<!-- Glossary collection -->
+
+<xsl:template match="glossary[@role='auto']" priority="2">
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+  <xsl:variable name="terms" select="//glossterm[not(parent::glossdef)]|//firstterm"/>
+  <xsl:variable name="collection" select="document($glossary.collection, .)"/>
+
+  <xsl:if test="$glossary.collection = ''">
+    <xsl:message>
+      <xsl:text>Warning: processing automatic glossary </xsl:text>
+      <xsl:text>without a glossary.collection file.</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <div id="{$id}" class="{name(.)}">
+    <xsl:call-template name="glossary.titlepage"/>
+
+    <xsl:choose>
+      <xsl:when test="$collection//glossdiv">
+        <xsl:for-each select="$collection//glossdiv">
+          <!-- first see if there are any in this div -->
+          <xsl:variable name="exist.test">
+            <xsl:for-each select="glossentry">
+              <xsl:variable name="cterm" select="glossterm"/>
+              <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
+                <xsl:value-of select="glossterm"/>
+              </xsl:if>
+            </xsl:for-each>
+          </xsl:variable>
+
+          <xsl:if test="$exist.test != ''">
+            <xsl:apply-templates select="." mode="auto-glossary">
+              <xsl:with-param name="terms" select="$terms"/>
+            </xsl:apply-templates>
+          </xsl:if>
+        </xsl:for-each>
+      </xsl:when>
+      <xsl:otherwise>
+        <dl>
+          <xsl:for-each select="$collection//glossentry">
+            <xsl:variable name="cterm" select="glossterm"/>
+            <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
+              <xsl:apply-templates select="." mode="auto-glossary"/>
+            </xsl:if>
+          </xsl:for-each>
+        </dl>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:call-template name="process.footnotes"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="auto-glossary">
+  <!-- pop back out to the default mode for most elements -->
+  <xsl:apply-templates select="."/>
+</xsl:template>
+
+<xsl:template match="glossdiv" mode="auto-glossary">
+  <xsl:param name="terms" select="."/>
+
+  <div class="{name(.)}">
+    <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
+
+    <dl>
+      <xsl:for-each select="glossentry">
+        <xsl:variable name="cterm" select="glossterm"/>
+        <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
+          <xsl:apply-templates select="." mode="auto-glossary"/>
+        </xsl:if>
+      </xsl:for-each>
+    </dl>
+  </div>
+</xsl:template>
+
+<xsl:template match="glossentry" mode="auto-glossary">
+  <xsl:apply-templates mode="auto-glossary"/>
+</xsl:template>
+
+<xsl:template match="glossentry/glossterm[1]" priority="2" mode="auto-glossary">
+  <xsl:variable name="id">
+    <xsl:text>gl.</xsl:text>
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select=".."/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <dt>
+    <a name="{$id}"/>
+    <xsl:apply-templates/>
+  </dt>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
 </xsl:stylesheet>
index 47033d9e99e80348c875c81466b79ef80b6fb163..dfd50dc8491eb6cef34f12c1fcab0669878cd72d 100644 (file)
 </xsl:template>
 
 <xsl:template match="firstterm">
-  <xsl:call-template name="inline.italicseq"/>
+  <xsl:call-template name="glossterm">
+    <xsl:with-param name="firstterm" select="1"/>
+  </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="glossterm">
+<xsl:template match="glossterm" name="glossterm">
+  <xsl:param name="firstterm" select="0"/>
+
   <xsl:choose>
 
-    <xsl:when test="@linkend">
+    <xsl:when test="($firstterm.only.link = 0 or $firstterm = 1) and @linkend">
       <xsl:variable name="targets" select="key('id',@linkend)"/>
       <xsl:variable name="target" select="$targets[1]"/>
 
       </a>
     </xsl:when>
 
-    <xsl:when test="$glossterm.auto.link != 0">
+    <xsl:when test="not(@linkend)
+                    and ($firstterm.only.link = 0 or $firstterm = 1)
+                    and $glossary.collection != ''">
+      <xsl:variable name="term">
+        <xsl:choose>
+          <xsl:when test="@baseform"><xsl:value-of select="@baseform"/></xsl:when>
+          <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      <xsl:variable name="cterm"
+           select="(document($glossary.collection,.)//glossentry[glossterm=$term])[1]"/>
+
+      <xsl:choose>
+        <xsl:when test="not($cterm)">
+          <xsl:message>
+            <xsl:text>There's no entry for </xsl:text>
+            <xsl:value-of select="$term"/>
+            <xsl:text> in </xsl:text>
+            <xsl:value-of select="$glossary.collection"/>
+          </xsl:message>
+          <xsl:call-template name="inline.italicseq"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:variable name="id">
+            <xsl:text>gl.</xsl:text>
+            <xsl:choose>
+              <xsl:when test="$cterm/@id">
+                <xsl:value-of select="$cterm/@id"/>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:value-of select="generate-id($cterm)"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:variable>
+          <a href="#{$id}">
+            <xsl:call-template name="inline.italicseq"/>
+          </a>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+
+    <xsl:when test="not(@linkend)
+                    and ($firstterm.only.link = 0 or $firstterm = 1)
+                    and $glossterm.auto.link != 0">
       <xsl:variable name="term">
         <xsl:choose>
           <xsl:when test="@baseform">
           </xsl:otherwise>
         </xsl:choose>
       </xsl:variable>
-      <xsl:variable name="targets" 
+      <xsl:variable name="targets"
                     select="//glossentry[glossterm=$term or glossterm/@baseform=$term]"/>
       <xsl:variable name="target" select="$targets[1]"/>
 
                 <xsl:value-of select="@id"/>
               </xsl:attribute>
             </xsl:if>
-            
+
             <xsl:attribute name="href">
               <xsl:call-template name="href.target">
                 <xsl:with-param name="object" select="$target"/>
               </xsl:call-template>
             </xsl:attribute>
-            
+
             <xsl:call-template name="inline.italicseq"/>
           </a>
         </xsl:otherwise>
index f796d874ec5f52e3d8aa4456ecbbb0304a526284..c128494a397de03e1ab57b6dfdc9023ccf52c064 100644 (file)
@@ -31,6 +31,7 @@
 <!ENTITY ebnf.table.bgcolor SYSTEM "../params/ebnf.table.bgcolor.xml">
 <!ENTITY ebnf.table.border SYSTEM "../params/ebnf.table.border.xml">
 <!ENTITY emphasis.propagates.style SYSTEM "../params/emphasis.propagates.style.xml">
+<!ENTITY firstterm.only.link SYSTEM "../params/firstterm.only.link.xml">
 <!ENTITY formal.procedures SYSTEM "../params/formal.procedures.xml">
 <!ENTITY funcsynopsis.decoration SYSTEM "../params/funcsynopsis.decoration.xml">
 <!ENTITY funcsynopsis.style SYSTEM "../params/funcsynopsis.style.xml">
@@ -51,6 +52,7 @@
 <!ENTITY generate.section.toc SYSTEM "../params/generate.section.toc.xml">
 <!ENTITY generate.section.toc.level SYSTEM "../params/generate.section.toc.level.xml">
 <!ENTITY generate.set.toc SYSTEM "../params/generate.set.toc.xml">
+<!ENTITY glossary.collection SYSTEM "../params/glossary.collection.xml">
 <!ENTITY glossterm.auto.link SYSTEM "../params/glossterm.auto.link.xml">
 <!ENTITY graphic.default.extension SYSTEM "../params/graphic.default.extension.xml">
 <!ENTITY html.base SYSTEM "../params/html.base.xml">
index 5322ae1ede750355035b0aff13846a9aa8804cb0..943269014439ab9fa0053caef8219705260a0e13 100644 (file)
@@ -197,7 +197,6 @@ to be incomplete. Don't forget to read the source, too :-)</para>
 &olink.pubid;
 &olink.sysid;
 &olink.resolver;
-&glossterm.auto.link;
 </reference>
 
 <reference><title>Bibliography</title>
@@ -205,6 +204,12 @@ to be incomplete. Don't forget to read the source, too :-)</para>
 &bibliography.collection;
 </reference>
 
+<reference><title>Glossary</title>
+&glossterm.auto.link;
+&firstterm.only.link;
+&glossary.collection;
+</reference>
+
 <reference><title>Miscellaneous</title>
 &graphic.default.extension;
 &formal.procedures;
@@ -308,6 +313,7 @@ around all these parameters.</para>
 <src:fragref linkend="ebnf.table.bgcolor.frag"/>
 <src:fragref linkend="ebnf.table.border.frag"/>
 <src:fragref linkend="emphasis.propagates.style.frag"/>
+<src:fragref linkend="firstterm.only.link.frag"/>
 <src:fragref linkend="formal.procedures.frag"/>
 <src:fragref linkend="funcsynopsis.decoration.frag"/>
 <src:fragref linkend="funcsynopsis.style.frag"/>
@@ -328,6 +334,7 @@ around all these parameters.</para>
 <src:fragref linkend="generate.section.toc.frag"/>
 <src:fragref linkend="generate.section.toc.level.frag"/>
 <src:fragref linkend="generate.set.toc.frag"/>
+<src:fragref linkend="glossary.collection.frag"/>
 <src:fragref linkend="glossterm.auto.link.frag"/>
 <src:fragref linkend="graphic.default.extension.frag"/>
 <src:fragref linkend="html.base.frag"/>
diff --git a/xsl/params/firstterm.only.link.xml b/xsl/params/firstterm.only.link.xml
new file mode 100644 (file)
index 0000000..eb53b36
--- /dev/null
@@ -0,0 +1,24 @@
+<refentry id="firstterm.only.link">
+<refmeta>
+<refentrytitle>firstterm.only.link</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>firstterm.only.link</refname>
+<refpurpose>Does automatic glossterm linking only apply to firstterms?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='firstterm.only.link.frag'>
+<xsl:param name="firstterm.only.link" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, only <sgmltag>firstterm</sgmltag>s will be automatically linked
+to the glossary. If glossary linking is not enabled, this parameter
+has no effect.</para>
+
+</refsect1>
+</refentry>
diff --git a/xsl/params/glossary.collection.xml b/xsl/params/glossary.collection.xml
new file mode 100644 (file)
index 0000000..5030d55
--- /dev/null
@@ -0,0 +1,28 @@
+<refentry id="glossary.collection">
+<refmeta>
+<refentrytitle>glossary.collection</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>glossary.collection</refname>
+<refpurpose>Name of the glossary collection file</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='glossary.collection.frag'>
+<xsl:param name="glossary.collection" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Tired of manually maintaining glossaries for multiple documents?
+Now you can maintain a central glossary and let the stylesheets do
+the copying for you. This parameter identifies the file (by URI reference)
+that contains your complete glossary collection.
+</para>
+
+<para>THIS IS EXPERIMENTAL. IT PROBABLY DOESN'T WORK</para>
+
+</refsect1>
+</refentry>