Divs moved around after xslt transformation
Normally for xslt transformation closing tags wil collapse
<div id=”1”></div>
Will be rendered like
<div id=”1” />
This will not cause much of an issue until you have nearby empty divs like
<div id=”1”></div> <div id=”2”></div>
After xslt transformation you will get
<div id=”1” /> <div id=”2”/>
When this has gone through html engine, it will be like
<div id=”1”><div id=”2”></div></div>
So divs are moved around and embedded.
The solution is to add following at the top of your style sheet to prevent collapsing of closing tags
<xsl:output method="html"/>
Tags: xslt
