This is as far as I get: I gave up the widget track for the time being and just edited my sidebar.php according to your readme-file. The widgets have their idiosyncrasies that don't seem to validate with the output from wp-dtree (see previous post).
Even so, I can't get the pages to validate due to two remaining offending constructs generated by wp-dtree. The first one is:
<span id="dtreepgewrapper">
<p id="oclink"><a href="javascript: p.openAll();">Expand all</a> | <a href="javascript: p.closeAll();">Collapse all</a>
[snip]
</span>
The validator says you can't put p's inside span's.
The second offending construct is the multiple definition of the id "oclink". It should be unique according to the validator. For more details, please check out the validator output yourself.
In my static html hack, that both validates and works fine, I simply removed the <p id="oclink">...</p> structure.
I have tried to find the piece of code that generates the offending statement but failed. I came all the way to the following statement
$pgeresults = $wpdb->get_var("SELECT content FROM ". $wp_dtree_cache . " WHERE treetype = 'pge' ORDER BY id");
in the file wp_dtree_pge_functions.php (and probably the files for categories etc too). It seems that the tags are returned in $pgeresults and thus reside in the database.
Could you pls give me a hint as to where exactly the offending HTML is generated and put into the database (if indeed it is there) and I'll give it another try.
Again, the pages can be found at http://www.ostrogothia.com
Thanks!
Arto