Gentoo Archives: gentoo-doc

From: Xavier Neys <neysx@g.o>
To: gentoo-doc@l.g.o
Subject: [gentoo-doc] GuideXML: define values & use conditional tags
Date: Thu, 22 Jun 2006 11:13:34
Message-Id: 449A7AF4.6020403@gentoo.org
1 Hi *,
2
3 With a new release coming out soon(-ish), we're going to have to hunt and
4 update quite a few variable data such as snapshot names/locations, CD sizes,
5 kernel versions in all our handbooks.
6 Some time ago, we discussed the possibility of defining values at the
7 beginning of the handbooks so that we need only update each value once, always
8 at the same place.
9
10 Besides, allowing conditional bodies would let us solve bugs like
11 http://bugs.gentoo.org/show_bug.cgi?id=52856 or the latest
12 http://bugs.gentoo.org/show_bug.cgi?id=132816. Paragraphs like "Sparc users or
13 PPC machines blah blah di blah" are getting more and more common and
14 inconsistencies such as the partitioning schemes in the the hb-ARCH-disk.xml
15 files and the common hb-install-config.xml are inevitable without conditionals.
16
17 Please have a look at the following links and compare:
18
19 Define values in books:
20 http://gentoo.neysx.org/mystuff/handbook/handbook-mips.xml?passthru=1
21 http://gentoo.neysx.org/mystuff/handbook/handbook-hppa.xml?passthru=1
22 http://gentoo.neysx.org/mystuff/handbook/handbook-alpha.xml?passthru=1
23 http://gentoo.neysx.org/mystuff/handbook/handbook-ppc64.xml?passthru=1
24 http://gentoo.neysx.org/mystuff/handbook/handbook-ppc.xml?passthru=1
25 http://gentoo.neysx.org/mystuff/handbook/handbook-amd64.xml?passthru=1
26 http://gentoo.neysx.org/mystuff/handbook/handbook-sparc.xml?passthru=1
27 http://gentoo.neysx.org/mystuff/handbook/handbook-x86.xml?passthru=1
28
29 Use them:
30 http://gentoo.neysx.org/mystuff/handbook/hb-install-config.xml?passthru=1
31
32 I did not want to make block tags conditional to avoid having to test all
33 p,table,pre,ul,dl... and added a test attribute to the body tag. The only
34 change to the DTD would be to make "body+" and add the test attribute.
35 The test can be any XPath expression that is evaluated and if it returns true,
36 the body is processed.
37
38 The result looks like:
39 http://gentoo.neysx.org/mystuff/handbook/handbook-x86.xml?part=1&chap=8
40 http://gentoo.neysx.org/mystuff/handbook/handbook-sparc.xml?part=1&chap=8
41 http://gentoo.neysx.org/mystuff/handbook/handbook-amd64.xml?part=1&chap=8
42 http://gentoo.neysx.org/mystuff/handbook/handbook-ppc.xml?part=1&chap=8
43 http://gentoo.neysx.org/mystuff/handbook/handbook-ppc64.xml?part=1&chap=8
44 http://gentoo.neysx.org/mystuff/handbook/handbook-alpha.xml?part=1&chap=8
45 http://gentoo.neysx.org/mystuff/handbook/handbook-hppa.xml?part=1&chap=8
46 http://gentoo.neysx.org/mystuff/handbook/handbook-mips.xml?part=1&chap=8
47
48 The good side is we could deliver less encumbered handbooks and please our users.
49 The drawback is that it makes writing text that flows properly in all cases
50 more difficult for us.
51
52 If you guys like it, it goes in, but if you think is too complex or too much
53 work to maintain, I shall not push it down your throat :)
54
55
56 Feedback welcome,
57 --
58 / Xavier Neys
59 \_ Gentoo Documentation Project
60 /
61 /\ http://www.gentoo.org/doc/en/

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies