Index: src/dot.cpp
===================================================================
--- src/dot.cpp	(revisione 614)
+++ src/dot.cpp	(copia locale)
@@ -1106,7 +1106,7 @@
     // write image and map in a table row
     QCString mapLabel = convertNameToFile(n->m_label);
     out << "<tr><td><img src=\"" << imgName << "\" border=\"0\" alt=\"\" usemap=\"#" 
-      << mapLabel << "_map\">" << endl;
+        << mapLabel << "_map\"/>" << endl;
     out << "<map name=\"" << mapLabel << "_map\">" << endl;
     convertMapFile(out,mapName,"");
     out << "</map></td></tr>" << endl;
@@ -1907,7 +1907,7 @@
         ASSERT(0);
         break;
     }
-    out << "\"></center>" << endl;
+    out << "\"/></center>" << endl;
     QString tmpstr;
     QTextOStream tmpout(&tmpstr);
     tmpout.setEncoding(tmpout.UnicodeUTF8);
@@ -2223,8 +2223,7 @@
   {
     out << "<p><center><img src=\"" << relPath << baseName << "." 
         << imgExt << "\" border=\"0\" usemap=\"#"
-        << mapName << "_map\" alt=\"";
-    out << "\">";
+        << mapName << "_map\" alt=\"\"/>";
     out << "</center>" << endl;
     QString tmpstr;
     QTextOStream tmpout(&tmpstr);
@@ -2516,8 +2515,7 @@
   {
     out << "<p><center><img src=\"" << relPath << baseName << "." 
         << imgExt << "\" border=\"0\" usemap=\"#"
-        << mapName << "_map\" alt=\"";
-    out << "\">";
+        << mapName << "_map\" alt=\"\"/>";
     out << "</center>" << endl;
     QString tmpstr;
     QTextOStream tmpout(&tmpstr);
@@ -2659,7 +2657,7 @@
         << imgExt << "\" border=\"0\" usemap=\"#"
         << mapName << "_map\" alt=\"";
     out << m_dir->displayName();
-    out << "\">";
+    out << "\"/>";
     out << "</center>" << endl;
     QString tmpstr;
     QTextOStream tmpout(&tmpstr);
@@ -3147,7 +3145,7 @@
       QCString mapLabel = convertNameToFile(baseName);
       t << "<center><table><tr><td><img src=\"" << relPath << imgName
         << "\" border=\"0\" alt=\"\" usemap=\"#" 
-        << mapLabel << "_map\">" << endl;
+        << mapLabel << "_map\"/>" << endl;
       t << "<map name=\"" << mapLabel << "_map\">" << endl;
       convertMapFile(t,mapName,relPath);
       t << "</map></td></tr></table></center>" << endl;
Index: src/diagram.cpp
===================================================================
--- src/diagram.cpp	(revisione 614)
+++ src/diagram.cpp	(copia locale)
@@ -176,9 +176,12 @@
       t << relPath;
     }
     t << cd->getOutputFileBase() << Doxygen::htmlFileExtension << "\" ";
-    t << "alt=\"" << cd->displayName(); 
+
+    // we need convertToXML because the class name could contain e.g. < > chars
+    t << "alt=\"" << convertToXML(cd->displayName()); 
+
     t << "\" shape=\"rect\" coords=\"" << x << "," << y << ",";
-    t << (x+w) << "," << (y+h) << "\">" << endl;
+    t << (x+w) << "," << (y+h) << "\"/>" << endl;
   }
 }
 //-----------------------------------------------------------------------------
Index: src/mangen.cpp
===================================================================
--- src/mangen.cpp	(revisione 614)
+++ src/mangen.cpp	(copia locale)
@@ -356,7 +356,7 @@
     t << "\"";
 }
 
-void ManGenerator::writeListItem() 
+void ManGenerator::startItemListItem() 
 { 
   if (!firstCol) t << endl; 
   t << ".TP" << endl; 
@@ -365,6 +365,10 @@
   col=0;
 } 
 
+void ManGenerator::endItemListItem() 
+{
+}
+
 void ManGenerator::startCodeFragment() 
 { 
   newParagraph();
@@ -476,7 +480,7 @@
 //  paragraph=TRUE;
 //}
 
-void ManGenerator::writeDescItem()
+void ManGenerator::startDescForItem()
 {
   if (!firstCol) t << endl;
   if (!paragraph) t << ".in -1c" << endl;
@@ -486,6 +490,10 @@
   col=0;
 }
 
+void ManGenerator::endDescForItem()
+{
+}
+
 void ManGenerator::endDescItem()
 {
   t << "\" 1c" << endl;
@@ -669,13 +677,14 @@
 
 void ManGenerator::startConstraintParam()
 {
-  writeListItem();
+  startItemListItem();
   startEmphasis();
 }
 
 void ManGenerator::endConstraintParam()
 {
   endEmphasis();
+  endItemListItem();
   t << " : ";
 }
 
Index: src/rtfgen.h
===================================================================
--- src/rtfgen.h	(revisione 614)
+++ src/rtfgen.h	(copia locale)
@@ -88,7 +88,8 @@
     void endTypewriter()   { t << "}";      }
     void startGroupHeader();
     void endGroupHeader();
-    void writeListItem();
+    void startItemListItem();
+    void endItemListItem();
 
     void startMemberSections() {}
     void endMemberSections() {} 
@@ -152,7 +153,8 @@
     void endSimpleSect();
     void startParamList(ParamListTypes,const char *);
     void endParamList();
-    void writeDescItem();
+    void startDescForItem();
+    void endDescForItem();
     void startSection(const char *,const char *,SectionInfo::SectionType);
     void endSection(const char *,SectionInfo::SectionType);
     void addIndexItem(const char *,const char *);
Index: src/dirdef.cpp
===================================================================
--- src/dirdef.cpp	(revisione 614)
+++ src/dirdef.cpp	(copia locale)
@@ -124,8 +124,9 @@
     // repeat brief description
     if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
     {
+      ol.startParagraph();
       ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE);
-      ol.newParagraph();
+      ol.endParagraph();
     }
 
     // write documentation
@@ -163,8 +164,9 @@
   // write brief or details (if DETAILS_AT_TOP)
   if (Config_getBool("DETAILS_AT_TOP"))
   {
+    ol.startParagraph();
     writeDetailedDocumentation(ol);
-    ol.newParagraph();
+    ol.endParagraph();
   }
   else if (!briefDescription().isEmpty())
   {
@@ -179,7 +181,7 @@
     ol.endTextLink();
     ol.enableAll();
     ol.disableAllBut(OutputGenerator::Man);
-    ol.newParagraph();
+    //ol.newParagraph(); FIXME
     ol.popGeneratorState();
   }
 
@@ -199,10 +201,11 @@
     {
       msg("Generating dependency graph for directory %s\n",displayName().data());
       ol.disable(OutputGenerator::Man);
-      ol.newParagraph();
+      ol.startParagraph();
       ol.startDirDepGraph();
       //TODO: ol.parseText(theTranslator->trDirDepGraph());
       ol.endDirDepGraph(dirDep);
+      ol.endParagraph();
       ol.enableAll();
     }
   }
@@ -229,6 +232,7 @@
       }
       if (!dd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
       {
+        ol.startParagraph();
         ol.startMemberDescription();
         ol.parseDoc(briefFile(),briefLine(),dd,0,dd->briefDescription(),
             FALSE, // indexWords
@@ -238,7 +242,7 @@
             TRUE   // link from index
            );
         ol.endMemberDescription();
-        ol.newParagraph();
+        ol.endParagraph();
       }
       dd=m_subdirs.next();
     }
@@ -288,6 +292,7 @@
       ol.endMemberItem();
       if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
       {
+        ol.startParagraph();
         ol.startMemberDescription();
         ol.parseDoc(briefFile(),briefLine(),fd,0,fd->briefDescription(),
             FALSE, // indexWords
@@ -297,7 +302,7 @@
             TRUE   // link from index
            );
         ol.endMemberDescription();
-        ol.newParagraph();
+        ol.endParagraph();
       }
       fd=m_fileList->next();
     }
Index: src/latexgen.h
===================================================================
--- src/latexgen.h	(revisione 614)
+++ src/latexgen.h	(copia locale)
@@ -90,7 +90,8 @@
     void endTypewriter()   { t << "}";      }
     void startGroupHeader();
     void endGroupHeader();
