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