The simplest method is to invoke mp with the
-f option:
mp info.met -f info.html
This will place into the file
info.html the FAQ-style HTML output.
An alternative method is to specify the form of the file name in a
config file.
Under
output:html the name of the FAQ-style HTML output
is specified using the element
faq as follows:
output:
html:
file: %s.html
faq: %s.faq.html
Here the
file element contains a
template showing
how mp should compose the name of the outline-style HTML file; in the
template, the string
%s is replaced with the name of the
input file (with its extension removed). Likewise, the
faq
element contains a template showing how mp should compose the name of
the FAQ-style HTML file.
Note that the Clearinghouse server software currently in use (May-1999)
assumes that if the SGML metadata document selected is
info.sgml
(for example) then the HTML document to be returned to the user
is
info.html. That strategy will normally return the outline
form of HTML to the user. If you wish to return the FAQ-style HTML
first, then you should change the values shown above like this:
output:
html:
file: %s.out.html
faq: %s.html
Using these config file elements, the FAQ-style output will be the
one returned by the server through a Z39.50 PRESENT request.
NOTE: mp now provides in its HTML output a link to each of
the other output formats that you requested when running mp. These
links are relative to the current directory by default, and will work
correctly when someone retrieves a metadata record directly through
a web server. However, HTML metadata records retrieved through the
Clearinghouse gateway interface come tagged with the URL of the gateway,
consequently these links will not work by default with HTML records
found through the gateway interface. To make these links work without
regard to the retrieval method, place a
BASE tag into the
HEAD element of the output HTML code. As you might guess,
mp can do this for you, but it needs to know the URL where your
metadata will be available as web pages. It gets this information
from a
config file
entry as follows:
output:
html:
base: URL
So if your web site has a URL like
http://www.our-data.org/metadata/
that will contain your metadata records, put this into your config file:
output:
html:
base: http://www.our-data.org/metadata/
Obviously you have to use the
-c config_file command line option
for mp, substituting for
config_file the name of the actual config
file you'll be using.