Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: XSLT removes HTML tags XSLT removes HTML tagsTo: NULL Date: 3/6/2009 2:21:00 AM Hi, I use the following XSLT file to transfer a xml document into XHTML format and everything goes fine except the fact that XSLT removes all my html tags such as <br /> tags or <b></b> and only uses the text content. This is the XSLT file : <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" indent="yes"/> <xsl:output omit-xml-declaration="yes"/> <xsl:template match="/"> <html xmlns="http:////www.w3.org/1999/xhtml"> <head> <title>Test title</title> </head> <body> <xsl:apply-templates select="/emaillist/email_content"/> </body> </html> </xsl:template> <xsl:template match="item"> </xsl:template> </xsl:stylesheet> And this is the xml file I use: <?xml version="1.0" encoding="utf-8" ?> <emaillist> <email_content> <b>Test Text</b>,<br /> Test Text,<br /> </email_content> </emaillist> The output of the above transformation is : <html xmlns="http:////www.w3.org/1999/xhtml"> <head> <title>Test title</title> </head> <body> Test Text, Test Text, </body> </html> As you can see xsl has automatically removed my html tags. Can you please help me how I can stop XSL to remove my html tags. Below is the desired xhtml document which I want: <html xmlns="http:////www.w3.org/1999/xhtml"> <head> <title>Test title</title> </head> <body> <b>Test Text</b>,<br /> Test Text,<br /> </body> </html> | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