-    void writeListItem() { t << "\\item " << endl; }
+    void startItemListItem() { t << "\\item " << endl; }
+    void endItemListItem() {}
 
     void startMemberSections() {}
     void endMemberSections() {} 
@@ -161,7 +162,8 @@
     void endSimpleSect();
     void startParamList(ParamListTypes,const char *title);
     void endParamList();
-    void writeDescItem()     { t << "\\par" << endl; }
+    void startDescForItem()     { t << "\\par" << endl; }
+    void endDescForItem()       {}
     void startSection(const char *,const char *,SectionInfo::SectionType);
     void endSection(const char *,SectionInfo::SectionType);
     void addIndexItem(const char *,const char *);
Index: src/doxygen_css.h
===================================================================
--- src/doxygen_css.h	(revisione 614)
+++ src/doxygen_css.h	(copia locale)
@@ -1,3 +1,5 @@
+"/* the doxygen standard CSS */\n"
+"\n"
 "BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {\n"
 "	font-family: Geneva, Arial, Helvetica, sans-serif;\n"
 "}\n"
@@ -187,6 +189,14 @@
 "IMG.formulaInl { \n"
 "	vertical-align: middle; \n"
 "}\n"
+"IMG.center {\n"
+"    float: center;\n"
+"    border: 0;\n"
+"}\n"
+"IMG.footer {\n"
+"    border: 0;\n"
+"    vertical-align: bottom; \n"
+"}\n"
 "SPAN.keyword       { color: #008000 }\n"
 "SPAN.keywordtype   { color: #604020 }\n"
 "SPAN.keywordflow   { color: #e08000 }\n"
Index: src/filedef.cpp
===================================================================
--- src/filedef.cpp	(revisione 614)
+++ src/filedef.cpp	(copia locale)
@@ -179,7 +179,7 @@
     {
       ol.pushGeneratorState();
         ol.disable(OutputGenerator::Man);
-        ol.newParagraph();
+        //ol.newParagraph();       FIXME
         ol.enableAll();
         ol.disableAllBut(OutputGenerator::Man);
         ol.writeString("\n\n");
@@ -296,7 +296,7 @@
     ol.pushGeneratorState();
     ol.disable(OutputGenerator::Man);
     ol.disable(OutputGenerator::RTF);
-    ol.newParagraph();
+    //ol.newParagraph(); FIXME
     ol.popGeneratorState();
   }
   else if (!briefDescription().isEmpty()) 
@@ -312,7 +312,7 @@
     ol.pushGeneratorState();
     ol.disable(OutputGenerator::Man);
     ol.disable(OutputGenerator::RTF);
-    ol.newParagraph();
+    //ol.newParagraph();  FIXME
     ol.popGeneratorState();
   }
   ol.writeSynopsis();
@@ -404,10 +404,11 @@
     {
       ol.startTextBlock(); 
       ol.disable(OutputGenerator::Man);
-      ol.newParagraph();
+      ol.startParagraph();
       ol.startInclDepGraph();
       ol.parseText(theTranslator->trInclDepGraph(name()));
       ol.endInclDepGraph(incDepGraph);
+      ol.endParagraph();
       ol.enableAll();
       ol.endTextBlock(TRUE);
     }
@@ -422,10 +423,11 @@
     {
       ol.startTextBlock(); 
       ol.disable(OutputGenerator::Man);
-      ol.newParagraph();
+      ol.startParagraph();
       ol.startInclDepGraph();
       ol.parseText(theTranslator->trInclByDepGraph());
       ol.endInclDepGraph(incDepGraph);
+      ol.endParagraph();
       ol.enableAll();
       ol.endTextBlock(TRUE);
     }
@@ -436,10 +438,11 @@
   if (generateSourceFile())
   {
     ol.disableAllBut(OutputGenerator::Html);
-    ol.newParagraph();
+    ol.startParagraph();
     ol.startTextLink(includeName(),0);
     ol.parseText(theTranslator->trGotoSourceCode());
     ol.endTextLink();
+    ol.endParagraph();
     ol.enableAll();
   }
   
Index: src/definition.cpp
===================================================================
--- src/definition.cpp	(revisione 614)
+++ src/definition.cpp	(copia locale)
@@ -765,6 +765,8 @@
       //printf("Read:\n`%s'\n\n",codeFragment.data());
       MemberDef *thisMd = 0;
       if (definitionType()==TypeMember) thisMd = (MemberDef *)this;
+
+      ol.startParagraph();
       ol.startCodeFragment();
       pIntf->parseCode(ol,               // codeOutIntf
                        scopeName,        // scope
@@ -778,7 +780,7 @@
                        thisMd            // memberDef
                       );
       ol.endCodeFragment();
-      ol.newParagraph();
+      ol.endParagraph();
     }
   }
   ol.popGeneratorState();
@@ -1160,7 +1162,7 @@
     else
     {
       ol.writeString("&nbsp;");
-      ol.writeString("&raquo");
+      ol.writeString("&raquo;");
       ol.writeString("&nbsp;");
     }
   }
Index: src/mangen.h
===================================================================
--- src/mangen.h	(revisione 614)
+++ src/mangen.h	(copia locale)
@@ -95,7 +95,8 @@
     void insertMemberAlign(bool) {}
     void startMemberSubtitle() {}
     void endMemberSubtitle() {}
-    void writeListItem();
+    void startItemListItem();
+    void endItemListItem();
     void startMemberDocList() {}
     void endMemberDocList() {}
     void startMemberList();
@@ -157,7 +158,8 @@
     void endSimpleSect();
     void startParamList(ParamListTypes,const char *title);
     void endParamList();
-    void writeDescItem();
+    void startDescForItem();
+    void endDescForItem();
     void startSection(const char *,const char *,SectionInfo::SectionType);
     void endSection(const char *,SectionInfo::SectionType);
     void addIndexItem(const char *,const char *) {}
@@ -177,7 +179,7 @@
     
     void startDescTable() {}
     void endDescTable() {}
-    void startDescTableTitle() { writeListItem(); startBold(); startEmphasis(); }
+    void startDescTableTitle() { startItemListItem(); startBold(); startEmphasis(); endItemListItem(); }
     void endDescTableTitle() { endEmphasis(); endBold(); }
     void startDescTableData() { t << endl; firstCol=TRUE; }
     void endDescTableData() {}
Index: src/outputlist.h
===================================================================
--- src/outputlist.h	(revisione 614)
+++ src/outputlist.h	(copia locale)
@@ -97,8 +97,6 @@
     { forall(&OutputGenerator::startTitle); }
     void endTitle() 
     { forall(&OutputGenerator::endTitle); }
-    void newParagraph() 
-    { forall(&OutputGenerator::newParagraph); }
     void startParagraph() 
     { forall(&OutputGenerator::startParagraph); }
     void endParagraph() 
@@ -157,8 +155,12 @@
     { forall(&OutputGenerator::startGroupHeader); }
     void endGroupHeader()
     { forall(&OutputGenerator::endGroupHeader); }
-    void writeListItem() 
-    { forall(&OutputGenerator::writeListItem); }
+
+    void startItemListItem() 
+    { forall(&OutputGenerator::startItemListItem); }
+    void endItemListItem() 
+    { forall(&OutputGenerator::endItemListItem); }
+
     void startMemberSections()
     { forall(&OutputGenerator::startMemberSections); }
     void endMemberSections()
@@ -251,6 +253,10 @@
     { forall(&OutputGenerator::startDescItem); }
     void endDescItem() 
     { forall(&OutputGenerator::endDescItem); }
+    void startDescForItem() 
+    { forall(&OutputGenerator::startDescForItem); }
+    void endDescForItem() 
+    { forall(&OutputGenerator::endDescForItem); }
     void startSubsection() 
     { forall(&OutputGenerator::startSubsection); }
     void endSubsection() 
@@ -286,8 +292,6 @@
     { forall(&OutputGenerator::startParamList,t,title); }
     void endParamList() 
     { forall(&OutputGenerator::endParamList); }
-    void writeDescItem() 
-    { forall(&OutputGenerator::writeDescItem); }
     void startIndent() 
     { forall(&OutputGenerator::startIndent); }
     void endIndent() 
Index: src/namespacedef.cpp
===================================================================
--- src/namespacedef.cpp	(revisione 614)
+++ src/namespacedef.cpp	(copia locale)
@@ -251,7 +251,7 @@
     {
       ol.pushGeneratorState();
         ol.disable(OutputGenerator::Man);
-        ol.newParagraph();
+        ///ol.newParagraph();  FIXME
         ol.enableAll();
         ol.disableAllBut(OutputGenerator::Man);
         ol.writeString("\n\n");
@@ -259,8 +259,9 @@
     }
     if (!documentation().isEmpty())
     {
+      ol.startParagraph();
       ol.parseDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE);
