Make -hdr and -ftr options (to include arbitrary HTML at the

top and bottom of output) work with docbook.
This commit is contained in:
John Fieber 1997-01-19 21:21:18 +00:00
parent ca76031b72
commit aeae2333f4
2 changed files with 42 additions and 2 deletions

View File

@ -111,6 +111,9 @@ ${_action &r.blkpe;t}</end>'>
<!ENTITY r.hyphen "60">
<!ENTITY r.nl "61">
<!ENTITY r.inchdr "70">
<!ENTITY r.incftr "71">
<!ENTITY cmap SYSTEM "/usr/share/sgml/transpec/html.cmap">
<!ENTITY sdata SYSTEM "/usr/share/sgml/transpec/html.sdata">
@ -431,8 +434,10 @@ ${_action &r.blkpe;t}</end>
<start>^&lt;!-- Generated on ${date} using ${transpec} -->
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
&lt;HTML>&lt;TITLE>${_followrel descendant TITLE &r.pass;}&lt;/TITLE>
&lt;BODY BGCOLOR="#FFFFFF" TEXT="#000000">^</start>
&lt;BODY BGCOLOR="#FFFFFF" TEXT="#000000">
${_isset inchdr &r.inchdr;}^</start>
<end>^${_set fnotenum 1}${_action &r.fnote;t}
${_isset incftr &r.incftr;}
&lt;/BODY>&lt;/HTML></end>
</rule>
@ -757,6 +762,13 @@ ${_action &r.blkpe;t}</end>
<gi>ENTRYTBL
</rule>
<rule> <!-- Environmental variable -->
<match>
<gi>ENVVAR
<action>
&m.tt;
</rule>
<rule> <!-- Brief text set at the beginning of a document as relevant to its content -->
<match>
<gi>EPIGRAPH
@ -1602,6 +1614,14 @@ ${_action &r.blkpe;t}</end>
<gi>PROGRAMLISTINGCO
</rule>
<rule> <!-- Character indicating the start of an input field in a
computer display -->
<match>
<gi>PROMPT
<action>
&m.tt;
</rule>
<rule> <!-- Defined set of data associated with a window -->
<match>
<gi>PROPERTY
@ -2804,4 +2824,22 @@ ${_find top gi FOOTNOTE &r.fnotei;}
<replace>^</replace>
</rule>
<!-- Insert a header file -->
<rule id="&r.inchdr;">
<match>
<varval>inchdr .
<action>
<replace>${_include ${inchdr}}</replace>
</rule>
<!-- Insert a footer file -->
<rule id="&r.incftr;">
<match>
<varval>incftr .
<action>
<replace>${_include ${incftr}}</replace>
</rule>
</transpec>

View File

@ -112,7 +112,7 @@ sub sgmlparse {
$defines = "-i $defines";
}
open($ifhandle, "$sgmls $defines $decl $file | " .
"$instant -Dfilename=$fileroot -t ${dtd}-${replacement}.ts |");
"$instant -Dfilename=$fileroot $instantopts -t ${dtd}-${replacement}.ts |");
}
#
@ -696,6 +696,8 @@ sub main {
$dtd = "docbook";
$decl = "/usr/share/sgml/docbook/docbook.dcl";
if ($opt_f eq 'html') {
if ($opt_hdr) {$instantopts .= " -D \"inchdr=${opt_hdr}\"";}
if ($opt_ftr) {$instantopts .= " -D \"incftr=${opt_ftr}\"";}
&docbook_html();
}
else {