Subject: Re: [xsl] xsl output defaults - html From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 18 Apr 2013 09:28:41 +0100 |
Just been burnt by the fact that XSLT defaults to html output and therefore does not emit well formed xml (e.g does not close img tags even if you tell it to) upon seeing a root element of html - EVEN if that root element is not in the html/xhtml namespace.
This rule has been in place since XSLT 1. Note you only get the html output method if the top level element is in _no_ namespace. If it is in the xhtml namespace then yiou get the xhtml method (or the xml method if xslt 1 compatibility is in force).
If producing html it is important not to use /> when generating html as (prior to HTML5) <meta.../> is a syntax error in html.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xsl output defaults - html, Ihe Onwuka | Thread | [xsl] replacing selective p tags wi, strip513 . |
[xsl] xsl output defaults - html, Ihe Onwuka | Date | [xsl] replacing selective p tags wi, strip513 . |
Month |