File: layout.html

package info (click to toggle)
docbook-website 2.5.0.0-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,512 kB
  • sloc: xml: 1,341; lisp: 412; java: 77; makefile: 39; javascript: 8; sh: 2
file content (425 lines) | stat: -rw-r--r-- 17,559 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
  <head>
    <meta name="generator" content=
    "HTML Tidy for Linux/x86 (vers 1st March 2002), see www.w3.org">
    <meta http-equiv="Content-Type" content=
    "text/html; charset=ISO-8859-1">
    <meta name="generator" content="Website XSL Stylesheet V2.4.1">
    <link rel="home" href="index.html" title="Welcome to Website">
    <link rel="up" href="index.html" title="Welcome to Website">
    <link rel="previous" href="index.html" title=
    "Welcome to Website">
    <link rel="next" href="linking.html" title="Linking Pages">
    <link rel="last" href="" title="nwalsh.com">
    <link rel="icon" href=
    "http://nwalsh.com/images/nwalsh-icon16.png" type="image/png">
    <link rel="stylesheet" href="example.css" type="text/css">

    <title>Site Layout</title>
  </head>

  <body class="tabular" bgcolor="white" text="black" link="#0000FF"
  vlink="#840084" alink="#0000FF">
    <div class="webpage">
      <a name="layout"></a>

      <table border="0" cellpadding="0" cellspacing="0" width=
      "100%" summary="Navigation">
        <tr>
          <td><img src="graphics/spacer.gif" alt=" " width="1"
          height="1"></td>

          <td valign="top" align="left" bgcolor="white" rowspan=
          "2">
            <h1>Site Layout</h1>

            <p>Breaking all of the web pages into separate XML
            documents introduces a significant problem: the
            hierarchical structure of the website is no longer
            manifest in the source document.</p>

            <p>In order for the stylesheets to construct the
            navigation system, you must describe the desired
            hierarchy explicitly in a <span class=
            "emphasis"><em>layout</em></span> file. The layout
            file, which must conform to <tt class=
            "filename">layout.dtd</tt>, identifies all of the pages
            in the website and defines how they fit into the
            navigational hierarchy. Here is simple layout file:</p>
<pre class="programlisting">
&lt;?xml version="1.0"?&gt;
&lt;layout&gt;
  &lt;toc page="website.xml" filename="index.html"&gt;
    &lt;tocentry page="doc1.xml" filename="page1.html"/&gt;
    &lt;tocentry page="doc2.xml" filename="page2.html"/&gt;
  &lt;/toc&gt;
&lt;/layout&gt;
</pre>

            <p>This website has three pages:</p>

            <div class="orderedlist">
              <ol type="1">
                <li>
                  <p><tt class="filename">index.html</tt>,
                  generated from <tt class=
                  "filename">website.xml</tt>;</p>
                </li>

                <li>
                  <p><tt class="filename">page1.html</tt>,
                  generated from <tt class=
                  "filename">doc1.xml</tt>; and</p>
                </li>

                <li>
                  <p><tt class="filename">page2.html</tt>,
                  generated from <tt class=
                  "filename">doc2.xml</tt></p>
                </li>
              </ol>
            </div>

            <p>(See also: <a href="revflag.html" target=
            "_top">revision flags</a>)</p>

            <p>Using this layout file, the hierarchical structure
            of the website is a main page <tt class=
            "filename">index.html</tt> with two subordinate pages
            that are siblings:</p>
<pre class="programlisting">
  + index.html
    + page1.html
    + page2.html
</pre>

            <p>Here's a slightly more complicated example:</p>
<pre class="programlisting">
&lt;?xml version="1.0"?&gt;
&lt;layout&gt;
  &lt;toc page="website.xml" filename="index.html"&gt;
    &lt;tocentry page="doc1.xml" dir="subdir"
              filename="index.html"&gt;
      &lt;tocentry page="doc1.1.xml" filename="page2.html"/&gt;
      &lt;tocentry page="doc1.2.xml" filename="page3.html"/&gt;
    &lt;/tocentry&gt;
    &lt;tocentry page="doc2.xml" filename="page2.html"/&gt;
  &lt;/toc&gt;
