[EMAIL PROTECTED] writes:
> > > XML *IS* case sensitive, and we use XML to make the docs.
> > > So I think we should be XML compatible with function names too.
> >
> > True, but the tool used to document another tool should not define
> > what is presented to the reader. :)
>
> I agree, but for a little consistance it would still be a good idea to make
> anything lowercase... this can't be too hard,
> just a regular expression to find all <function>...</function>'s, and then
> make it lowercase? Or that script, maybe that works well?
That's what I did, as I mentioned in the snipped part of the above
email. I'm not saying we *should* have mixed-case function names in
the manual--just that whatever we decide upon should be decided upon
for reasons of 'This is the way PHP works', not 'This is the way XML
works'--and in PHP function names are case-insensitive, so this is
largely a matter of aesthetics. I agree that it would be good to have
it all consistent, and that we should clean it up. But until we can
get that done, I think the stylesheets should take care of it: I feel
that the crossreferencing presented by these tags is more important to
the reader than the case of the letters used.
> And that even at the start of a sentence. You also don't write numbers in
> uppercase just because they happen to be the first 'word' of a sentence.
Bad example: sentences shouldn't start with digits anyway. Spell the
word out at the start of a sentence. It remains largely undecided as
to whether function names should be capitalized when starting a
sentence--I personally believe they should not be, but not everybody
thinks that way. :)
> In a day or something I'll process the whole documentation (all
> languages too). Unless someone has any objections of course.
> Greetz, Jeroen
I think this is a good idea. Just run 'make test' when you do. :)
BTW, here's the script:
#!/usr/local/bin/php -q
<?php /* -*- mode: c++; minor-mode: font -*- */
error_reporting(E_ALL);
if ($argc != 2) {
die('Usage: ' . basename($argv[0]) . ' <xml_file>');
}
if (!$source = implode('', file($argv[1]))) {
die("Failed reading '$sourcefile'\n");
}
echo preg_replace(':<function>(.*?)</function>:ise',
'"<function>".strtolower("\1")."</function>"',
$source);
?>
--
Torben Wilson <[EMAIL PROTECTED]>
http://www.thebuttlesschaps.com
+1.604.709.0506