Need Advice on Quickest Way to Clean Up Styles

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
zerd
Jr. Propeller Head
Posts: 3
Joined: Tue Nov 20, 2007 12:49 pm

Need Advice on Quickest Way to Clean Up Styles

Post by zerd »

I imported a rather large project from RoboHelp to Flare. Doing so created a "bazillion" inline styles. I need to clean up all of these styles and get everything back to the standard styles that should be used. Although I usually enjoy tackling this sort of thing , I'm feeling overwhelmed by this task (probably because I'm not completely comfortable with Flare yet).

Can anyone give advice on the quickest, cleanest way to clean up the formats in my project?

Also, I'm not sure why, but the original author of this project created individual .CSS files in every sub-directory of the project so I not only have one files to clean up, but several. Can I "override" all of the individual files and just create one master?

Thanks very much!
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Need Advice on Quickest Way to Clean Up Styles

Post by LTinker68 »

Well, you could either use Flare's find-and-replace feature (with search in source code enabled) to strip out all the inline styles, or you could buy/try MadCap Analyzer, which will find those inline styles and recommend that you convert them into real styles. Or a combination of both activities might be better. Use wildcards in the find-and-replace to change common tags (<p>, <table>, <li>, <td>, etc.) with inline styles and replace them with the plain tag. Then use Analyzer to find <span> tags in the middle of those paragraphs, tables, etc., and either remove them or convert them to a style in the main stylesheet.

Now that I think about it, your wisest course might be to:
  1. Use the find-and-replace to find stylesheet references to the other stylesheets and change it to look at just one stylesheet.
  2. Delete the extra stylesheets.
  3. Use the find-and-replace with wildcards to clean up the common tags.
  4. Run Analyzer to find any you missed.
Anyone else have any ideas/suggestions?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Need Advice on Quickest Way to Clean Up Styles

Post by KevinDAmery »

I don't think I'd use find and replace for the stylesheet references: I think I'd just open the file list (Ctrl+Shift+J) and select all the topics and use the properties (F4) to assign them all to the stylesheet you want.

(As a heads up, odds are Flare will freeze when you do this. However, when you restart it you should find that the operation worked. It's one of those annoying things we really wish Madcap would fix, but it doesn't prevent you from getting work done...)
Until next time....
Image
Kevin Amery
Certified MAD for Flare
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Need Advice on Quickest Way to Clean Up Styles

Post by LTinker68 »

KevinDAmery wrote:I don't think I'd use find and replace for the stylesheet references: I think I'd just open the file list (Ctrl+Shift+J) and select all the topics and use the properties (F4) to assign them all to the stylesheet you want.
I tried this the other day in response to someone else's post, but it only seemed to change the topic that was currently open. Now that I think about it, though, that was using the Tools > Stylesheet Links option, not the Properties screen. Your method would be a lot easier.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Post Reply