Re: XML Header

From John R. McPherson
DateThu, 09 Jan 2003 13:57:49 +1300
Subject Re: XML Header
In-Reply-To (3E1BA6ED-3070202-pop-com-br)
Leo wrote:
>
> Hi,
>
> Can I modify the Greenstone to generate XML files over HTML pages?
>
> The most of pages begin with <html><head><title></title>. I need that
> begin with <?xml version="1.0"?>.
>
> Can anywhere help me?

Most of the HTML output is customisable from the macro files; if you
look in the greenstone/macro/*.dm files you'll see that most packages
refer to an GSDL Error macro. This macro itself is defined in a couple
of places, for example in html.dm:
GSDL Error {
<html>
<head>
<title>GSDL Error</title>
<base target="_top">

</head>

<body bgcolor="#ffffff" text="#000000" link="#006666"
alink="#cc9900" vlink="#666633">
}

and in style.dm:
GSDL Error {
<html>
<head>
<title>GSDL Error</title>

</head>

<body bgcolor="#ffffff" text="#000000" link="#006666"
alink="#cc9900" vlink="#666633"_1_>
}

Unfortunately there is still some HTML code that is generated by the
library program itself rather than encapsulated entirely in macros.
However, once you understand how the macros work I think you could get
valid xml out (apart from the converted documents - eg the pdftohtml
spits out HTML that isn't xhtml although I think the wvWare .doc converter
does).

Hope this helps
John McPherson