Re: xml preformated text & db2html != gnome-db2html
- From: Havoc Pennington <hp redhat com>
- To: Naba Kumar <kh_naba yahoo com>
- Cc: gnome-devel-list gnome org, gnome-doc-list gnome org
- Subject: Re: xml preformated text & db2html != gnome-db2html
- Date: 04 May 2001 09:42:53 -0400
Naba Kumar <kh_naba yahoo com> writes:
>
> I am just putting two questions together (they are unrelated).
>
> 1) How can I put preformated text (that may contain "</>" etc)
> without confusing the xml parser? Last time I tried, it was
> producing errors and core dumped. May be I'm missing something
> here, but I just couldn't make it.
You just escape the text, along these lines:
static void
append_escaped_text (GString *str,
const gchar *text,
gint length)
{
const gchar *p;
const gchar *end;
p = text;
end = text + length;
while (p != end)
{
const gchar *next;
next = g_utf8_next_char (p);
switch (*p)
{
case '&':
g_string_append (str, "&");
break;
case '<':
g_string_append (str, "<");
break;
case '>':
g_string_append (str, ">");
break;
case '\'':
g_string_append (str, "'");
break;
case '"':
g_string_append (str, """);
break;
default:
g_string_append_len (str, p, next - p);
break;
}
p = next;
}
}
I'm not sure that's what you were asking, also I'm not sure if you
need the apos/quot escapes, but maybe it helps.
> 2) Why is gnome-db2html so happy to produce the whole chapter
> in a single page? It's annoying, since these so-called _chapters_
> in so-called _books_ tend to be big.
>
> db2html does fine with section per page. Moreover, the two programs seem
> to be parsing the sgml file differently and expecting different
> tags (jade was producing so much error compiling the gnome sgml
> docs). Are they suppose to work on different doc types?
>
This is just a matter of what stylesheet is used to format the docs,
we have a different one. I don't know the rationale etc.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]