]> granicus.if.org Git - docbook-dsssl/commitdiff
Fix bug #3297553 error in Word metadata elements from including
authorBob Stayton <bobs@sagehill.net>
Fri, 26 Oct 2012 20:44:10 +0000 (20:44 +0000)
committerBob Stayton <bobs@sagehill.net>
Fri, 26 Oct 2012 20:44:10 +0000 (20:44 +0000)
WordML markup instead of just text.

xsl/roundtrip/dbk2wordml.xsl

index d5077f012d40ae230941276b26f5e1f2eea179a8..04c548b45ea1bb16ab78f0bf4842dd1a79dddbb2 100644 (file)
         <o:Author>
           <xsl:choose>
             <xsl:when test='$authors'>
-              <xsl:apply-templates select='$authors[1]' mode='doc:docprop.author'/>
+              <xsl:variable name="content">
+                <xsl:apply-templates select='$authors[1]' mode='doc:docprop.author'/>
+              </xsl:variable>
+              <xsl:value-of select="$content"/>
             </xsl:when>
             <xsl:otherwise>Unknown</xsl:otherwise>
           </xsl:choose>
         </o:Author>
         <o:LastAuthor>
-          <xsl:choose>
-            <xsl:when test='$info/revhistory/revision[1]/*[self::author|self::authorinitials]'>
-              <xsl:apply-templates select='$info/revhistory/revision[1]/*[self::author|self::authorinitials]' mode='doc:docprop.author'/>
-            </xsl:when>
-            <xsl:when test='$authors'>
-              <xsl:apply-templates select='$authors[1]' mode='doc:docprop.author'/>
-            </xsl:when>
-            <xsl:otherwise>Unknown</xsl:otherwise>
-          </xsl:choose>
+          <xsl:variable name="content">
+            <xsl:choose>
+              <xsl:when test='$info/revhistory/revision[1]/*[self::author|self::authorinitials]'>
+                <xsl:apply-templates select='$info/revhistory/revision[1]/*[self::author|self::authorinitials]' mode='doc:docprop.author'/>
+              </xsl:when>
+              <xsl:when test='$authors'>
+                <xsl:apply-templates select='$authors[1]' mode='doc:docprop.author'/>
+              </xsl:when>
+              <xsl:otherwise>Unknown</xsl:otherwise>
+            </xsl:choose>
+          </xsl:variable>
+          <xsl:value-of select="$content"/>
         </o:LastAuthor>
         <o:Revision>1</o:Revision>
         <o:TotalTime></o:TotalTime>