Moving text to specified position using xsl



I apologize if this has been asked before, but I don't even know what terms to search for. I'm a beginner with xml and xslt and am looking to create html output from a xml file. My problem looks like this:


My text is:



This is some text. This is the last bit of text.
This is some other text.


The output I want is



This is some text. This is some other Text. This is the last bit of text.


I cannot just tag



<a>This is some text.</a> <b>This is the last bit of text.</b>
<c>This is some other text.</c>.


What I want to do is place a marker for where the text needs to be inserted. Sort of like this:



This is some text. <insert n="1"/> This is the last bit of text.
<addition n="1">This is some other Text.</addition>


The added text can be anywhere in the document, but it I can easily assign the n manually. Any ideas how to achieve this with my xslt stylesheet?


Many thanks!


Marie


No comments:

Post a Comment