\:CheckOption{xhtml} \if:Option
\NewConfigure{@DOCTYPE}[1]{\def\:temp{#1}%
\ifx \:temp\empty \let\a:@DOCTYPE=\empty
\else \ifx \a:@DOCTYPE\relax \let\a:@DOCTYPE=\empty\fi
\pend:def\a:@DOCTYPE{#1}\fi}
\let\a:@DOCTYPE=\relax
\fi
-_-_-
<.pre definitions.>
\Configure{PROLOG}{VERSION,DOCTYPE,*XML-STYLESHEET}
\:CheckOption{mouseover} \if:Option
<.DOCTYPE in PROLOG under mouseover.>
\fi
\:CheckOption{no-DOCTYPE} \if:Option
\:CheckOption{no-VERSION} \if:Option
\Configure{PROLOG}{*XML-STYLESHEET}
\else
\Configure{PROLOG}{VERSION,*XML-STYLESHEET}
<.no-version note.>
\fi
\else
\:CheckOption{no-VERSION} \if:Option
\Configure{PROLOG}{DOCTYPE,*XML-STYLESHEET}
\else
<.no-version note.>
\fi
\Log:Note{to remove the DOCTYPE declaration
use the command line option ‘no-DOCTYPE’}
\fi -_-_-
\Log:Note{to remove the <?xml version=...?> processing instruction
use the command line option ‘no-VERSION’}
-_-_-
\csname a:frames-altDOCTYPE\endcsname
-_-_-
Don’t place the full address
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd’
within DOCTYPE. It can stop tools like xt when the server doesn’t respond
<.xhtml dtd xml-version.>%
\Configure{DOCTYPE}
{\HCode{<!DOCTYPE html \xhtml:DOCTYPE> \Hnewline
<!--http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd-->
\Hnewline}}
\def\xhtml:DOCTYPE{PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//<.dtd lang.>"\Hnewline
\space\space
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"} -_-_-
\expandafter
\ifx \csname a:dtd-lang\endcsname\relax EN\else
\csname a:dtd-lang\endcsname
\fi
-_-_-
\Configure{@DOCTYPE}
{<!ENTITY \% xhtml.dtd \xhtml:DOCTYPE>\Hnewline\%xhtml.dtd; \Hnewline}
-_-_-
\Configure{DOCTYPE}{\IgnorePar\HCode
{<!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//<.dtd lang.>"
\Hnewline\space\space "http://www.w3.org/TR/html4/loose.dtd">
\Hnewline}} -_-_-
\:CheckOption{xhtml} \if:Option
<.xhtml dtd xml-version.>%
\Configure{DOCTYPE}
{\HCode{<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Frameset//<.dtd lang.>"
\Hnewline
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">\Hnewline}}
\else
\Configure{DOCTYPE}
{\HCode{<!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01 Frameset//<.dtd lang.>"
\Hnewline "http://www.w3.org/TR/html4/frameset.dtd">\Hnewline}}
\fi -_-_-
Xerces reqires the following encoding.
encoding="\expandafter\ifx \csname a:charset\endcsname\relax
\expandafter\:encoding\A:charset
\else \expandafter\:encoding\a:charset\fi"
-_-_-