this:
<formalpara>
<title>foo</title>
<para>bar</para>
</formalpara>
will be rendered as this:
<p>
<span class="formalpara-title">foo</span>
bar
</p>
I already set <xsl:param name="runinhead.default.title.end.punct"></xsl:param>
so the stupid point doesnt get rendered anymore.
<div class="formalpara">
<h2 class="title">foo</h2>
<p>bar</p>
</div>
I changed:
<xsl:template match="d:formalpara">
<xsl:call-template name="paragraph">
.....
</xsl:template>
to:
<xsl:template match="d:formalpara">
<xsl:call-template name="block.object">
.....
</xsl:template>
and I changed:
<xsl:template match="d:formalpara/d:title|d:formalpara/d:info/d:title">
.....
<span class="formalpara-title">
.....
</span>
</xsl:template>
to:
<xsl:template match="d:formalpara/d:title|d:formalpara/d:info/d:title">
.....
<h2 class="title">
.....
</h2>
</xsl:template>
This is what will be rendered now:
<div class="formalpara">
<h2 xmlns:d="http://docbook.org/ns/docbook" class="title">foo</h2>
bar
</div>
xmlns:d="http://docbook.org/ns/docbook"
getting rendered?<p>
tag around my bar
?You should be able to avoid the namespace declaration xmlns:d="http://docbook.org/ns/docbook"
on the h2
element by adding exclude-result-prefixes="d"
on your xsl:stylesheet
(respectively xsl:transform
) element.
I would assume that adding
<xsl:template match="d:formalpara/d:para">
<p>
<xsl:apply-templates/>
</p>
</xsl:template>
ensures the transformation of the para
element child of a formalpara
, but I haven't checked whether that works.