-      //ol.newParagraph();
+      ol.endParagraph();
     }
     ol.endTextBlock();
   }
@@ -313,8 +314,9 @@
     
   if (Config_getBool("DETAILS_AT_TOP"))
   {
+    ol.startParagraph();
     writeDetailedDocumentation(ol);
-    ol.newParagraph();
+    ol.endParagraph();
   }
   else if (!briefDescription().isEmpty()) 
   {
@@ -327,12 +329,12 @@
     ol.endTextLink();
     ol.enableAll();
     ol.disableAllBut(OutputGenerator::Man);
-    ol.newParagraph();
+    // ol.newParagraph(); FIXME
     ol.popGeneratorState();
   }
   ol.disable(OutputGenerator::Man);
   ol.disable(OutputGenerator::RTF);
-  ol.newParagraph();
+  // ol.newParagraph(); FIXME
   ol.enable(OutputGenerator::Man);
   ol.enable(OutputGenerator::RTF);
   ol.writeSynopsis();
@@ -694,10 +696,11 @@
       ol.endMemberItem();
       if (!nd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
       {
+        ol.startParagraph();
         ol.startMemberDescription();
         ol.parseDoc(nd->briefFile(),nd->briefLine(),nd,0,nd->briefDescription(),FALSE,FALSE);
         ol.endMemberDescription();
-        ol.newParagraph();
+        ol.endParagraph();
       }
     }
   }
Index: src/classdef.cpp
===================================================================
--- src/classdef.cpp	(revisione 614)
+++ src/classdef.cpp	(copia locale)
@@ -874,7 +874,7 @@
       ol.pushGeneratorState();
         ol.disable(OutputGenerator::Man);
         ol.disable(OutputGenerator::RTF);
-        ol.newParagraph();
+        //ol.startParagraph();      // FIXME; needs an endParagraph() somewhere
         ol.enableAll();
         ol.disableAllBut(OutputGenerator::Man);
         ol.writeString("\n\n");
@@ -883,8 +883,9 @@
     // write documentation
     if (!documentation().isEmpty())
     {
-      //ol.newParagraph();
+      //ol.startParagraph();
       ol.parseDoc(docFile(),docLine(),this,0,documentation(),TRUE,FALSE);
+      //ol.endParagraph();
     }
     // write type constraints
     writeTypeConstraints(ol,this,m_impl->typeConstraints);
@@ -893,12 +894,13 @@
     if (exampleFlag && m_impl->exampleSDict)
     {
       ol.startSimpleSect(BaseOutputDocInterface::Examples,0,0,theTranslator->trExamples()+": ");
-      ol.writeDescItem();
-      ol.newParagraph();
+      ol.startDescForItem();
+      ol.startParagraph();
       writeExample(ol,m_impl->exampleSDict);
+      ol.endParagraph();
+      ol.endDescForItem();
       ol.endSimpleSect();
     }
-    //ol.newParagraph();
     writeSourceDef(ol,name());
     ol.endTextBlock();
   }
@@ -942,7 +944,7 @@
           ol.startItemList();
         }
 
-        ol.writeListItem();
+        ol.startItemListItem();
         QCString path=fd->getPath().copy();
         if (Config_getBool("FULL_PATH_NAMES"))
         {
@@ -988,7 +990,7 @@
 
         ol.popGeneratorState();
 
-        
+        ol.endItemListItem();
       }
       file=m_impl->files.next();
     }
@@ -1068,6 +1070,7 @@
     // now replace all markers in inheritLine with links to the classes
     while ((newIndex=marker.match(inheritLine,index,&matchLen))!=-1)
     {
+      ol.startParagraph();
       ol.parseText(inheritLine.mid(index,newIndex-index));
       bool ok;
       uint entryIndex = inheritLine.mid(newIndex+1,matchLen-1).toUInt(&ok);
@@ -1112,7 +1115,7 @@
       index=newIndex+matchLen;
     } 
     ol.parseText(inheritLine.right(inheritLine.length()-index));
-    ol.newParagraph();
+    ol.endParagraph();
   }
 
   // write subclasses
@@ -1124,6 +1127,7 @@
     // now replace all markers in inheritLine with links to the classes
     while ((newIndex=marker.match(inheritLine,index,&matchLen))!=-1)
     {
+      ol.startParagraph();
       ol.parseText(inheritLine.mid(index,newIndex-index));
       bool ok;
       uint entryIndex = inheritLine.mid(newIndex+1,matchLen-1).toUInt(&ok);
@@ -1144,7 +1148,7 @@
       index=newIndex+matchLen;
     } 
     ol.parseText(inheritLine.right(inheritLine.length()-index));
-    ol.newParagraph();
+    ol.endParagraph();
   }
 
   if (renderDiagram) 
@@ -1268,7 +1272,7 @@
 
       ol.pushGeneratorState();
       ol.disable(OutputGenerator::RTF);
-      ol.newParagraph();
+      ////ol.newParagraph(); FIXME
       ol.popGeneratorState();
     }
   }
@@ -1324,7 +1328,7 @@
       if (isIDLorJava) 
         ol.docify(";");
       ol.endTypewriter();
-      ol.newParagraph();
+      //ol.newParagraph(); FIXME
     }
   }
 
@@ -1357,10 +1361,11 @@
   {
     ol.pushGeneratorState();
     ol.disableAllBut(OutputGenerator::Html);
-    ol.newParagraph();
+    ol.startParagraph();
     ol.startTextLink(getMemberListFileName(),0);
     ol.parseText(theTranslator->trListOfAllMembers());
     ol.endTextLink();
+    ol.endParagraph();
     ol.enableAll();
     ol.popGeneratorState();
   }
@@ -1673,7 +1678,7 @@
   ol.parseText(theTranslator->trIncludingInheritedMembers());
   
   //ol.startItemList();
-  ol.writeString("<p><table>\n");
+  ol.writeString("<table>\n");
   
   //MemberNameInfo *mni=m_impl->allMemberNameInfoList->first();
   MemberNameInfoSDict::Iterator mnii(*m_impl->allMemberNameInfoSDict); 
Index: src/htmlgen.cpp
===================================================================
--- src/htmlgen.cpp	(revisione 614)
+++ src/htmlgen.cpp	(copia locale)
@@ -567,11 +567,13 @@
   else
     relPathStr=relPath;
 
-  t << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"
-    "<html><head>" 
+  /*t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n"*/
+  t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
+
+  t << "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n"
     "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8" 
          //<< theTranslator->idLanguageCharset() 
-         << "\">\n"
+         << "\"/>\n"
     "<title>"; 
   t << convertToHtml(title);
   t << "</title>\n";
@@ -592,9 +594,9 @@
     t << relPathStr << cssfi.fileName();
   }
   
-  t << "\" rel=\"stylesheet\" type=\"text/css\">\n";
-  t << "<link href=\"" << relPathStr << "tabs.css\" rel=\"stylesheet\" type=\"text/css\">\n";
-  t << "</head><body>\n";
+  t << "\" rel=\"stylesheet\" type=\"text/css\"/>\n";
+  t << "  <link href=\"" << relPathStr << "tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n";
+  t << "</head>\n<body>\n";
 }
 
 
