<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">  
<html>
<body>
     
       <xsl:for-each select="data/p">
        <xsl:choose>
         <xsl:when test="italic">
            <xsl:variable name="prepara"> 
                <xsl:value-of select="text()"/>
            </xsl:variable> 
            <xsl:value-of select="$prepara"/>
            <i><xsl:value-of select="italic"/></i>
            <xsl:variable name="postpara"> 
                <xsl:copy-of select="text()"/>
            </xsl:variable>
            <xsl:value-of select="substring-after($postpara,$prepara)"/><br/>
          </xsl:when>
    
          <xsl:otherwise>
             <xsl:value-of select="." />
          </xsl:otherwise>
     </xsl:choose>
</xsl:for-each>
</body>
</html> 
</xsl:template>
</xsl:stylesheet>