]> granicus.if.org Git - docbook-dsssl/commitdiff
Add support for generate.consistent.ids parameter.
authorBob Stayton <bobs@sagehill.net>
Mon, 24 Oct 2011 06:33:51 +0000 (06:33 +0000)
committerBob Stayton <bobs@sagehill.net>
Mon, 24 Oct 2011 06:33:51 +0000 (06:33 +0000)
xsl/common/common.xsl
xsl/fo/param.ent
xsl/fo/param.xweb
xsl/html/param.ent
xsl/html/param.xweb

index b647995cb2428581ec572d0d43d715889a0bfc64..10c89cef74c2c4fad5f5cd1c436a68ef7541e6dc 100644 (file)
@@ -458,6 +458,13 @@ Defaults to the context node.</para>
     <xsl:when test="$object/@xml:id">
       <xsl:value-of select="$object/@xml:id"/>
     </xsl:when>
+    <xsl:when test="$generate.consistent.ids != 0">
+      <!-- Make $object the current node -->
+      <xsl:for-each select="$object">
+        <xsl:text>id-</xsl:text>
+        <xsl:number level="multiple" count="*"/>
+      </xsl:for-each>
+    </xsl:when>
     <xsl:otherwise>
       <xsl:value-of select="generate-id($object)"/>
     </xsl:otherwise>
@@ -1326,8 +1333,10 @@ pointed to by the link is one of the elements listed in
       </xsl:choose>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:variable name="prevlist"
-        select="$list/preceding::orderedlist[1]"/>
+      <!-- match on previous list at same nesting level -->
+      <xsl:variable name="prevlist" 
+       select="$list/preceding::orderedlist
+                [count($list/ancestor::orderedlist) = count(ancestor::orderedlist)][1]"/>
       <xsl:choose>
         <xsl:when test="count($prevlist) = 0">2</xsl:when>
         <xsl:otherwise>
index e6c2c31c95dbbdfe732b940a5b05b96c6916f1e9..a9322609eda6759a9acfad9f06da5859b6a4c7ca 100644 (file)
 <!ENTITY callout.properties SYSTEM "../params/callout.properties.xml">
 <!ENTITY calloutlist.properties SYSTEM "../params/calloutlist.properties.xml">
 <!ENTITY task.properties SYSTEM "../params/task.properties.xml">
+<!ENTITY generate.consistent.ids SYSTEM "../params/generate.consistent.ids.xml">
index 3728e5b417cb4ff7bd99733ca2ef1f4373f751f0..8a5d3c410513634db865e55cab54589502886cfd 100644 (file)
@@ -277,6 +277,7 @@ generate.section.toc.level;
 &monospace.verbatim.font.width;
 &exsl.node.set.available;
 &bookmarks.collapse;
+&generate.consistent.ids;
 </reference>
 <reference xml:id="graphics"><title>Graphics</title>
 &graphic.default.extension;
@@ -657,6 +658,7 @@ around all these parameters.</para>
 <src:fragref linkend="funcsynopsis.decoration.frag"/>
 <src:fragref linkend="funcsynopsis.style.frag"/>
 <src:fragref linkend="function.parens.frag"/>
+<src:fragref linkend="generate.consistent.ids.frag"/>
 <src:fragref linkend="generate.index.frag"/>
 <src:fragref linkend="generate.section.toc.level.frag"/>
 <src:fragref linkend="generate.toc.frag"/>
index 342b53ec49e9b71e64eef069718095d0aa201b06..42a0d6fbd25bec7fa63e816d07814f8034e248df 100644 (file)
 <!ENTITY generate.css.header SYSTEM "../params/generate.css.header.xml">
 <!ENTITY make.clean.html SYSTEM "../params/make.clean.html.xml">
 <!ENTITY custom.css.source SYSTEM "../params/custom.css.source.xml">
+<!ENTITY generate.consistent.ids SYSTEM "../params/generate.consistent.ids.xml">
index 76e9f97fa2fc2a74d5354ed9bbaf5880cf818ddf..60c6adf9a54db788c6ddccdc1516321d54e83bdb 100644 (file)
@@ -136,6 +136,7 @@ $Id$
 &draft.mode;
 &draft.watermark.image;
 &generate.id.attributes;
+&generate.consistent.ids;
 &generate.meta.abstract;
 &make.clean.html;
 &docbook.css.source;
@@ -521,6 +522,7 @@ around all these parameters.</para>
 <src:fragref linkend="funcsynopsis.decoration.frag"/>
 <src:fragref linkend="funcsynopsis.style.frag"/>
 <src:fragref linkend="function.parens.frag"/>
+<src:fragref linkend="generate.consistent.ids.frag"/>
 <src:fragref linkend="generate.css.header.frag"/>
 <src:fragref linkend="generate.id.attributes.frag"/>
 <src:fragref linkend="generate.index.frag"/>