@@ -608,11 +610,10 @@
 void HtmlGenerator::writeFooterFile(QFile &file)
 {
   QTextStream t(&file);
-  t << "<hr size=\"1\"><address style=\"text-align: right;\"><small>\n";
+  t << "<hr/><address style=\"text-align: right;\"><small>\n";
   t << theTranslator->trGeneratedAt( "$datetime", "$projectname" );
   t << "&nbsp;<a href=\"http://www.doxygen.org/index.html\">"
-    << "<img src=\"doxygen.png\" alt=\"doxygen\" " 
-    << "align=\"middle\" border=\"0\">"
+    << "<img class=\"footer\" src=\"doxygen.png\" alt=\"doxygen\"/>"
     << "</a> $doxygenversion";
   t << "</small></address>\n"
     << "</body>\n"
@@ -714,24 +715,24 @@
 {
   if (g_footer.isEmpty())
   {
-    t << "<hr size=\"1\"><address style=\"text-align: right;\"><small>";
+    t << "<hr/><address style=\"text-align: right;\"><small>\n";
     t << theTranslator->trGeneratedAt(
         dateToString(TRUE),
         Config_getString("PROJECT_NAME")
         );
     t << "&nbsp;" << endl << "<a href=\"http://www.doxygen.org/index.html\">";
-    t << endl << "<img src=\"" << relPath << "doxygen.png\" alt=\"doxygen\" " 
-      << "align=\"middle\" border=\"0\">" << "</a> " << versionString << " ";
+    t << endl << "<img class=\"footer\" src=\"" << relPath << "doxygen.png\" alt=\"doxygen\"/>"
+      << "</a> " << versionString << " ";
     t << "</small></address>";
     if (Debug::isFlagSet(Debug::Validate))
     {
       t << "<p><a href=\"http://validator.w3.org/check/referer\">"
-           "<img border=\"0\" src=\"http://www.w3.org/Icons/valid-html401\""
+           "<img class=\"footer\" src=\"http://www.w3.org/Icons/valid-html401\""
            " height=\"31\" width=\"88\" alt=\"This page is Valid HTML 4.01 "
-           "Transitional!\"></a><a href=\"http://jigsaw.w3.org/css-validator/\">"
-           "<img style=\"border:0;width:88px;height:31px\" "
+           "Transitional!\"></a><a href=\"http://jigsaw.w3.org/css-validator/\"/>"
+           "<img class=\"footer\" style=\"border:0;width:88px;height:31px\" "
            "src=\"http://jigsaw.w3.org/css-validator/images/vcss\" "
-           "alt=\"This page uses valid CSS!\"></a></p>";
+           "alt=\"This page uses valid CSS!\"/></a></p>";
     }
     t << "\n</body>\n</html>\n";
   }
@@ -753,7 +754,7 @@
 
 void HtmlGenerator::startProjectNumber()
 {
-  t << "<h3 align=\"center\">";
+  t << "<h3>";
 }
 
 void HtmlGenerator::endProjectNumber()
@@ -803,7 +804,7 @@
                                     const char *anchor, const char *name,
                                     const char *args)
 {
-  t << "<a class=\"anchor\" name=\"" << anchor << "\"></a>";
+  t << "<a class=\"anchor\" id=\"" << anchor << "\"></a>";
   t << "<!-- doxytag: member=\"";
   docify(name); 
   t << "\" ref=\""; 
@@ -817,11 +818,6 @@
 {
 }
 
-void HtmlGenerator::newParagraph()
-{
-  t << endl << "<p>" << endl;
-}
-
 void HtmlGenerator::startParagraph()
 {
   t << endl << "<p>";
@@ -877,12 +873,14 @@
   //printf("HtmlGenerator::endIndexItem(%s,%s,%s)\n",ref,f,name);
   if (ref || f)
   {
-    t << "</a>" << endl;
+    t << "</a>";
   }
   else
   {
     t << "</b>";
   }
+
+  t << "</li>" << endl;
 }
 
 void HtmlGenerator::writeStartAnnoItem(const char *,const char *f,
@@ -1003,14 +1001,14 @@
 {
   switch(type)
   {
-    case SectionInfo::Page:          t << "<h1>"; break;
-    case SectionInfo::Section:       t << "<h2>"; break;
-    case SectionInfo::Subsection:    t << "<h3>"; break;
-    case SectionInfo::Subsubsection: t << "<h4>"; break;
-    case SectionInfo::Paragraph:     t << "<h5>"; break;
+    case SectionInfo::Page:          t << "\n\n<h1>"; break;
+    case SectionInfo::Section:       t << "\n\n<h2>"; break;
+    case SectionInfo::Subsection:    t << "\n\n<h3>"; break;
+    case SectionInfo::Subsubsection: t << "\n\n<h4>"; break;
+    case SectionInfo::Paragraph:     t << "\n\n<h5>"; break;
     default: ASSERT(0); break;
   }
-  t << "<a class=\"anchor\" name=\"" << lab << "\">";
+  t << "<a class=\"anchor\" id=\"" << lab << "\">";
 }
 
 void HtmlGenerator::endSection(const char *,SectionInfo::SectionType type)
@@ -1018,11 +1016,11 @@
   t << "</a>";
   switch(type)
   {
-    case SectionInfo::Page:          t << "</h1>"; break;
-    case SectionInfo::Section:       t << "</h2>"; break;
-    case SectionInfo::Subsection:    t << "</h3>"; break;
-    case SectionInfo::Subsubsection: t << "</h4>"; break;
-    case SectionInfo::Paragraph:     t << "</h5>"; break;
+    case SectionInfo::Page:          t << "</h1>\n"; break;
+    case SectionInfo::Section:       t << "</h2>\n"; break;
+    case SectionInfo::Subsection:    t << "</h3>\n"; break;
+    case SectionInfo::Subsubsection: t << "</h4>\n"; break;
+    case SectionInfo::Paragraph:     t << "</h5>\n"; break;
     default: ASSERT(0); break;
   }
 }
@@ -1124,10 +1122,13 @@
 {
   t << "</div>" << endl;
   t << "<div class=\"dynsection\">" << endl;
-  t << "\n<p><center><img src=\""
-    << relPath << fileName << ".png\" usemap=\"#" << name << "_map\""
-    << " border=\"0\" alt=\"\"></center>" << endl
-    << "<map name=\"" << name << "_map\">" << endl;
+  t << "\n<img class=\"center\" src=\""
+    << relPath << fileName << ".png\" usemap=\"#";
+  docify(name);
+  t << "_map\" alt=\"\"/>" << endl
+    << "<map id=\"";
+  docify(name);
+  t << "_map\">" << endl;
 
   d.writeImage(t,dir,relPath,fileName);
   t << "</div>" << endl;
@@ -1170,10 +1171,10 @@
     t << "<tr>";
     switch(annoType)
     {
-      case 0:  t << "<td class=\"memItemLeft\" nowrap align=\"right\" valign=\"top\">"; break;
-      case 1:  t << "<td class=\"memItemLeft\" nowrap>"; break;
-      case 2:  t << "<td class=\"memItemLeft\" nowrap valign=\"top\">"; break;
-      default: t << "<td class=\"memTemplParams\" nowrap colspan=\"2\">"; break;
+      case 0:  t << "<td class=\"memItemLeft\" align=\"right\" valign=\"top\">"; break;
+      case 1:  t << "<td class=\"memItemLeft\">"; break;
+      case 2:  t << "<td class=\"memItemLeft\" valign=\"top\">"; break;
+      default: t << "<td class=\"memTemplParams\" colspan=\"2\">"; break;
     }
   }
   else
@@ -1201,7 +1202,7 @@
   if (Config_getBool("HTML_ALIGN_MEMBERS"))
   {
     t << "</td></tr>" << endl;
-    t << "<tr><td class=\"memTemplItemLeft\" nowrap align=\"right\" valign=\"top\">";
+    t << "<tr><td class=\"memTemplItemLeft\" align=\"right\" valign=\"top\">";
   }
 }
 
@@ -1234,11 +1235,11 @@
   DBG_HTML(t << "<!-- endMemberDescription -->" << endl)
   if (Config_getBool("HTML_ALIGN_MEMBERS"))
   {
-    t << "<br></td></tr>" << endl; 
+    t << "<br/></td></tr>" << endl; 
   }
   else
   {
-    t << "<br></dl>";
+    t << "<br/></dl>";
   }
 }
 
@@ -1267,7 +1268,7 @@
   DBG_HTML(t << "<!-- startMemberHeader -->" << endl)
   if (Config_getBool("HTML_ALIGN_MEMBERS"))
   {
-    t << "<tr><td colspan=\"2\"><br><h2>";
+    t << "<tr><td colspan=\"2\"><br/><h2>";
   }
   else
   {
@@ -1297,7 +1298,7 @@
 void HtmlGenerator::endMemberSubtitle()
 {
   DBG_HTML(t << "<!-- endMemberSubtitle -->" << endl)
-  if (Config_getBool("HTML_ALIGN_MEMBERS")) t << "<br><br></td></tr>" << endl;
+  if (Config_getBool("HTML_ALIGN_MEMBERS")) t << "<br/><br/></td></tr>" << endl;
 }
 
 void HtmlGenerator::startIndexList() 
@@ -1444,7 +1445,7 @@
       t << "          <td>";
       if (closeBracket) t << "&nbsp;)";
       t << "&nbsp;</td>" << endl;
-      t << "          <td width=\"100%\">";
+      t << "          <td>";
     }
     else
     {
@@ -1455,7 +1456,7 @@
       t << "          <td>";
       if (closeBracket) t << ")";
       t << "</td>" << endl;
-      t << "          <td></td><td></td><td width=\"100%\">";
+      t << "          <td></td><td></td><td>";
     }
   }
   else
