OSDN Git Service

Initial commit
[wordring-tm/wordring-tm.git] / third_party / tidy-html5-master / build / documentation / quickref.xsl
1 <?xml version="1.0"?>
2 <!--
3     For generating the `quickref.html` web page from output of
4     `tidy -xml-config`
5
6     (c) 2005 (W3C) MIT, ERCIM, Keio University
7     See tidy.h for the copyright notice.
8
9     Written by Charles Reitzel and Jelks Cabaniss
10
11 -->
12
13 <xsl:stylesheet version="1.0"
14                 xmlns="http://www.w3.org/1999/xhtml"
15                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
16
17 <xsl:output method="xml" indent="yes"
18      encoding="us-ascii"
19      omit-xml-declaration="yes"
20      doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
21      doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" />
22
23 <xsl:template match="/">
24   <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
25   <head>
26     <title>HTML Tidy Configuration Options Quick Reference</title>
27         <xsl:call-template name="Stylesheet" />
28   </head>
29
30   <body>
31     <h1 id="top">Quick Reference</h1>
32
33     <h2>HTML Tidy Configuration Options</h2>
34
35     <p>Version: <xsl:value-of select="config/@version" /></p>
36
37     <p><a class="h3" href="#MarkupHeader">HTML, XHTML, XML</a><br />
38      <a class="h3" href="#DiagnosticsHeader">Diagnostics</a><br />
39      <a class="h3" href="#PrettyPrintHeader">Pretty Print</a><br />
40      <a class="h3" href="#EncodingHeader">Character Encoding</a><br />
41      <a class="h3" href="#MiscellaneousHeader">Miscellaneous</a></p>
42
43     <xsl:call-template name="link-section" />
44
45     <xsl:call-template name="detail-section" />
46
47   </body>
48   </html>
49 </xsl:template>
50
51
52 <!-- Named Templates: -->
53
54 <xsl:template name="link-section">
55   <table summary="Tidy Options Quick Reference Header Section" border="0"
56   cellpadding="3" cellspacing="0">
57     <colgroup>
58       <col width="33%" />
59       <col width="33%" />
60       <col width="33%" />
61     </colgroup>
62     <xsl:call-template name="links">
63       <xsl:with-param name="class">markup</xsl:with-param>
64       <xsl:with-param name="header">HTML, XHTML, XML</xsl:with-param>
65       <xsl:with-param name="headerID">MarkupHeader</xsl:with-param>
66     </xsl:call-template>
67     <xsl:call-template name="links">
68       <xsl:with-param name="class">diagnostics</xsl:with-param>
69       <xsl:with-param name="header">Diagnostics</xsl:with-param>
70       <xsl:with-param name="headerID">DiagnosticsHeader</xsl:with-param>
71     </xsl:call-template>
72     <xsl:call-template name="links">
73       <xsl:with-param name="class">print</xsl:with-param>
74       <xsl:with-param name="header">Pretty Print</xsl:with-param>
75       <xsl:with-param name="headerID">PrettyPrintHeader</xsl:with-param>
76     </xsl:call-template>
77     <xsl:call-template name="links">
78       <xsl:with-param name="class">encoding</xsl:with-param>
79       <xsl:with-param name="header">Character Encoding</xsl:with-param>
80       <xsl:with-param name="headerID">EncodingHeader</xsl:with-param>
81     </xsl:call-template>
82     <xsl:call-template name="links">
83       <xsl:with-param name="class">misc</xsl:with-param>
84       <xsl:with-param name="header">Miscellaneous</xsl:with-param>
85       <xsl:with-param name="headerID">MiscellaneousHeader</xsl:with-param>
86     </xsl:call-template>
87   </table>
88 </xsl:template>
89
90
91 <xsl:template name="detail-section">
92   <table summary="Tidy Options Quick Reference Detail Section" border="0"
93     cellpadding="3" cellspacing="0">
94     <xsl:call-template name="reference">
95       <xsl:with-param name="class">markup</xsl:with-param>
96       <xsl:with-param name="header">HTML, XHTML, XML</xsl:with-param>
97       <xsl:with-param name="headerID">MarkupReference</xsl:with-param>
98     </xsl:call-template>
99     <xsl:call-template name="reference">
100       <xsl:with-param name="class">diagnostics</xsl:with-param>
101       <xsl:with-param name="header">Diagnostics</xsl:with-param>
102       <xsl:with-param name="headerID">DiagnosticsReference</xsl:with-param>
103     </xsl:call-template>
104     <xsl:call-template name="reference">
105       <xsl:with-param name="class">print</xsl:with-param>
106       <xsl:with-param name="header">Pretty Print</xsl:with-param>
107       <xsl:with-param name="headerID">PrettyPrintReference</xsl:with-param>
108     </xsl:call-template>
109     <xsl:call-template name="reference">
110       <xsl:with-param name="class">encoding</xsl:with-param>
111       <xsl:with-param name="header">Character Encoding</xsl:with-param>
112       <xsl:with-param name="headerID">EncodingReference</xsl:with-param>
113     </xsl:call-template>
114     <xsl:call-template name="reference">
115       <xsl:with-param name="class">misc</xsl:with-param>
116       <xsl:with-param name="header">Miscellaneous</xsl:with-param>
117       <xsl:with-param name="headerID">MiscellaneousReference</xsl:with-param>
118     </xsl:call-template>
119   </table>
120 </xsl:template>
121
122
123 <xsl:template name="links">
124   <xsl:param name="class"/>
125   <xsl:param name="header"/>
126   <xsl:param name="headerID"/>
127   <tr valign="bottom">
128     <td class="h3" colspan="2" id="{$headerID}">
129       <xsl:value-of select="$header"/> Options</td>
130     <td valign="top"><a href="#top">Top</a></td>
131   </tr>
132   <xsl:call-template name="ClassHeaders" />
133   <xsl:for-each select="/config/option[@class=$class]">
134     <xsl:sort select="name" order="ascending" />
135     <tr>
136       <td><a href="#{name}"><xsl:value-of select="name"/></a></td>
137       <td><xsl:apply-templates select="type"/></td>
138       <td><xsl:choose>
139             <xsl:when test="string-length(default) &gt; 0 ">
140               <xsl:apply-templates select="default" />
141             </xsl:when>
142             <xsl:otherwise>
143               <strong>-</strong>
144             </xsl:otherwise>
145         </xsl:choose>
146       </td>
147     </tr>
148   </xsl:for-each>
149   <tr valign="bottom">
150     <td colspan="3">&#160;</td>
151   </tr>
152 </xsl:template>
153
154
155 <xsl:template name="reference">
156   <xsl:param name="class"/>
157   <xsl:param name="header"/>
158   <xsl:param name="headerID"/>
159
160   <tr>
161     <td>&#160;</td>
162   </tr>
163   <tr valign="bottom">
164     <td valign="top" colspan="2" class="h2" id="{$headerID}">
165        <xsl:value-of select="$header"/> Options Reference
166     </td>
167   </tr>
168   <tr>
169     <td>&#160;</td>
170   </tr>
171
172   <xsl:for-each select="/config/option[@class=$class]">
173     <xsl:sort select="name" order="ascending" />
174     <tr>
175       <td class="tabletitle" valign="top" id="{name}">
176         <xsl:value-of select="name"/>
177       </td>
178       <td class="tabletitlelink" valign="top" align="right">
179       <a href="#top">Top</a></td>
180     </tr>
181     <tr>
182       <td valign="top">Type: <strong><xsl:value-of
183         select="type"/></strong><br />
184
185         <xsl:choose>
186           <xsl:when test="string-length(default) &gt; 0">
187             Default: <strong><xsl:apply-templates select="default" /></strong>
188           </xsl:when>
189           <xsl:otherwise>
190             Default: <strong>-</strong>
191           </xsl:otherwise>
192         </xsl:choose>
193
194         <xsl:choose>
195           <xsl:when test="string-length(example) &gt; 0">
196             <br />Example: <strong><xsl:apply-templates
197                 select="example"/></strong>
198           </xsl:when>
199           <xsl:otherwise>
200             <br />Example: <strong>-</strong>
201           </xsl:otherwise>
202         </xsl:choose>
203       </td>
204       <td align="right" valign="top">
205         <xsl:for-each select="seealso">
206           <a href="#{.}"><xsl:apply-templates select="." /></a>
207           <xsl:if test="position() != last()">
208             <br />
209           </xsl:if>
210         </xsl:for-each>
211       </td>
212     </tr>
213
214     <tr>
215       <td colspan="2"><xsl:apply-templates select="description"/></td>
216     </tr>
217
218     <tr>
219       <td>&#160;</td>
220     </tr>
221   </xsl:for-each>
222 </xsl:template>
223
224 <xsl:template name="ClassHeaders">
225       <tr>
226         <td class="tabletitle">Option</td>
227         <td class="tabletitle">Type</td>
228         <td class="tabletitle">Default</td>
229       </tr>
230 </xsl:template>
231
232 <xsl:template name="Stylesheet">
233         <style type="text/css">
234                 /* 1st Style ignored by Netscape */
235                 td.dummy, font.dummy, .dummy, a:link.dummy, a:visited.dummy, a:active.dummy
236                 {
237                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
238                 font-size: 16pt;
239                 color: #336699;
240                 text-decoration: none;
241                 font-weight: normal
242                 }
243
244                 body
245                 {
246                 margin-left: 10%;
247                 margin-right: 10%;
248                 font-family: sans-serif;
249                 background-color: #FFFFFF
250                 }
251
252                 /* Blue TITLE */
253                 td.title, font.title, .title, a:link.title, a:visited.title, a:active.title
254                 {
255                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
256                 font-size: 16pt;
257                 color: #336699;
258                 text-decoration: none;
259                 font-weight: normal
260                 }
261
262                 /* BODY TEXT */
263                 td.text, font.text, .text, a:link.text, a:visited.text, a:active.text
264                 {
265                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
266                 font-size: 9pt;
267                 color: #000000;
268                 text-decoration: none;
269                 font-weight: normal
270                 }
271
272                 /* BOLD BODY TEXT */
273                 td.textbold, font.textbold, .textbold, a:link.textbold, a:visited.textbold, a:active.textbold
274                 {
275                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
276                 font-size: 9pt;
277                 color: #000000;
278                 text-decoration: none;
279                 font-weight: bold
280                 }
281
282                 /* BOLD BODY TEXT LINK WITH UNDERLINE*/
283                 td.textboldlink, font.textboldlink, .textboldlink, a:link.textboldlink, a:visited.textboldlink, a:active.textboldlink
284                 {
285                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
286                 font-size: 9pt;
287                 color: #000000;
288                 font-weight: bold
289                 }
290
291                 /* SMALL BODY TEXT */
292                 td.smtext, font.smtext, .smtext, a:link.smtext, a:visited.smtext, a:active.smtext
293                 {
294                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
295                 font-size: 8pt;
296                 color: #000000;
297                 text-decoration: none;
298                 font-weight: normal
299                 }
300
301                 /* SMALL BOLD BODY TEXT */
302                 td.smtextbold, font.smtextbold, .smtextbold, a:link.smtextbold, a:visited.smtextbold, a:active.smtextbold
303                 {
304                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
305                 font-size: 8pt;
306                 color: #000000;
307                 text-decoration: none;
308                 font-weight: bold
309                 }
310
311                 /* TITLES
312                 td.title, font.title, .title, a:link.title, a:visited.title, a:active.title
313                 {
314                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
315                 font-size: 12pt;
316                 color: #CC3300;
317                 text-decoration: none;
318                 font-weight: bold
319                 }
320                 */
321
322                 /* SUBTITLES */
323                 td.subtitle, font.subtitle, .subtitle, a:link.subtitle, a:visited.subtitle, a:active.subtitle
324                 {
325                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
326                 font-size: 11pt;
327                 color: #000000;
328                 text-decoration: none;
329                 font-weight: bold
330                 }
331
332                 /* LEGAL TEXT */
333                 td.legal, font.legal, .legal, a:link.legal, a:visited.legal, a:active.legal
334                 {
335                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
336                 font-size: 8pt;
337                 color: #000000;
338                 text-decoration: none;
339                 font-weight: normal
340                 }
341
342                 td.legallink, font.legallink, .legallink, a:link.legallink, a:visited.legallink, a:active.legallink
343                 {
344                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
345                 font-size: 8pt;
346                 color: #CC3300;
347                 font-weight: normal
348                 }
349
350                 /* RED TEXT */
351                 td.textred, font.textred, .textred, a:link.textred, a:visited.textred, a:active.textred
352                 {
353                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
354                 font-size: 10pt;
355                 color: #CC3300;
356                 text-decoration: none;
357                 font-weight: normal
358                 }
359
360                 /* RED TEXT BOLD*/
361                 td.textredbold, font.textredbold, .textredbold, a:link.textredbold, a:visited.textredbold, a:active.textredbold
362                 {
363                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
364                 font-size: 10pt;
365                 color: #CC3300;
366                 text-decoration: none;
367                 font-weight: bold
368                 }
369
370                 /* LINKS */
371                 td.link, font.link, .link, a:link.link, a:visited.link, a:active.link
372                 {
373                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
374                 font-size: 10pt;
375                 color: #3366CC;
376                 font-weight: normal
377                 }
378
379                 td.tabletitlelink, font.tabletitlelink, .tabletitlelink, a:link.tabletitlelink, a:visited.tabletitlelink, a:active.tabletitlelink
380                 {
381                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
382                 font-size: 10pt;
383                 background-color: #e9e9d3;
384                 color: #000000;
385                 }
386
387                 /* TABLE TITLES */
388                 td.tabletitle, font.tabletitle, .tabletitle, a:link.tabletitle, a:visited.tabletitle, a:active.tabletitle
389                 {
390                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
391                 font-size: 10pt;
392                 color: #336699;
393                 background-color: #e9e9d3;
394                 /* text-decoration: none; */
395                 font-weight: bold
396                 }
397
398                 /* TABLE CELL */
399                 td.cell, tr.cell, font.cell, .cell, a:link.cell, a:visited.cell, a:active.cell
400                 {
401                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
402                 font-size: 12pt;
403                 color: #000000;
404                 font-weight: normal;
405                 /* background-color: #e9e9d3 */
406                 background-color: #f5f5f5
407                 }
408
409                 /* SHADED TABLE CELL */
410                 td.shaded, tr.shaded, font.shaded, .shaded, a:link.shaded, a:visited.shaded, a:active.shaded
411                 {
412                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
413                 font-size: 12pt;
414                 color: #000000;
415                 font-weight: normal;
416                 background-color: #f5f5f5
417                 }
418
419                 /* GLOSSARY TERM */
420                 td.term, font.term, .term, a:link.term, a:visited.term, a:active.term
421                 {
422                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
423                 font-size: 10pt;
424                 font-style: normal;
425                 color: #000000;
426                 text-decoration: none;
427                 font-weight: normal
428                 }
429
430                 /* ELEMENT TAGS */
431                 ul
432                 {
433                 font-family: Arial, Helvetica, sans-serif;
434                 font-size: 10pt;
435                 font-style: normal;
436                 font-weight: normal
437                 }
438                 li
439                 {
440                 font-family: Arial, Helvetica, sans-serif;
441                 font-size: 10pt;
442                 font-style: normal;
443                 font-weight: normal
444                 }
445
446                 a:link.h1, a:visited.h1, .h1
447                 {
448                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
449                 font-size: 12pt;
450                 color: #0066CC
451                 }
452                 a:active.h1
453                 {
454                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
455                 font-size: 12pt;
456                 font-weight: bold;
457                 color: #0066CC
458                 }
459                 h1
460                 {
461                 margin-left: -8%;
462                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
463                 font-size: 12pt;
464                 color: #0066CC
465                 }
466
467                 .h2
468                 {
469                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
470                 font-size: 11pt;
471                 /* font-weight: bold; */
472                 color: #000000
473                 }
474
475                 h2
476                 {
477                 margin-left: -4%;
478                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
479                 font-size: 11pt;
480                 /* font-weight: bold; */
481                 color: #000000
482                 }
483
484                 A:link.h3, A:visited.h3, .h3
485                 {  font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
486                 font-size: 10pt;
487                 color: #000000;
488                 font-weight: bold
489                 }
490
491                 A:active.h3
492                 {
493                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
494                 font-size: 10pt;
495                 color: #000000;
496                 font-weight: bold
497                 }
498
499                 h3
500                 {
501                 margin-left: -4%;
502                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
503                 font-size: 10pt;
504                 font-weight: bold;
505                 color: #000000
506                 }
507
508                 h4
509                 {
510                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
511                 font-size: 9pt;
512                 font-weight: bold;
513                 color: #000000
514                 }
515
516                 .code, A:active.code, A:link.code, A:visited.code
517                 {
518                 font-family: "Courier New", Courier, monospace;
519                 }
520
521                 .abstract
522                 {
523                         font-style : italic;
524                 }
525
526                 p
527                 {
528                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
529                 font-size: 10pt;
530                 font-style: normal
531                 }
532
533                 td
534                 {
535                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
536                 font-size: 10pt;
537                 font-style: normal
538                 }
539
540                 /* LINKS */
541                 a:link, a:active
542                 {
543                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
544                 font-size: 10pt;
545                 color: #3366CC;
546                 font-weight: normal
547                 }
548
549                 a:visited
550                 {
551                 font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
552                 font-size: 10pt;
553                 color: #333366;
554                 font-weight: normal
555                 }
556
557                 code {
558                   /* use browser/user default for `font-family` */
559                   font-weight: bold;
560                   color: brown;
561                   background: transparent;
562                 }
563         </style>
564 </xsl:template>
565
566
567 <!-- Regular Templates: -->
568 <xsl:template match="a | code | em | strong | br">
569     <xsl:element name="{local-name(.)}">
570         <xsl:copy-of select="@* | node()" />
571     </xsl:element>
572 </xsl:template>
573
574 </xsl:stylesheet>