&lt;/layout&gt;
</pre>

            <p>This website has five pages:</p>

            <div class="orderedlist">
              <ol type="1">
                <li>
                  <p><tt class="filename">index.html</tt>,
                  generated from <tt class=
                  "filename">website.xml</tt>;</p>
                </li>

                <li>
                  <p><tt class="filename">subdir/index.html</tt>,
                  generated from <tt class=
                  "filename">doc1.xml</tt>;</p>
                </li>

                <li>
                  <p><tt class="filename">subdir/page2.html</tt>,
                  generated from <tt class=
                  "filename">doc1.1.xml</tt>;</p>
                </li>

                <li>
                  <p><tt class="filename">subdir/page3.html</tt>,
                  generated from <tt class=
                  "filename">doc1.2.xml</tt>; and</p>
                </li>

                <li>
                  <p><tt class="filename">page2.html</tt>,
                  generated from <tt class=
                  "filename">doc2.xml</tt></p>
                </li>
              </ol>
            </div>

            <p>Using this layout file, the hierarchical structure
            of the website is a main page <tt class=
            "filename">index.html</tt> with two subordinate pages
            that are siblings (<tt class=
            "filename">subdir/index.html</tt> and <tt class=
            "filename">page2.html</tt>). The first sibling page has
            two siblings of its own (<tt class=
            "filename">subdir/page2.html</tt> and <tt class=
            "filename">subdir/page3.html</tt>):</p>
<pre class="programlisting">
  + index.html
    + subdir/index.html
      + subdir/page2.html
      + subdir/page3.html
    + page2.html