@@ -1498,11 +1499,12 @@
   g.writeGraph(t,BITMAP,dir,relPath);
   if (Config_getBool("GENERATE_LEGEND"))
   {
-    t << "<center><font size=\"2\">[";
+    // FIXME: removed <center> and <font> without fix
+    t << "[";
     startHtmlLink(relPath+"graph_legend"+Doxygen::htmlFileExtension);
     t << theTranslator->trLegend();
     endHtmlLink();
-    t << "]</font></center>";
+    t << "]";
   }
   t << "</div>" << endl;
 }
@@ -1581,7 +1583,7 @@
 
 void HtmlGenerator::endMemberGroupDocs()
 {
-  t << "<br><br></div></td></tr>" << endl;
+  t << "<br/><br/></div></td></tr>" << endl;
 }
 
 void HtmlGenerator::startMemberGroup()
@@ -1602,7 +1604,7 @@
 void HtmlGenerator::endIndent()          
 { 
   DBG_HTML(t << "<!-- endIndent -->" << endl;)
-  t << endl << "</div>" << endl << "</div><p>" << endl; 
+  t << endl << "</div>" << endl << "</div>" << endl;         // FIXME: what's the <p> for??
 }
 
 void HtmlGenerator::addIndexItem(const char *,const char *)
@@ -1644,7 +1646,7 @@
                                 const char *file,const char *anchor,
                                 const char *title)
 {
-  t << "<dl compact><dt><b>";
+  t << "<dl><dt><b>";
   if (file)
   {
     writeObjectLink(0,file,anchor,title);
@@ -1664,7 +1666,7 @@
 void HtmlGenerator::startParamList(ParamListTypes,
                                 const char *title)
 {
-  t << "<dl compact><dt><b>";
+  t << "<dl><dt><b>";
   docify(title);
   t << "</b></dt>";
 }
@@ -2180,7 +2182,7 @@
 void HtmlGenerator::startConstraintList(const char *header)
 {
   t << "<div class=\"typeconstraint\">" << endl;
-  t << "<dl compact><dt><b>" << header << "</b><dt><dd>" << endl;
+  t << "<dl><dt><b>" << header << "</b><dt><dd>" << endl;
   t << "<table border=\"0\" cellspacing=\"2\" cellpadding=\"0\">" << endl;
 }
 
Index: src/outputgen.h
===================================================================
--- src/outputgen.h	(revisione 614)
+++ src/outputgen.h	(copia locale)
@@ -101,15 +101,20 @@
                           const QCString &,bool)  {} 
     virtual void parseText(const QCString &)  {}
     
-    /*! Start of a bullet list: e.g. \c \<ul\> in html. writeListItem() is
-     *  Used for the bullet items.
+    /*! Start of a bullet list: e.g. \c \<ul\> in html. startItemListItem()
+     *  and endItemListItem() is used for the bullet items.
      */
     virtual void startItemList()  = 0;
 
     /*! Writes a list item for a bullet or enumerated 
      *  list: e.g. \c \<li\> in html 
      */
-    virtual void writeListItem()  = 0;
+    virtual void startItemListItem()  = 0;
+
+    /*! Writes a list item for a bullet or enumerated 
+     *  list: e.g. \c \</li\> in html 
+     */
+    virtual void endItemListItem()  = 0;
 
     /*! Ends a bullet list: e.g. \c \</ul\> in html */
     virtual void endItemList()    = 0;
@@ -130,11 +135,9 @@
     virtual void writeString(const char *text) = 0;
 
     /*! Starts a new paragraph */
-    virtual void newParagraph()   = 0;
-
-    /*! Starts a new paragraph */
     virtual void startParagraph() = 0;
-    /*! End a paragraph */
+
+    /*! Ends a paragraph */
     virtual void endParagraph() = 0;
 
     /*! Writes a link to an object in the documentation.
@@ -211,11 +214,13 @@
     /*! Starts an item of a description list: e.g. \c \<dt\> in HTML. */
     virtual void startDescItem() = 0;
 
-    /*! Ends an item of a description list and starts the 
-     *  description itself: e.g. \c \<dd\> in HTML. 
-     */
+    /*! Ends an item of a description list: e.g. \c \</dt\> in HTML. */
     virtual void endDescItem() = 0;
 
+    virtual void startDescForItem() = 0;
+    virtual void endDescForItem() = 0;
+
+
     virtual void startCenter() = 0;
     virtual void endCenter() = 0;
     virtual void startSmall() = 0;
@@ -227,7 +232,6 @@
     virtual void startParamList(ParamListTypes t,const char *title) = 0;
     virtual void endParamList() = 0;
 
-    virtual void writeDescItem() = 0;
     virtual void startTitle() = 0;
     virtual void endTitle()   = 0;
 
Index: src/htmldocvisitor.cpp
===================================================================
--- src/htmldocvisitor.cpp	(revisione 614)
+++ src/htmldocvisitor.cpp	(copia locale)
@@ -141,13 +141,13 @@
 void HtmlDocVisitor::visit(DocLineBreak *)
 {
   if (m_hide) return;
-  m_t << "<br>\n";
+  m_t << "<br/>\n";
 }
 
 void HtmlDocVisitor::visit(DocHorRuler *)
 {
   if (m_hide) return;
-  m_t << "<hr>\n";
+  m_t << "<hr/>\n";
 }
 
 void HtmlDocVisitor::visit(DocStyleChange *s)
@@ -441,10 +441,29 @@
   m_t << "</li>";
 }
 
