Hi Uma, thanks for the response. I am somewhat aware of using xml:sort as an element, however here is the problem I am running into. I have an infopath form that uses 3 different views, an edit, filter and published view. The published view is the view I need to edit, there is a rich text field in the published view that once merged with other documents contains all the text from the field. I want to sort and then apply styles to the text.
Here is a block of code from the xsl file.
<xsl:template match="my:Story" mode="_4">
<xsl:for-each select="my:Story">
<xsl:sort selected="my:Story"/>
<div class="xdRepeatingSection xdRepeating" title="" style="MARGIN-BOTTOM: 6px; WIDTH: 651px" align="left" xd:CtrlId="CTRL17" xd:xctname="RepeatingSection" tabIndex="-1">
<div>
<span class="xdTextBox " hideFocus="1" title="" xd:CtrlId="CTRL27" xd:xctname="RichText" xd:binding="my:company" xd:disableEditing="yes" tabIndex="-1" style="WIDTH: 640px; WHITE-SPACE: nowrap; WORD-WRAP: normal">
<xsl:value-of select="my:company"/><br />
</span>
</div>
<div><font style="bold">
<span class="xdTextBox" hideFocus="1" title="" xd:CtrlId="CTRL25" xd:xctname="RichText" xd:binding="my:newslettertitle" xd:disableEditing="yes" tabIndex="-1" style="WIDTH: 640px; WHITE-SPACE: nowrap; HEIGHT: 20px; WORD-WRAP: normal">
<xsl:value-of select="my:newslettertitle"/><br />
</span>
</font>
</div>
<div>
<span class="xdRichTextBox" hideFocus="1" title="" xd:CtrlId="CTRL19" xd:xctname="RichText" xd:binding="my:newsbrief" xd:disableEditing="yes" tabIndex="-1" style="WIDTH: 100%; WHITE-SPACE: normal; HEIGHT: 50px">
<xsl:copy-of select="my:newsbrief/node()"/><br />
</span>
</div>
The problem is when I merge the fields it doesn#%92t apply a style nor does it sort correct…