I have an XML file formatted like
<paragraph> Some Free text goes here<LinkType1 href="link1" >LinkName1</LinkType1> Then some more text <LinkType2 href="link2" >LinkName2</LinkType2>Then some more text <LinkType1 href =link3" >LinkName3</LinkType1> and then some more text
</paragraph>
This XML represents a paragraph of text with some links embedded inside it. In other words it is text and nodes within this text.
I need to convert it to HTML that looks like:
<p>
Some Free text goes here<a href="link1" target="_blank" >LinkName1</a> Then some more text <a href="link2" target="_blank" >LinkName2</a>Then some more text <a href =link3" target="_blank" >LinkName3</a> and then some more text
</p>
How can I do such transformation with XSLT ?
This transformation:
when applied on the provided XML document (corrected to become well-formed !):
produces the wanted, correct result: