]> granicus.if.org Git - docbook-dsssl/commitdiff
Handle XHTML RTFs more completely
authorNorman Walsh <ndw@nwalsh.com>
Wed, 18 Sep 2002 13:06:37 +0000 (13:06 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 18 Sep 2002 13:06:37 +0000 (13:06 +0000)
xsl/html/html-rtf.xsl

index 898a2e545d80b0597d9040af4f8fb43814932858..fccfbbceb1b5d48b03cc841ec4536ede4ba1711c 100644 (file)
   </xsl:copy>
 </xsl:template>
 
-<xsl:template match="p" mode="insert.html.p">
+<xsl:template xmlns:html="http://www.w3.org/1999/xhtml"
+              match="html:p|p" mode="insert.html.p">
   <xsl:param name="mark" select="'?'"/>
   <xsl:copy>
     <xsl:copy-of select="@*"/>
-    <xsl:if test="not(preceding::p)">
+    <xsl:if test="not(preceding::p|preceding::html:p)">
       <xsl:copy-of select="$mark"/>
     </xsl:if>
     <xsl:apply-templates mode="insert.html.p">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="p" mode="unwrap.p">
+<xsl:template xmlns:html="http://www.w3.org/1999/xhtml"
+              match="html:p|p" mode="unwrap.p">
   <!-- xmlns:html is necessary for the xhtml stylesheet case -->
   <xsl:variable name="blocks" xmlns:html="http://www.w3.org/1999/xhtml"
                 select="address|blockquote|div|hr|h1|h2|h3|h4|h5|h6