@rnd:style = "" or
@rnd:style = "para-continue"'>
<dbk:para>
+ <xsl:call-template name='rnd:attributes'/>
<xsl:apply-templates/>
</dbk:para>
</xsl:when>
<xsl:when test='&admonition-title;'>
<xsl:element name='{substring-before(@rnd:style, "-title")}'
namespace='http://docbook.org/ns/docbook'>
+ <xsl:call-template name='rnd:attributes'/>
<dbk:title>
<xsl:apply-templates/>
</dbk:title>
<xsl:when test='@rnd:style = "example-title"'>
<xsl:element name='{substring-before(@rnd:style, "-title")}'
namespace='http://docbook.org/ns/docbook'>
+ <xsl:call-template name='rnd:attributes'/>
<dbk:title>
<xsl:apply-templates/>
</dbk:title>
normalize-space(.) = ""][1]'/>
<dbk:sidebar>
+ <xsl:call-template name='rnd:attributes'/>
<dbk:info>
<dbk:title>
<xsl:apply-templates/>
<xsl:when test='&admonition;'>
<xsl:element name='{@rnd:style}'
namespace='http://docbook.org/ns/docbook'>
+ <xsl:call-template name='rnd:attributes'/>
<dbk:para>
<xsl:apply-templates/>
</dbk:para>
-->
<xsl:when test='@rnd:style = "bibliomixed"'>
<dbk:bibliomixed>
+ <xsl:call-template name='rnd:attributes'/>
<xsl:apply-templates/>
</dbk:bibliomixed>
</xsl:when>
<xsl:when test='@rnd:style = "biblioentry-title"'>
<dbk:biblioentry>
+ <xsl:call-template name='rnd:attributes'/>
<dbk:title>
<xsl:apply-templates/>
</dbk:title>
@rnd:style = "blockquote-attribution")][1]'/>
<dbk:blockquote>
+ <xsl:call-template name='rnd:attributes'/>
<xsl:if test='@rnd:style = "blockquote-title"'>
<dbk:info>
<dbk:title>
<xsl:when test='@rnd:style = "informalfigure-imagedata"'>
<dbk:informalfigure>
+ <xsl:call-template name='rnd:attributes'/>
<dbk:mediaobject>
<dbk:imageobject>
<dbk:imagedata fileref='{.}'/>
</dbk:imageobject>
</dbk:mediaobject>
+ <xsl:apply-templates select='following-sibling::*[1][self::dbk:para][@rnd:style = "Caption"]'
+ mode='rnd:caption'/>
</dbk:informalfigure>
</xsl:when>
+ <xsl:when test='@rnd:style = "Caption" and
+ preceding-sibling::*[(self::dbk:para and contains(@rnd:style, "imagedata")) or self::dbk:informaltable]'/>
+ <xsl:when test='@rnd:style = "Caption"'>
+ <xsl:call-template name='rnd:error'>
+ <xsl:with-param name='code'>bad-caption</xsl:with-param>
+ <xsl:with-param name='message'>caption does not follow table or figure</xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+
<xsl:when test='(contains(@rnd:style, "-title") or
contains(@rnd:style, "-titleabbrev") or
contains(@rnd:style, "-subtitle")) and
</xsl:choose>
</xsl:template>
+ <xsl:template match='dbk:para' mode='rnd:caption'>
+ <dbk:caption>
+ <xsl:call-template name='rnd:attributes'/>
+ <xsl:apply-templates/>
+ </dbk:caption>
+ </xsl:template>
+
<xsl:template match='dbk:emphasis'>
<xsl:choose>
<xsl:when test='not(@rnd:style) and @role = "italic"'>
<xsl:with-param name='style' select='"informalfigure-imagedata"'/>
<xsl:with-param name='content'>
<xsl:call-template name='doc:make-phrase'>
+ <xsl:with-param name='style'/>
<xsl:with-param name='content'>
<xsl:apply-templates select='mediaobject/imageobject/imagedata/@fileref |
doc:mediaobject/doc:imageobject/doc:imagedata/@fileref'
<xsl:when test='not(para|doc:para)'>
<!-- TODO: check for any block elements -->
<xsl:call-template name='doc:make-paragraph'>
+ <xsl:with-param name='style'/>
<xsl:with-param name='attributes.node' select='/..'/>
+ <xsl:with-param name='content'/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
The idea is to map custom names back to standard names. -->
<xsl:template name='rnd:map-paragraph-style'>
<xsl:param name='style'/>
- <xsl:value-of select='$style'/>
+ <xsl:choose>
+ <xsl:when test='starts-with($style, "Normal")'/>
+ <xsl:otherwise>
+ <xsl:value-of select='$style'/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<xsl:template name='rnd:map-character-style'>
<xsl:param name='style'/>
<xsl:value-of select='w:pPr/w:pStyle/@w:val'/>
</xsl:attribute>
</xsl:if>
+
+ <xsl:if test='w:r[1][w:rPr/w:rStyle/@w:val = "attributes"] and
+ w:r[2][w:rPr/w:rStyle/@w:val = "CommentReference"]'>
+ <xsl:apply-templates select='w:r[2]//w:r[w:rPr/w:rStyle/@w:val = "attribute-name"]'
+ mode='rnd:attributes'/>
+ </xsl:if>
+
<xsl:apply-templates/>
</dbk:para>
</xsl:template>
+ <xsl:template match='*' mode='rnd:attributes'>
+ <xsl:attribute name='{w:t}'>
+ <xsl:apply-templates select='following-sibling::w:r[w:rPr/w:rStyle/@w:val = "attribute-value"][1]'
+ mode='rnd:attribute-value'/>
+ </xsl:attribute>
+ </xsl:template>
+
<xsl:template match='w:r'>
<xsl:param name='do-vert-align' select='true()'/>
</xsl:variable>
<xsl:choose>
+ <xsl:when test='w:rPr/w:rStyle/@w:val = "attributes"'/>
+ <xsl:when test='w:rPr/w:rStyle/@w:val = "CommentReference"'/>
<xsl:when test='w:pict'>
<xsl:variable name='filename'>
<xsl:choose>