Re: new feature proposal: filter maps

Francesco Montorsi <[email protected]>
Newsgroups gmane.text.doxygen.devel
Message-ID <[email protected]>
Dimitri Van Heesch ha scritto:
>>> Dimitri, what do you think of this idea?
>>> It should be an easy-to-implement and fairly robust solution, which
>>> avoids the user to install sed and write sed postprocessing scripts  
>>> to
>>> fix the naming of some fixed labels in the output....
> 
> It sounds a bit too much like a hack to me, so I'm not too  
> enthusiastic about it.
> A better solution would then be to allow translators to be plugins  
> loaded at startup. Either as a dynamically loadable library (but that is  
> difficult to do in a portable way)
this would do the job but as you say it would be impossible for the 
users to have a single DSO for all platforms where doxygen must be able 
to run (e.g. linuxes with different versions of libc, linux/win, etc).

Also it would be a very unconvenient way to change labels in the 
generated output: you'd have to write a C file, compile it, link it, 
test it...

> or as an XML file.
this is much more easier to do but would an XML translation file cope 
with trXXX() functions which take booleans/strings ? The latter can be 
just used as replacements for $1, $2 (or similar syntaxed) strings.
The first however needs a "decisional" syntax... which is not part of XML.

> One can even go one step further and implemented  
> item 9 on the todo
> list (http://www.doxygen.org/todo.html), i.e. a template file that  
> defines the structure of the output.
this would be the best (in the sense "more complete") solution.
It could even make possible to get XHTML output.

However I think that either we invent a new programming language ad-hoc 
for such template files (which would be quite complex and would produce 
probably a buggy implementation), or use some existing embeddable 
interpreter. Unfortunately embeddable interpreters are not very used: a 
Python interpreter is very difficult to embed AFAIK.
C++ interpreters exist (see e.g. UnderC as open source product) but are 
quite a niche category of software.

Something else which comes to my mind is that if Doxygen could output 
XHTML instead of HTML4, it would be easy to change "fixed labels" (and 
not only them!) doing an XSLT transformation on it...
Also, the XSLT solution over an XHTML output of doxygen would be 
possible only for the XHTML output itself: latex/rtf/etc would still 
have those "fixed labels".

In conclusion I think that in order to make the doxygen "fixed labels" 
more configurable two solutions are realistically possible:

  1) create a special Translator as I proposed

or

  2) make the HTML4 output XHTML compliant so that XSLT can be used on it


do I miss something?

Francesco


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.