-void HtmlDocVisitor::visitPre(DocPara *) 
+void HtmlDocVisitor::visitPre(DocPara *p) 
 {
   if (m_hide) return;
 
+  //printf("Processing docpara with parent of kind %d\n",
+  //       p->parent() ? p->parent()->kind() : -1);
+
+  bool needsTag = false;
+  if (p && p->parent()) {
+    switch(p->parent()->kind()) {
+      case DocNode::Kind_Section:
+        needsTag = true;
+        break;
+      default:
+        needsTag = false;
+    }
+  }
+
+  if (needsTag)
+    m_t << "<p>";
+
+
+
   // TODO:
   // Paragraph should be surrounded by <p>..</p>, but
   // 
@@ -462,14 +481,20 @@
 void HtmlDocVisitor::visitPost(DocPara *p)
 {
   if (m_hide) return;
-  if (!p->isLast() &&            // omit <p> for last paragraph
-      !(p->parent() &&           // and for parameter sections
-        p->parent()->kind()==DocNode::Kind_ParamSect
-       ) 
-     ) 
-  {
-    m_t << "<p>\n";
+
+  bool needsTag = false;
+  if (p && p->parent()) {
+    switch(p->parent()->kind()) {
+      case DocNode::Kind_Section:
+        needsTag = true;
+        break;
+      default:
+        needsTag = false;
+    }
   }
+
+  if (needsTag)
+    m_t << "</p>\n\n";
 }
 
 void HtmlDocVisitor::visitPre(DocRoot *)
@@ -483,7 +508,7 @@
 void HtmlDocVisitor::visitPre(DocSimpleSect *s)
 {
   if (m_hide) return;
-  m_t << "<dl class=\"" << s->typeString() << "\" compact><dt><b>";
+  m_t << "<dl class=\"" << s->typeString() << "\"><dt><b>";
   switch(s->type())
   {
     case DocSimpleSect::See: 
@@ -573,7 +598,7 @@
 {
   if (m_hide) return;
   m_t << "<h" << s->level()+1 << ">";
-  m_t << "<a class=\"anchor\" name=\"" << s->anchor();
+  m_t << "<a class=\"anchor\" id=\"" << s->anchor();
   m_t << "\">" << endl;
   filter(convertCharEntitiesToUTF8(s->title().data()));
   m_t << "</a></h" << s->level()+1 << ">\n";
@@ -926,7 +951,7 @@
 void HtmlDocVisitor::visitPre(DocParamSect *s)
 {
   if (m_hide) return;
-  m_t << "<dl compact><dt><b>";
+  m_t << "<dl><dt><b>";
   switch(s->type())
   {
     case DocParamSect::Param: 
@@ -1009,13 +1034,13 @@
   bool anonymousEnum = x->file()=="@";
   if (!anonymousEnum)
   {
-    m_t << "<dl compact><dt><b><a class=\"el\" href=\"" 
+    m_t << "<dl><dt><b><a class=\"el\" href=\"" 
         << x->relPath() << x->file() << Doxygen::htmlFileExtension 
         << "#" << x->anchor() << "\">";
   }
   else 
   {
-    m_t << "<dl compact><dt><b>";
+    m_t << "<dl><dt><b>";
   }
   filter(x->title());
   m_t << ":";
@@ -1180,7 +1205,7 @@
     << Config_getEnum("DOT_IMAGE_FORMAT") << "\" alt=\""
     << baseName << "\" border=\"0\" usemap=\"#" << mapName << "\">" << endl;
   QString imap = getDotImageMapFromFile(fileName,outDir,relPath.data(),context);
-  m_t << "<map name=\"" << mapName << "\">" << imap << "</map>" << endl;
+  m_t << "<map id=\"" << mapName << "\">" << imap << "</map>" << endl;
 }
 
 void HtmlDocVisitor::writeMscFile(const QString &fileName,const QString &relPath,
@@ -1199,6 +1224,6 @@
   m_t << "<img src=\"" << relPath << baseName << ".png\" alt=\""
     << baseName << "\" border=\"0\" usemap=\"#" << mapName << "\">" << endl;
   QString imap = getMscImageMapFromFile(fileName,outDir,relPath.data(),context);
-  m_t << "<map name=\"" << mapName << "\">" << imap << "</map>" << endl;
+  m_t << "<map id=\"" << mapName << "\">" << imap << "</map>" << endl;
 }
 
Index: src/msc.cpp
===================================================================
--- src/msc.cpp	(revisione 614)
+++ src/msc.cpp	(copia locale)
@@ -81,7 +81,7 @@
       }
       t << "\" shape=\"rect\" coords=\""
         << x1 << "," << y1 << "," << x2 << "," << y2 << "\""
-        << " alt=\"\">" << endl;
+        << " alt=\"\"/>" << endl;
     }
   }
 
Index: src/rtfgen.cpp
===================================================================
--- src/rtfgen.cpp	(revisione 614)
+++ src/rtfgen.cpp	(copia locale)
@@ -959,7 +959,7 @@
 //}
 
 /*! write bullet or enum item */
-void RTFGenerator::writeListItem()
+void RTFGenerator::startItemListItem()
 {
   DBG_RTF(t << "{\\comment (writeListItem)}" << endl)
   newParagraph();
@@ -977,6 +977,10 @@
   m_omitParagraph = TRUE;
 }
 
+void RTFGenerator::endItemListItem()
+{
+}
+
 void RTFGenerator::startIndexItem(const char *,const char *)
 {
   DBG_RTF(t << "{\\comment (startIndexItem)}" << endl)
@@ -1564,11 +1568,15 @@
 //  t << rtf_Style_Reset << rtf_DList_DepthStyle();
 //}
 
-void RTFGenerator::writeDescItem()
+void RTFGenerator::startDescForItem()
 {
   DBG_RTF(t << "{\\comment (writeDescItem) }"    << endl)
 }
 
+void RTFGenerator::endDescForItem()
+{
+}
+
 //void RTFGenerator::endDescList()
 //{
 //  DBG_RTF(t << "{\\comment (endDescList)}"    << endl)
Index: src/memberdef.cpp
===================================================================
--- src/memberdef.cpp	(revisione 614)
+++ src/memberdef.cpp	(copia locale)
@@ -140,9 +140,22 @@
 
   //if (!md->isDefine()) ol.startParameter(TRUE); else ol.docify(" ");
   bool first=TRUE;
+
+  // HACK: this boolean is used to ensure each param-type is always closed.
+  //       the proper way to do this would be to revise all the code below,
+  //       clean and reorganize it!
+  bool paramTypeClosed=TRUE;
+
   while (a)
   {
-    if (md->isDefine() || first) ol.startParameterType(first,md->isObjCMethod()?"dummy":0);
+    if (md->isDefine() || first)
+    {
+      if (!paramTypeClosed)
+        ol.endParameterType();
+      ol.startParameterType(first,md->isObjCMethod()?"dummy":0);        // START
+      paramTypeClosed = FALSE;       // this param-type needs to be closed somewhere
+    }
+
     QRegExp re(")("),res("(.*\\*");
     int vp=a->type.find(re);
     int wp=a->type.find(res);
@@ -179,7 +192,11 @@
     }
     if (!md->isDefine())
     {
+      if (!paramTypeClosed)
+      {
       ol.endParameterType();
+        paramTypeClosed = TRUE;
+      }
       ol.startParameterName(defArgList->count()<2);
     }
     if (hasFuncPtrType)
@@ -236,7 +253,11 @@
           if (key!=",") key+=":"; // for normal keywords add colon
         }
         ol.endParameterName(FALSE,FALSE,!md->isObjCMethod());
+
+        if (!paramTypeClosed)
+          ol.endParameterType();
         ol.startParameterType(FALSE,key);
+        paramTypeClosed = FALSE;
       }
     }
     first=FALSE;
@@ -1468,7 +1489,6 @@
       //ol.startEmphasis();
       ol.popGeneratorState();
     }
-    //ol.newParagraph();
     ol.endMemberDescription();
   }
   warnIfUndocumented();
@@ -1893,7 +1913,7 @@
 
   ol.pushGeneratorState();
   ol.disable(OutputGenerator::RTF);
-  ol.newParagraph();
+  ///////ol.newParagraph(); FIXME
   ol.popGeneratorState();
 
   /* write multi-line initializer (if any) */
@@ -1934,8 +1954,9 @@
       ) 
      )  
   { 
+    ol.startParagraph();
     ol.parseDoc(briefFile(),briefLine(),getOuterScope()?getOuterScope():container,this,brief,FALSE,FALSE);
-    ol.newParagraph();
+    ol.endParagraph();
   }
 
   /* write detailed description */
@@ -1944,8 +1965,9 @@
     ol.parseDoc(docFile(),docLine(),getOuterScope()?getOuterScope():container,this,detailed+"\n",TRUE,FALSE);
     if (!m_impl->inbodyDocs.isEmpty())
     {
-      ol.newParagraph();
+      ol.startParagraph();
       ol.parseDoc(inbodyFile(),inbodyLine(),getOuterScope()?getOuterScope():container,this,m_impl->inbodyDocs+"\n",TRUE,FALSE);
+      ol.endParagraph();
     }
   }
   else if (!brief.isEmpty() && (Config_getBool("REPEAT_BRIEF") ||
@@ -1953,8 +1975,9 @@
   {
     if (!m_impl->inbodyDocs.isEmpty())
     {
-      ol.newParagraph();
+      ol.startParagraph();
       ol.parseDoc(inbodyFile(),inbodyLine(),getOuterScope()?getOuterScope():container,this,m_impl->inbodyDocs+"\n",TRUE,FALSE);
+      ol.endParagraph();
     }
   }
 
@@ -1966,7 +1989,7 @@
   {
     //printf("***** argumentList is documented\n");
     ol.startParamList(BaseOutputDocInterface::Param,theTranslator->trParameters()+": ");
-    ol.writeDescItem();
+    ol.startDescForItem();
     ol.startDescTable();
     ArgumentListIterator ali(*docArgList);
     Argument *a;
@@ -1989,6 +2012,7 @@
       }
     }
     ol.endDescTable();
+    ol.endDescForItem();
     ol.endParamList();
   }
 
