<articleinfo><author><firstname>Bob</firstname><surname>Stayton</surname><affiliation><orgname>Sagehill
Enterprises</orgname></affiliation></author>
<author><firstname>Steve</firstname><surname>Ball</surname><affiliation><orgname>Zveno</orgname></affiliation></author>
-<releaseinfo>Version 1.1, dated 28 September 2005</releaseinfo>
+<releaseinfo>Version 1.2, dated 13 Octobber 2005</releaseinfo>
</articleinfo>
<abstract>
<para>This document specifies how DocBook elements can be mapped to Microsoft Word styles. The specifications will be used to write conversions between DocBook XML and Microsoft's WordProcessingML (WordML).</para>
<entry colname="col3">Any Word paragraph with style <literal>Normal</literal> will also be converted to a <sgmltag class="element">para</sgmltag> element.</entry>
</row>
<row>
+<entry colname="col1">abstract</entry>
+<entry colname="col2">abstract,abstract-title</entry>
+<entry colname="col3"><sgmltag>abstract</sgmltag>/<sgmltag>para</sgmltag>.</entry>
+</row>
+<row>
<entry colname="col1">note/para</entry>
<entry colname="col2">note</entry>
<entry colname="col3">Consecutive paragraphs with style "note" after the first note are to be treated as part of the same <sgmltag class="element">note</sgmltag> element. That is, consecutive notes are coalesced.</entry>
(w:pPr/w:listPr/w:ilvl/@w:val = "0" and
w:pPr/w:listPr/wx:t/@wx:val = "·" and
w:pPr/w:listPr/wx:font/@wx:val = "Symbol")]'>
-<!ENTITY itemizedlist1 'w:p[w:pPr/w:pStyle/@w:val = "itemizedlist" or
+<!ENTITY itemizedlist1 'w:p[w:pPr/w:pStyle/@w:val = "itemizedlist1" or
(w:pPr/w:listPr/w:ilvl/@w:val = "0" and
w:pPr/w:listPr/wx:t/@wx:val = "·" and
w:pPr/w:listPr/wx:font/@wx:val = "Symbol")]'>
<!ENTITY othercredit "w:p[w:pPr/w:pStyle/@w:val='othercredit']">
<!ENTITY authorblurb "w:p[w:pPr/w:pStyle/@w:val='authorblurb']">
+<!ENTITY abstracttitle "w:p[w:pPr/w:pStyle/@w:val='abstract-title']">
+<!ENTITY abstract "w:p[w:pPr/w:pStyle/@w:val='abstract']">
+
<!ENTITY xinclude "w:p[w:pPr/w:pStyle/@w:val='xinclude']">
<!ENTITY surname "w:r[w:rPr/w:rStyle/@w:val='surname']">
../&editor; |
../&othercredit; |
../&revhistory; |
- ../&revision;'>
+ ../&revision; |
+ ../&abstract;'>
<xsl:element name='{$parent}info'>
<title>
<xsl:apply-templates select="w:r|w:hlink"/>
../&editor; |
../&othercredit; |
../&revhistory; |
- ../&revision;'
+ ../&revision; |
+ ../&abstract;'
mode='metadata'/>
</xsl:element>
</xsl:when>
&affiliation; |
&revhistory; |
&revision; |
- &revremark;" mode='group'/>
+ &revremark; |
+ &abstracttitle; |
+ &abstract;" mode='group'/>
+ <xsl:template match='&abstracttitle;' mode='metadata'/>
+ <xsl:template match='&abstract;' mode='metadata'>
+ <xsl:choose>
+ <xsl:when test='preceding-sibling::*[1][self::&abstracttitle;]'>
+ <abstract>
+ <title>
+ <xsl:apply-templates
+ select='preceding-sibling::*[1]/*[self::w:r|self::w:hlink]'/>
+ </title>
+ <xsl:apply-templates select='.' mode='abstract'/>
+ </abstract>
+ </xsl:when>
+ <xsl:when test='preceding-sibling::*[1][not(self::&abstract;)]'>
+ <abstract>
+ <xsl:apply-templates select='.' mode='abstract'/>
+ </abstract>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template match='*' mode='abstract'/>
+ <xsl:template match='&abstract;' mode='abstract'>
+ <para>
+ <xsl:call-template name='object.id'/>
+ <xsl:apply-templates select="w:r|w:hlink"/>
+ </para>
+ <xsl:apply-templates select='following-sibling::*[1]' mode='abstract'/>
+ </xsl:template>
<xsl:template match="&releaseinfo;" mode='metadata'>
<releaseinfo>
<xsl:call-template name='attributes'/>
<!-- Identify the node that follows all the listitems -->
<xsl:variable name="stop.node"
- select="generate-id(following-sibling::*[not(self::&itemizedlist;
+ select="following-sibling::*[not(self::&itemizedlist;
or self::&continue;
- or self::&orderedlist;)][1])"/>
+ or self::&orderedlist;)][1]"/>
+ <xsl:variable name='stop.node.id' select='generate-id($stop.node)'/>
<!-- Start the list and process all the level 1 listitems -->
<itemizedlist>
- <xsl:apply-templates mode="item"
- select=".|following-sibling::&itemizedlist;[&listlevel; = '']
- [following-sibling::*[generate-id() = $stop.node]]">
- <xsl:with-param name="depth" select="1"/>
- </xsl:apply-templates>
+ <xsl:choose>
+ <xsl:when test='$stop.node'>
+ <xsl:apply-templates
+ mode="item"
+ select=".|following-sibling::&itemizedlist;[&listlevel; = '' or &listlevel; = '1']
+ [following-sibling::*[generate-id() = $stop.node.id]]">
+ <xsl:with-param name="depth" select="1"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates
+ mode='item'
+ select='.|following-sibling::&itemizedlist;[&listlevel; = "" or &listlevel; = "1"]'/>
+ </xsl:otherwise>
+ </xsl:choose>
</itemizedlist>
</xsl:template>
- <xsl:template match="&itemizedlist;" mode="item">
+ <xsl:template match="&itemizedlist;|&itemizedlist1;" mode="item">
<xsl:param name="depth" select="1"/>
<listitem>
<xsl:with-param name="depth" select="$depth + 1"/>
</xsl:apply-templates>
</listitem>
-
</xsl:template>
<xsl:template match="&itemizedlist;" mode="subgroup">
</link>
</xsl:template>
-<xsl:template match="w:hlink[w:r/w:rPr/w:rStyle[@w:val='ulink' or @w:val='Hyperlink']]">
+<xsl:template match="w:hlink[w:r/w:rPr/w:u |
+ w:r/w:rPr/w:rStyle[@w:val='ulink' or @w:val='Hyperlink']]">
<ulink url='{@w:dest}'>
<xsl:apply-templates select="w:r"/>
</ulink>
<xsl:template match='w:r[starts-with(w:rPr/w:rStyle/@w:val, "emphasis")]'
priority='2'>
<xsl:choose>
+ <xsl:when test='ancestor::w:hlink'>
+ <xsl:apply-templates select='w:t'/>
+ </xsl:when>
<xsl:when test='w:rPr/w:rStyle/@w:val = "emphasis-bold"'>
<emphasis role='bold'>
<xsl:apply-templates select="w:t"/>