Я использую xslt.Мой входной файл
<table bnf_id="bnf_204272" colsep="1" frame="all" id="nzf_3865" otherprops="HRT Risk table" pgwide="1" rowsep="1"><title>HRT Risk</title><tgroup cols="8" colsep="1" rowsep="1"><colspec colname="col1" /><colspec colname="col2" /><thead><row><entry morerows="1" rowsep="1">Risk</entry><entry morerows="1" rowsep="1">Age range (years)</entry><entry colsep="1" nameend="col4" namest="col3" rowsep="1">Background incidence per 1000 women in Europe not using HRT</entry><entry colsep="1" nameend="col6" namest="col5" rowsep="1"><b>Additional</b>
cases per 1000 women using
<b>oestrogen only HRT</b>
(estimated)
</entry><entry colsep="1" nameend="col8" namest="col7" rowsep="1"><b>Additional</b>
cases per 1000 women using
<b>combined (oestrogen-progestogen) HRT</b>
(estimated)
</entry></row><row><entry>Over 5 years</entry><entry nameend="col8" namest="col1"><b>Note</b><p>Where background incidence or additional cases have not been included in the table, this indicates a lack of available data. NS indicates a non-significant difference</p><p>
Taken from MHRA/CHM (<i>Drug Safety Update</i>
2007;
<b>1</b>
(2): 2–6) available at
<xref format="html" href="http://www.mhra.gov.uk/drugsafetyupdate">
www.mhra.gov.uk/drugsafetyupdate
</xref></p></entry></row></tbody></tgroup></table>
Мой xslt равен
<xsl:template match="tgroup">
<tr>
<xsl:if test="@cols">
<xsl:attribute name="cols">
<xsl:value-of select="@cols"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="@colsep">
<xsl:attribute name="colsep">
<xsl:value-of select="@colsep"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="@rowsep">
<xsl:attribute name="rowsep">
<xsl:value-of select="@rowsep"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="@align">
<xsl:attribute name="align">
<xsl:value-of select="@align"/>
</xsl:attribute>
</xsl:if>
<xsl:for-each select="colspec">
<th>
<xsl:if test="@colwidth">
<xsl:attribute name="width">
<xsl:value-of select="@colwidth"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="@colname">
<xsl:attribute name="colname">
<xsl:value-of select="@colname"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="@align">
<xsl:attribute name="align">
<xsl:value-of select="@align"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="@colsep">
<xsl:attribute name="colsep">
<xsl:value-of select="@colsep"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="@colnum">
<xsl:attribute name="colnum">
<xsl:value-of select="@colnum"/>
</xsl:attribute>
</xsl:if>
</th>
</xsl:for-each>
</tr>
<xsl:apply-templates/>
Но, имея вышеуказанный код в том же файле XSLT, мое второе совпадение для th выполняется.Так что я получаю пустое th как
<th></th>
Но мне нужно вставить ...
между тегами.Как это решить?