5 Replies Latest reply on Aug 23, 2006 8:07 AM by Brian.Mccaffery

    Redundant Codes

    Brian.Mccaffery Level 1
      I have been given a selection of manuals to update. There have many releases resulting in a large number of codes (true code mode) now redundant. Is there a way to identify all redundant codes in the Topic/Project and safely remove them? Doing it manually will take forever.
        • 1. Re: Redundant Codes
          Peter Grainge Adobe Community Professional (Moderator)
          Welcome to the forum Brian

          You'll need to give us a bit more than that. What sort of codes are you talking about? Are these codes used in your software that need to be removed? Are you talking about classes of styles?

          • 2. Re: Redundant Codes
            Brian.Mccaffery Level 1
            Hello Peter,

            These documents were originally imported from Word. On top of that, there has been a selection of authors updating them over the last couple of years. In True Code mode, there are many style codes that appear to do nothing, for example:
            <span style="font-weight: bold;"></span> with no text between.

            I have spent hours checking each project for spurious styles which send both the documents and me loopy:

            <span style="margin-left: 40px; font-weight: bold;">Drop</span><span
            style="margin-left: 40px;">.</span></p></li>

            <p class=Body-Text
            style="font-weight: bold; margin-left: 40px;">or</p>

            <p class=BODY-TEXT
            style="margin-left: 40px;">When the call is answered,...

            How these manuals got through testing and publishing, I'll never understand.

            Is there a utility that would identify these problems - switched on switched of by line number?

            Thanks for your quick response.


            • 3. Re: Redundant Codes
              RoboColum(n) Level 5
              Hi Brian. I see you are becoming well acquainted with the bloated code of RH. This is especially true when importing word documents. Peter Grainge's website has some tips on doing this to avoid some of the problems connected with this. However to deal with what you have the only solution is to use a tool such as FAR downloadable from here to strip out the code. It's a cracking utility with many uses. It sounds like you've already identified what needs to be removed so that will make it easier. The other longer term suggestion is to use Dreamweaver to generate the topics before importing to RH. It's code is much cleaner but this is an expensive option if you don't have it. P.S. Don't forget to take a backup before you start
              • 4. Re: Redundant Codes
                Peter Grainge Adobe Community Professional (Moderator)
                There is a utility for this, it's called Brian McCaffery!

                Yes all that stuff is the result of imports from Word not being cleaned up properly. There's a topic on my site about how to do that but it's too late now for what you have.

                Some of it you can clean up with a good find and replace tool such as FAR from http://www.helpware.net but do make sure you back up and test at every stage. It's a dangerous game.

                Things like <span style="font-weight: bold;"></span> are straightforward enough but will
                p class=Body-Text
                style="font-weight: bold; margin-left: 40px;">or</p>
                always have the same combination of class and style?

                They will have got through testing because they will not affect the appearance in most cases, indeed they are getting the desired appearance but not the way you would do it.

                • 5. Re: Redundant Codes
                  Brian.Mccaffery Level 1

                  Thanks for the advice. Think I'll have to purchase this when I get home. Trying to convince companies to outlay small amounts seems more problematic than forking out thousands.

                  Still it will come in handy for the future.

                  Only been on this one for a couple of weeks. I feel it may be prudent to wait a while before advising the permanent members about cleaning projects between releases.

                  Thanks again.