@@ -2006,9 +2030,9 @@
         {
           if (first)
           {
-            //ol.newParagraph();
+            //ol.startParagraph();
             ol.startSimpleSect(BaseOutputDocInterface::EnumValues,0,0,theTranslator->trEnumerationValues()+": ");
-            ol.writeDescItem();
+            ol.startDescForItem();
             ol.startDescTable();
           }
 
@@ -2047,13 +2071,14 @@
 
           if (!fmd->briefDescription().isEmpty())
           { 
+            ol.startParagraph();
             ol.parseDoc(fmd->briefFile(),fmd->briefLine(),getOuterScope()?getOuterScope():container,fmd,fmd->briefDescription(),TRUE,FALSE);
-            //ol.newParagraph();
+            ol.endParagraph();
           }
           if (!fmd->briefDescription().isEmpty() && 
               !fmd->documentation().isEmpty())
           {
-            ol.newParagraph();
+            //ol.newParagraph(); FIXME
           }
           if (!fmd->documentation().isEmpty())
           { 
@@ -2068,6 +2093,7 @@
     { 
       //ol.endItemList(); 
       ol.endDescTable();
+      ol.endDescForItem();
       ol.endSimpleSect();
       ol.writeChar('\n'); 
     }
@@ -2207,9 +2233,10 @@
   if (hasExamples())
   {
     ol.startSimpleSect(BaseOutputDocInterface::Examples,0,0,theTranslator->trExamples()+": ");
-    ol.writeDescItem();
+    ol.startDescForItem();
     writeExample(ol,m_impl->exampleSDict);
-    //ol.endDescItem();
+    ///ol.endDescItem();
+    ol.endDescForItem();
     ol.endSimpleSect();
   }
 
@@ -2234,10 +2261,11 @@
     {
       msg("Generating call graph for function %s\n",qualifiedName().data());
       ol.disable(OutputGenerator::Man);
-      ol.newParagraph();
+      ol.startParagraph();
       ol.startCallGraph();
       ol.parseText(theTranslator->trCallGraph());
       ol.endCallGraph(callGraph);
+      ol.endParagraph();
       ol.enableAll();
     }
   }
@@ -2250,10 +2278,11 @@
     {
       msg("Generating caller graph for function %s\n",qualifiedName().data());
       ol.disable(OutputGenerator::Man);
-      ol.newParagraph();
+      ol.startParagraph();
       ol.startCallGraph();
       ol.parseText(theTranslator->trCallerGraph());
       ol.endCallGraph(callerGraph);
+      ol.endParagraph();
       ol.enableAll();
     }
   }
@@ -2457,7 +2486,11 @@
   QCString sigStr(33);
   MD5Buffer((const unsigned char *)memAnchor.data(),memAnchor.length(),md5_sig);
   MD5SigToString(md5_sig,sigStr.data(),33);
-  m_impl->anc = sigStr;
+
+  // IMPORTANT: some formats (notably XHTML) need the anchor name to begin
+  //            with a non-numeric character... thus we prefix the MD5 with 'a'
+    // FIXME FIXME FIXME: does this change needs to be done also somewhere else??
+  m_impl->anc = "a" + sigStr;
 }
 
 void MemberDef::setGroupDef(GroupDef *gd,Grouping::GroupPri_t pri,
Index: src/htmlgen.h
===================================================================
--- src/htmlgen.h	(revisione 614)
+++ src/htmlgen.h	(copia locale)
@@ -63,7 +63,6 @@
     void startTitle() { t << "<h1>"; }
     void endTitle() { t << "</h1>"; }
     
-    void newParagraph();
     void startParagraph();
     void endParagraph();
     void writeString(const char *text);
@@ -89,10 +88,11 @@
     void startHtmlLink(const char *url);
     void endHtmlLink();
     void startTypewriter() { t << "<code>"; }
-    void endTypewriter()   { t << "</code>"; }
+    void endTypewriter()   { t << "</code>\n"; }
     void startGroupHeader();
     void endGroupHeader();
-    void writeListItem() { t << "<li>"; }
+    void startItemListItem() { t << "<li>"; }
+    void endItemListItem() { t << "</li>\n"; }
 
     void startMemberSections();
     void endMemberSections();
@@ -122,7 +122,7 @@
     void startMemberDescription();
     void endMemberDescription();
 
-    void writeRuler()    { t << "<hr>"; }
+    void writeRuler()    { t << "<hr/>"; }
     void writeAnchor(const char *,const char *name) 
                          { t << "<a name=\"" << name <<"\"></a>"; }
     void startCodeFragment() { t << PREFRAG_START; }
@@ -134,11 +134,16 @@
     void endEmphasis()   { t << "</em>"; }
     void startBold()     { t << "<b>"; }
     void endBold()       { t << "</b>"; }
-    void startDescription() { t << endl << "<dl compact>" << endl; }
-    void endDescription()   { t << endl << "</dl>" << endl; }
+
+    void startDescription() { t << endl << "<dl>" << endl; }
+    void endDescription()   { t << endl << "</dl>\n" << endl; }
     void startDescItem()    { t << "<dt>"; }
-    void endDescItem()      { t << "<dd>"; }
-    void lineBreak() { t << "<br>" << endl; }
+    void endDescItem()      { t << "</dt>"; }
+    void startDescForItem() { t << "<dd>" << endl; }
+    void endDescForItem()   { t << "</dd>\n" << endl; }
+
+    void lineBreak() { t << "<br/>\n" << endl; }
+
     void writeChar(char c);
     void startMemberDoc(const char *,const char *,const char *,const char *);
     void endMemberDoc(bool); 
@@ -160,13 +165,16 @@
     void endCenter()          { t << "</center>" << endl; }
     void startSmall()         { t << "<small>" << endl; }
     void endSmall()           { t << "</small>" << endl; }
-    void startDescList(SectionTypes)      { t << "<dl compact><dt><b>" << endl; }
+/*
+    these seems to be unused and are not XHTML compatible btw...
+
+    void startDescList(SectionTypes)      { t << "<dl><dt><b>" << endl; }
     void endDescList()        { t << "</dl>"; }
+*/
     void startSimpleSect(SectionTypes,const char *,const char *,const char *);
     void endSimpleSect();
     void startParamList(ParamListTypes,const char *);
     void endParamList();
-    void writeDescItem()      { t << "<dd>" << endl; }
     void startSection(const char *,const char *,SectionInfo::SectionType);
     void endSection(const char *,SectionInfo::SectionType);
     void addIndexItem(const char *,const char *);
Index: src/index.cpp
===================================================================
--- src/index.cpp	(revisione 614)
+++ src/index.cpp	(copia locale)
@@ -603,10 +603,11 @@
   {
     ol.disable(OutputGenerator::Latex);
     ol.disable(OutputGenerator::RTF);
+    ol.startParagraph();
     ol.startTextLink("inherits",0);
     ol.parseText(theTranslator->trGotoGraphicalHierarchy());
     ol.endTextLink();
-    ol.newParagraph();
+    ol.endParagraph();
     ol.enable(OutputGenerator::Latex);
     ol.enable(OutputGenerator::RTF);
   }
@@ -634,10 +635,11 @@
   endTitle(ol,0,0);
   ol.startTextBlock();
   Doxygen::indexList.addContentsItem(FALSE,theTranslator->trGraphicalHierarchy(),0,"inherits",0); 
+  ol.startParagraph();
   ol.startTextLink("hierarchy",0);
   ol.parseText(theTranslator->trGotoTextualHierarchy());
   ol.endTextLink();
-  ol.newParagraph();
+  ol.endParagraph();
   //parseText(ol,theTranslator->trClassHierarchyDescription());
   //ol.newParagraph();
   ol.endTextBlock();
@@ -1406,6 +1408,7 @@
   QCString prevDefName;
   bool first=TRUE;
   bool firstSection=TRUE;
+  bool firstItem=TRUE;
   for (pi=startIndex; pi<=endIndex; pi++) // page==-1 => pi=[0..127], page!=-1 => pi=page 
   {
     MemberIndexList *ml = &memberLists[pi];
@@ -1420,6 +1423,7 @@
         (md->isFunction() || md->isSlot() || md->isSignal()); 
       QCString name=md->name();
       int startIndex = getPrefixIndex(name);
+
       if (QCString(name.data()+startIndex)!=prevName) // new entry
       {
         if ((prevName.isEmpty() || 
@@ -1444,10 +1448,13 @@
         }
 
         // member name
-        ol.writeListItem();
+        if (!firstItem) ol.endItemListItem();       // close previous item
+        ol.startItemListItem();                     // open a new one
+        firstItem=FALSE;
+
         ol.docify(name);
         if (isFunc) ol.docify("()");
-        ol.writeString("\n");
+        //ol.writeString("\n"); FIXME: why?
 
         // link to class
         prevDefName="";
@@ -1463,6 +1470,7 @@
       writeLinkForMemberMap[(int)type](ol,md,sep,prevDefName);
     }
   }
+  if (!firstItem) ol.endItemListItem(); // close the last item
   ol.endItemList();
 }
 
@@ -1684,6 +1692,7 @@
 {
   bool first=TRUE;
   int i;
+  ol.startParagraph();
   startQuickIndexList(ol);
   for (i=33;i<127;i++)
   {
@@ -1705,7 +1714,7 @@
     }
   }
   endQuickIndexList(ol);
-  ol.newParagraph();
+  ol.endParagraph();
 }
 
 //----------------------------------------------------------------------------
