<TEI.2>
<teiHeader> [ TEI Header information ] </teiHeader>
<text>
<front> [ front matter ... ] </front>
<body> [ body of text ... ] </body>
<back> [ back matter ... ] </back>
</text>
</TEI.2>
The front and back elements are optional.
\Configure{HTML}
{\HCode{<TEI.2>}}
{\HCode{</TEI.2>}}
\Configure{HEAD}
{\HCode{<teiHeader type="text" status="new"><fileDesc>}}
{\HCode{</fileDesc>\Hnewline
<revisionDesc><list
type="simple"><item></item></list></revisionDesc>\Hnewline
</teiHeader>}}
\Configure{TITLE}
{\HCode{<titleStmt><title></title></titleStmt>\Hnewline}}
{}
\Configure{TITLE+}
{\HCode{<publicationStmt> <p></p> </publicationStmt>\Hnewline
<sourceDesc><p>\FileName\space from \jobname.tex
(TeX4ht, \:today)</p></sourceDesc>\Hnewline
}}
-_-_-
The <!--@Basename=\jobname--> is for clean-tei.xsl.
\Configure{TITLE}
{\HCode{<titleStmt>\Hnewline
<title>\ifTag{TITLE+}{\LikeRef{TITLE+}}{}</title>\Hnewline
<author>\ifTag{)author)}{\LikeRef{)author)}}{}</author>\Hnewline
</titleStmt>\Hnewline
}}
{}%
-_-_-
\let\leavevmode=\empty \let\not@math@alphabet=\:gobbleII
\def\text@command##1{##1}\let\selectfont=\empty \let\\=\empty
\no:fonts \def\check@icl ##1\check@icr{}%
\:TITLE: \a:NoSection
-_-_-
\Configure{@TITLE}{\def\LaTeX{LaTeX}\let\fontencoding=\:gobble
\let\fontfamily=\:gobble \let\fontseries=\:gobble
\let\fontshape=\:gobble \let\usefont=\:gobbleIV }
-_-_-
\Configure{InsertTitle}{\let\label=\lb:l
\let\ref=\o:ref \Configure{ref}{}{}{}}
\Configure{AfterTitle}{\let\index=\:index
\let\ref=\:ref \let\label=\lb:l }
\Configure{NoSection}
{\let\sv:index=\index \let\sv:label=\label \let\sv:ref=\ref
\let\sv:newline=\newline \def\newline{ }%
\let\sv:setfontsize=\@setfontsize \let\@setfontsize=\:gobbleIII
\let\index=\@gobble \let\label=\@gobble \let\ref=\@gobble
}
{\let\index=\sv:index \let\label=\sv:label \let\ref=\sv:ref
\let\newline=\sv:newline \let\@setfontsize=\sv:setfontsize
}
-_-_-
\Configure{maketitle}
{<.tag title.>\HCode{<titlePage>}}
{\HCode{</titlePage>}}
{\HCode{<title>}}
{\HCode{</title>}}
\Configure{thanks author date and}{}{}
{<.tag author.>\HCode{<author>}}
{\HCode{</author>}}
{\HCode{<date>}} {\HCode{</date>}}
{\HCode{<!--and-->}}
{} -_-_-
\Configure{maketitle}
{<.tag title.>\HCode{<titlePage>}}
{\HCode{</titlePage>}}
{\HCode{<docTitle><titlePart type="main">}}
{\HCode{</titlePart></docTitle>}}
\Configure{thanks author date and}{}{}
{<.tag author.>\HCode{<docAuthor>}}
{\HCode{</docAuthor>}}
{\HCode{<docDate>}} {\HCode{</docDate>}}
{\HCode{<!--and-->}}
{} -_-_-
\Configure{BODY}
{\ifTag{TITLE+}%
{\HCode{<text><front>}\PushStack\text:stack{front}}%
{\HCode{<text><body>}\PushStack\text:stack{body}\ShowPar
\csname par\endcsname}%
}
{\IgnorePar\EndP \PopStack\text:stack\:temp \def\:tempa{front}%
\HCode{</\:temp>\ifx\:temp\:tempa <body><p></p></body>\fi</text>}}
-_-_-
\Configure{authors}
{\HCode{<docAuthor>}} {\HCode{</docAuthor>}}
\Configure{setdate}
{\HCode{<docDate>}} {\HCode{</docDate>}}
\Configure{thanks author date and}{}{}
{<.tag author.>\HCode{<docAuthor>}}
{\HCode{</docAuthor>}}
{\HCode{<date>}} {\HCode{</date>}}
{\HCode{<!--and-->}}
{} -_-_-
\Configure{maketitle}
{<.tag title.>\HCode{<titlePage>}%
\bgroup \Configure{centerline}
{\HCode{<byline rend="centerline">}}
{\HCode{</byline>}}
}
{\egroup \HCode{</titlePage>}}
{\HCode{<docTitle>}}
{\HCode{</docTitle>}} -_-_-
\Configure{PROLOG}{VERSION,DOCTYPE,*XML-STYLESHEET}
\:CheckOption{no-DOCTYPE} \if:Option
\Configure{PROLOG}{VERSION,*XML-STYLESHEET}
\fi
-_-_-
\Configure{VERSION}
{\HCode{<?xml version="1.0"?>\Hnewline}}
\Configure{VERSION}
{\HCode{<?xml version="1.0"?>\Hnewline}}
\Configure{DOCTYPE}
{\HCode{<!DOCTYPE TEI.2 [<.tei dtd tex4ht.>]>}} -_-_-
\Configure{VERSION}
{\HCode{<?xml version="1.0"?>\Hnewline}}
\Configure{VERSION}
{\HCode{<?xml version="1.0"?>\Hnewline}}
\Configure{DOCTYPE}
{\HCode{<!DOCTYPE TEI.2 [\Hnewline<.tei-mml dtd tex4ht.>]>\Hnewline}} -_-_-
\Configure{VERSION}
{\HCode{<?xml version="1.0"?>\Hnewline}}
\Configure{VERSION}
{\HCode{<?xml version="1.0"?>\Hnewline}}
\Configure{DOCTYPE}
{\HCode{<!DOCTYPE TEI.2 <.tei-mmltei dtd tex4ht.> >\Hnewline}} -_-_-
<!ELEMENT formula (math)>\Hnewline
-_-_-
<!ENTITY \% TEI.dtd PUBLIC\Hnewline
"-//TEI//DTD TEI Lite XML ver. 1.3//<.dtd lang.>"\Hnewline
"teixlite.dtd">
\Hnewline \%TEI.dtd; \Hnewline -_-_-
<!ENTITY \% mathml.dtd PUBLIC
"-//W3C//DTD MathML 2.0//<.dtd lang.>"\Hnewline\space\space
"mathml2.dtd">
\Hnewline \%mathml.dtd;\Hnewline -_-_-
<!ENTITY \% ENT-\jobname.ent SYSTEM "\jobname.ent">
\Hnewline \%ENT-\jobname.ent; \Hnewline
-_-_-
\bgroup
\def\toctei##1##2##3{\HCode{##2\Hnewline}}%
\no:catcodes{34}{36}{12}\no:catcodes{94}{95}{12}\catcode‘\~=12
\Configure{tableofcontents} {} {} {}{}{}%
\:TableOfContents[tei]%
\egroup
-_-_-
Instead of SYSTEM earlier we had
PUBLIC\Hnewline "-//TEI U5-1995//DTD TEI Lite 1.0 Extensions//|<dtd lang|>"\Hnewline.
\let\:NOTATIONs=\empty
\def\Decl#1{\edef\:NOTATIONs{\:NOTATIONs#1\Hnewline}}
-_-_-
\def\Decl#1{\edef\:temp{\the\:tokwrite{\string\doTocEntry
\string\toc tei{}{#1}{}}}\:temp
}
-_-_-
\def\Decl##1{{\everypar{}%
\ht:special{t4ht>\jobname.ent}\hbox{\HCode{##1\Hnewline}}%
\ht:special{t4ht>\FileName}}}
\Decl{\:NOTATIONs}\let\:NOTATIONs=\:UnDef
-_-_-
> oh yes. I copied the entity declaration into a comment after <TEI.2>,
> because xsl has no access to the document subset...
Consider this:
<?xml version="1.0"?>
<!DOCTYPE TEI.2 [
<!ELEMENT formula (math)>
<!ENTITY % TEI.dtd PUBLIC
"-//TEI//DTD TEI Lite XML ver. 1.3//|<dtd lang|>"
"teixlite.dtd">
%TEI.dtd;
<!ENTITY % ENT-1-3.ent SYSTEM "1-3.ent">
%ENT-1-3.ent;
<!ENTITY % list.qname "mathml-list"> <!ENTITY % mathml.dtd PUBLIC "-//W3C//DTD \
MathML 2.0//|<dtd lang|>"
"mathml2.dtd">
%mathml.dtd;
]>
the entities are read in from an external file via the %ENT-1-3.ent;
unfortunately such parameter entities do not have to be expanded by
XML processors, so the file can not get read. xmltex is an example of
a system which fails to do so...
we need to textually include the entity file, not reference it.
\HAssign\ent:cnt = 0
\Configure{Preamble}
{}
{{\ifdim \lastskip>\z@ \unskip\fi
\IgnorePar\parindent\z@ \leavevmode}%
<.main Decl.>%
}
<.early Decl.> -_-_-
\Configure{Preamble}
{}
{{\ifdim \lastskip>\z@ \unskip\fi
\IgnorePar\parindent\z@ \leavevmode}%
}
<.early xslt Decl.> -_-_-