How to convert word to Title Case

Questions about XML that are not covered by the other forums should go here.
eloralon
Posts: 38
Joined: Thu Oct 28, 2010 5:10 pm

How to convert word to Title Case

Post by eloralon » Fri Dec 30, 2011 5:23 pm

Hello,

Using regular expression, I was wondering whether it is possible to search for words in caps inside tag like:

<head>SOME TEXT FOR HEADER</head>,

and replace them with with title case like:

<head>Some Text For Header</head>

Thank you.

george
Site Admin
Posts: 2102
Joined: Thu Jan 09, 2003 2:58 pm

Re: How to convert word to Title Case

Post by george » Tue Jan 03, 2012 1:00 pm

Hi,

oXygen has a plugin called Form Words that converts a text to that form. To get that please go to
http://www.oxygenxml.com/oxygen_sdk.htm ... er_Plugins
and download the sample plugins in compiled format:
http://www.oxygenxml.com/InstData/Edito ... nsJars.zip
When you expand this archive you will get a number of folders, each containing a plugin. Drop the FormWords folder inside the oXygen/plugins folder and restart oXygen.

After these, when you select a text in the editor and invoke the contextual menu (right click on some platforms) you will see a Plugins entry and inside that there will be this Form Words menu item. This will make sure that each word starts with an upper case.

Now, looking at your sample, you may need first to invoke the Lower Case action, either through another sample plugin (similar with the Form Words one) or you can use also the Source -> To lower case action, again from the contextual menu.

Best Regards,
George
George Cristian Bina

Post Reply