I was making the default Ddoc generation work with XHTML 1.1 when I ran into a little problem. The version I have now is available at http://www.summerseas.com/jpelcis/downloads/test.ddoc. It seems to generate almost completely correct code, even if the result currently looks slightly different (it's a WIP).
There is, however, one thing I can't seem to fix with the way Ddoc currently works. If a struct is specified but no elements are provided, Ddoc will output a <dl></dl>, which is invalid without a child element.
--------------------------------
/** Generates proper XHTML. */
struct bar {
int blah; ///
}
--------------------------------
/** Generates improper XHTML. */
struct foo {
int blah;
}
--------------------------------
This is the line that appears to be causing the problem.
DDOC_MEMBERS = $(DL $0)
--------------------------------
There are some other ways to force improper code generation, too (Params: with no parameters specified), but most others seem to be errors on the part of the code writer.
--------------------------------
There are two possible solution I see:
Specific:
Only generate a DDOC_MODULE_MEMBERS if some members have documentation associated with them. This would likely be relatively easy to implement, but some future problems might be missed.
--------------------------------
General:
Create a macro that uses, say, $- (since we have a $+) to represent a non-empty string. The downside is that there would have to be some sort of "macro overloading," which appears to be beyond the scope of Ddoc.