:) Thanks a lot Mads Hansen, for contributing to my question. I finally did changes to the XSLT you gave and succeeded in achieving the Transformation to required Format. Here is the final XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output indent="yes"/>
<!--identity template-->
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<!--convert every <Unit> into a <UL>,
then "push" the attributes(i.e. @id),
and then "push" any <Unit> children-->
<xsl:template match="Unit">
<xsl:apply-templates select="@*"/>
</xsl:template>
<!--Create an <li> and copy the @id attribute,
then "push" the Data/PartyName that are children of this <Unit>-->
<xsl:template match="Unit/@id">
<li>
<xsl:copy/>
<xsl:apply-templates select="../Data/PartyName"/>
<xsl:if test= "../Unit">
<ul>
<xsl:apply-templates select="../Unit"/>
</ul>
</xsl:if>
</li>
</xsl:template>
<!--convert <PartyName> into <span> -->
<xsl:template match="Data/PartyName">
<span>
<xsl:value-of select="."/>
</span>
</xsl:template>
</xsl:stylesheet>