Here is an XSLT 1.0 stylesheet that performs the transformation:
Code:
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="ul">
<xsl:copy>
<xsl:apply-templates select="li[1]"/>
</xsl:copy>
</xsl:template>
<xsl:template match="li">
<xsl:copy>
<xsl:apply-templates/>
<xsl:apply-templates select="following-sibling::*[1][self::ul]"/>
</xsl:copy>
<xsl:apply-templates select="following-sibling::li[1]"/>
</xsl:template>
</xsl:stylesheet>
--
Martin Honnen
Microsoft MVP - XML