1 Reply Latest reply on Nov 17, 2014 4:09 PM by Amebr

    RH11-How do I change a DOCTYPE across a project?

    zeppm Level 1

      I'm using RH11, and my employer wants to publish our software for our December 1 release in about 50% WebHelp and 50% .CHM format.    They said that they are having issues with the .chm format files having compatibility on/compatibility off with different versions of IE that our customers are using, where customers will get a "Compatibility View Settings" window depending on whether they have that on or off.  Because of that, they want me to change the beginning of each HTML file from this:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

      to this:  <!DOCTYPE HTML>


      Is there a fast way to do this?  One of my pieces of software has 448 HTML topics!

       

      I tried search and replace, but that did not work.  They want this done regardless of whether the end release will be HTML or .chm.

       

      Thanks!

        • 1. Re: RH11-How do I change a DOCTYPE across a project?
          Amebr Level 4

          Find in Files should work. I tried copying the line in a test project and Find and Replace found it across all my topics.

           

          Make sure you have the following setup:

          Look in: <current project>

          Files of type: Text file types (*.htm ; *.html; *.txt)

          x  Include Subfolders.

           

          Or possibly you have line breaks inside your doctype tag in which case you could try this - take a backup of your projects and test it on a single file first!

           

          Find what: (\<\!doctype html(/?[^\>]+)\>)

          Replace with: <!doctype html>

          Look in: *same as above

          Files of type: * same as above

          x  Use: Regular Expressions

          x  Include Subfolders.

           

          HTH,

          Amber

          P.S. I just realised maybe you are accessing the wrong search and replace.

          Edit > Replace (Ctrl+H) only searches in the current topic.

          Edit > Find and Replace in Files (Ctrl+Shift+F) searches across all files in a project or a select directory/folder