3 Replies Latest reply on Jun 21, 2007 9:52 AM by Linux Rules

    DOC type definitions

    NianNorth
      There is a bit of an accessibility purge on at the minute. Our output has more or less got the all clear however there are some issues that have been highlighted about which I'm having a mare.

      The main issue is with the markup language (grammar). All our output is <!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN"> <meta http-equiv="content-type" content="text/html; charset=windows-1252"> and we are required to use <!doctype HTML public "-//W3C//DTD HTML 4.01//EN" Frameset//EN" "."> http://www.w3c.org/tr/hgtml4/strict.dtd">[/b
      I'm either being thick and missing something obvious or I'm asking some thing that can't be done. Tell me I'm thick, please.
      How do I change or define the HTML grammar used?
      Can it be done in RoboHelp x5?
      If not can it be done in RoboHelp 6?
      I'm having a bad day getting the output to comply with every standard, so any help would be appreciated.

      I posted this question in Webhelp but got no reply so I'm hoping some one will see this and help.
        • 1. Re: DOC type definitions
          AmyGfromNZ
          Nian,

          is your problem that RH is rewriting your !doctype declaration, or that you don't know how to get it to use your !doctype declaration in the first place?

          With respect to the former, I can tell you that I have files that use the "HTML 4.0 Strict" DTD and their doctype survives the RH process and appears in the output. However, your syntax looks a little different to mine: I use
          quote:

          <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
          " http://www.w3.org/TR/html4/strict.dtd">

          (note that the URL appears inside the doctype tag; I'm presuming that "hgtml4" is a typo in your posting rather than in your files.)

          if you are actually asking the latter question, I can't answer with any real assurance because I don't use the RH editor, I use a third party one, exactly because I dislike the way RH rewrites my code. The TrueCode view does seem to show the doctype declaration and let you edit this declaration and save the result, but if you open the file again in RH it will revert. How annoying.

          There is, incidentally, no way I would have done that experiment (or any other task involving letting RH touch my HTML/CSS) without (third party) version control so I could revert everything afterward.

          FWIW, here's my workflow, whose aims include introducing and preserving accessibility where possible while eliminating undesirable RH modifications to my code:

          EDITING:

          • edit HTML in DreamWeaver or emacs
          • run HTML Tidy over HTML files
          • optionally [*], run an HTML validator over the output
          • check in to version control

          [*] which is to say that a better person would probably do it every time but I don't.

          MANUAL STRUCTURING:

          • open RH
          • make all necessary changes
          • if RH tries to open a file for editing, close the file immediately
          • close RH
          • check manual directory tree against version control to make sure no undesired changes were made to files; revert files where necessary
          • check in the RH-specific files that were legitimately changed

          (sometimes I just edit the RH-specific files directly in emacs - it depends how complex the change is)

          BUILDING:

          • check files out of version control to a dedicated manual-building directory (all RH-specific files are also in version control)
          • run RH to generate manual, send output to a dedicated manual-output directory
          • copy clean versions of all .css files to the manual-output directory to replace the ones that RH rewrote incorrectly (this includes copying fname.css to fname_ns.css for all fname).




          Hope this helps

          Amy
          • 2. Re: DOC type definitions
            NianNorth Level 1
            Thanks for your response. I'll have a good read through it and see what I can do. What I really wanted was for RH to use the correct doc type and HTML grammar, as I have nine authors creating topics etc in RH. I didn't want to be messing with code changes etc every time I publish (every two weeks). I'll let you know how I get on cheers.
            • 3. Re: DOC type definitions
              Linux Rules Level 2
              Hello Nian -

              My sig is applicable to your question...can't get there from here.

              That is, RoboHelp x5 does not produce DTD HTML 4.01//EN compliant output and just changing the header doesn't make it so. As Amy wrote, you need to manually change ALL of the generated code to be compliant. Be sure to run a test on the generated code to be sure your changes are up to snuff.

              Regards,
              GEWB