This content has been marked as final. Show 3 replies
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
(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:
- 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.
- open RH
- make all necessary changes
- if RH tries to open a file for editing, close the file
- close RH
- check manual directory tree against version control to make
sure no undesired changes were made to files; revert files where
- 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)
- check files out of version control to a dedicated
manual-building directory (all RH-specific files are also in
- run RH to generate manual, send output to a dedicated
- 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
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.
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.