How to transform some tags to another using XSLT
问题 I have the following xml: <box> <title>bold text</title> some text </box> and the following xsl: <xsl:template match="box"> <p style="background:red;"> <xsl:apply-templates/> </p> </xsl:template> <xsl:template match="title"> <p style='background:green;'> <xsl:apply-templates/> </p> </xsl:template> And I got following: <p style="background:red;"> </p> <p style="background:green;">bold text</p> some text <p></p> But I want following: <p style="background:red;"> <p style="background:green;">bold