Typically the problem I've experienced is I have my hierarchical transformations setup incorrectly. I've found the easiest thing to do with hierarchical viewers and transformations is get the markup structure you need and place inline HTML comments as to what transformation and level each line will be in, especially if the markup is complex. Secondly, view your source code as it's rendered and copy and paste it into a new HTML page in Visual Studio. You should find out pretty quickly if you have any invalid HTML.
One of those two options should get you moving in the right direction. If they don't it could be in one of your transformations.