@@ -1816,11 +1825,12 @@
         // normal lists otherwise
         ol.writeString("&nbsp;");
       }
-      ol.newParagraph();
+      // ol.startParagraph();   FIXME: in HTML <p> cannot contain <ul>
       writeMemberList(ol,quickIndex,
                       multiPageIndex?page:-1,
                       g_memberIndexLetterUsed[hl],
                       Definition::TypeClass);
+      //ol.endParagraph();
       endFile(ol);
       first=FALSE;
     }
@@ -1947,12 +1957,13 @@
         // normal lists otherwise
         ol.writeString("&nbsp;");
       }
-      ol.newParagraph();
+      //ol.startParagraph();   FIXME: <p> cannot contain <ul> in HTML
       //writeFileMemberList(ol,quickIndex,hl,page);
       writeMemberList(ol,quickIndex,
                       multiPageIndex?page:-1,
                       g_fileIndexLetterUsed[hl],
                       Definition::TypeFile);
+      //ol.endParagraph();
       endFile(ol);
       first=FALSE;
     }
@@ -2075,13 +2086,15 @@
         // normal lists otherwise
         ol.writeString("&nbsp;");
       }
-      ol.newParagraph();
+      //ol.startParagraph();   FIXME: <p> cannot contain <ul> in HTML
 
       //writeNamespaceMemberList(ol,quickIndex,hl,page);
       writeMemberList(ol,quickIndex,
                       multiPageIndex?page:-1,
                       g_namespaceIndexLetterUsed[hl],
                       Definition::TypeNamespace);
+      //ol.endParagraph();
+
       endFile(ol);
     }
   }
@@ -2132,7 +2145,7 @@
   PageDef *pd=0;
   for (pdi.toFirst();(pd=pdi.current());++pdi)
   {
-    ol.writeListItem();
+    ol.startItemListItem();
     QCString n=pd->getOutputFileBase();
     if (!pd->title().isEmpty())
     {
@@ -2144,6 +2157,7 @@
       ol.writeObjectLink(0,n,0,pd->name());
       Doxygen::indexList.addContentsItem(FALSE,pd->name(),pd->getReference(),n,0);
     }
+    ol.endItemListItem();
     ol.writeString("\n");
   }
   ol.endItemList();
@@ -2770,7 +2784,7 @@
     }
   }
   ol.endTitleHead(0,0);
-  ol.newParagraph();
+  //ol.newParagraph(); FIXME
   if (!Config_getString("PROJECT_NUMBER").isEmpty())
   {
     ol.startProjectNumber();
Index: src/groupdef.cpp
===================================================================
--- src/groupdef.cpp	(revisione 614)
+++ src/groupdef.cpp	(copia locale)
@@ -560,8 +560,9 @@
       // repeat brief description
       if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
       {
+        ol.startParagraph();
         ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE);
-        ol.newParagraph();
+        ol.endParagraph();
       }
     }
 
@@ -605,10 +606,11 @@
       msg("Generating dependency graph for group %s\n",qualifiedName().data());
       ol.pushGeneratorState();
       ol.disable(OutputGenerator::Man);
-      ol.newParagraph();
+      ol.startParagraph();
       ol.startGroupCollaboration();
       ol.parseText(theTranslator->trCollaborationDiagram(title));
       ol.endGroupCollaboration(graph);
+      ol.endParagraph();
       ol.popGeneratorState();
     }
   }
@@ -616,8 +618,9 @@
 
   if (Config_getBool("DETAILS_AT_TOP"))
   {
+    ol.startParagraph();
     writeDetailedDocumentation(ol);
-    ol.newParagraph();
+    ol.endParagraph();
   }
   else if (!briefDescription().isEmpty())
   {
@@ -632,7 +635,7 @@
     ol.endTextLink();
     ol.enableAll();
     ol.disableAllBut(OutputGenerator::Man);
-    ol.newParagraph();
+    //ol.newParagraph();     FIXME
     ol.popGeneratorState();
   }
 
@@ -667,10 +670,11 @@
       ol.endMemberItem();
       if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
       {
+        ol.startParagraph();
         ol.startMemberDescription();
         ol.parseDoc(briefFile(),briefLine(),fd,0,fd->briefDescription(),FALSE,FALSE);
         ol.endMemberDescription();
-        ol.newParagraph();
+        ol.endParagraph();
       }
       fd=fileList->next();
     }
@@ -702,10 +706,11 @@
       ol.endMemberItem();
       if (!gd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
       {
+        ol.startParagraph();
         ol.startMemberDescription();
         ol.parseDoc(briefFile(),briefLine(),gd,0,gd->briefDescription(),FALSE,FALSE);
         ol.endMemberDescription();
-        ol.newParagraph();
+        ol.endParagraph();
       }
       gd=groupList->next();
     }
@@ -733,10 +738,11 @@
       }
       if (!dd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
       {
+        ol.startParagraph();
         ol.startMemberDescription();
         ol.parseDoc(briefFile(),briefLine(),dd,0,dd->briefDescription(),FALSE,FALSE);
         ol.endMemberDescription();
-        ol.newParagraph();
+        ol.endParagraph();
       }
       dd=dirList->next();
     }
Index: src/translator_en.h
===================================================================
--- src/translator_en.h	(revisione 614)
+++ src/translator_en.h	(copia locale)
@@ -1044,30 +1044,30 @@
         "\\endcode\n"
         "If the \\c MAX_DOT_GRAPH_HEIGHT tag in the configuration file "
         "is set to 240 this will result in the following graph:"
-        "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n"
+        "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center></p>\n"
         "<p>\n"
-        "The boxes in the above graph have the following meaning:\n"
+        "The boxes in the above graph have the following meaning:\n</p>"
         "<ul>\n"
         "<li>%A filled gray box represents the struct or class for which the "
-        "graph is generated.\n"
-        "<li>%A box with a black border denotes a documented struct or class.\n"
-        "<li>%A box with a grey border denotes an undocumented struct or class.\n"
+        "graph is generated.</li>\n"
+        "<li>%A box with a black border denotes a documented struct or class.</li>\n"
+        "<li>%A box with a grey border denotes an undocumented struct or class.</li>\n"
         "<li>%A box with a red border denotes a documented struct or class for"
         "which not all inheritance/containment relations are shown. %A graph is "
-        "truncated if it does not fit within the specified boundaries.\n"
+        "truncated if it does not fit within the specified boundaries.</li>\n"
         "</ul>\n"
         "The arrows have the following meaning:\n"
         "<ul>\n"
         "<li>%A dark blue arrow is used to visualize a public inheritance "
-        "relation between two classes.\n"
-        "<li>%A dark green arrow is used for protected inheritance.\n"
-        "<li>%A dark red arrow is used for private inheritance.\n"
+        "relation between two classes.</li>\n"
+        "<li>%A dark green arrow is used for protected inheritance.</li>\n"
+        "<li>%A dark red arrow is used for private inheritance.</li>\n"
         "<li>%A purple dashed arrow is used if a class is contained or used "
         "by another class. The arrow is labeled with the variable(s) "
-        "through which the pointed class or struct is accessible.\n"
+        "through which the pointed class or struct is accessible.</li>\n"
         "<li>%A yellow dashed arrow denotes a relation between a template instance and "
         "the template class it was instantiated from. The arrow is labeled with "
-        "the template parameters of the instance.\n"
+        "the template parameters of the instance.</li>\n"
         "</ul>\n";
     }
     /*! text for the link to the legend page */
Index: src/doxygen.css
===================================================================
--- src/doxygen.css	(revisione 614)
+++ src/doxygen.css	(copia locale)
@@ -1,3 +1,5 @@
+/* the doxygen standard CSS */
+
 BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
 	font-family: Geneva, Arial, Helvetica, sans-serif;
 }
@@ -187,6 +189,14 @@
 IMG.formulaInl { 
 	vertical-align: middle; 
 }
+IMG.center {
+    float: center;
+    border: 0;
+}
+IMG.footer {
+    border: 0;
+    vertical-align: bottom; 
+}
 SPAN.keyword       { color: #008000 }
 SPAN.keywordtype   { color: #604020 }
 SPAN.keywordflow   { color: #e08000 }
