Hi,
There is a bug with the docbook 4 to 5 conversion xslt
(docbook-5.0/tools/db4-upgrade.xsl) - it drops step titles.
This is easy enough to fix in the style sheet, I just added step to the
match of procedure - but I have some further issues with the conversion
process.
The way title templates are applied breaks the ordering of the nodes -
inserting the <info><title>... before all other nodes, which includes
the text node that has the indentation ...
Example of this would be seen when converting something like:
<section>
this text is not really valid but is just here to prove a point
<title>atitle</title>
</section>
After conversion this is:
<section><info><title>atitle</title></info>
this text is not really valid but is just here to prove a point
</section>
I would really like to not have this happen and retain order of the
nodes so indentation stays where I put it originally.
So my question is - how would I go about fixing this, without changing
too much of the style sheet ?
I tried changing the parts that applied the templates to procedure to a
for loop - and then apply templates to the current node - but this does
not seem to be possilbe.
Below is example of what i tried - the apply templates did not work the
way I intended it to.
<xsl:for-each select="node()">
<xsl:comment>
<xsl:choose>
<xsl:when test="local-name()=title">
<xsl:comment>tm</xsl:comment>
<xsl:apply-templates select="self::node()" mode="copy"/>
</xsl:when>
<xsl:when test="local-name()=titleabbrev">
<xsl:comment>tm</xsl:comment>
<xsl:apply-templates select="self::node()" mode="copy"/>
</xsl:when>
<xsl:when test="local-name()=subtitle">
<xsl:comment>tm</xsl:comment>
<xsl:apply-templates select="self::node()" mode="copy"/>
</xsl:when>
<xsl:otherwise>
<xsl:comment>tm</xsl:comment>
<xsl:apply-templates select="self::node()"/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
Any help will be appreciated.
Regards
Iwan Aucamp