Re: [Doxygen-develop] how to document files other than c,c++,java ?
Brought to you by:
dimitri
From: Stefan K. <ko...@im...> - 2003-11-27 16:12:44
|
hi again, here is an extendet version of the script. dimitri: can we define new structural commands like \fn \file \def ... when I document a dtd I would like to have \entity \element and \attlist so what I am asking for is something like \defstructcmd <structcmd> <singular> <plural> \defstructcmd entity Entity Entities /** \structcmd entity <entity-name> * \brief .... */ Ciao Stefan > hi again, > > should have read some more before asking. Attached is version 0.1 of such a > filter script (perl). At least file comments do work. More to come tommorow > > Ciao > Stefan > > Stefan Kost wrote: > >>hi hi, >> >>has anyone achived to document files other that c,c++,java? >>my system includes xml, xsl files and a dtd. For completness I would at least >>document the files themselfs. So I tried things like >><!-- >> @file test.dtd >> @brief the test document type definition >>--> >> >>as well as >> >><!-- >>/** >> * @file test.dtd >> * @brief the test document type definition >> */ >>--> >> >>The file appear in the section of files, but without the comment. When I follow >>the [code] link the /** .. */ comment is not part of the source listing. >> >>Ciao >>Stefan > > > > ------------------------------------------------------------------------ > > #!/usr/local/bin/perl > > if(!defined($ARGV[0])) { exit; } > > #print "arg : ".$ARGV[0]."\n"; > $ifilename=$ARGV[0]; > > if($ifilename=~m/.*\.dtd/) { &filter_dtd($ifilename); } > elsif($ifilename=~m/.*\.x[ms]l/) { &filter_xml($ifilename); } > else { &filter_dummy($ifilename); } > > exit; > > sub filter_dtd { > my ($fn)=@_; > > if(open(FHI,"<$fn")) { > while($line=<FHI>) { > $line=~s/\<\!\-\-/\/\*\*/g; > $line=~s/\-\-\>/\*\//g; > print $line; > } > close(FHI); > } > } > > sub filter_xml { > my ($fn)=@_; > > if(open(FHI,"<$fn")) { > while($line=<FHI>) { > $line=~s/\<\!\-\-/\/\*\*/g; > $line=~s/\-\-\>/\*\//g; > if(($line!~m/^\<\?xml/) && ($line!~m/^\<\!DOCTYPE/)) { > print $line; > } > } > close(FHI); > } > } > > sub filter_dummy { > my ($fn)=@_; > > if(open(FHI,"<$fn")) { > while($line=<FHI>) { > print $line; > } > close(FHI); > } > } -- \|/ Stefan Kost <@ @> private business +-oOO-(_)-OOo------------------------------------------------------ - - - - - | __ Address Simildenstr. 5 HTWK Leipzig, Fb IMN, Postfach 301166 | /// 04277 Leipzig 04251 Leipzig | __ /// Germany Germany | \\\/// Phone +49341 2253538 +49341 30766101 | \__/ EMail st_kost_at_gmx.net kost_at_imn.htwk-leipzig.de | WWW www.sonicpulse.de www.imn.htwk-leipzig.de/~kost/about.html ===-=-=--=---=---------------------------------- - - - - - |