Home Forums General XMetaL Discussion Looking for Script to toggle capitalization Reply To: Looking for Script to toggle capitalization

sandvik

Reply to: Looking for Script to toggle capitalization

> c) title case        “Block Diagram Of Two Counters”

Title case for this should be “Block Diagram of Two Counters”,
at least for US English. “A” and “of” and “the” and many other
little words are not capitalized unless leading the title.

I implemented conversion of sentence case to title case
recently in XSL 2.0 (which doesn't translate to
.NET macros terribly well). You can use an external file of “little
words” that are not capitalized unless leading a title. Look up
each word to see if it should be capitalized. It's still a
heuristic. For example, if the doc includes Java or C API
names, NameOfItem is not the same as nameOfItem and
the conversion will mangle these unless you list every
lower-cased API name in the little-words file.

– Craig

Reply

Products
Downloads
Support