![](https://secure.gravatar.com/avatar/9e0addb6d7e0013f5a2e2fe88124c1cb.jpg?s=120&d=mm&r=g)
<species_comments>The nature of <i>Carcinus maenas</i> is blah blah blah.</species_comments>
What I would like to do is have this attribute parsed using XSL and retain the formatting over species names. When the text is processed normally the HTML tags are dropped.
That's because you're hitting the default template rules, which strips elements but retains their content.
If it is kept as CDATA the tags are not dropped but also not processed.
If you mean you've got <i>Carcinus maenas</i> or something similar, then the XSLT processor won't treat them as tags, but text.
Any clues how to handle this?
You need a template rule that copies over the contents of this element into the result tree unchanged.
something like:
<xsl:template match="species_comments"> xsl:copy <xsl:copy-of select="@*"/> xsl:apply-templates/ </xsl:copy> </xsl:template>
This should copy the contents unchanged (including attributes) into the output.
HtH,
Cheers,
L.
participants (1)
-
Leigh Dodds