I had an XML somewhat similar to what is shown below. I had to find the unique categories. There are lot of easy ways in XSLT 2.0. But I had to stick to 1.0 :( . After several struggle I found the solution. I thought of sharing. Might help somebody. Please improve my answer. I appreciate.
<root>
<category>
this is Games category
</category>
<category>
this is Books category
</category>
<category>
this is Food category
</category>
<category>
this is Games category
</category>
<category>
this is Books category
</category>
<category>
this is Food category
</category>
<category>
this is Travel category
</category>
<category>
this is Travel category
</category>
</root>
Solution. I have added in the answer section. Thanks.