Gentoo Archives: gentoo-dev

From: Mark Gordon <spamtrap@×××××××××××××××.uk>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: xml in gentoo documentation
Date: Tue, 30 Jul 2002 07:00:40
Message-Id: 20020730113110.02633dba.spamtrap@flash-gordon.me.uk
In Reply to: [gentoo-dev] xml in gentoo documentation by "kirill j."
1 On Tue, 30 Jul 2002 12:42:12 +0300
2 "kirill j." <kirill@××××.fi> wrote:
3
4 > Hi!
5 >
6 > I'm currently in the process of writing my first guide, using
7 > gentoo-web -tools. I was inspired by xml-guide.html.
8 > I am not really that good into xml or even html or css, so I'm asking
9 > for help here:
10 >
11 > the problem is that i've included a copy/paste from kernel's 'make
12 > menuconfig' into my guide.
13 > xml dont like it (it doesn't like the <M>'s, which it thinks are
14 > incomplete tags).
15 >
16 > is there anyway to tell xml to ignore everything withing some specific
17 > tag?
18 >
19 > <pre> </pre> doesn't seem to help.
20
21 You have to replace them with things like "&lt;M&gt;". Here is a
22 snippet of perl from a utility I have that creates a web page from some
23 standard text input:
24
25 sub tohtml {
26 my $line=$_;
27 $line =~ s/\&/&amp;/g;
28 $line =~ s/\</&lt;/g;
29 $line =~ s/\>/&gt;/g;
30 $line =~ s/\"/&quot;/g;
31 $line =~ s/\t/&nbsp;&nbsp;&nbsp;/g;
32 $line =~ s/ /&nbsp;/g;
33 return $line;
34 }
35
36 HTH.
37
38 --
39 Mark Gordon