</pre>

            <p>In brief, the hierarchy of <tt class=
            "sgmltag-element">tocentry</tt> elements in a <tt
            class="sgmltag-element">toc</tt> describes the logical
            navigation hierarchy of the website. Each entry must
            identify the XML document (containing a <tt class=
            "sgmltag-starttag">&lt;webpage&gt;</tt>) that it
            represents and may identify the directory and filename
            where the file will appear in the HTML website.</p>

            <p>By default, directories are inherited (hence <tt
            class="filename">page2.html</tt> and <tt class=
            "filename">page3.html</tt> will appear in the <tt
            class="filename">subdir</tt> directory) which makes it
            easy to build a website that has similar logical and
            physical organization. It is not necessary for the
            logical and physical hierarchy of your website to be
            consistent; you can specify an absolute directory at
            any level and on any file by beginning the name with a
            slash.</p>

            <p>If a directory is not specified, the files will
            appear in the currently inherited directory (or in the
            root, if no directory is specified anywhere in the <tt
            class="sgmltag-element">tocentry</tt> ancestry).</p>

            <p>If a filename is not specified, <tt class=
            "filename">index.html</tt> will be used.</p>

            <p>It is possible to map two different XML documents to
            the same HTML filename. At present, the stylesheets do
            not detect this, but the result will be a broken
            website. Exercise caution.</p>

            <div class="section" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h2 class="title" style="clear: both"><a name=
                    "d0e173"></a>Global Parameters</h2>
                  </div>
                </div>
              </div>

              <p>The layout file can also contain a number of
              global parameters: <tt class=
              "sgmltag-element">config</tt>, <tt class=
              "sgmltag-element">script</tt>, <tt class=
              "sgmltag-element">style</tt>, and <tt class=
              "sgmltag-element">copyright</tt>. For the most part,
              these elements behave as they do on individual pages,
              except that they apply to every page.</p>
            </div>

            <div class="section" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h2 class="title" style="clear: both"><a name=
                    "d0e192"></a>Multiple <tt class=
                    "sgmltag-element">toc</tt>s</h2>
                  </div>
                </div>
              </div>

              <p>If you put multiple <tt class=
              "sgmltag-element">toc</tt> elements in your layout
              file, the result will be completely separate
              navigational hierarchies. Note, however, that the
              restriction that a page can only appear once in a
              website prevents a page from appearing in more than
              one hierarchy.</p>

              <p>Navigation between hierarchies is only possible if
              you insert <a href="linking.html">links between
              pages</a> across hierarchies.</p>
            </div>

            <div class="section" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h2 class="title" style="clear: both"><a name=
                    "d0e211"></a>Standalone Pages</h2>
                  </div>
                </div>
              </div>

              <p>Pages identified with <tt class=
              "sgmltag-element">notoc</tt> elements instead of <tt
              class="sgmltag-element">tocentry</tt>s will be in the
              website but will not appear in any hierarchy. The <a
              href="about.html">about page</a> of this example
              website uses <tt class=
              "sgmltag-element">notoc</tt>.</p>
            </div>

            <div class="section" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h2 class="title" style="clear: both"><a name=
                    "d0e230"></a>&#8220;<span class=
                    "quote">Dummy</span>&#8221; Pages</h2>
                  </div>
                </div>
              </div>

              <p>Sometimes it's useful to have a page in the
              hierarchy in order to make the TOC clearer, without
              actually wanting to construct the page. Consider the
              &#8220;<span class="quote">Building</span>&#8221;
              page in this website. It's really just a hierarchy
              placeholder for the different sorts of building that
              are possible.</p>

              <p>If you click on &#8220;<span class=
              "quote">Building</span>&#8221; in the TOC, you'll
              discover that you don't actually go to that page,
              instead you go to that page's first child.</p>

              <p>This effect is achieved by using the <tt class=
              "sgmltag-attribute">tocskip</tt> attribute on the <tt
              class="sgmltag-element">tocentry</tt> for the
              building page.</p>

              <p>Note, however, that the skipped page must exist
              and it is still possible to link directly to <a href=
              "building.html">the page</a>.</p>
            </div>
            <br>
          </td>
        </tr>

        <tr>
          <td valign="top" align="left" bgcolor="#4080FF" width=
          "220">
            <p class="navtoc"><a href="index.html"><img align=
            "left" border="0" src="graphics/banner.png" alt=
            "Banner"></a><br clear="all">
            <br>
            <span class="toplevel"><img src="graphics/blank.gif"
            alt="&#160;&#160;&#160;"><a href="layout.html" title=
            "Site Navigation Layout Setup"><img src=
            "graphics/navicons/triangle/current/leaf.gif" alt="+"
            border="0"></a><span class="curpage">Site
            Layout&#160;<img src=
            "graphics/navicons/triangle/current/pointer.gif" alt=
            "&lt;-"></span><br>
            </span><span class="toplevel"><img src=
            "graphics/blank.gif" alt="&#160;&#160;&#160;"><a href=
            "linking.html" title="Linking across Pages"><img src=
            "graphics/navicons/triangle/other/leaf.gif" alt=
            "&#160;" border="0"></a><span class="otherpage"><a
            href="linking.html" title=
            "Linking across Pages">Linking</a></span><br>
            </span><span class="toplevel"><img src=
            "graphics/blank.gif" alt="&#160;&#160;&#160;"><a href=
            "custom.html" title=
            "Stylesheet customization instructions"><img src=
            "graphics/navicons/triangle/other/leaf.gif" alt=
            "&#160;" border="0"></a><span class="otherpage"><a
            href="custom.html" title=
            "Stylesheet customization instructions">Customization</a></span><br>

            </span><span class="toplevel"><img src=
            "graphics/blank.gif" alt="&#160;&#160;&#160;"><a href=
            "buildmake.html" title="Building strategies"><img src=
            "graphics/navicons/triangle/other/closed.gif" alt=
            "&#160;" border="0"></a><span class="otherpage"><a
            href="buildmake.html" title=
            "Building strategies">Building</a></span><br>
            </span><span class="toplevel"><img src=
            "graphics/blank.gif" alt="&#160;&#160;&#160;"><a href=
            "formtest.html" title="Form Test Page"><img src=
            "graphics/navicons/triangle/other/leaf.gif" alt=
            "&#160;" border="0"></a><span class="otherpage"><a
            href="formtest.html" title="Form Test Page">Form
            Test</a></span><br>
            </span><span class="toplevel"><img src=
            "graphics/blank.gif" alt="&#160;&#160;&#160;"><a href=
            "test3.html" title="XBEL Bookmark test"><img src=
            "graphics/navicons/triangle/other/leaf.gif" alt=
            "&#160;" border="0"></a><span class="otherpage"><a
            href="test3.html" title="XBEL Bookmark test">XBEL
            Bookmarks</a></span><br>
            </span><span class="toplevel"><img src=
            "graphics/blank.gif" alt="&#160;&#160;&#160;"><a href=
            "rddl.html" title="RDDL"><img src=
            "graphics/navicons/triangle/other/leaf.gif" alt=
            "&#160;" border="0"></a><span class="otherpage"><a
            href="rddl.html" title="RDDL">RDDL</a></span><br>
            </span><span class="toplevel"><img src=
            "graphics/blank.gif" alt="&#160;&#160;&#160;"><a href=
            "php.html" title="PHP"><img src=
            "graphics/navicons/triangle/other/leaf.gif" alt=
            "&#160;" border="0"></a><span class="otherpage"><a
            href="php.html" title="PHP">PHP</a></span><br>
            </span><span class="toplevel"><img src=
            "graphics/blank.gif" alt="&#160;&#160;&#160;"><a href=
            "rss.html"><img src=
            "graphics/navicons/triangle/other/leaf.gif" alt=
            "&#160;" border="0"></a><span class="otherpage"><a
            href="rss.html">RSS</a>&#160;<img src=
            "graphics/navicons/triangle/added.gif" alt=
            "New"></span><br>
            </span><span class="toplevel"><img src=
            "graphics/blank.gif" alt="&#160;&#160;&#160;"><a href=
            "full.html" title="Full Website"><img src=
            "graphics/navicons/triangle/other/leaf.gif" alt=
            "&#160;" border="0"></a><span class="otherpage"><a
            href="full.html" title=
            "Full Website">Website-Full</a>&#160;<img src=
            "graphics/navicons/triangle/added.gif" alt=
            "New"></span><br>
            </span><span class="toplevel"><img src=
            "graphics/blank.gif" alt="&#160;&#160;&#160;"><a href=
            "revflag.html" title="Revision Flags"><img src=
            "graphics/navicons/triangle/other/leaf.gif" alt=
            "&#160;" border="0"></a><span class="otherpage"><a
            href="revflag.html" title="Revision Flags">Revision
            Flags</a></span><br>
            </span><span class="toplevel"><img src=
            "graphics/blank.gif" alt="&#160;&#160;&#160;"><a href=
            "http://nwalsh.com/"><img src=
            "graphics/navicons/triangle/other/leaf.gif" alt=
            "&#160;" border="0"></a><span class="otherpage"><a
            href="http://nwalsh.com/">nwalsh.com</a></span><br>
            </span><br>
            </p>
          </td>
        </tr>
      </table>

      <div class="navfoot">
        <hr>

        <table width="100%" border="0" summary="Footer navigation">
          <tr>
            <td width="33%" align="left"><span class=
            "footdate">$Date: 2003/01/16 15:05:46 $</span></td>

            <td width="34%" align="center"><span class=
            "foothome"><a href="index.html">Home</a></span></td>

            <td width="33%" align="right">&#160;</td>
          </tr>

          <tr>
            <td colspan="3" align="right"><span class=
            "footcopy"><span class="copyright">Copyright  1999,
            2000, 2001 Norman Walsh.</span></span></td>
          </tr>
        </table>
      </div>
    </div>
  </body>
</html>