Re: [Doxygen-develop] new feature proposal: filter maps
Brought to you by:
dimitri
From: Francesco M. <f18...@ya...> - 2008-03-21 20:21:36
|
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 |