]> granicus.if.org Git - docbook-dsssl/commitdiff
Apply patch 412510 by Jon Willeke, make xref to Question work correctly
authorNorman Walsh <ndw@nwalsh.com>
Tue, 3 Apr 2001 12:25:08 +0000 (12:25 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Tue, 3 Apr 2001 12:25:08 +0000 (12:25 +0000)
xsl/html/qandaset.xsl

index 5109dc149d707bf1259800860d54d4f37efcac83..d181f33398c9927621a22a3c80546e0d81b49590 100644 (file)
   <xsl:variable name="firstch" select="(*[name(.)!='label'])[1]"/>
   <xsl:variable name="restch" select="(*[name(.)!='label'])[position()!=1]"/>
   <xsl:variable name="id">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="parent::*"/>
-    </xsl:call-template>
+    <xsl:call-template name="object.id"/>
   </xsl:variable>
 
   <div class="{name(.)}">
     <p>
-      <a name="{$id}">
-        <b>
-          <xsl:apply-templates select="." mode="label.markup"/>
-          <xsl:text> </xsl:text>
-        </b>
-        <xsl:apply-templates select="$firstch" mode="no.wrapper.mode"/>
-      </a>
+      <a name="{$id}"/>
+      <b>
+        <xsl:apply-templates select="." mode="label.markup"/>
+        <xsl:text> </xsl:text>
+      </b>
+      <xsl:apply-templates select="$firstch" mode="no.wrapper.mode"/>
     </p>
     <xsl:apply-templates select="$restch"/>
   </div>
 <xsl:template match="answer">
   <xsl:variable name="firstch" select="(*[name(.)!='label'])[1]"/>
   <xsl:variable name="restch" select="(*[name(.)!='label'])[position()!=1]"/>
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
 
   <div class="{name(.)}">
     <p>
+      <a name="{$id}"/>
       <b>
         <xsl:apply-templates select="." mode="label.markup"/>
         <xsl:text> </xsl:text>
 
 <xsl:template match="question" mode="qandatoc.mode">
   <xsl:variable name="firstch" select="(*[name(.)!='label'])[1]"/>
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="parent::*"/>
-    </xsl:call-template>
-  </xsl:variable>
 
   <dt>
     <xsl:apply-templates select="." mode="label.markup"/>
     <xsl:text> </xsl:text>
     <a>
       <xsl:attribute name="href">
-        <xsl:call-template name="href.target">
-          <xsl:with-param name="object" select="parent::*"/>
-        </xsl:call-template>
+        <xsl:call-template name="href.target"/>
       </xsl:attribute>
       <xsl:value-of select="$firstch"/>
     </a>