How to convert below xml to given output using xslt 1.0 and xslt 2.0. Please refer to given input and output............. Input:-
<block>
<line>
<formatting>
<word>text 1</word>
</formatting>
<formatting bold="1">
<word>text 2</word>
</formatting>
<formatting bold="1">
<word>text 3</word>
</formatting>
<formatting bold="1">
<word>text 4</word>
</formatting>
<formatting>
<word>text 5</word>
</formatting>
<formatting bold="1">
<word>text 6</word>
</formatting>
<formatting bold="1">
<word>text 7</word>
</formatting>
<formatting>
<word>text 8</word>
</formatting>
<formatting>
<word>text 9</word>
</formatting>
<formatting bold="1">
<word>text 10</word>
</formatting>
<formatting>
<word>text 11</word>
</formatting>
</line>
</block>
Output should be:-
<p>text 1 <b>text 2 text 3 text 4</b> text 5 <b>text 6 text 7</b> text 8 text 9 <b>text 10</b> text 11</p>
need code in xslt 1.0