]> granicus.if.org Git - docbook-dsssl/commitdiff
handle weird EndnoteReference character style
authorSteve Ball <balls@users.sourceforge.net>
Tue, 8 Jul 2008 13:22:25 +0000 (13:22 +0000)
committerSteve Ball <balls@users.sourceforge.net>
Tue, 8 Jul 2008 13:22:25 +0000 (13:22 +0000)
added support for footnote in author paragraph

xsl/roundtrip/blocks2dbk.xsl

index 3a62eff2f8253329702c39282067dacb8ecef8c2..da48bfdef359cbfe489a3af8868f887a0b711f05 100644 (file)
         </dbk:link>
       </xsl:when>
 
+      <!-- In rare circumstances, Word inserts an empty element that appears to be something like a space in the editor -->
+      <xsl:when test='(@rnd:style = "EndnoteReference" or
+                      @rnd:style = "FootnoteReference") and
+                      . = ""'>
+        <xsl:text> </xsl:text>
+      </xsl:when>
+
       <xsl:otherwise>
         <xsl:call-template name='rnd:error'>
           <xsl:with-param name='code'>unknown-style</xsl:with-param>
             <!-- TODO: check style of author; mixed content or structured -->
             <xsl:apply-templates mode='rnd:personname'/>
           </dbk:personname>
+          <xsl:apply-templates mode='rnd:author-personblurb'/>
           <xsl:apply-templates select='following-sibling::*[1]'
             mode='rnd:author'/>
         </dbk:author>
     </xsl:choose>
   </xsl:template>
 
+  <xsl:template match='text()' mode='rnd:author-personblurb'/>
+  <xsl:template match='dbk:emphasis' mode='rnd:author-personblurb'/>
+  <xsl:template match='dbk:footnote' mode='rnd:author-personblurb'>
+    <dbk:personblurb>
+      <dbk:para>
+        <xsl:copy>
+          <xsl:apply-templates select='@*' mode='rnd:copy'/>
+          <xsl:apply-templates/>
+        </xsl:copy>
+      </dbk:para>
+    </dbk:personblurb>
+  </xsl:template>
+
   <xsl:template match='dbk:para' mode='rnd:author'>
     <xsl:choose>
       <xsl:when test='@rnd:style = "personblurb" and