From: g0dil Date: Thu, 25 Jan 2007 16:12:14 +0000 (+0000) Subject: Add XSLT postprocessing of HTML files to fix browser problems X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=ac88c68bb3aebad5f7d91ce44f1c845d973f9613;p=senf.git Add XSLT postprocessing of HTML files to fix browser problems git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@185 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/SConstruct b/SConstruct index 2bd5c45..7946269 100644 --- a/SConstruct +++ b/SConstruct @@ -14,6 +14,7 @@ env.Append( CPPPATH = [ '#' ], LIBS = [ 'iberty' ], DOXY_XREF_TYPES = [ 'bug', 'fixme', 'todo', 'idea' ], + DOXY_HTML_XSL = '#/doclib/html-munge.xsl', ) import datetime diff --git a/Socket/ClientSocketHandle.ct b/Socket/ClientSocketHandle.ct index 0c6b61b..3f5112f 100644 --- a/Socket/ClientSocketHandle.ct +++ b/Socket/ClientSocketHandle.ct @@ -20,7 +20,9 @@ // Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// Definition of non-inline template functions +/** \file + \brief senf::ClientSocketHandle non-inline template implementation + */ //#include "ClientSocketHandle.ih" diff --git a/Socket/ClientSocketHandle.cti b/Socket/ClientSocketHandle.cti index c6a9348..669aa38 100644 --- a/Socket/ClientSocketHandle.cti +++ b/Socket/ClientSocketHandle.cti @@ -20,7 +20,9 @@ // Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// Definition of inline template functions +/** \file + \brief senf::ClientSocketHandle inline template implementation + */ //#include "ClientSocketHandle.ih" diff --git a/Socket/ClientSocketHandle.hh b/Socket/ClientSocketHandle.hh index a1f3b92..96267f5 100644 --- a/Socket/ClientSocketHandle.hh +++ b/Socket/ClientSocketHandle.hh @@ -20,6 +20,10 @@ // Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/** \file + \brief senf::ClientSocketHandle public header + */ + #ifndef HH_ClientSocketHandle_ #define HH_ClientSocketHandle_ 1 @@ -37,7 +41,7 @@ namespace senf { template class ServerSocketHandle; - /** \brief + /** \brief Generic SocketHandle with client interface \todo Move all not template-parameter dependent code into a non-template base class diff --git a/Socket/SocketPolicy.ct b/Socket/SocketPolicy.ct index 3f07f25..d8b2f22 100644 --- a/Socket/SocketPolicy.ct +++ b/Socket/SocketPolicy.ct @@ -20,7 +20,9 @@ // Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// Definition of non-inline template functions +/** \file + \brief Policy Framework non-inline template implemenation + */ #include "SocketPolicy.ih" diff --git a/Socket/SocketPolicy.hh b/Socket/SocketPolicy.hh index 297a469..eb453af 100644 --- a/Socket/SocketPolicy.hh +++ b/Socket/SocketPolicy.hh @@ -21,7 +21,7 @@ // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /** \file - \brief SocketPolicy public header + \brief Policy Framework public header \todo We should probably remove BufferingPolicy from the interface, it does not make much sense (how did I come to include diff --git a/Socket/SocketPolicy.ih b/Socket/SocketPolicy.ih index fac273a..0e2b58f 100644 --- a/Socket/SocketPolicy.ih +++ b/Socket/SocketPolicy.ih @@ -20,6 +20,10 @@ // Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/** \file + \brief Policy Framework internal header + */ + #ifndef IH_SocketPolicy_ #define IH_SocketPolicy_ 1 diff --git a/doclib/html-munge.xsl b/doclib/html-munge.xsl new file mode 100644 index 0000000..241bc8b --- /dev/null +++ b/doclib/html-munge.xsl @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + xref-bug + + + + + + + + xref-fixme + + + + + + + + xref-todo + + + + + + + + xref-idea + + + + + + + + + + + + diff --git a/doclib/senf.css b/doclib/senf.css index f5f2de4..ddfeff0 100644 --- a/doclib/senf.css +++ b/doclib/senf.css @@ -175,25 +175,24 @@ dl.bug, dl.fixme, dl.todo, dl.idea { padding: 0 10px; } -dl:contains("Bug:"), dl:contains("Fix:"), dl:contains("Todo:"), dl:contains("Idea:") { +dl.xref-bug, dl.xref-fix, dl.xref-todo, dl.xref-idea { border: 1px solid #CC8888; - padding: 4px; + padding: 2px 3px; + margin: 4px 0; background-color: #FFEEEE; color: #666666; - font-size: 6px; - line-height: 6px; + font-size: 9px; overflow: hidden; - height: 6px; } -dl:contains("Bug:"):hover, dl:contains("Fix:"):hover, -dl:contains("Todo:"):hover, dl:contains("Idea:"):hover { - line-height: inherit; - font-size: inherit; - height: auto; +dl.xref-bug dt, dl.xref-fix dt, dl.xref-todo dt, dl.xref-idea dt, +dl.xref-bug dd, dl.xref-fix dd, dl.xref-todo dd, dl.xref-idea dd { + display: inline; + margin: 0; + padding: 0; } -dl:contains("Bug:") a, dl:contains("Fix:") a, dl:contains("Todo:") a, dl:contains("Idea:") a { +dl.xref-bug a, dl.xref-fix a, dl.xref-todo a, dl.xref-idea a { color: #6666FF; } @@ -202,7 +201,7 @@ dl.fixme { background-color: #FFFFDD; } -dl:contains("Fix:") { +dl.xref-fix { border-color: #CCCC88; background-color: #FFFFEE; } @@ -212,7 +211,7 @@ dl.todo { background-color: #DDFFDD; } -dl:contains("Todo:") { +dl.xref-todo { border-color: #88CC88; background-color: #EEFFEE; } @@ -222,7 +221,7 @@ dl.idea { background-color: #EEEEEE; } -dl:contains("Idea:") { +dl.xref-idea { border-color: #CCCCCC; background-color: #F8F8F8; } diff --git a/senfscons/SENFSCons.py b/senfscons/SENFSCons.py index d2e0c48..a9961d6 100644 --- a/senfscons/SENFSCons.py +++ b/senfscons/SENFSCons.py @@ -151,11 +151,13 @@ def Doxygen(env, doxyfile = "Doxyfile", extra_sources = []): # ||| WITHIN THE DOXYGEN BUILDER docs = env.Doxygen(doxyfile)[:] xmlnode = None + htmlnode = None tagnode = None for doc in docs: if isinstance(doc,SCons.Node.FS.Dir): continue if doc.name == 'xml.stamp' : xmlnode = doc - if os.path.splitext(doc.name)[1] == '.stamp' : continue # file stamp + if doc.name == 'html.stamp' : htmlnode = doc + if os.path.splitext(doc.name)[1] == '.stamp' : continue # ignore other file stamps # otherwise it must be the tag file tagnode = doc @@ -164,10 +166,21 @@ def Doxygen(env, doxyfile = "Doxyfile", extra_sources = []): # references env.AddPostAction( docs, - env.Action("xsltproc -o %(target)s.temp %(template)s %(target)s && mv %(target)s.temp %(target)s" + env.Action("xsltproc --nonet -o %(target)s.temp %(template)s %(target)s && mv %(target)s.temp %(target)s" % { 'target': tagnode.abspath, 'template': os.path.join(basedir,"tagmunge.xsl") })) + if htmlnode and env.get('DOXY_HTML_XSL'): + xslfile = env.File(env['DOXY_HTML_XSL']) + env.AddPostAction( + docs, + env.Action(("for html in %s/*.html; do " + + "xsltproc --nonet --html -o $${html}.new %s $${html} && mv $${html}.new $${html}; " + + "done") + % (htmlnode.dir.abspath, xslfile.abspath))) + for doc in docs: + env.Depends(doc,xslfile) + if xmlnode: xrefs = [] for type in env.get("DOXY_XREF_TYPES",[ "bug", "todo" ]):