RE: automatic generation of quickref.html

"Jelks Cabaniss" <[email protected]>
Newsgroups gmane.comp.web.html-tidy.devel
Message-ID <004501c52e42$1a894490$6401a8c0@blackie>
Bjoern Hoehrmann wrote:
>> The idea is to have a C file (1) containing the description of each
>> option. Then, a driver (2) generates quickref.html, making sure that
>> all options are dealt with. The generated HTML is almost a copy
>> of the current quickref.html.
> 
> Well, I think I am -0 on this, I quite dislike maintaining the docs
> in C files; I would prefer to have a proper XML format with the
> documentation plus a command line tool to retrieve data from Tidy and
> an XSLT to merge those.

If it were to generate clean XHTML (with IDs for each option), that should
allow you to parse the output with XSLT or any other tool.

OTOH, I agree with you that it's a good idea to have a succinct XML format
in place of stuff like this (from the current quickref page) ... 
	
    ...
    <tr>
    <td class="tabletitle" valign="top" id="write-back">write-back</td>
    <td class="tabletitlelink" valign="top" align="right"><a
href="#top">Top</a></td>
    </tr>
    <tr>
    <td valign="top">
      Type: <b>Boolean</b><br />
      Default: <b>no</b><br />
      Example: <b>y/n, yes/no, t/f, true/false, 1/0</b></td>
    <td align="right" valign="top">
    </td>
    </tr>
    <tr>
    <td colspan="2">This option specifies if Tidy
    should write back the tidied markup to the same file it read from. You
are
    advised to keep copies of important files before tidying them, as on
rare
    occasions the result may not be what you expect. </td>
    </tr>
    ...

vs.
	<TidyOptions>
	  ...
	  <option>
	    <name>write-back</name>
	    <type>Boolean</type>
	    <desc>This option specifies if Tidy should write back the tidied
markup to the same file it read from. You are advised to keep copies of
important files before tidying them, as on rare occasions the result may not
be what you expect.</desc>
	  </option>
	  ...
	</TidyOptions>

I think it would be nice if the latter were generated from Tidy itself,
where it's all in one place.  Then you could run an XSLT on that, changing
with the times as necessary, and without all the presentational stuff
hardcoded into the C program.


/Jelks



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
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.