September 25, 2005
Walter Bright wrote:
> The new version of Ddoc should be flexible enough that people can write
> config.ddoc files to cause it to generate XHTML, style sheet based HTML, or
> XML output.
> 
> I'd love to see what people can come up with, so it can be incorporated as
> part of the D distribution.
> 
> There's also room for wild/creative files to do things like render D
> documentation in Star Trek fonts, etc!

It would be quite useful to support class hierarchy and call graphs. Doxygen uses dot to render those.
September 25, 2005
"Walter Bright" <newshound@digitalmars.com> wrote in message news:dh6lge$2f08$1@digitaldaemon.com...
> Right now, it only applies to null, true and false.

Ah, I see.


September 25, 2005

Markus Dangl wrote:
> i could use my XML/XSLT experience from the ddocwiki (http://www.quit-clan.de/docwiki/) to create XML output plus some stylesheet for XML-FO. Generating XML would be useful anyways, 
...

Definitely!!

If there ever was a transformation that we really need, it's XML!

From that, anything can be created. That opens up the avenues for Language Independent Code Analysis, IDEs of the Future, automatic code integration from disparate languages, -- do I have to go on?

Plus many, today existing uses.
September 25, 2005
"Jari-Matti Mäkelä" <jmjmak@invalid_utu.fi> wrote in message news:dh709n$2ms3$1@digitaldaemon.com...
> Walter Bright wrote:
> > The new version of Ddoc should be flexible enough that people can write config.ddoc files to cause it to generate XHTML, style sheet based HTML,
or
> > XML output.
> >
> > I'd love to see what people can come up with, so it can be incorporated
as
> > part of the D distribution.
> >
> > There's also room for wild/creative files to do things like render D documentation in Star Trek fonts, etc!
>
> It would be quite useful to support class hierarchy and call graphs. Doxygen uses dot to render those.

I agree, but that'll have to wait. In the meantime, I've been using Ddoc to redo some of the Phobos documentation, and it really does cut the time down by a huge factor.


September 25, 2005
Walter Bright wrote:
> I think it's worth doing. I want to include files in the D distribution so
> people can create XHTML, XML, CHM, RTF, PDF, Latex, Postscript, etc. with
> Ddoc. I generally subscribe to "build it, and they will come!"
> 
> Also, I want to know if there are any technical obstacles preventing this
> from working, so Ddoc can be fixed. The only way to find that out is to try
> it.

Okay, i'm in. My first try was to create ddoc macros for outputting XML like this:
DDOC_DECL      = <declaration>$0</declaration>
DDOC_DECL_DD   = <decldescription>$0</decldescription>
DDOC_SECTIONS  = <sections>$0</sections>
DDOC_SUMMARY   = <summary>$0</summary>
and so on...

There are some minor problems:
For XSLT it is much easier to transform XML tags than to match on strings. Perhaps someone would want to alter the arrangement of the sections, so he has to match on the section name.
Doing it like this:
DDOC_SECTION_H = <sectionname>$0</sectionname>
DDOC_SECTION   = <section>$0</section>

gives me:
<sectionname>Authors:</sectionname>
<section>Markus Dangl, danglm@in.tum.de</section>

But i would like to have seperate tags for different sections, the best way to do it would be:
<sections>
  <authors>Markus Dangl, danglm@in.tum.de</section>
  <license>Public Domain</license>
  <customsection title="Somethingelse">This is for user-defined sections</customsection >
</sections>

But i can't do something like pattern-matching with the DDOC Macros...

IMHO it would be even better to change the behavior of DDOC to output XML by default and integrate an XSLT transformer instead of the Text Macro Processor. You can go from XML to XHTML pretty easy... But i know this would be a very fundamental change and i really appreciate the work you have done so far with ddoc.
September 26, 2005
Looking through src/dmd/doc.c i found that it sometimes uses HTML-Like macros, for example:

in void Dsymbol::emitDitto(Scope *sc)
#270: b.writestring("$(BR)");
in void DocComment::writeSections(Scope *sc, Dsymbol *s, OutBuffer *buf)
#810: 	buf->writestring("$(BR)$(BR)\n");
and "$(P ...)" in highlightText.

It may be better to change these macros give them more semantic meaning, so they will still be useful even if we're not using HTML. (e.g. XML-Fo)
1 2
Next ›   Last »