]> granicus.if.org Git - docbook-dsssl/commitdiff
Support other roles on emphasis; support nested emphasis
authorNorman Walsh <ndw@nwalsh.com>
Wed, 13 Mar 2002 18:22:00 +0000 (18:22 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 13 Mar 2002 18:22:00 +0000 (18:22 +0000)
xsl/fo/inline.xsl

index 69965093277a67f5ed6036dc7b49e163f8e115f5..9e595df0fb4882d27341625323a4a42978793c49 100644 (file)
 </xsl:template>
 
 <xsl:template match="emphasis">
+  <xsl:variable name="depth">
+    <xsl:call-template name="dot.count">
+      <xsl:with-param name="string"><xsl:number level="multiple"/></xsl:with-param>
+    </xsl:call-template>
+  </xsl:variable>
+
   <xsl:choose>
     <xsl:when test="@role='bold'">
       <xsl:call-template name="inline.boldseq"/>
     </xsl:when>
-<!-- what about these?
     <xsl:when test="@role='underline'">
       <fo:inline text-decoration="underline">
         <xsl:call-template name="inline.charseq"/>
         <xsl:call-template name="inline.charseq"/>
       </fo:inline>
     </xsl:when>
--->
     <xsl:otherwise>
-      <xsl:call-template name="inline.italicseq"/>
+      <xsl:choose>
+        <xsl:when test="$depth mod 2 = 1">
+          <fo:inline font-style="normal">
+            <xsl:apply-templates/>
+          </fo:inline>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="inline.italicseq"/>
+        </xsl:otherwise>
+      </xsl:choose>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>