]> granicus.if.org Git - docbook-dsssl/commitdiff
Fixed bug #977874. Remark/comment is rendered as a block/inline depending on its...
authorJirka Kosek <jirka@kosek.cz>
Sun, 24 Oct 2004 10:42:29 +0000 (10:42 +0000)
committerJirka Kosek <jirka@kosek.cz>
Sun, 24 Oct 2004 10:42:29 +0000 (10:42 +0000)
xsl/fo/inline.xsl
xsl/html/inline.xsl

index 30564a92f9baa37dc5337237dc03a7967b896b6f..84c3cd8dec3738754d37b5eecd380d69c78d5ef3 100644 (file)
@@ -1,4 +1,17 @@
 <?xml version='1.0'?>
+<!DOCTYPE xsl:stylesheet [
+  <!ENTITY comment.block.parents "parent::answer|parent::appendix|parent::article|parent::bibliodiv|
+                                  parent::bibliography|parent::blockquote|parent::caution|parent::chapter|
+                                  parent::glossary|parent::glossdiv|parent::important|parent::index|
+                                  parent::indexdiv|parent::listitem|parent::note|parent::orderedlist|
+                                  parent::partintro|parent::preface|parent::procedure|parent::qandadiv|
+                                  parent::qandaset|parent::question|parent::refentry|parent::refnamediv|
+                                  parent::refsect1|parent::refsect2|parent::refsect3|parent::refsection|
+                                  parent::refsynopsisdiv|parent::sect1|parent::sect2|parent::sect3|parent::sect4|
+                                  parent::sect5|parent::section|parent::setindex|parent::sidebar|
+                                  parent::simplesect|parent::taskprerequisites|parent::taskrelated|
+                                  parent::tasksummary|parent::warning">
+]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:xlink='http://www.w3.org/1999/xlink'
 
 <!-- ==================================================================== -->
 
-<xsl:template match="comment|remark">
+<xsl:template match="comment[&comment.block.parents;]|remark[&comment.block.parents;]">
   <xsl:if test="$show.comments != 0">
     <fo:block font-style="italic">
       <xsl:call-template name="inline.charseq"/>
   </xsl:if>
 </xsl:template>
 
+<xsl:template match="comment|remark">
+  <xsl:if test="$show.comments != 0">
+    <fo:inline font-style="italic">
+      <xsl:call-template name="inline.charseq"/>
+    </fo:inline>
+  </xsl:if>
+</xsl:template>
+
 <!-- ==================================================================== -->
 
 <xsl:template match="productname">
index ef72df9590b6f73bb69fb757cd2c40abe9e0601b..5e6b56436fdd05e2e543f97b6cf8972c04f1f3d0 100644 (file)
@@ -1,4 +1,17 @@
 <?xml version='1.0'?>
+<!DOCTYPE xsl:stylesheet [
+  <!ENTITY comment.block.parents "parent::answer|parent::appendix|parent::article|parent::bibliodiv|
+                                  parent::bibliography|parent::blockquote|parent::caution|parent::chapter|
+                                  parent::glossary|parent::glossdiv|parent::important|parent::index|
+                                  parent::indexdiv|parent::listitem|parent::note|parent::orderedlist|
+                                  parent::partintro|parent::preface|parent::procedure|parent::qandadiv|
+                                  parent::qandaset|parent::question|parent::refentry|parent::refnamediv|
+                                  parent::refsect1|parent::refsect2|parent::refsect3|parent::refsection|
+                                  parent::refsynopsisdiv|parent::sect1|parent::sect2|parent::sect3|parent::sect4|
+                                  parent::sect5|parent::section|parent::setindex|parent::sidebar|
+                                  parent::simplesect|parent::taskprerequisites|parent::taskrelated|
+                                  parent::tasksummary|parent::warning">
+]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:xlink='http://www.w3.org/1999/xlink'
                 xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks"
 
 <!-- ==================================================================== -->
 
+<xsl:template match="comment[&comment.block.parents;]|remark[&comment.block.parents;]">
+  <xsl:if test="$show.comments != 0">
+    <p class="remark"><i><xsl:call-template name="inline.charseq"/></i></p>
+  </xsl:if>
+</xsl:template>
+
 <xsl:template match="comment|remark">
   <xsl:if test="$show.comments != 0">
     <em><xsl:call-template name="inline.charseq"/></em>