source: ZMS/trunk/import/default_win32.filter.xml @ 1496

Revision 1496, 158.7 KB checked in by fhoffmann, 13 months ago (diff)

fixed typo

Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<list>
3<item type="dictionary"><dictionary>
4<item key="type"><![CDATA[filter]]></item>
5<item key="value" type="dictionary"><dictionary>
6<item key="acquired" type="int">0</item>
7<item key="content_type"><![CDATA[application/x-excel]]></item>
8<item key="description"/>
9<item key="format"><![CDATA[XML]]></item>
10<item key="id"><![CDATA[excel2ZMSRecordSetExport]]></item>
11<item key="meta_types" type="list"><list>
12</list>
13</item>
14<item key="name"><![CDATA[Excel Recordset-Export]]></item>
15<item key="processes" type="list"><list>
16<item type="dictionary"><dictionary>
17<item key="file" type="file">
18<data content_type="text/xml" filename="ZMSRecordSet2Excel.xsl" type="file"><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>
19<xsl:stylesheet version="1.0"
20        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
21        xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
22        xmlns:spreadsheet="urn:schemas-microsoft-com:office:spreadsheet">
23<xsl:output method="xml" encoding="ISO-8859-1"/>
24        <xsl:template match="/">
25                <Workbook
26                                xmlns="urn:schemas-microsoft-com:office:spreadsheet"
27                                xmlns:o="urn:schemas-microsoft-com:office:office"
28                                xmlns:x="urn:schemas-microsoft-com:office:excel"
29                                xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
30                                xmlns:html="http://www.w3.org/TR/REC-html40">
31                        <Styles>
32                                <Style ss:ID="head">
33                                        <Font ss:Bold="1"/>
34                                        <Interior ss:Color="#CCCCCC" ss:Pattern="Solid"/>
35                                </Style>
36                        </Styles>
37                        <Worksheet ss:Name="ZMSRecordSet">
38                                <Table>
39                                        <xsl:for-each select="ZMSCustom/records/list/item/dictionary">
40                                                <xsl:if test="position()=1">
41                                                        <Row>
42                                                                <xsl:for-each select="item">
43                                                                        <Cell ss:StyleID="head"><Data ss:Type="String"><xsl:value-of select="@key"/></Data></Cell>
44                                                                </xsl:for-each>
45                                                        </Row>
46                                                </xsl:if>
47                                                <Row>
48                                                        <xsl:for-each select="item">
49                                                                <Cell><Data ss:Type="String"><xsl:value-of select="."/></Data></Cell>
50                                                        </xsl:for-each>
51                                                </Row>
52                                        </xsl:for-each>
53                                </Table>
54                        </Worksheet>
55                </Workbook>
56        </xsl:template>
57</xsl:stylesheet>
58
59]]></data></item>
60<item key="id"><![CDATA[xslt]]></item>
61</dictionary>
62</item>
63</list>
64</item>
65<item key="roles" type="list"><list>
66</list>
67</item>
68</dictionary>
69</item>
70</dictionary>
71</item>
72<item type="dictionary"><dictionary>
73<item key="type"><![CDATA[filter]]></item>
74<item key="value" type="dictionary"><dictionary>
75<item key="acquired" type="int">0</item>
76<item key="content_type"><![CDATA[text/xml]]></item>
77<item key="description"/>
78<item key="format"><![CDATA[import]]></item>
79<item key="id"><![CDATA[excel2ZMSRecordSetImport]]></item>
80<item key="meta_types" type="list"><list>
81</list>
82</item>
83<item key="name"><![CDATA[Excel Recordset-Import]]></item>
84<item key="processes" type="list"><list>
85<item type="dictionary"><dictionary>
86<item key="file"/>
87<item key="id"><![CDATA[excel2ZMSRecordSet]]></item>
88</dictionary>
89</item>
90<item type="dictionary"><dictionary>
91<item key="file"/>
92<item key="id"><![CDATA[xslt_trans_xsl]]></item>
93</dictionary>
94</item>
95</list>
96</item>
97<item key="roles" type="list"><list>
98<item><![CDATA[ZMSAuthor]]></item>
99<item><![CDATA[ZMSEditor]]></item>
100</list>
101</item>
102</dictionary>
103</item>
104</dictionary>
105</item>
106<item type="dictionary"><dictionary>
107<item key="type"><![CDATA[filter]]></item>
108<item key="value" type="dictionary"><dictionary>
109<item key="acquired" type="int">0</item>
110<item key="content_type"><![CDATA[text/html; charset=utf-8]]></item>
111<item key="description"/>
112<item key="format"><![CDATA[XHTML]]></item>
113<item key="id"><![CDATA[xhtmlExport]]></item>
114<item key="meta_types" type="list"><list>
115<item><![CDATA[ZMSDocument]]></item>
116<item><![CDATA[ZMSFolder]]></item>
117<item><![CDATA[ZMS]]></item>
118</list>
119</item>
120<item key="name"><![CDATA[HTML-Printversion]]></item>
121<item key="processes" type="list"><list>
122<item type="dictionary"><dictionary>
123<item key="file" type="file">
124<data content_type="text/plain" filename="tidy.zms2html.conf" type="file"><![CDATA[add-xml-decl: no
125doctype: omit
126enclose-block-text: yes
127enclose-text: yes
128input-encoding: utf8
129output-encoding: utf8
130
131]]></data></item>
132<item key="id"><![CDATA[tidy]]></item>
133</dictionary>
134</item>
135</list>
136</item>
137<item key="roles" type="list"><list>
138<item><![CDATA[ZMSEditor]]></item>
139<item><![CDATA[ZMSAuthor]]></item>
140<item><![CDATA[ZMSAdministrator]]></item>
141</list>
142</item>
143</dictionary>
144</item>
145</dictionary>
146</item>
147<item type="dictionary"><dictionary>
148<item key="type"><![CDATA[filter]]></item>
149<item key="value" type="dictionary"><dictionary>
150<item key="acquired" type="int">0</item>
151<item key="content_type"><![CDATA[application/sxw]]></item>
152<item key="description"/>
153<item key="format"><![CDATA[XML]]></item>
154<item key="id"><![CDATA[docbkExport]]></item>
155<item key="meta_types" type="list"><list>
156<item><![CDATA[ZMSDocument]]></item>
157<item><![CDATA[ZMSFolder]]></item>
158<item><![CDATA[ZMS]]></item>
159</list>
160</item>
161<item key="name"><![CDATA[OpenOffice (DocBook)]]></item>
162<item key="processes" type="list"><list>
163<item type="dictionary"><dictionary>
164<item key="file" type="file">
165<data content_type="text/xml" filename="zms2docbk.xsl" type="file"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
166
167<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
168                version="1.0">
169  <xsl:output
170    method="xml"
171    doctype-public="-//OASIS//DTD DocBook XML V4.2//EN"
172    doctype-system="http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
173    indent="yes"
174    />
175
176
177<!-- ###################################################################### -->
178<!-- ### ZMS                                                                -->
179<!-- ###################################################################### -->
180<xsl:template match="/">
181  <article>
182    <xsl:apply-templates select="ZMS|ZMSFolder|ZMSDocument"/>
183  </article>
184</xsl:template>
185
186
187<!-- ###################################################################### -->
188<!-- ### ZMSContainerObject                                                 -->
189<!-- ###################################################################### -->
190<xsl:template match="ZMS|ZMSFolder|ZMSDocument">
191
192  <!-- Display this node -->
193  <title><xsl:for-each select="title/lang"><xsl:apply-templates /></xsl:for-each></title>
194  <!-- Process child-nodes -->
195  <xsl:apply-templates select="ZMSTextarea[1]"/>
196  <xsl:for-each select="ZMSFolder|ZMSDocument">
197    <section>
198      <xsl:apply-templates select="."/>
199    </section>
200  </xsl:for-each>
201
202</xsl:template>
203
204
205<!-- ###################################################################### -->
206<!-- ### ZMSTextarea: Sections                                              -->
207<!-- ###################################################################### -->
208<xsl:template match="ZMSTextarea[substring(format,1,9)='headline_']">
209
210  <!-- Level of this node (passed as parameter!) -->
211  <xsl:param name="seq_level" select="2"/>
212 
213  <!-- Display this node -->
214  <section>
215    <title><xsl:for-each select="text/lang"><xsl:apply-templates /></xsl:for-each></title>
216    <!-- Process child-nodes -->
217    <xsl:apply-templates select="following-sibling::ZMSTextarea[substring(format,1,8)!='headline' or (substring(format,1,9)='headline_' and number(substring(format,10,1)) &gt; $seq_level+1)][1]">
218      <xsl:with-param name="seq_level" select="$seq_level+1" />
219    </xsl:apply-templates>
220  </section>
221 
222  <!-- Process following-sibling -->
223  <xsl:apply-templates select="following-sibling::ZMSTextarea[substring(format,1,9)='headline_' and number(substring(format,10,1)) = $seq_level][1]">
224    <xsl:with-param name="seq_level" select="number(substring(format,10,1))" />
225  </xsl:apply-templates>
226 
227</xsl:template>
228
229
230<!-- ###################################################################### -->
231<!-- ### ZMSTextarea: Paragraphs                                            -->
232<!-- ###################################################################### -->
233<xsl:template match="ZMSTextarea[substring(format,1,9)!='headline_']">
234 
235  <!-- Level of this node (passed as parameter!) -->
236  <xsl:param name="seq_level" select="2"/>
237 
238  <!-- Display this node -->
239  <xsl:choose>
240    <xsl:when test="format='body'">
241      <para><xsl:for-each select="text/lang"><xsl:apply-templates /></xsl:for-each></para>
242    </xsl:when>
243    <xsl:when test="format='unordered_list'">
244      <itemizedlist>
245        <xsl:call-template name="ListToRows">
246          <xsl:with-param name="StringToTransform">
247            <xsl:for-each select="text/lang"><xsl:apply-templates /></xsl:for-each>
248          </xsl:with-param>
249        </xsl:call-template>
250      </itemizedlist>
251    </xsl:when>
252  </xsl:choose>
253 
254  <!-- Process following-sibling -->
255  <xsl:for-each select="following-sibling::ZMSTextarea[1]">
256    <xsl:if test="substring(format,1,8)!='headline' or format=concat('headline_',$seq_level)">
257      <xsl:apply-templates select=".">
258        <xsl:with-param name="seq_level" select="$seq_level"/>
259      </xsl:apply-templates>
260    </xsl:if>
261  </xsl:for-each>
262 
263</xsl:template>
264
265
266<!-- ###################################################################### -->
267<!-- ### Other                                                              -->
268<!-- ###################################################################### -->
269<xsl:template match="*"/>
270
271
272<!-- ###################################################################### -->
273<!-- ### List to rows                                                       -->
274<!-- ###################################################################### -->
275<xsl:template name ="ListToRows" >
276 
277  <!-- String to transform -->
278  <xsl:param name="StringToTransform" select ="''" />
279 
280  <xsl:choose>
281    <xsl:when test ="contains($StringToTransform,'&#xa;')" >
282      <!-- string contains &#xa;-->
283      <listitem><para><xsl:value-of select ="substring-before($StringToTransform,'&#xa;')" disable-output-escaping="yes"/></para></listitem>
284      <!-- Get everything up to the first &#xa; -->
285      <xsl:call-template name ="ListToRows" >
286        <!-- repeat for the remainder of the original string -->
287        <xsl:with-param name ="StringToTransform" >
288          <xsl:value-of select ="substring-after($StringToTransform,'&#xa;')" disable-output-escaping="yes" />
289        </xsl:with-param>
290      </xsl:call-template>
291    </xsl:when>
292    <xsl:otherwise >
293      <listitem><para><xsl:value-of select ="$StringToTransform"  disable-output-escaping="yes"/></para></listitem>
294    </xsl:otherwise >
295  </xsl:choose>
296 
297</xsl:template>
298
299
300</xsl:stylesheet>
301]]></data></item>
302<item key="id"><![CDATA[xslt]]></item>
303</dictionary>
304</item>
305</list>
306</item>
307<item key="roles" type="list"><list>
308<item><![CDATA[ZMSAdministrator]]></item>
309<item><![CDATA[ZMSAuthor]]></item>
310<item><![CDATA[ZMSEditor]]></item>
311</list>
312</item>
313</dictionary>
314</item>
315</dictionary>
316</item>
317<item type="dictionary"><dictionary>
318<item key="type"><![CDATA[filter]]></item>
319<item key="value" type="dictionary"><dictionary>
320<item key="acquired" type="int">0</item>
321<item key="content_type"><![CDATA[application/pdf]]></item>
322<item key="description"/>
323<item key="format"><![CDATA[XHTML]]></item>
324<item key="id"><![CDATA[pdfExport]]></item>
325<item key="meta_types" type="list"><list>
326<item><![CDATA[ZMSDocument]]></item>
327<item><![CDATA[ZMSFolder]]></item>
328<item><![CDATA[ZMS]]></item>
329</list>
330</item>
331<item key="name"><![CDATA[PDF-Printversion]]></item>
332<item key="processes" type="list"><list>
333<item type="dictionary"><dictionary>
334<item key="file" type="file">
335<data content_type="text/plain" filename="tidy.zms2html.conf" type="file"><![CDATA[add-xml-decl: yes
336doctype: omit
337enclose-block-text: yes
338enclose-text: yes
339input-encoding: utf8
340output-encoding: utf8
341
342]]></data></item>
343<item key="id"><![CDATA[tidy]]></item>
344</dictionary>
345</item>
346<item type="dictionary"><dictionary>
347<item key="file" type="file">
348<data content_type="text/xml" filename="xhtml1-transitional.dtd" type="file"><![CDATA[<!--
349   Extensible HTML version 1.0 Transitional DTD
350
351   This is the same as HTML 4 Transitional except for
352   changes due to the differences between XML and SGML.
353
354   Namespace = http://www.w3.org/1999/xhtml
355
356   For further information, see: http://www.w3.org/TR/xhtml1
357
358   Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),
359   All Rights Reserved.
360
361   This DTD module is identified by the PUBLIC and SYSTEM identifiers:
362
363   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
364   SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
365
366   $Revision: 1.2 $
367   $Date: 2002/08/01 18:37:55 $
368
369-->
370
371<!--================ Character mnemonic entities =========================-->
372
373<!ENTITY % HTMLlat1 PUBLIC
374   "-//W3C//ENTITIES Latin 1 for XHTML//EN"
375   "xhtml-lat1.ent">
376%HTMLlat1;
377
378<!ENTITY % HTMLsymbol PUBLIC
379   "-//W3C//ENTITIES Symbols for XHTML//EN"
380   "xhtml-symbol.ent">
381%HTMLsymbol;
382
383<!ENTITY % HTMLspecial PUBLIC
384   "-//W3C//ENTITIES Special for XHTML//EN"
385   "xhtml-special.ent">
386%HTMLspecial;
387
388<!--================== Imported Names ====================================-->
389
390<!ENTITY % ContentType "CDATA">
391    <!-- media type, as per [RFC2045] -->
392
393<!ENTITY % ContentTypes "CDATA">
394    <!-- comma-separated list of media types, as per [RFC2045] -->
395
396<!ENTITY % Charset "CDATA">
397    <!-- a character encoding, as per [RFC2045] -->
398
399<!ENTITY % Charsets "CDATA">
400    <!-- a space separated list of character encodings, as per [RFC2045] -->
401
402<!ENTITY % LanguageCode "NMTOKEN">
403    <!-- a language code, as per [RFC3066] -->
404
405<!ENTITY % Character "CDATA">
406    <!-- a single character, as per section 2.2 of [XML] -->
407
408<!ENTITY % Number "CDATA">
409    <!-- one or more digits -->
410
411<!ENTITY % LinkTypes "CDATA">
412    <!-- space-separated list of link types -->
413
414<!ENTITY % MediaDesc "CDATA">
415    <!-- single or comma-separated list of media descriptors -->
416
417<!ENTITY % URI "CDATA">
418    <!-- a Uniform Resource Identifier, see [RFC2396] -->
419
420<!ENTITY % UriList "CDATA">
421    <!-- a space separated list of Uniform Resource Identifiers -->
422
423<!ENTITY % Datetime "CDATA">
424    <!-- date and time information. ISO date format -->
425
426<!ENTITY % Script "CDATA">
427    <!-- script expression -->
428
429<!ENTITY % StyleSheet "CDATA">
430    <!-- style sheet data -->
431
432<!ENTITY % Text "CDATA">
433    <!-- used for titles etc. -->
434
435<!ENTITY % FrameTarget "NMTOKEN">
436    <!-- render in this frame -->
437
438<!ENTITY % Length "CDATA">
439    <!-- nn for pixels or nn% for percentage length -->
440
441<!ENTITY % MultiLength "CDATA">
442    <!-- pixel, percentage, or relative -->
443
444<!ENTITY % Pixels "CDATA">
445    <!-- integer representing length in pixels -->
446
447<!-- these are used for image maps -->
448
449<!ENTITY % Shape "(rect|circle|poly|default)">
450
451<!ENTITY % Coords "CDATA">
452    <!-- comma separated list of lengths -->
453
454<!-- used for object, applet, img, input and iframe -->
455<!ENTITY % ImgAlign "(top|middle|bottom|left|right)">
456
457<!-- a color using sRGB: #RRGGBB as Hex values -->
458<!ENTITY % Color "CDATA">
459
460<!-- There are also 16 widely known color names with their sRGB values:
461
462    Black  = #000000    Green  = #008000
463    Silver = #C0C0C0    Lime   = #00FF00
464    Gray   = #808080    Olive  = #808000
465    White  = #FFFFFF    Yellow = #FFFF00
466    Maroon = #800000    Navy   = #000080
467    Red    = #FF0000    Blue   = #0000FF
468    Purple = #800080    Teal   = #008080
469    Fuchsia= #FF00FF    Aqua   = #00FFFF
470-->
471
472<!--=================== Generic Attributes ===============================-->
473
474<!-- core attributes common to most elements
475  id       document-wide unique id
476  class    space separated list of classes
477  style    associated style info
478  title    advisory title/amplification
479-->
480<!ENTITY % coreattrs
481 "id          ID             #IMPLIED
482  class       CDATA          #IMPLIED
483  style       %StyleSheet;   #IMPLIED
484  title       %Text;         #IMPLIED"
485  >
486
487<!-- internationalization attributes
488  lang        language code (backwards compatible)
489  xml:lang    language code (as per XML 1.0 spec)
490  dir         direction for weak/neutral text
491-->
492<!ENTITY % i18n
493 "lang        %LanguageCode; #IMPLIED
494  xml:lang    %LanguageCode; #IMPLIED
495  dir         (ltr|rtl)      #IMPLIED"
496  >
497
498<!-- attributes for common UI events
499  onclick     a pointer button was clicked
500  ondblclick  a pointer button was double clicked
501  onmousedown a pointer button was pressed down
502  onmouseup   a pointer button was released
503  onmousemove a pointer was moved onto the element
504  onmouseout  a pointer was moved away from the element
505  onkeypress  a key was pressed and released
506  onkeydown   a key was pressed down
507  onkeyup     a key was released
508-->
509<!ENTITY % events
510 "onclick     %Script;       #IMPLIED
511  ondblclick  %Script;       #IMPLIED
512  onmousedown %Script;       #IMPLIED
513  onmouseup   %Script;       #IMPLIED
514  onmouseover %Script;       #IMPLIED
515  onmousemove %Script;       #IMPLIED
516  onmouseout  %Script;       #IMPLIED
517  onkeypress  %Script;       #IMPLIED
518  onkeydown   %Script;       #IMPLIED
519  onkeyup     %Script;       #IMPLIED"
520  >
521
522<!-- attributes for elements that can get the focus
523  accesskey   accessibility key character
524  tabindex    position in tabbing order
525  onfocus     the element got the focus
526  onblur      the element lost the focus
527-->
528<!ENTITY % focus
529 "accesskey   %Character;    #IMPLIED
530  tabindex    %Number;       #IMPLIED
531  onfocus     %Script;       #IMPLIED
532  onblur      %Script;       #IMPLIED"
533  >
534
535<!ENTITY % attrs "%coreattrs; %i18n; %events;">
536
537<!-- text alignment for p, div, h1-h6. The default is
538     align="left" for ltr headings, "right" for rtl -->
539
540<!ENTITY % TextAlign "align (left|center|right|justify) #IMPLIED">
541
542<!--=================== Text Elements ====================================-->
543
544<!ENTITY % special.extra
545   "object | applet | img | map | iframe">
546       
547<!ENTITY % special.basic
548        "br | span | bdo">
549
550<!ENTITY % special
551   "%special.basic; | %special.extra;">
552
553<!ENTITY % fontstyle.extra "big | small | font | basefont">
554
555<!ENTITY % fontstyle.basic "tt | i | b | u
556                      | s | strike ">
557
558<!ENTITY % fontstyle "%fontstyle.basic; | %fontstyle.extra;">
559
560<!ENTITY % phrase.extra "sub | sup">
561<!ENTITY % phrase.basic "em | strong | dfn | code | q |
562                   samp | kbd | var | cite | abbr | acronym">
563
564<!ENTITY % phrase "%phrase.basic; | %phrase.extra;">
565
566<!ENTITY % inline.forms "input | select | textarea | label | button">
567
568<!-- these can occur at block or inline level -->
569<!ENTITY % misc.inline "ins | del | script">
570
571<!-- these can only occur at block level -->
572<!ENTITY % misc "noscript | %misc.inline;">
573
574<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
575
576<!-- %Inline; covers inline or "text-level" elements -->
577<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">
578
579<!--================== Block level elements ==============================-->
580
581<!ENTITY % heading "h1|h2|h3|h4|h5|h6">
582<!ENTITY % lists "ul | ol | dl | menu | dir">
583<!ENTITY % blocktext "pre | hr | blockquote | address | center | noframes">
584
585<!ENTITY % block
586    "p | %heading; | div | %lists; | %blocktext; | isindex |fieldset | table">
587
588<!-- %Flow; mixes block and inline and is used for list items etc. -->
589<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">
590
591<!--================== Content models for exclusions =====================-->
592
593<!-- a elements use %Inline; excluding a -->
594
595<!ENTITY % a.content
596   "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*">
597
598<!-- pre uses %Inline excluding img, object, applet, big, small,
599     font, or basefont -->
600
601<!ENTITY % pre.content
602   "(#PCDATA | a | %special.basic; | %fontstyle.basic; | %phrase.basic; |
603           %inline.forms; | %misc.inline;)*">
604
605<!-- form uses %Flow; excluding form -->
606
607<!ENTITY % form.content "(#PCDATA | %block; | %inline; | %misc;)*">
608
609<!-- button uses %Flow; but excludes a, form, form controls, iframe -->
610
611<!ENTITY % button.content
612   "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |
613      table | br | span | bdo | object | applet | img | map |
614      %fontstyle; | %phrase; | %misc;)*">
615
616<!--================ Document Structure ==================================-->
617
618<!-- the namespace URI designates the document profile -->
619
620<!ELEMENT html (head, body)>
621<!ATTLIST html
622  %i18n;
623  id          ID             #IMPLIED
624  xmlns       %URI;          #FIXED 'http://www.w3.org/1999/xhtml'
625  >
626
627<!--================ Document Head =======================================-->
628
629<!ENTITY % head.misc "(script|style|meta|link|object|isindex)*">
630
631<!-- content model is %head.misc; combined with a single
632     title and an optional base element in any order -->
633
634<!ELEMENT head (%head.misc;,
635     ((title, %head.misc;, (base, %head.misc;)?) |
636      (base, %head.misc;, (title, %head.misc;))))>
637
638<!ATTLIST head
639  %i18n;
640  id          ID             #IMPLIED
641  profile     %URI;          #IMPLIED
642  >
643
644<!-- The title element is not considered part of the flow of text.
645       It should be displayed, for example as the page header or
646       window title. Exactly one title is required per document.
647    -->
648<!ELEMENT title (#PCDATA)>
649<!ATTLIST title
650  %i18n;
651  id          ID             #IMPLIED
652  >
653
654<!-- document base URI -->
655
656<!ELEMENT base EMPTY>
657<!ATTLIST base
658  id          ID             #IMPLIED
659  href        %URI;          #IMPLIED
660  target      %FrameTarget;  #IMPLIED
661  >
662
663<!-- generic metainformation -->
664<!ELEMENT meta EMPTY>
665<!ATTLIST meta
666  %i18n;
667  id          ID             #IMPLIED
668  http-equiv  CDATA          #IMPLIED
669  name        CDATA          #IMPLIED
670  content     CDATA          #REQUIRED
671  scheme      CDATA          #IMPLIED
672  >
673
674<!--
675  Relationship values can be used in principle:
676
677   a) for document specific toolbars/menus when used
678      with the link element in document head e.g.
679        start, contents, previous, next, index, end, help
680   b) to link to a separate style sheet (rel="stylesheet")
681   c) to make a link to a script (rel="script")
682   d) by stylesheets to control how collections of
683      html nodes are rendered into printed documents
684   e) to make a link to a printable version of this document
685      e.g. a PostScript or PDF version (rel="alternate" media="print")
686-->
687
688<!ELEMENT link EMPTY>
689<!ATTLIST link
690  %attrs;
691  charset     %Charset;      #IMPLIED
692  href        %URI;          #IMPLIED
693  hreflang    %LanguageCode; #IMPLIED
694  type        %ContentType;  #IMPLIED
695  rel         %LinkTypes;    #IMPLIED
696  rev         %LinkTypes;    #IMPLIED
697  media       %MediaDesc;    #IMPLIED
698  target      %FrameTarget;  #IMPLIED
699  >
700
701<!-- style info, which may include CDATA sections -->
702<!ELEMENT style (#PCDATA)>
703<!ATTLIST style
704  %i18n;
705  id          ID             #IMPLIED
706  type        %ContentType;  #REQUIRED
707  media       %MediaDesc;    #IMPLIED
708  title       %Text;         #IMPLIED
709  xml:space   (preserve)     #FIXED 'preserve'
710  >
711
712<!-- script statements, which may include CDATA sections -->
713<!ELEMENT script (#PCDATA)>
714<!ATTLIST script
715  id          ID             #IMPLIED
716  charset     %Charset;      #IMPLIED
717  type        %ContentType;  #REQUIRED
718  language    CDATA          #IMPLIED
719  src         %URI;          #IMPLIED
720  defer       (defer)        #IMPLIED
721  xml:space   (preserve)     #FIXED 'preserve'
722  >
723
724<!-- alternate content container for non script-based rendering -->
725
726<!ELEMENT noscript %Flow;>
727<!ATTLIST noscript
728  %attrs;
729  >
730
731<!--======================= Frames =======================================-->
732
733<!-- inline subwindow -->
734
735<!ELEMENT iframe %Flow;>
736<!ATTLIST iframe
737  %coreattrs;
738  longdesc    %URI;          #IMPLIED
739  name        NMTOKEN        #IMPLIED
740  src         %URI;          #IMPLIED
741  frameborder (1|0)          "1"
742  marginwidth %Pixels;       #IMPLIED
743  marginheight %Pixels;      #IMPLIED
744  scrolling   (yes|no|auto)  "auto"
745  align       %ImgAlign;     #IMPLIED
746  height      %Length;       #IMPLIED
747  width       %Length;       #IMPLIED
748  >
749
750<!-- alternate content container for non frame-based rendering -->
751
752<!ELEMENT noframes %Flow;>
753<!ATTLIST noframes
754  %attrs;
755  >
756
757<!--=================== Document Body ====================================-->
758
759<!ELEMENT body %Flow;>
760<!ATTLIST body
761  %attrs;
762  onload      %Script;       #IMPLIED
763  onunload    %Script;       #IMPLIED
764  background  %URI;          #IMPLIED
765  bgcolor     %Color;        #IMPLIED
766  text        %Color;        #IMPLIED
767  link        %Color;        #IMPLIED
768  vlink       %Color;        #IMPLIED
769  alink       %Color;        #IMPLIED
770  >
771
772<!ELEMENT div %Flow;>  <!-- generic language/style container -->
773<!ATTLIST div
774  %attrs;
775  %TextAlign;
776  >
777
778<!--=================== Paragraphs =======================================-->
779
780<!ELEMENT p %Inline;>
781<!ATTLIST p
782  %attrs;
783  %TextAlign;
784  >
785
786<!--=================== Headings =========================================-->
787
788<!--
789  There are six levels of headings from h1 (the most important)
790  to h6 (the least important).
791-->
792
793<!ELEMENT h1  %Inline;>
794<!ATTLIST h1
795  %attrs;
796  %TextAlign;
797  >
798
799<!ELEMENT h2 %Inline;>
800<!ATTLIST h2
801  %attrs;
802  %TextAlign;
803  >
804
805<!ELEMENT h3 %Inline;>
806<!ATTLIST h3
807  %attrs;
808  %TextAlign;
809  >
810
811<!ELEMENT h4 %Inline;>
812<!ATTLIST h4
813  %attrs;
814  %TextAlign;
815  >
816
817<!ELEMENT h5 %Inline;>
818<!ATTLIST h5
819  %attrs;
820  %TextAlign;
821  >
822
823<!ELEMENT h6 %Inline;>
824<!ATTLIST h6
825  %attrs;
826  %TextAlign;
827  >
828
829<!--=================== Lists ============================================-->
830
831<!-- Unordered list bullet styles -->
832
833<!ENTITY % ULStyle "(disc|square|circle)">
834
835<!-- Unordered list -->
836
837<!ELEMENT ul (li)+>
838<!ATTLIST ul
839  %attrs;
840  type        %ULStyle;     #IMPLIED
841  compact     (compact)     #IMPLIED
842  >
843
844<!-- Ordered list numbering style
845
846    1   arabic numbers      1, 2, 3, ...
847    a   lower alpha         a, b, c, ...
848    A   upper alpha         A, B, C, ...
849    i   lower roman         i, ii, iii, ...
850    I   upper roman         I, II, III, ...
851
852    The style is applied to the sequence number which by default
853    is reset to 1 for the first list item in an ordered list.
854-->
855<!ENTITY % OLStyle "CDATA">
856
857<!-- Ordered (numbered) list -->
858
859<!ELEMENT ol (li)+>
860<!ATTLIST ol
861  %attrs;
862  type        %OLStyle;      #IMPLIED
863  compact     (compact)      #IMPLIED
864  start       %Number;       #IMPLIED
865  >
866
867<!-- single column list (DEPRECATED) -->
868<!ELEMENT menu (li)+>
869<!ATTLIST menu
870  %attrs;
871  compact     (compact)     #IMPLIED
872  >
873
874<!-- multiple column list (DEPRECATED) -->
875<!ELEMENT dir (li)+>
876<!ATTLIST dir
877  %attrs;
878  compact     (compact)     #IMPLIED
879  >
880
881<!-- LIStyle is constrained to: "(%ULStyle;|%OLStyle;)" -->
882<!ENTITY % LIStyle "CDATA">
883
884<!-- list item -->
885
886<!ELEMENT li %Flow;>
887<!ATTLIST li
888  %attrs;
889  type        %LIStyle;      #IMPLIED
890  value       %Number;       #IMPLIED
891  >
892
893<!-- definition lists - dt for term, dd for its definition -->
894
895<!ELEMENT dl (dt|dd)+>
896<!ATTLIST dl
897  %attrs;
898  compact     (compact)      #IMPLIED
899  >
900
901<!ELEMENT dt %Inline;>
902<!ATTLIST dt
903  %attrs;
904  >
905
906<!ELEMENT dd %Flow;>
907<!ATTLIST dd
908  %attrs;
909  >
910
911<!--=================== Address ==========================================-->
912
913<!-- information on author -->
914
915<!ELEMENT address (#PCDATA | %inline; | %misc.inline; | p)*>
916<!ATTLIST address
917  %attrs;
918  >
919
920<!--=================== Horizontal Rule ==================================-->
921
922<!ELEMENT hr EMPTY>
923<!ATTLIST hr
924  %attrs;
925  align       (left|center|right) #IMPLIED
926  noshade     (noshade)      #IMPLIED
927  size        %Pixels;       #IMPLIED
928  width       %Length;       #IMPLIED
929  >
930
931<!--=================== Preformatted Text ================================-->
932
933<!-- content is %Inline; excluding
934        "img|object|applet|big|small|sub|sup|font|basefont" -->
935
936<!ELEMENT pre %pre.content;>
937<!ATTLIST pre
938  %attrs;
939  width       %Number;      #IMPLIED
940  xml:space   (preserve)    #FIXED 'preserve'
941  >
942
943<!--=================== Block-like Quotes ================================-->
944
945<!ELEMENT blockquote %Flow;>
946<!ATTLIST blockquote
947  %attrs;
948  cite        %URI;          #IMPLIED
949  >
950
951<!--=================== Text alignment ===================================-->
952
953<!-- center content -->
954<!ELEMENT center %Flow;>
955<!ATTLIST center
956  %attrs;
957  >
958
959<!--=================== Inserted/Deleted Text ============================-->
960
961<!--
962  ins/del are allowed in block and inline content, but its
963  inappropriate to include block content within an ins element
964  occurring in inline content.
965-->
966<!ELEMENT ins %Flow;>
967<!ATTLIST ins
968  %attrs;
969  cite        %URI;          #IMPLIED
970  datetime    %Datetime;     #IMPLIED
971  >
972
973<!ELEMENT del %Flow;>
974<!ATTLIST del
975  %attrs;
976  cite        %URI;          #IMPLIED
977  datetime    %Datetime;     #IMPLIED
978  >
979
980<!--================== The Anchor Element ================================-->
981
982<!-- content is %Inline; except that anchors shouldn't be nested -->
983
984<!ELEMENT a %a.content;>
985<!ATTLIST a
986  %attrs;
987  %focus;
988  charset     %Charset;      #IMPLIED
989  type        %ContentType;  #IMPLIED
990  name        NMTOKEN        #IMPLIED
991  href        %URI;          #IMPLIED
992  hreflang    %LanguageCode; #IMPLIED
993  rel         %LinkTypes;    #IMPLIED
994  rev         %LinkTypes;    #IMPLIED
995  shape       %Shape;        "rect"
996  coords      %Coords;       #IMPLIED
997  target      %FrameTarget;  #IMPLIED
998  >
999
1000<!--===================== Inline Elements ================================-->
1001
1002<!ELEMENT span %Inline;> <!-- generic language/style container -->
1003<!ATTLIST span
1004  %attrs;
1005  >
1006
1007<!ELEMENT bdo %Inline;>  <!-- I18N BiDi over-ride -->
1008<!ATTLIST bdo
1009  %coreattrs;
1010  %events;
1011  lang        %LanguageCode; #IMPLIED
1012  xml:lang    %LanguageCode; #IMPLIED
1013  dir         (ltr|rtl)      #REQUIRED
1014  >
1015
1016<!ELEMENT br EMPTY>   <!-- forced line break -->
1017<!ATTLIST br
1018  %coreattrs;
1019  clear       (left|all|right|none) "none"
1020  >
1021
1022<!ELEMENT em %Inline;>   <!-- emphasis -->
1023<!ATTLIST em %attrs;>
1024
1025<!ELEMENT strong %Inline;>   <!-- strong emphasis -->
1026<!ATTLIST strong %attrs;>
1027
1028<!ELEMENT dfn %Inline;>   <!-- definitional -->
1029<!ATTLIST dfn %attrs;>
1030
1031<!ELEMENT code %Inline;>   <!-- program code -->
1032<!ATTLIST code %attrs;>
1033
1034<!ELEMENT samp %Inline;>   <!-- sample -->
1035<!ATTLIST samp %attrs;>
1036
1037<!ELEMENT kbd %Inline;>  <!-- something user would type -->
1038<!ATTLIST kbd %attrs;>
1039
1040<!ELEMENT var %Inline;>   <!-- variable -->
1041<!ATTLIST var %attrs;>
1042
1043<!ELEMENT cite %Inline;>   <!-- citation -->
1044<!ATTLIST cite %attrs;>
1045
1046<!ELEMENT abbr %Inline;>   <!-- abbreviation -->
1047<!ATTLIST abbr %attrs;>
1048
1049<!ELEMENT acronym %Inline;>   <!-- acronym -->
1050<!ATTLIST acronym %attrs;>
1051
1052<!ELEMENT q %Inline;>   <!-- inlined quote -->
1053<!ATTLIST q
1054  %attrs;
1055  cite        %URI;          #IMPLIED
1056  >
1057
1058<!ELEMENT sub %Inline;> <!-- subscript -->
1059<!ATTLIST sub %attrs;>
1060
1061<!ELEMENT sup %Inline;> <!-- superscript -->
1062<!ATTLIST sup %attrs;>
1063
1064<!ELEMENT tt %Inline;>   <!-- fixed pitch font -->
1065<!ATTLIST tt %attrs;>
1066
1067<!ELEMENT i %Inline;>   <!-- italic font -->
1068<!ATTLIST i %attrs;>
1069
1070<!ELEMENT b %Inline;>   <!-- bold font -->
1071<!ATTLIST b %attrs;>
1072
1073<!ELEMENT big %Inline;>   <!-- bigger font -->
1074<!ATTLIST big %attrs;>
1075
1076<!ELEMENT small %Inline;>   <!-- smaller font -->
1077<!ATTLIST small %attrs;>
1078
1079<!ELEMENT u %Inline;>   <!-- underline -->
1080<!ATTLIST u %attrs;>
1081
1082<!ELEMENT s %Inline;>   <!-- strike-through -->
1083<!ATTLIST s %attrs;>
1084
1085<!ELEMENT strike %Inline;>   <!-- strike-through -->
1086<!ATTLIST strike %attrs;>
1087
1088<!ELEMENT basefont EMPTY>  <!-- base font size -->
1089<!ATTLIST basefont
1090  id          ID             #IMPLIED
1091  size        CDATA          #REQUIRED
1092  color       %Color;        #IMPLIED
1093  face        CDATA          #IMPLIED
1094  >
1095
1096<!ELEMENT font %Inline;> <!-- local change to font -->
1097<!ATTLIST font
1098  %coreattrs;
1099  %i18n;
1100  size        CDATA          #IMPLIED
1101  color       %Color;        #IMPLIED
1102  face        CDATA          #IMPLIED
1103  >
1104
1105<!--==================== Object ======================================-->
1106<!--
1107  object is used to embed objects as part of HTML pages.
1108  param elements should precede other content. Parameters
1109  can also be expressed as attribute/value pairs on the
1110  object element itself when brevity is desired.
1111-->
1112
1113<!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*>
1114<!ATTLIST object
1115  %attrs;
1116  declare     (declare)      #IMPLIED
1117  classid     %URI;          #IMPLIED
1118  codebase    %URI;          #IMPLIED
1119  data        %URI;          #IMPLIED
1120  type        %ContentType;  #IMPLIED
1121  codetype    %ContentType;  #IMPLIED
1122  archive     %UriList;      #IMPLIED
1123  standby     %Text;         #IMPLIED
1124  height      %Length;       #IMPLIED
1125  width       %Length;       #IMPLIED
1126  usemap      %URI;          #IMPLIED
1127  name        NMTOKEN        #IMPLIED
1128  tabindex    %Number;       #IMPLIED
1129  align       %ImgAlign;     #IMPLIED
1130  border      %Pixels;       #IMPLIED
1131  hspace      %Pixels;       #IMPLIED
1132  vspace      %Pixels;       #IMPLIED
1133  >
1134
1135<!--
1136  param is used to supply a named property value.
1137  In XML it would seem natural to follow RDF and support an
1138  abbreviated syntax where the param elements are replaced
1139  by attribute value pairs on the object start tag.
1140-->
1141<!ELEMENT param EMPTY>
1142<!ATTLIST param
1143  id          ID             #IMPLIED
1144  name        CDATA          #REQUIRED
1145  value       CDATA          #IMPLIED
1146  valuetype   (data|ref|object) "data"
1147  type        %ContentType;  #IMPLIED
1148  >
1149
1150<!--=================== Java applet ==================================-->
1151<!--
1152  One of code or object attributes must be present.
1153  Place param elements before other content.
1154-->
1155<!ELEMENT applet (#PCDATA | param | %block; | form | %inline; | %misc;)*>
1156<!ATTLIST applet
1157  %coreattrs;
1158  codebase    %URI;          #IMPLIED
1159  archive     CDATA          #IMPLIED
1160  code        CDATA          #IMPLIED
1161  object      CDATA          #IMPLIED
1162  alt         %Text;         #IMPLIED
1163  name        NMTOKEN        #IMPLIED
1164  width       %Length;       #REQUIRED
1165  height      %Length;       #REQUIRED
1166  align       %ImgAlign;     #IMPLIED
1167  hspace      %Pixels;       #IMPLIED
1168  vspace      %Pixels;       #IMPLIED
1169  >
1170
1171<!--=================== Images ===========================================-->
1172
1173<!--
1174   To avoid accessibility problems for people who aren't
1175   able to see the image, you should provide a text
1176   description using the alt and longdesc attributes.
1177   In addition, avoid the use of server-side image maps.
1178-->
1179
1180<!ELEMENT img EMPTY>
1181<!ATTLIST img
1182  %attrs;
1183  src         %URI;          #REQUIRED
1184  alt         %Text;         #REQUIRED
1185  name        NMTOKEN        #IMPLIED
1186  longdesc    %URI;          #IMPLIED
1187  height      %Length;       #IMPLIED
1188  width       %Length;       #IMPLIED
1189  usemap      %URI;          #IMPLIED
1190  ismap       (ismap)        #IMPLIED
1191  align       %ImgAlign;     #IMPLIED
1192  border      %Length;       #IMPLIED
1193  hspace      %Pixels;       #IMPLIED
1194  vspace      %Pixels;       #IMPLIED
1195  >
1196
1197<!-- usemap points to a map element which may be in this document
1198  or an external document, although the latter is not widely supported -->
1199
1200<!--================== Client-side image maps ============================-->
1201
1202<!-- These can be placed in the same document or grouped in a
1203     separate document although this isn't yet widely supported -->
1204
1205<!ELEMENT map ((%block; | form | %misc;)+ | area+)>
1206<!ATTLIST map
1207  %i18n;
1208  %events;
1209  id          ID             #REQUIRED
1210  class       CDATA          #IMPLIED
1211  style       %StyleSheet;   #IMPLIED
1212  title       %Text;         #IMPLIED
1213  name        CDATA          #IMPLIED
1214  >
1215
1216<!ELEMENT area EMPTY>
1217<!ATTLIST area
1218  %attrs;
1219  %focus;
1220  shape       %Shape;        "rect"
1221  coords      %Coords;       #IMPLIED
1222  href        %URI;          #IMPLIED
1223  nohref      (nohref)       #IMPLIED
1224  alt         %Text;         #REQUIRED
1225  target      %FrameTarget;  #IMPLIED
1226  >
1227
1228<!--================ Forms ===============================================-->
1229
1230<!ELEMENT form %form.content;>   <!-- forms shouldn't be nested -->
1231
1232<!ATTLIST form
1233  %attrs;
1234  action      %URI;          #REQUIRED
1235  method      (get|post)     "get"
1236  name        NMTOKEN        #IMPLIED
1237  enctype     %ContentType;  "application/x-www-form-urlencoded"
1238  onsubmit    %Script;       #IMPLIED
1239  onreset     %Script;       #IMPLIED
1240  accept      %ContentTypes; #IMPLIED
1241  accept-charset %Charsets;  #IMPLIED
1242  target      %FrameTarget;  #IMPLIED
1243  >
1244
1245<!--
1246  Each label must not contain more than ONE field
1247  Label elements shouldn't be nested.
1248-->
1249<!ELEMENT label %Inline;>
1250<!ATTLIST label
1251  %attrs;
1252  for         IDREF          #IMPLIED
1253  accesskey   %Character;    #IMPLIED
1254  onfocus     %Script;       #IMPLIED
1255  onblur      %Script;       #IMPLIED
1256  >
1257
1258<!ENTITY % InputType
1259  "(text | password | checkbox |
1260    radio | submit | reset |
1261    file | hidden | image | button)"
1262   >
1263
1264<!-- the name attribute is required for all but submit & reset -->
1265
1266<!ELEMENT input EMPTY>     <!-- form control -->
1267<!ATTLIST input
1268  %attrs;
1269  %focus;
1270  type        %InputType;    "text"
1271  name        CDATA          #IMPLIED
1272  value       CDATA          #IMPLIED
1273  checked     (checked)      #IMPLIED
1274  disabled    (disabled)     #IMPLIED
1275  readonly    (readonly)     #IMPLIED
1276  size        CDATA          #IMPLIED
1277  maxlength   %Number;       #IMPLIED
1278  src         %URI;          #IMPLIED
1279  alt         CDATA          #IMPLIED
1280  usemap      %URI;          #IMPLIED
1281  onselect    %Script;       #IMPLIED
1282  onchange    %Script;       #IMPLIED
1283  accept      %ContentTypes; #IMPLIED
1284  align       %ImgAlign;     #IMPLIED
1285  >
1286
1287<!ELEMENT select (optgroup|option)+>  <!-- option selector -->
1288<!ATTLIST select
1289  %attrs;
1290  name        CDATA          #IMPLIED
1291  size        %Number;       #IMPLIED
1292  multiple    (multiple)     #IMPLIED
1293  disabled    (disabled)     #IMPLIED
1294  tabindex    %Number;       #IMPLIED
1295  onfocus     %Script;       #IMPLIED
1296  onblur      %Script;       #IMPLIED
1297  onchange    %Script;       #IMPLIED
1298  >
1299
1300<!ELEMENT optgroup (option)+>   <!-- option group -->
1301<!ATTLIST optgroup
1302  %attrs;
1303  disabled    (disabled)     #IMPLIED
1304  label       %Text;         #REQUIRED
1305  >
1306
1307<!ELEMENT option (#PCDATA)>     <!-- selectable choice -->
1308<!ATTLIST option
1309  %attrs;
1310  selected    (selected)     #IMPLIED
1311  disabled    (disabled)     #IMPLIED
1312  label       %Text;         #IMPLIED
1313  value       CDATA          #IMPLIED
1314  >
1315
1316<!ELEMENT textarea (#PCDATA)>     <!-- multi-line text field -->
1317<!ATTLIST textarea
1318  %attrs;
1319  %focus;
1320  name        CDATA          #IMPLIED
1321  rows        %Number;       #REQUIRED
1322  cols        %Number;       #REQUIRED
1323  disabled    (disabled)     #IMPLIED
1324  readonly    (readonly)     #IMPLIED
1325  onselect    %Script;       #IMPLIED
1326  onchange    %Script;       #IMPLIED
1327  >
1328
1329<!--
1330  The fieldset element is used to group form fields.
1331  Only one legend element should occur in the content
1332  and if present should only be preceded by whitespace.
1333-->
1334<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>
1335<!ATTLIST fieldset
1336  %attrs;
1337  >
1338
1339<!ENTITY % LAlign "(top|bottom|left|right)">
1340
1341<!ELEMENT legend %Inline;>     <!-- fieldset label -->
1342<!ATTLIST legend
1343  %attrs;
1344  accesskey   %Character;    #IMPLIED
1345  align       %LAlign;       #IMPLIED
1346  >
1347
1348<!--
1349 Content is %Flow; excluding a, form, form controls, iframe
1350-->
1351<!ELEMENT button %button.content;>  <!-- push button -->
1352<!ATTLIST button
1353  %attrs;
1354  %focus;
1355  name        CDATA          #IMPLIED
1356  value       CDATA          #IMPLIED
1357  type        (button|submit|reset) "submit"
1358  disabled    (disabled)     #IMPLIED
1359  >
1360
1361<!-- single-line text input control (DEPRECATED) -->
1362<!ELEMENT isindex EMPTY>
1363<!ATTLIST isindex
1364  %coreattrs;
1365  %i18n;
1366  prompt      %Text;         #IMPLIED
1367  >
1368
1369<!--======================= Tables =======================================-->
1370
1371<!-- Derived from IETF HTML table standard, see [RFC1942] -->
1372
1373<!--
1374 The border attribute sets the thickness of the frame around the
1375 table. The default units are screen pixels.
1376
1377 The frame attribute specifies which parts of the frame around
1378 the table should be rendered. The values are not the same as
1379 CALS to avoid a name clash with the valign attribute.
1380-->
1381<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
1382
1383<!--
1384 The rules attribute defines which rules to draw between cells:
1385
1386 If rules is absent then assume:
1387     "none" if border is absent or border="0" otherwise "all"
1388-->
1389
1390<!ENTITY % TRules "(none | groups | rows | cols | all)">
1391 
1392<!-- horizontal placement of table relative to document -->
1393<!ENTITY % TAlign "(left|center|right)">
1394
1395<!-- horizontal alignment attributes for cell contents
1396
1397  char        alignment char, e.g. char=':'
1398  charoff     offset for alignment char
1399-->
1400<!ENTITY % cellhalign
1401  "align      (left|center|right|justify|char) #IMPLIED
1402   char       %Character;    #IMPLIED
1403   charoff    %Length;       #IMPLIED"
1404  >
1405
1406<!-- vertical alignment attributes for cell contents -->
1407<!ENTITY % cellvalign
1408  "valign     (top|middle|bottom|baseline) #IMPLIED"
1409  >
1410
1411<!ELEMENT table
1412     (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>
1413<!ELEMENT caption  %Inline;>
1414<!ELEMENT thead    (tr)+>
1415<!ELEMENT tfoot    (tr)+>
1416<!ELEMENT tbody    (tr)+>
1417<!ELEMENT colgroup (col)*>
1418<!ELEMENT col      EMPTY>
1419<!ELEMENT tr       (th|td)+>
1420<!ELEMENT th       %Flow;>
1421<!ELEMENT td       %Flow;>
1422
1423<!ATTLIST table
1424  %attrs;
1425  summary     %Text;         #IMPLIED
1426  width       %Length;       #IMPLIED
1427  border      %Pixels;       #IMPLIED
1428  frame       %TFrame;       #IMPLIED
1429  rules       %TRules;       #IMPLIED
1430  cellspacing %Length;       #IMPLIED
1431  cellpadding %Length;       #IMPLIED
1432  align       %TAlign;       #IMPLIED
1433  bgcolor     %Color;        #IMPLIED
1434  >
1435
1436<!ENTITY % CAlign "(top|bottom|left|right)">
1437
1438<!ATTLIST caption
1439  %attrs;
1440  align       %CAlign;       #IMPLIED
1441  >
1442
1443<!--
1444colgroup groups a set of col elements. It allows you to group
1445several semantically related columns together.
1446-->
1447<!ATTLIST colgroup
1448  %attrs;
1449  span        %Number;       "1"
1450  width       %MultiLength;  #IMPLIED
1451  %cellhalign;
1452  %cellvalign;
1453  >
1454
1455<!--
1456 col elements define the alignment properties for cells in
1457 one or more columns.
1458
1459 The width attribute specifies the width of the columns, e.g.
1460
1461     width=64        width in screen pixels
1462     width=0.5*      relative width of 0.5
1463
1464 The span attribute causes the attributes of one
1465 col element to apply to more than one column.
1466-->
1467<!ATTLIST col
1468  %attrs;
1469  span        %Number;       "1"
1470  width       %MultiLength;  #IMPLIED
1471  %cellhalign;
1472  %cellvalign;
1473  >
1474
1475<!--
1476    Use thead to duplicate headers when breaking table
1477    across page boundaries, or for static headers when
1478    tbody sections are rendered in scrolling panel.
1479
1480    Use tfoot to duplicate footers when breaking table
1481    across page boundaries, or for static footers when
1482    tbody sections are rendered in scrolling panel.
1483
1484    Use multiple tbody sections when rules are needed
1485    between groups of table rows.
1486-->
1487<!ATTLIST thead
1488  %attrs;
1489  %cellhalign;
1490  %cellvalign;
1491  >
1492
1493<!ATTLIST tfoot
1494  %attrs;
1495  %cellhalign;
1496  %cellvalign;
1497  >
1498
1499<!ATTLIST tbody
1500  %attrs;
1501  %cellhalign;
1502  %cellvalign;
1503  >
1504
1505<!ATTLIST tr
1506  %attrs;
1507  %cellhalign;
1508  %cellvalign;
1509  bgcolor     %Color;        #IMPLIED
1510  >
1511
1512<!-- Scope is simpler than headers attribute for common tables -->
1513<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
1514
1515<!-- th is for headers, td for data and for cells acting as both -->
1516
1517<!ATTLIST th
1518  %attrs;
1519  abbr        %Text;         #IMPLIED
1520  axis        CDATA          #IMPLIED
1521  headers     IDREFS         #IMPLIED
1522  scope       %Scope;        #IMPLIED
1523  rowspan     %Number;       "1"
1524  colspan     %Number;       "1"
1525  %cellhalign;
1526  %cellvalign;
1527  nowrap      (nowrap)       #IMPLIED
1528  bgcolor     %Color;        #IMPLIED
1529  width       %Length;       #IMPLIED
1530  height      %Length;       #IMPLIED
1531  >
1532
1533<!ATTLIST td
1534  %attrs;
1535  abbr        %Text;         #IMPLIED
1536  axis        CDATA          #IMPLIED
1537  headers     IDREFS         #IMPLIED
1538  scope       %Scope;        #IMPLIED
1539  rowspan     %Number;       "1"
1540  colspan     %Number;       "1"
1541  %cellhalign;
1542  %cellvalign;
1543  nowrap      (nowrap)       #IMPLIED
1544  bgcolor     %Color;        #IMPLIED
1545  width       %Length;       #IMPLIED
1546  height      %Length;       #IMPLIED
1547  >
1548
1549]]></data></item>
1550<item key="id"><![CDATA[nop]]></item>
1551</dictionary>
1552</item>
1553<item type="dictionary"><dictionary>
1554<item key="file" type="file">
1555<data content_type="text/xml" filename="xhtml-lat1.ent" type="file"><![CDATA[<!-- Portions (C) International Organization for Standardization 1986
1556     Permission to copy in any form is granted for use with
1557     conforming SGML systems and applications as defined in
1558     ISO 8879, provided this notice is included in all copies.
1559-->
1560<!-- Character entity set. Typical invocation:
1561    <!ENTITY % HTMLlat1 PUBLIC
1562       "-//W3C//ENTITIES Latin 1 for XHTML//EN"
1563       "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
1564    %HTMLlat1;
1565-->
1566
1567<!ENTITY nbsp   "&#160;"> <!-- no-break space = non-breaking space,
1568                                  U+00A0 ISOnum -->
1569<!ENTITY iexcl  "&#161;"> <!-- inverted exclamation mark, U+00A1 ISOnum -->
1570<!ENTITY cent   "&#162;"> <!-- cent sign, U+00A2 ISOnum -->
1571<!ENTITY pound  "&#163;"> <!-- pound sign, U+00A3 ISOnum -->
1572<!ENTITY curren "&#164;"> <!-- currency sign, U+00A4 ISOnum -->
1573<!ENTITY yen    "&#165;"> <!-- yen sign = yuan sign, U+00A5 ISOnum -->
1574<!ENTITY brvbar "&#166;"> <!-- broken bar = broken vertical bar,
1575                                  U+00A6 ISOnum -->
1576<!ENTITY sect   "&#167;"> <!-- section sign, U+00A7 ISOnum -->
1577<!ENTITY uml    "&#168;"> <!-- diaeresis = spacing diaeresis,
1578                                  U+00A8 ISOdia -->
1579<!ENTITY copy   "&#169;"> <!-- copyright sign, U+00A9 ISOnum -->
1580<!ENTITY ordf   "&#170;"> <!-- feminine ordinal indicator, U+00AA ISOnum -->
1581<!ENTITY laquo  "&#171;"> <!-- left-pointing double angle quotation mark
1582                                  = left pointing guillemet, U+00AB ISOnum -->
1583<!ENTITY not    "&#172;"> <!-- not sign = angled dash,
1584                                  U+00AC ISOnum -->
1585<!ENTITY shy    "&#173;"> <!-- soft hyphen = discretionary hyphen,
1586                                  U+00AD ISOnum -->
1587<!ENTITY reg    "&#174;"> <!-- registered sign = registered trade mark sign,
1588                                  U+00AE ISOnum -->
1589<!ENTITY macr   "&#175;"> <!-- macron = spacing macron = overline
1590                                  = APL overbar, U+00AF ISOdia -->
1591<!ENTITY deg    "&#176;"> <!-- degree sign, U+00B0 ISOnum -->
1592<!ENTITY plusmn "&#177;"> <!-- plus-minus sign = plus-or-minus sign,
1593                                  U+00B1 ISOnum -->
1594<!ENTITY sup2   "&#178;"> <!-- superscript two = superscript digit two
1595                                  = squared, U+00B2 ISOnum -->
1596<!ENTITY sup3   "&#179;"> <!-- superscript three = superscript digit three
1597                                  = cubed, U+00B3 ISOnum -->
1598<!ENTITY acute  "&#180;"> <!-- acute accent = spacing acute,
1599                                  U+00B4 ISOdia -->
1600<!ENTITY micro  "&#181;"> <!-- micro sign, U+00B5 ISOnum -->
1601<!ENTITY para   "&#182;"> <!-- pilcrow sign = paragraph sign,
1602                                  U+00B6 ISOnum -->
1603<!ENTITY middot "&#183;"> <!-- middle dot = Georgian comma
1604                                  = Greek middle dot, U+00B7 ISOnum -->
1605<!ENTITY cedil  "&#184;"> <!-- cedilla = spacing cedilla, U+00B8 ISOdia -->
1606<!ENTITY sup1   "&#185;"> <!-- superscript one = superscript digit one,
1607                                  U+00B9 ISOnum -->
1608<!ENTITY ordm   "&#186;"> <!-- masculine ordinal indicator,
1609                                  U+00BA ISOnum -->
1610<!ENTITY raquo  "&#187;"> <!-- right-pointing double angle quotation mark
1611                                  = right pointing guillemet, U+00BB ISOnum -->
1612<!ENTITY frac14 "&#188;"> <!-- vulgar fraction one quarter
1613                                  = fraction one quarter, U+00BC ISOnum -->
1614<!ENTITY frac12 "&#189;"> <!-- vulgar fraction one half
1615                                  = fraction one half, U+00BD ISOnum -->
1616<!ENTITY frac34 "&#190;"> <!-- vulgar fraction three quarters
1617                                  = fraction three quarters, U+00BE ISOnum -->
1618<!ENTITY iquest "&#191;"> <!-- inverted question mark
1619                                  = turned question mark, U+00BF ISOnum -->
1620<!ENTITY Agrave "&#192;"> <!-- latin capital letter A with grave
1621                                  = latin capital letter A grave,
1622                                  U+00C0 ISOlat1 -->
1623<!ENTITY Aacute "&#193;"> <!-- latin capital letter A with acute,
1624                                  U+00C1 ISOlat1 -->
1625<!ENTITY Acirc  "&#194;"> <!-- latin capital letter A with circumflex,
1626                                  U+00C2 ISOlat1 -->
1627<!ENTITY Atilde "&#195;"> <!-- latin capital letter A with tilde,
1628                                  U+00C3 ISOlat1 -->
1629<!ENTITY Auml   "&#196;"> <!-- latin capital letter A with diaeresis,
1630                                  U+00C4 ISOlat1 -->
1631<!ENTITY Aring  "&#197;"> <!-- latin capital letter A with ring above
1632                                  = latin capital letter A ring,
1633                                  U+00C5 ISOlat1 -->
1634<!ENTITY AElig  "&#198;"> <!-- latin capital letter AE
1635                                  = latin capital ligature AE,
1636                                  U+00C6 ISOlat1 -->
1637<!ENTITY Ccedil "&#199;"> <!-- latin capital letter C with cedilla,
1638                                  U+00C7 ISOlat1 -->
1639<!ENTITY Egrave "&#200;"> <!-- latin capital letter E with grave,
1640                                  U+00C8 ISOlat1 -->
1641<!ENTITY Eacute "&#201;"> <!-- latin capital letter E with acute,
1642                                  U+00C9 ISOlat1 -->
1643<!ENTITY Ecirc  "&#202;"> <!-- latin capital letter E with circumflex,
1644                                  U+00CA ISOlat1 -->
1645<!ENTITY Euml   "&#203;"> <!-- latin capital letter E with diaeresis,
1646                                  U+00CB ISOlat1 -->
1647<!ENTITY Igrave "&#204;"> <!-- latin capital letter I with grave,
1648                                  U+00CC ISOlat1 -->
1649<!ENTITY Iacute "&#205;"> <!-- latin capital letter I with acute,
1650                                  U+00CD ISOlat1 -->
1651<!ENTITY Icirc  "&#206;"> <!-- latin capital letter I with circumflex,
1652                                  U+00CE ISOlat1 -->
1653<!ENTITY Iuml   "&#207;"> <!-- latin capital letter I with diaeresis,
1654                                  U+00CF ISOlat1 -->
1655<!ENTITY ETH    "&#208;"> <!-- latin capital letter ETH, U+00D0 ISOlat1 -->
1656<!ENTITY Ntilde "&#209;"> <!-- latin capital letter N with tilde,
1657                                  U+00D1 ISOlat1 -->
1658<!ENTITY Ograve "&#210;"> <!-- latin capital letter O with grave,
1659                                  U+00D2 ISOlat1 -->
1660<!ENTITY Oacute "&#211;"> <!-- latin capital letter O with acute,
1661                                  U+00D3 ISOlat1 -->
1662<!ENTITY Ocirc  "&#212;"> <!-- latin capital letter O with circumflex,
1663                                  U+00D4 ISOlat1 -->
1664<!ENTITY Otilde "&#213;"> <!-- latin capital letter O with tilde,
1665                                  U+00D5 ISOlat1 -->
1666<!ENTITY Ouml   "&#214;"> <!-- latin capital letter O with diaeresis,
1667                                  U+00D6 ISOlat1 -->
1668<!ENTITY times  "&#215;"> <!-- multiplication sign, U+00D7 ISOnum -->
1669<!ENTITY Oslash "&#216;"> <!-- latin capital letter O with stroke
1670                                  = latin capital letter O slash,
1671                                  U+00D8 ISOlat1 -->
1672<!ENTITY Ugrave "&#217;"> <!-- latin capital letter U with grave,
1673                                  U+00D9 ISOlat1 -->
1674<!ENTITY Uacute "&#218;"> <!-- latin capital letter U with acute,
1675                                  U+00DA ISOlat1 -->
1676<!ENTITY Ucirc  "&#219;"> <!-- latin capital letter U with circumflex,
1677                                  U+00DB ISOlat1 -->
1678<!ENTITY Uuml   "&#220;"> <!-- latin capital letter U with diaeresis,
1679                                  U+00DC ISOlat1 -->
1680<!ENTITY Yacute "&#221;"> <!-- latin capital letter Y with acute,
1681                                  U+00DD ISOlat1 -->
1682<!ENTITY THORN  "&#222;"> <!-- latin capital letter THORN,
1683                                  U+00DE ISOlat1 -->
1684<!ENTITY szlig  "&#223;"> <!-- latin small letter sharp s = ess-zed,
1685                                  U+00DF ISOlat1 -->
1686<!ENTITY agrave "&#224;"> <!-- latin small letter a with grave
1687                                  = latin small letter a grave,
1688                                  U+00E0 ISOlat1 -->
1689<!ENTITY aacute "&#225;"> <!-- latin small letter a with acute,
1690                                  U+00E1 ISOlat1 -->
1691<!ENTITY acirc  "&#226;"> <!-- latin small letter a with circumflex,
1692                                  U+00E2 ISOlat1 -->
1693<!ENTITY atilde "&#227;"> <!-- latin small letter a with tilde,
1694                                  U+00E3 ISOlat1 -->
1695<!ENTITY auml   "&#228;"> <!-- latin small letter a with diaeresis,
1696                                  U+00E4 ISOlat1 -->
1697<!ENTITY aring  "&#229;"> <!-- latin small letter a with ring above
1698                                  = latin small letter a ring,
1699                                  U+00E5 ISOlat1 -->
1700<!ENTITY aelig  "&#230;"> <!-- latin small letter ae
1701                                  = latin small ligature ae, U+00E6 ISOlat1 -->
1702<!ENTITY ccedil "&#231;"> <!-- latin small letter c with cedilla,
1703                                  U+00E7 ISOlat1 -->
1704<!ENTITY egrave "&#232;"> <!-- latin small letter e with grave,
1705                                  U+00E8 ISOlat1 -->
1706<!ENTITY eacute "&#233;"> <!-- latin small letter e with acute,
1707                                  U+00E9 ISOlat1 -->
1708<!ENTITY ecirc  "&#234;"> <!-- latin small letter e with circumflex,
1709                                  U+00EA ISOlat1 -->
1710<!ENTITY euml   "&#235;"> <!-- latin small letter e with diaeresis,
1711                                  U+00EB ISOlat1 -->
1712<!ENTITY igrave "&#236;"> <!-- latin small letter i with grave,
1713                                  U+00EC ISOlat1 -->
1714<!ENTITY iacute "&#237;"> <!-- latin small letter i with acute,
1715                                  U+00ED ISOlat1 -->
1716<!ENTITY icirc  "&#238;"> <!-- latin small letter i with circumflex,
1717                                  U+00EE ISOlat1 -->
1718<!ENTITY iuml   "&#239;"> <!-- latin small letter i with diaeresis,
1719                                  U+00EF ISOlat1 -->
1720<!ENTITY eth    "&#240;"> <!-- latin small letter eth, U+00F0 ISOlat1 -->
1721<!ENTITY ntilde "&#241;"> <!-- latin small letter n with tilde,
1722                                  U+00F1 ISOlat1 -->
1723<!ENTITY ograve "&#242;"> <!-- latin small letter o with grave,
1724                                  U+00F2 ISOlat1 -->
1725<!ENTITY oacute "&#243;"> <!-- latin small letter o with acute,
1726                                  U+00F3 ISOlat1 -->
1727<!ENTITY ocirc  "&#244;"> <!-- latin small letter o with circumflex,
1728                                  U+00F4 ISOlat1 -->
1729<!ENTITY otilde "&#245;"> <!-- latin small letter o with tilde,
1730                                  U+00F5 ISOlat1 -->
1731<!ENTITY ouml   "&#246;"> <!-- latin small letter o with diaeresis,
1732                                  U+00F6 ISOlat1 -->
1733<!ENTITY divide "&#247;"> <!-- division sign, U+00F7 ISOnum -->
1734<!ENTITY oslash "&#248;"> <!-- latin small letter o with stroke,
1735                                  = latin small letter o slash,
1736                                  U+00F8 ISOlat1 -->
1737<!ENTITY ugrave "&#249;"> <!-- latin small letter u with grave,
1738                                  U+00F9 ISOlat1 -->
1739<!ENTITY uacute "&#250;"> <!-- latin small letter u with acute,
1740                                  U+00FA ISOlat1 -->
1741<!ENTITY ucirc  "&#251;"> <!-- latin small letter u with circumflex,
1742                                  U+00FB ISOlat1 -->
1743<!ENTITY uuml   "&#252;"> <!-- latin small letter u with diaeresis,
1744                                  U+00FC ISOlat1 -->
1745<!ENTITY yacute "&#253;"> <!-- latin small letter y with acute,
1746                                  U+00FD ISOlat1 -->
1747<!ENTITY thorn  "&#254;"> <!-- latin small letter thorn,
1748                                  U+00FE ISOlat1 -->
1749<!ENTITY yuml   "&#255;"> <!-- latin small letter y with diaeresis,
1750                                  U+00FF ISOlat1 -->
1751]]></data></item>
1752<item key="id"><![CDATA[nop]]></item>
1753</dictionary>
1754</item>
1755<item type="dictionary"><dictionary>
1756<item key="file" type="file">
1757<data content_type="text/xml" filename="xhtml-special.ent" type="file"><![CDATA[<!-- Special characters for XHTML -->
1758
1759<!-- Character entity set. Typical invocation:
1760     <!ENTITY % HTMLspecial PUBLIC
1761        "-//W3C//ENTITIES Special for XHTML//EN"
1762        "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
1763     %HTMLspecial;
1764-->
1765
1766<!-- Portions (C) International Organization for Standardization 1986:
1767     Permission to copy in any form is granted for use with
1768     conforming SGML systems and applications as defined in
1769     ISO 8879, provided this notice is included in all copies.
1770-->
1771
1772<!-- Relevant ISO entity set is given unless names are newly introduced.
1773     New names (i.e., not in ISO 8879 list) do not clash with any
1774     existing ISO 8879 entity names. ISO 10646 character numbers
1775     are given for each character, in hex. values are decimal
1776     conversions of the ISO 10646 values and refer to the document
1777     character set. Names are Unicode names.
1778-->
1779
1780<!-- C0 Controls and Basic Latin -->
1781<!ENTITY quot    "&#34;"> <!--  quotation mark, U+0022 ISOnum -->
1782<!ENTITY amp     "&#38;#38;"> <!--  ampersand, U+0026 ISOnum -->
1783<!ENTITY lt      "&#38;#60;"> <!--  less-than sign, U+003C ISOnum -->
1784<!ENTITY gt      "&#62;"> <!--  greater-than sign, U+003E ISOnum -->
1785<!ENTITY apos    "&#39;"> <!--  apostrophe = APL quote, U+0027 ISOnum -->
1786
1787<!-- Latin Extended-A -->
1788<!ENTITY OElig   "&#338;"> <!--  latin capital ligature OE,
1789                                    U+0152 ISOlat2 -->
1790<!ENTITY oelig   "&#339;"> <!--  latin small ligature oe, U+0153 ISOlat2 -->
1791<!-- ligature is a misnomer, this is a separate character in some languages -->
1792<!ENTITY Scaron  "&#352;"> <!--  latin capital letter S with caron,
1793                                    U+0160 ISOlat2 -->
1794<!ENTITY scaron  "&#353;"> <!--  latin small letter s with caron,
1795                                    U+0161 ISOlat2 -->
1796<!ENTITY Yuml    "&#376;"> <!--  latin capital letter Y with diaeresis,
1797                                    U+0178 ISOlat2 -->
1798
1799<!-- Spacing Modifier Letters -->
1800<!ENTITY circ    "&#710;"> <!--  modifier letter circumflex accent,
1801                                    U+02C6 ISOpub -->
1802<!ENTITY tilde   "&#732;"> <!--  small tilde, U+02DC ISOdia -->
1803
1804<!-- General Punctuation -->
1805<!ENTITY ensp    "&#8194;"> <!-- en space, U+2002 ISOpub -->
1806<!ENTITY emsp    "&#8195;"> <!-- em space, U+2003 ISOpub -->
1807<!ENTITY thinsp  "&#8201;"> <!-- thin space, U+2009 ISOpub -->
1808<!ENTITY zwnj    "&#8204;"> <!-- zero width non-joiner,
1809                                    U+200C NEW RFC 2070 -->
1810<!ENTITY zwj     "&#8205;"> <!-- zero width joiner, U+200D NEW RFC 2070 -->
1811<!ENTITY lrm     "&#8206;"> <!-- left-to-right mark, U+200E NEW RFC 2070 -->
1812<!ENTITY rlm     "&#8207;"> <!-- right-to-left mark, U+200F NEW RFC 2070 -->
1813<!ENTITY ndash   "&#8211;"> <!-- en dash, U+2013 ISOpub -->
1814<!ENTITY mdash   "&#8212;"> <!-- em dash, U+2014 ISOpub -->
1815<!ENTITY lsquo   "&#8216;"> <!-- left single quotation mark,
1816                                    U+2018 ISOnum -->
1817<!ENTITY rsquo   "&#8217;"> <!-- right single quotation mark,
1818                                    U+2019 ISOnum -->
1819<!ENTITY sbquo   "&#8218;"> <!-- single low-9 quotation mark, U+201A NEW -->
1820<!ENTITY ldquo   "&#8220;"> <!-- left double quotation mark,
1821                                    U+201C ISOnum -->
1822<!ENTITY rdquo   "&#8221;"> <!-- right double quotation mark,
1823                                    U+201D ISOnum -->
1824<!ENTITY bdquo   "&#8222;"> <!-- double low-9 quotation mark, U+201E NEW -->
1825<!ENTITY dagger  "&#8224;"> <!-- dagger, U+2020 ISOpub -->
1826<!ENTITY Dagger  "&#8225;"> <!-- double dagger, U+2021 ISOpub -->
1827<!ENTITY permil  "&#8240;"> <!-- per mille sign, U+2030 ISOtech -->
1828<!ENTITY lsaquo  "&#8249;"> <!-- single left-pointing angle quotation mark,
1829                                    U+2039 ISO proposed -->
1830<!-- lsaquo is proposed but not yet ISO standardized -->
1831<!ENTITY rsaquo  "&#8250;"> <!-- single right-pointing angle quotation mark,
1832                                    U+203A ISO proposed -->
1833<!-- rsaquo is proposed but not yet ISO standardized -->
1834
1835<!-- Currency Symbols -->
1836<!ENTITY euro   "&#8364;"> <!--  euro sign, U+20AC NEW -->
1837]]></data></item>
1838<item key="id"><![CDATA[nop]]></item>
1839</dictionary>
1840</item>
1841<item type="dictionary"><dictionary>
1842<item key="file" type="file">
1843<data content_type="text/xml" filename="xhtml-symbol.ent" type="file"><![CDATA[<!-- Mathematical, Greek and Symbolic characters for XHTML -->
1844
1845<!-- Character entity set. Typical invocation:
1846     <!ENTITY % HTMLsymbol PUBLIC
1847        "-//W3C//ENTITIES Symbols for XHTML//EN"
1848        "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">
1849     %HTMLsymbol;
1850-->
1851
1852<!-- Portions (C) International Organization for Standardization 1986:
1853     Permission to copy in any form is granted for use with
1854     conforming SGML systems and applications as defined in
1855     ISO 8879, provided this notice is included in all copies.
1856-->
1857
1858<!-- Relevant ISO entity set is given unless names are newly introduced.
1859     New names (i.e., not in ISO 8879 list) do not clash with any
1860     existing ISO 8879 entity names. ISO 10646 character numbers
1861     are given for each character, in hex. values are decimal
1862     conversions of the ISO 10646 values and refer to the document
1863     character set. Names are Unicode names.
1864-->
1865
1866<!-- Latin Extended-B -->
1867<!ENTITY fnof     "&#402;"> <!-- latin small letter f with hook = function
1868                                    = florin, U+0192 ISOtech -->
1869
1870<!-- Greek -->
1871<!ENTITY Alpha    "&#913;"> <!-- greek capital letter alpha, U+0391 -->
1872<!ENTITY Beta     "&#914;"> <!-- greek capital letter beta, U+0392 -->
1873<!ENTITY Gamma    "&#915;"> <!-- greek capital letter gamma,
1874                                    U+0393 ISOgrk3 -->
1875<!ENTITY Delta    "&#916;"> <!-- greek capital letter delta,
1876                                    U+0394 ISOgrk3 -->
1877<!ENTITY Epsilon  "&#917;"> <!-- greek capital letter epsilon, U+0395 -->
1878<!ENTITY Zeta     "&#918;"> <!-- greek capital letter zeta, U+0396 -->
1879<!ENTITY Eta      "&#919;"> <!-- greek capital letter eta, U+0397 -->
1880<!ENTITY Theta    "&#920;"> <!-- greek capital letter theta,
1881                                    U+0398 ISOgrk3 -->
1882<!ENTITY Iota     "&#921;"> <!-- greek capital letter iota, U+0399 -->
1883<!ENTITY Kappa    "&#922;"> <!-- greek capital letter kappa, U+039A -->
1884<!ENTITY Lambda   "&#923;"> <!-- greek capital letter lamda,
1885                                    U+039B ISOgrk3 -->
1886<!ENTITY Mu       "&#924;"> <!-- greek capital letter mu, U+039C -->
1887<!ENTITY Nu       "&#925;"> <!-- greek capital letter nu, U+039D -->
1888<!ENTITY Xi       "&#926;"> <!-- greek capital letter xi, U+039E ISOgrk3 -->
1889<!ENTITY Omicron  "&#927;"> <!-- greek capital letter omicron, U+039F -->
1890<!ENTITY Pi       "&#928;"> <!-- greek capital letter pi, U+03A0 ISOgrk3 -->
1891<!ENTITY Rho      "&#929;"> <!-- greek capital letter rho, U+03A1 -->
1892<!-- there is no Sigmaf, and no U+03A2 character either -->
1893<!ENTITY Sigma    "&#931;"> <!-- greek capital letter sigma,
1894                                    U+03A3 ISOgrk3 -->
1895<!ENTITY Tau      "&#932;"> <!-- greek capital letter tau, U+03A4 -->
1896<!ENTITY Upsilon  "&#933;"> <!-- greek capital letter upsilon,
1897                                    U+03A5 ISOgrk3 -->
1898<!ENTITY Phi      "&#934;"> <!-- greek capital letter phi,
1899                                    U+03A6 ISOgrk3 -->
1900<!ENTITY Chi      "&#935;"> <!-- greek capital letter chi, U+03A7 -->
1901<!ENTITY Psi      "&#936;"> <!-- greek capital letter psi,
1902                                    U+03A8 ISOgrk3 -->
1903<!ENTITY Omega    "&#937;"> <!-- greek capital letter omega,
1904                                    U+03A9 ISOgrk3 -->
1905
1906<!ENTITY alpha    "&#945;"> <!-- greek small letter alpha,
1907                                    U+03B1 ISOgrk3 -->
1908<!ENTITY beta     "&#946;"> <!-- greek small letter beta, U+03B2 ISOgrk3 -->
1909<!ENTITY gamma    "&#947;"> <!-- greek small letter gamma,
1910                                    U+03B3 ISOgrk3 -->
1911<!ENTITY delta    "&#948;"> <!-- greek small letter delta,
1912                                    U+03B4 ISOgrk3 -->
1913<!ENTITY epsilon  "&#949;"> <!-- greek small letter epsilon,
1914                                    U+03B5 ISOgrk3 -->
1915<!ENTITY zeta     "&#950;"> <!-- greek small letter zeta, U+03B6 ISOgrk3 -->
1916<!ENTITY eta      "&#951;"> <!-- greek small letter eta, U+03B7 ISOgrk3 -->
1917<!ENTITY theta    "&#952;"> <!-- greek small letter theta,
1918                                    U+03B8 ISOgrk3 -->
1919<!ENTITY iota     "&#953;"> <!-- greek small letter iota, U+03B9 ISOgrk3 -->
1920<!ENTITY kappa    "&#954;"> <!-- greek small letter kappa,
1921                                    U+03BA ISOgrk3 -->
1922<!ENTITY lambda   "&#955;"> <!-- greek small letter lamda,
1923                                    U+03BB ISOgrk3 -->
1924<!ENTITY mu       "&#956;"> <!-- greek small letter mu, U+03BC ISOgrk3 -->
1925<!ENTITY nu       "&#957;"> <!-- greek small letter nu, U+03BD ISOgrk3 -->
1926<!ENTITY xi       "&#958;"> <!-- greek small letter xi, U+03BE ISOgrk3 -->
1927<!ENTITY omicron  "&#959;"> <!-- greek small letter omicron, U+03BF NEW -->
1928<!ENTITY pi       "&#960;"> <!-- greek small letter pi, U+03C0 ISOgrk3 -->
1929<!ENTITY rho      "&#961;"> <!-- greek small letter rho, U+03C1 ISOgrk3 -->
1930<!ENTITY sigmaf   "&#962;"> <!-- greek small letter final sigma,
1931                                    U+03C2 ISOgrk3 -->
1932<!ENTITY sigma    "&#963;"> <!-- greek small letter sigma,
1933                                    U+03C3 ISOgrk3 -->
1934<!ENTITY tau      "&#964;"> <!-- greek small letter tau, U+03C4 ISOgrk3 -->
1935<!ENTITY upsilon  "&#965;"> <!-- greek small letter upsilon,
1936                                    U+03C5 ISOgrk3 -->
1937<!ENTITY phi      "&#966;"> <!-- greek small letter phi, U+03C6 ISOgrk3 -->
1938<!ENTITY chi      "&#967;"> <!-- greek small letter chi, U+03C7 ISOgrk3 -->
1939<!ENTITY psi      "&#968;"> <!-- greek small letter psi, U+03C8 ISOgrk3 -->
1940<!ENTITY omega    "&#969;"> <!-- greek small letter omega,
1941                                    U+03C9 ISOgrk3 -->
1942<!ENTITY thetasym "&#977;"> <!-- greek theta symbol,
1943                                    U+03D1 NEW -->
1944<!ENTITY upsih    "&#978;"> <!-- greek upsilon with hook symbol,
1945                                    U+03D2 NEW -->
1946<!ENTITY piv      "&#982;"> <!-- greek pi symbol, U+03D6 ISOgrk3 -->
1947
1948<!-- General Punctuation -->
1949<!ENTITY bull     "&#8226;"> <!-- bullet = black small circle,
1950                                     U+2022 ISOpub  -->
1951<!-- bullet is NOT the same as bullet operator, U+2219 -->
1952<!ENTITY hellip   "&#8230;"> <!-- horizontal ellipsis = three dot leader,
1953                                     U+2026 ISOpub  -->
1954<!ENTITY prime    "&#8242;"> <!-- prime = minutes = feet, U+2032 ISOtech -->
1955<!ENTITY Prime    "&#8243;"> <!-- double prime = seconds = inches,
1956                                     U+2033 ISOtech -->
1957<!ENTITY oline    "&#8254;"> <!-- overline = spacing overscore,
1958                                     U+203E NEW -->
1959<!ENTITY frasl    "&#8260;"> <!-- fraction slash, U+2044 NEW -->
1960
1961<!-- Letterlike Symbols -->
1962<!ENTITY weierp   "&#8472;"> <!-- script capital P = power set
1963                                     = Weierstrass p, U+2118 ISOamso -->
1964<!ENTITY image    "&#8465;"> <!-- black-letter capital I = imaginary part,
1965                                     U+2111 ISOamso -->
1966<!ENTITY real     "&#8476;"> <!-- black-letter capital R = real part symbol,
1967                                     U+211C ISOamso -->
1968<!ENTITY trade    "&#8482;"> <!-- trade mark sign, U+2122 ISOnum -->
1969<!ENTITY alefsym  "&#8501;"> <!-- alef symbol = first transfinite cardinal,
1970                                     U+2135 NEW -->
1971<!-- alef symbol is NOT the same as hebrew letter alef,
1972     U+05D0 although the same glyph could be used to depict both characters -->
1973
1974<!-- Arrows -->
1975<!ENTITY larr     "&#8592;"> <!-- leftwards arrow, U+2190 ISOnum -->
1976<!ENTITY uarr     "&#8593;"> <!-- upwards arrow, U+2191 ISOnum-->
1977<!ENTITY rarr     "&#8594;"> <!-- rightwards arrow, U+2192 ISOnum -->
1978<!ENTITY darr     "&#8595;"> <!-- downwards arrow, U+2193 ISOnum -->
1979<!ENTITY harr     "&#8596;"> <!-- left right arrow, U+2194 ISOamsa -->
1980<!ENTITY crarr    "&#8629;"> <!-- downwards arrow with corner leftwards
1981                                     = carriage return, U+21B5 NEW -->
1982<!ENTITY lArr     "&#8656;"> <!-- leftwards double arrow, U+21D0 ISOtech -->
1983<!-- Unicode does not say that lArr is the same as the 'is implied by' arrow
1984    but also does not have any other character for that function. So lArr can
1985    be used for 'is implied by' as ISOtech suggests -->
1986<!ENTITY uArr     "&#8657;"> <!-- upwards double arrow, U+21D1 ISOamsa -->
1987<!ENTITY rArr     "&#8658;"> <!-- rightwards double arrow,
1988                                     U+21D2 ISOtech -->
1989<!-- Unicode does not say this is the 'implies' character but does not have
1990     another character with this function so rArr can be used for 'implies'
1991     as ISOtech suggests -->
1992<!ENTITY dArr     "&#8659;"> <!-- downwards double arrow, U+21D3 ISOamsa -->
1993<!ENTITY hArr     "&#8660;"> <!-- left right double arrow,
1994                                     U+21D4 ISOamsa -->
1995
1996<!-- Mathematical Operators -->
1997<!ENTITY forall   "&#8704;"> <!-- for all, U+2200 ISOtech -->
1998<!ENTITY part     "&#8706;"> <!-- partial differential, U+2202 ISOtech  -->
1999<!ENTITY exist    "&#8707;"> <!-- there exists, U+2203 ISOtech -->
2000<!ENTITY empty    "&#8709;"> <!-- empty set = null set, U+2205 ISOamso -->
2001<!ENTITY nabla    "&#8711;"> <!-- nabla = backward difference,
2002                                     U+2207 ISOtech -->
2003<!ENTITY isin     "&#8712;"> <!-- element of, U+2208 ISOtech -->
2004<!ENTITY notin    "&#8713;"> <!-- not an element of, U+2209 ISOtech -->
2005<!ENTITY ni       "&#8715;"> <!-- contains as member, U+220B ISOtech -->
2006<!ENTITY prod     "&#8719;"> <!-- n-ary product = product sign,
2007                                     U+220F ISOamsb -->
2008<!-- prod is NOT the same character as U+03A0 'greek capital letter pi' though
2009     the same glyph might be used for both -->
2010<!ENTITY sum      "&#8721;"> <!-- n-ary summation, U+2211 ISOamsb -->
2011<!-- sum is NOT the same character as U+03A3 'greek capital letter sigma'
2012     though the same glyph might be used for both -->
2013<!ENTITY minus    "&#8722;"> <!-- minus sign, U+2212 ISOtech -->
2014<!ENTITY lowast   "&#8727;"> <!-- asterisk operator, U+2217 ISOtech -->
2015<!ENTITY radic    "&#8730;"> <!-- square root = radical sign,
2016                                     U+221A ISOtech -->
2017<!ENTITY prop     "&#8733;"> <!-- proportional to, U+221D ISOtech -->
2018<!ENTITY infin    "&#8734;"> <!-- infinity, U+221E ISOtech -->
2019<!ENTITY ang      "&#8736;"> <!-- angle, U+2220 ISOamso -->
2020<!ENTITY and      "&#8743;"> <!-- logical and = wedge, U+2227 ISOtech -->
2021<!ENTITY or       "&#8744;"> <!-- logical or = vee, U+2228 ISOtech -->
2022<!ENTITY cap      "&#8745;"> <!-- intersection = cap, U+2229 ISOtech -->
2023<!ENTITY cup      "&#8746;"> <!-- union = cup, U+222A ISOtech -->
2024<!ENTITY int      "&#8747;"> <!-- integral, U+222B ISOtech -->
2025<!ENTITY there4   "&#8756;"> <!-- therefore, U+2234 ISOtech -->
2026<!ENTITY sim      "&#8764;"> <!-- tilde operator = varies with = similar to,
2027                                     U+223C ISOtech -->
2028<!-- tilde operator is NOT the same character as the tilde, U+007E,
2029     although the same glyph might be used to represent both  -->
2030<!ENTITY cong     "&#8773;"> <!-- approximately equal to, U+2245 ISOtech -->
2031<!ENTITY asymp    "&#8776;"> <!-- almost equal to = asymptotic to,
2032                                     U+2248 ISOamsr -->
2033<!ENTITY ne       "&#8800;"> <!-- not equal to, U+2260 ISOtech -->
2034<!ENTITY equiv    "&#8801;"> <!-- identical to, U+2261 ISOtech -->
2035<!ENTITY le       "&#8804;"> <!-- less-than or equal to, U+2264 ISOtech -->
2036<!ENTITY ge       "&#8805;"> <!-- greater-than or equal to,
2037                                     U+2265 ISOtech -->
2038<!ENTITY sub      "&#8834;"> <!-- subset of, U+2282 ISOtech -->
2039<!ENTITY sup      "&#8835;"> <!-- superset of, U+2283 ISOtech -->
2040<!ENTITY nsub     "&#8836;"> <!-- not a subset of, U+2284 ISOamsn -->
2041<!ENTITY sube     "&#8838;"> <!-- subset of or equal to, U+2286 ISOtech -->
2042<!ENTITY supe     "&#8839;"> <!-- superset of or equal to,
2043                                     U+2287 ISOtech -->
2044<!ENTITY oplus    "&#8853;"> <!-- circled plus = direct sum,
2045                                     U+2295 ISOamsb -->
2046<!ENTITY otimes   "&#8855;"> <!-- circled times = vector product,
2047                                     U+2297 ISOamsb -->
2048<!ENTITY perp     "&#8869;"> <!-- up tack = orthogonal to = perpendicular,
2049                                     U+22A5 ISOtech -->
2050<!ENTITY sdot     "&#8901;"> <!-- dot operator, U+22C5 ISOamsb -->
2051<!-- dot operator is NOT the same character as U+00B7 middle dot -->
2052
2053<!-- Miscellaneous Technical -->
2054<!ENTITY lceil    "&#8968;"> <!-- left ceiling = APL upstile,
2055                                     U+2308 ISOamsc  -->
2056<!ENTITY rceil    "&#8969;"> <!-- right ceiling, U+2309 ISOamsc  -->
2057<!ENTITY lfloor   "&#8970;"> <!-- left floor = APL downstile,
2058                                     U+230A ISOamsc  -->
2059<!ENTITY rfloor   "&#8971;"> <!-- right floor, U+230B ISOamsc  -->
2060<!ENTITY lang     "&#9001;"> <!-- left-pointing angle bracket = bra,
2061                                     U+2329 ISOtech -->
2062<!-- lang is NOT the same character as U+003C 'less than sign'
2063     or U+2039 'single left-pointing angle quotation mark' -->
2064<!ENTITY rang     "&#9002;"> <!-- right-pointing angle bracket = ket,
2065                                     U+232A ISOtech -->
2066<!-- rang is NOT the same character as U+003E 'greater than sign'
2067     or U+203A 'single right-pointing angle quotation mark' -->
2068
2069<!-- Geometric Shapes -->
2070<!ENTITY loz      "&#9674;"> <!-- lozenge, U+25CA ISOpub -->
2071
2072<!-- Miscellaneous Symbols -->
2073<!ENTITY spades   "&#9824;"> <!-- black spade suit, U+2660 ISOpub -->
2074<!-- black here seems to mean filled as opposed to hollow -->
2075<!ENTITY clubs    "&#9827;"> <!-- black club suit = shamrock,
2076                                     U+2663 ISOpub -->
2077<!ENTITY hearts   "&#9829;"> <!-- black heart suit = valentine,
2078                                     U+2665 ISOpub -->
2079<!ENTITY diams    "&#9830;"> <!-- black diamond suit, U+2666 ISOpub -->
2080]]></data></item>
2081<item key="id"><![CDATA[nop]]></item>
2082</dictionary>
2083</item>
2084<item type="dictionary"><dictionary>
2085<item key="file"/>
2086<item key="id"><![CDATA[htmlEntities]]></item>
2087</dictionary>
2088</item>
2089<item type="dictionary"><dictionary>
2090<item key="file" type="file">
2091<data content_type="text/xml" filename="xhtml2fo.xsl" type="file"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
2092<xsl:stylesheet version="1.0"
2093                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
2094                xmlns:fo="http://www.w3.org/1999/XSL/Format"
2095                xmlns:html="http://www.w3.org/1999/xhtml">
2096 
2097  <xsl:output method="xml"
2098              version="1.0"
2099              encoding="utf-8"
2100              indent="no"/>
2101 
2102  <!--======================================================================
2103      Parameters
2104  =======================================================================-->
2105 
2106  <!-- page size -->
2107  <xsl:param name="page-units">cm</xsl:param>
2108  <xsl:param name="page-width">20.9cm</xsl:param>
2109  <xsl:param name="page-height">29.5cm</xsl:param>
2110  <xsl:param name="page-margin-top">3.0cm</xsl:param>
2111  <xsl:param name="page-margin-bottom">2.5cm</xsl:param>
2112  <xsl:param name="page-margin-left">2.0cm</xsl:param>
2113  <xsl:param name="page-margin-right">2.5cm</xsl:param>
2114 
2115  <!-- page header and footer -->
2116  <xsl:param name="page-header-margin">1.0cm</xsl:param>
2117  <xsl:param name="page-footer-margin">0.5cm</xsl:param>
2118  <xsl:param name="title-print-in-header">true</xsl:param>
2119  <xsl:param name="page-number-print-in-footer">true</xsl:param>
2120 
2121  <!-- multi column -->
2122  <xsl:param name="column-count">1</xsl:param>
2123  <xsl:param name="column-gap">0px</xsl:param>
2124 
2125  <!-- writing-mode: lr-tb | rl-tb | tb-rl -->
2126  <xsl:param name="writing-mode">lr-tb</xsl:param>
2127 
2128  <!-- text-align: justify | start -->
2129  <xsl:param name="text-align">start</xsl:param>
2130 
2131  <!-- hyphenate: true | false -->
2132  <xsl:param name="hyphenate">false</xsl:param>
2133 
2134 
2135  <!--======================================================================
2136      Attribute Sets
2137  =======================================================================-->
2138 
2139  <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2140       Root
2141  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
2142 
2143  <xsl:attribute-set name="root">
2144    <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
2145    <xsl:attribute name="hyphenate"><xsl:value-of select="$hyphenate"/></xsl:attribute>
2146    <xsl:attribute name="text-align"><xsl:value-of select="$text-align"/></xsl:attribute>
2147    <!-- specified on fo:root to change the properties' initial values -->
2148  </xsl:attribute-set>
2149 
2150  <xsl:attribute-set name="page">
2151    <xsl:attribute name="page-width"><xsl:value-of select="$page-width"/></xsl:attribute>
2152    <xsl:attribute name="page-height"><xsl:value-of select="$page-height"/></xsl:attribute>
2153    <!-- specified on fo:simple-page-master -->
2154  </xsl:attribute-set>
2155 
2156  <xsl:attribute-set name="body">
2157    <!-- specified on fo:flow's only child fo:block -->
2158  </xsl:attribute-set>
2159 
2160  <xsl:attribute-set name="page-header">
2161    <!-- specified on (page-header)fo:static-content's only child fo:block -->
2162    <xsl:attribute name="font-size">small</xsl:attribute>
2163    <xsl:attribute name="text-align">center</xsl:attribute>
2164    <xsl:attribute name="border-after-style">solid</xsl:attribute>
2165    <xsl:attribute name="border-after-width">thin</xsl:attribute>
2166  </xsl:attribute-set>
2167 
2168  <xsl:attribute-set name="page-footer">
2169    <!-- specified on (page-footer)fo:static-content's only child fo:block -->
2170    <xsl:attribute name="font-size">small</xsl:attribute>
2171    <xsl:attribute name="text-align">center</xsl:attribute>
2172    <xsl:attribute name="border-before-style">solid</xsl:attribute>
2173    <xsl:attribute name="border-before-width">thin</xsl:attribute>
2174  </xsl:attribute-set>
2175 
2176  <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2177       Block-level
2178  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
2179 
2180  <xsl:attribute-set name="h1">
2181    <xsl:attribute name="font-size">2em</xsl:attribute>
2182    <xsl:attribute name="font-weight">bold</xsl:attribute>
2183    <xsl:attribute name="space-before">0.67em</xsl:attribute>
2184    <xsl:attribute name="space-after">0.67em</xsl:attribute>
2185    <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
2186    <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
2187  </xsl:attribute-set>
2188 
2189  <xsl:attribute-set name="h2">
2190    <xsl:attribute name="font-size">1.5em</xsl:attribute>
2191    <xsl:attribute name="font-weight">bold</xsl:attribute>
2192    <xsl:attribute name="space-before">0.83em</xsl:attribute>
2193    <xsl:attribute name="space-after">0.83em</xsl:attribute>
2194    <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
2195    <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
2196  </xsl:attribute-set>
2197 
2198  <xsl:attribute-set name="h3">
2199    <xsl:attribute name="font-size">1.17em</xsl:attribute>
2200    <xsl:attribute name="font-weight">bold</xsl:attribute>
2201    <xsl:attribute name="space-before">1em</xsl:attribute>
2202    <xsl:attribute name="space-after">1em</xsl:attribute>
2203    <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
2204    <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
2205  </xsl:attribute-set>
2206 
2207  <xsl:attribute-set name="h4">
2208    <xsl:attribute name="font-size">1em</xsl:attribute>
2209    <xsl:attribute name="font-weight">bold</xsl:attribute>
2210    <xsl:attribute name="space-before">1.17em</xsl:attribute>
2211    <xsl:attribute name="space-after">1.17em</xsl:attribute>
2212    <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
2213    <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
2214  </xsl:attribute-set>
2215 
2216  <xsl:attribute-set name="h5">
2217    <xsl:attribute name="font-size">0.83em</xsl:attribute>
2218    <xsl:attribute name="font-weight">bold</xsl:attribute>
2219    <xsl:attribute name="space-before">1.33em</xsl:attribute>
2220    <xsl:attribute name="space-after">1.33em</xsl:attribute>
2221    <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
2222    <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
2223  </xsl:attribute-set>
2224 
2225  <xsl:attribute-set name="h6">
2226    <xsl:attribute name="font-size">0.67em</xsl:attribute>
2227    <xsl:attribute name="font-weight">bold</xsl:attribute>
2228    <xsl:attribute name="space-before">1.67em</xsl:attribute>
2229    <xsl:attribute name="space-after">1.67em</xsl:attribute>
2230    <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
2231    <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
2232  </xsl:attribute-set>
2233 
2234  <xsl:attribute-set name="p">
2235    <xsl:attribute name="space-before">1em</xsl:attribute>
2236    <xsl:attribute name="space-after">1em</xsl:attribute>
2237    <!-- e.g.,
2238    <xsl:attribute name="text-indent">1em</xsl:attribute>
2239    -->
2240  </xsl:attribute-set>
2241 
2242  <xsl:attribute-set name="p-initial" use-attribute-sets="p">
2243    <!-- initial paragraph, preceded by h1..6 or div -->
2244    <!-- e.g.,
2245    <xsl:attribute name="text-indent">0em</xsl:attribute>
2246    -->
2247  </xsl:attribute-set>
2248 
2249  <xsl:attribute-set name="p-initial-first" use-attribute-sets="p-initial">
2250    <!-- initial paragraph, first child of div, body or td -->
2251  </xsl:attribute-set>
2252 
2253  <xsl:attribute-set name="blockquote">
2254    <xsl:attribute name="start-indent">inherited-property-value(start-indent) + 24pt</xsl:attribute>
2255    <xsl:attribute name="end-indent">inherited-property-value(end-indent) + 24pt</xsl:attribute>
2256    <xsl:attribute name="space-before">1em</xsl:attribute>
2257    <xsl:attribute name="space-after">1em</xsl:attribute>
2258  </xsl:attribute-set>
2259 
2260  <xsl:attribute-set name="pre">
2261    <xsl:attribute name="font-size">0.83em</xsl:attribute>
2262    <xsl:attribute name="font-family">monospace</xsl:attribute>
2263    <xsl:attribute name="white-space">pre</xsl:attribute>
2264    <xsl:attribute name="space-before">1em</xsl:attribute>
2265    <xsl:attribute name="space-after">1em</xsl:attribute>
2266  </xsl:attribute-set>
2267 
2268  <xsl:attribute-set name="address">
2269    <xsl:attribute name="font-style">italic</xsl:attribute>
2270  </xsl:attribute-set>
2271 
2272  <xsl:attribute-set name="hr">
2273    <xsl:attribute name="border">1px inset</xsl:attribute>
2274    <xsl:attribute name="space-before">0.67em</xsl:attribute>
2275    <xsl:attribute name="space-after">0.67em</xsl:attribute>
2276  </xsl:attribute-set>
2277 
2278  <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2279       List
2280  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
2281 
2282  <xsl:attribute-set name="ul">
2283    <xsl:attribute name="space-before">1em</xsl:attribute>
2284    <xsl:attribute name="space-after">1em</xsl:attribute>
2285  </xsl:attribute-set>
2286 
2287  <xsl:attribute-set name="ul-nested">
2288    <xsl:attribute name="space-before">0pt</xsl:attribute>
2289    <xsl:attribute name="space-after">0pt</xsl:attribute>
2290  </xsl:attribute-set>
2291 
2292  <xsl:attribute-set name="ol">
2293    <xsl:attribute name="space-before">1em</xsl:attribute>
2294    <xsl:attribute name="space-after">1em</xsl:attribute>
2295  </xsl:attribute-set>
2296 
2297  <xsl:attribute-set name="ol-nested">
2298    <xsl:attribute name="space-before">0pt</xsl:attribute>
2299    <xsl:attribute name="space-after">0pt</xsl:attribute>
2300  </xsl:attribute-set>
2301 
2302  <xsl:attribute-set name="ul-li">
2303    <!-- for (unordered)fo:list-item -->
2304    <xsl:attribute name="relative-align">baseline</xsl:attribute>
2305  </xsl:attribute-set>
2306 
2307  <xsl:attribute-set name="ol-li">
2308    <!-- for (ordered)fo:list-item -->
2309    <xsl:attribute name="relative-align">baseline</xsl:attribute>
2310  </xsl:attribute-set>
2311 
2312  <xsl:attribute-set name="dl">
2313    <xsl:attribute name="space-before">1em</xsl:attribute>
2314    <xsl:attribute name="space-after">1em</xsl:attribute>
2315  </xsl:attribute-set>
2316 
2317  <xsl:attribute-set name="dt">
2318    <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
2319    <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
2320  </xsl:attribute-set>
2321 
2322  <xsl:attribute-set name="dd">
2323    <xsl:attribute name="start-indent">inherited-property-value(start-indent) + 24pt</xsl:attribute>
2324  </xsl:attribute-set>
2325 
2326  <!-- list-item-label format for each nesting level -->
2327 
2328  <xsl:param name="ul-label-1">&#x2022;</xsl:param>
2329  <xsl:attribute-set name="ul-label-1">
2330    <xsl:attribute name="font">1em serif</xsl:attribute>
2331  </xsl:attribute-set>
2332 
2333  <xsl:param name="ul-label-2">o</xsl:param>
2334  <xsl:attribute-set name="ul-label-2">
2335    <xsl:attribute name="font">0.67em monospace</xsl:attribute>
2336    <xsl:attribute name="baseline-shift">0.25em</xsl:attribute>
2337  </xsl:attribute-set>
2338 
2339  <xsl:param name="ul-label-3">-</xsl:param>
2340  <xsl:attribute-set name="ul-label-3">
2341    <xsl:attribute name="font">bold 0.9em sans-serif</xsl:attribute>
2342    <xsl:attribute name="baseline-shift">0.05em</xsl:attribute>
2343  </xsl:attribute-set>
2344 
2345  <xsl:param name="ol-label-1">1.</xsl:param>
2346  <xsl:attribute-set name="ol-label-1"/>
2347 
2348  <xsl:param name="ol-label-2">a.</xsl:param>
2349  <xsl:attribute-set name="ol-label-2"/>
2350 
2351  <xsl:param name="ol-label-3">i.</xsl:param>
2352  <xsl:attribute-set name="ol-label-3"/>
2353 
2354  <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2355       Table
2356  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
2357   
2358  <xsl:attribute-set name="inside-table">
2359    <!-- prevent unwanted inheritance -->
2360    <xsl:attribute name="start-indent">0pt</xsl:attribute>
2361    <xsl:attribute name="end-indent">0pt</xsl:attribute>
2362    <xsl:attribute name="text-indent">0pt</xsl:attribute>
2363    <xsl:attribute name="last-line-end-indent">0pt</xsl:attribute>
2364    <xsl:attribute name="text-align">start</xsl:attribute>
2365    <!--<xsl:attribute name="text-align-last">relative</xsl:attribute>-->
2366  </xsl:attribute-set>
2367 
2368  <xsl:attribute-set name="table-and-caption" >
2369    <!-- horizontal alignment of table itself
2370    <xsl:attribute name="text-align">center</xsl:attribute>
2371    -->
2372    <!-- vertical alignment in table-cell -->
2373    <xsl:attribute name="display-align">center</xsl:attribute>
2374  </xsl:attribute-set>
2375 
2376  <xsl:attribute-set name="table">
2377    <xsl:attribute name="border-collapse">separate</xsl:attribute>
2378    <xsl:attribute name="border-spacing">2px</xsl:attribute>
2379    <xsl:attribute name="border">1px</xsl:attribute>
2380    <!--
2381    <xsl:attribute name="border-style">outset</xsl:attribute>
2382    -->
2383  </xsl:attribute-set>
2384 
2385  <xsl:attribute-set name="table-caption" use-attribute-sets="inside-table">
2386    <xsl:attribute name="text-align">center</xsl:attribute>
2387  </xsl:attribute-set>
2388 
2389  <xsl:attribute-set name="table-column">
2390  </xsl:attribute-set>
2391 
2392  <xsl:attribute-set name="thead" use-attribute-sets="inside-table">
2393  </xsl:attribute-set>
2394 
2395  <xsl:attribute-set name="tfoot" use-attribute-sets="inside-table">
2396  </xsl:attribute-set>
2397 
2398  <xsl:attribute-set name="tbody" use-attribute-sets="inside-table">
2399  </xsl:attribute-set>
2400 
2401  <xsl:attribute-set name="tr">
2402  </xsl:attribute-set>
2403 
2404  <xsl:attribute-set name="th">
2405    <xsl:attribute name="font-size">9pt</xsl:attribute>
2406    <xsl:attribute name="font-weight">bold</xsl:attribute>
2407    <xsl:attribute name="text-align">center</xsl:attribute>
2408    <xsl:attribute name="background-color">silver</xsl:attribute>
2409    <xsl:attribute name="font-size">9pt</xsl:attribute>
2410    <xsl:attribute name="border">0.1pt</xsl:attribute>
2411    <xsl:attribute name="border-color">black</xsl:attribute>
2412    <!--
2413    <xsl:attribute name="border-style">inset</xsl:attribute>
2414    -->
2415    <xsl:attribute name="padding">1pt</xsl:attribute>
2416  </xsl:attribute-set>
2417 
2418  <xsl:attribute-set name="td">
2419    <xsl:attribute name="font-size">9pt</xsl:attribute>
2420    <xsl:attribute name="border">0.1pt</xsl:attribute>
2421    <xsl:attribute name="border-color">gray</xsl:attribute>
2422    <!--
2423    <xsl:attribute name="border-style">inset</xsl:attribute>
2424    -->
2425    <xsl:attribute name="padding">0.1pt</xsl:attribute>
2426  </xsl:attribute-set>
2427 
2428  <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2429       Inline-level
2430  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
2431 
2432  <xsl:attribute-set name="b">
2433    <xsl:attribute name="font-weight">bold</xsl:attribute>
2434  </xsl:attribute-set>
2435  <xsl:attribute-set name="strong">
2436    <xsl:attribute name="font-weight">bold</xsl:attribute>
2437  </xsl:attribute-set>
2438 
2439  <xsl:attribute-set name="strong-em">
2440    <xsl:attribute name="font-weight">bold</xsl:attribute>
2441    <xsl:attribute name="font-style">italic</xsl:attribute>
2442  </xsl:attribute-set>
2443 
2444  <xsl:attribute-set name="i">
2445    <xsl:attribute name="font-style">italic</xsl:attribute>
2446  </xsl:attribute-set>
2447  <xsl:attribute-set name="cite">
2448    <xsl:attribute name="font-style">italic</xsl:attribute>
2449  </xsl:attribute-set>
2450  <xsl:attribute-set name="em">
2451    <xsl:attribute name="font-style">italic</xsl:attribute>
2452  </xsl:attribute-set>
2453  <xsl:attribute-set name="var">
2454    <xsl:attribute name="font-style">italic</xsl:attribute>
2455  </xsl:attribute-set>
2456  <xsl:attribute-set name="dfn">
2457    <xsl:attribute name="font-style">italic</xsl:attribute>
2458  </xsl:attribute-set>
2459 
2460  <xsl:attribute-set name="tt">
2461    <xsl:attribute name="font-family">monospace</xsl:attribute>
2462  </xsl:attribute-set>
2463  <xsl:attribute-set name="code">
2464    <xsl:attribute name="font-family">monospace</xsl:attribute>
2465  </xsl:attribute-set>
2466  <xsl:attribute-set name="kbd">
2467    <xsl:attribute name="font-family">monospace</xsl:attribute>
2468  </xsl:attribute-set>
2469  <xsl:attribute-set name="samp">
2470    <xsl:attribute name="font-family">monospace</xsl:attribute>
2471  </xsl:attribute-set>
2472 
2473  <xsl:attribute-set name="big">
2474    <xsl:attribute name="font-size">larger</xsl:attribute>
2475  </xsl:attribute-set>
2476  <xsl:attribute-set name="small">
2477    <xsl:attribute name="font-size">smaller</xsl:attribute>
2478  </xsl:attribute-set>
2479 
2480  <xsl:attribute-set name="sub">
2481    <xsl:attribute name="baseline-shift">sub</xsl:attribute>
2482    <xsl:attribute name="font-size">smaller</xsl:attribute>
2483  </xsl:attribute-set>
2484  <xsl:attribute-set name="sup">
2485    <xsl:attribute name="baseline-shift">super</xsl:attribute>
2486    <xsl:attribute name="font-size">smaller</xsl:attribute>
2487  </xsl:attribute-set>
2488 
2489  <xsl:attribute-set name="s">
2490    <xsl:attribute name="text-decoration">line-through</xsl:attribute>
2491  </xsl:attribute-set>
2492  <xsl:attribute-set name="strike">
2493    <xsl:attribute name="text-decoration">line-through</xsl:attribute>
2494  </xsl:attribute-set>
2495  <xsl:attribute-set name="del">
2496    <xsl:attribute name="text-decoration">line-through</xsl:attribute>
2497  </xsl:attribute-set>
2498 
2499  <xsl:attribute-set name="u">
2500    <xsl:attribute name="text-decoration">underline</xsl:attribute>
2501  </xsl:attribute-set>
2502  <xsl:attribute-set name="ins">
2503    <xsl:attribute name="text-decoration">underline</xsl:attribute>
2504  </xsl:attribute-set>
2505 
2506  <xsl:attribute-set name="abbr">
2507    <!-- e.g.,
2508    <xsl:attribute name="font-variant">small-caps</xsl:attribute>
2509    <xsl:attribute name="letter-spacing">0.1em</xsl:attribute>
2510    -->
2511  </xsl:attribute-set>
2512 
2513  <xsl:attribute-set name="acronym">
2514    <!-- e.g.,
2515    <xsl:attribute name="font-variant">small-caps</xsl:attribute>
2516    <xsl:attribute name="letter-spacing">0.1em</xsl:attribute>
2517    -->
2518  </xsl:attribute-set>
2519 
2520  <xsl:attribute-set name="q"/>
2521  <xsl:attribute-set name="q-nested"/>
2522 
2523  <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2524       Image
2525  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
2526 
2527  <xsl:attribute-set name="img">
2528  </xsl:attribute-set>
2529 
2530  <xsl:attribute-set name="img-link">
2531    <xsl:attribute name="border">2px solid</xsl:attribute>
2532  </xsl:attribute-set>
2533 
2534  <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2535       Link
2536  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
2537   
2538  <xsl:attribute-set name="a-link">
2539    <xsl:attribute name="text-decoration">underline</xsl:attribute>
2540    <xsl:attribute name="color">blue</xsl:attribute>
2541  </xsl:attribute-set>
2542 
2543 
2544  <!--======================================================================
2545      Templates
2546  =======================================================================-->
2547 
2548  <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2549       Root
2550  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
2551 
2552  <xsl:template match="html:html">
2553    <fo:root xsl:use-attribute-sets="root">
2554      <xsl:call-template name="process-common-attributes"/>
2555      <xsl:call-template name="make-layout-master-set"/>
2556      <xsl:apply-templates/>
2557    </fo:root>
2558  </xsl:template>
2559 
2560  <xsl:template name="make-layout-master-set">
2561    <fo:layout-master-set>
2562      <fo:simple-page-master master-name="all-pages"
2563                             xsl:use-attribute-sets="page">
2564        <fo:region-body margin-top="{$page-margin-top}"
2565                        margin-right="{$page-margin-right}"
2566                        margin-bottom="{$page-margin-bottom}"
2567                        margin-left="{$page-margin-left}"
2568                        column-count="{$column-count}"
2569                        column-gap="{$column-gap}"/>
2570        <xsl:choose>
2571          <xsl:when test="$writing-mode = 'tb-rl'">
2572            <fo:region-before extent="{$page-margin-right}"
2573                              precedence="true"/>
2574            <fo:region-after  extent="{$page-margin-left}"
2575                              precedence="true"/>
2576            <fo:region-start  region-name="page-header"
2577                              extent="{$page-margin-top}"
2578                              writing-mode="lr-tb"
2579                              display-align="before"/>
2580            <fo:region-end    region-name="page-footer"
2581                              extent="{$page-margin-bottom}"
2582                              writing-mode="lr-tb"
2583                              display-align="after"/>
2584          </xsl:when>
2585          <xsl:when test="$writing-mode = 'rl-tb'">
2586            <fo:region-before region-name="page-header"
2587                              extent="{$page-margin-top}"
2588                              display-align="before"/>
2589            <fo:region-after  region-name="page-footer"
2590                              extent="{$page-margin-bottom}"
2591                              display-align="after"/>
2592            <fo:region-start  extent="{$page-margin-right}"/>
2593            <fo:region-end    extent="{$page-margin-left}"/>
2594          </xsl:when>
2595          <xsl:otherwise><!-- $writing-mode = 'lr-tb' -->
2596            <fo:region-before region-name="page-header"
2597                              extent="{$page-margin-top}"
2598                              display-align="before"/>
2599            <fo:region-after  region-name="page-footer"
2600                              extent="{$page-margin-bottom}"
2601                              display-align="after"/>
2602            <fo:region-start  extent="{$page-margin-left}"/>
2603            <fo:region-end    extent="{$page-margin-right}"/>
2604          </xsl:otherwise>
2605        </xsl:choose>
2606      </fo:simple-page-master>
2607    </fo:layout-master-set>
2608  </xsl:template>
2609 
2610  <xsl:template match="html:head | html:script"/>
2611 
2612  <xsl:template match="html:body">
2613    <fo:page-sequence master-reference="all-pages">
2614      <fo:title>
2615        <xsl:value-of select="/html:html/html:head/html:title"/>
2616      </fo:title>
2617      <fo:static-content flow-name="page-header">
2618        <fo:block space-before.conditionality="retain"
2619                  space-before="{$page-header-margin}"
2620                  xsl:use-attribute-sets="page-header">
2621          <fo:table>
2622            <fo:table-column column-width="30%"/>
2623            <fo:table-column column-width="60%"/>
2624            <fo:table-body>
2625              <fo:table-row>
2626                <fo:table-cell text-align="left" vertical-align="bottom" absolute-position="bottom">
2627                  <fo:block absolute-position="bottom">
2628                    <xsl:text>www.zms-publishing.com</xsl:text>
2629                  </fo:block>
2630                </fo:table-cell>
2631                <fo:table-cell text-align="right" vertical-align="bottom" absolute-position="bottom">
2632                  <fo:block absolute-position="bottom">
2633                    <xsl:if test="$title-print-in-header = 'true'">
2634                      <xsl:value-of select="/html:html/html:head/html:title"/>
2635                    </xsl:if>
2636                  </fo:block>
2637                </fo:table-cell>
2638              </fo:table-row>
2639            </fo:table-body>
2640          </fo:table>
2641        </fo:block>
2642      </fo:static-content>
2643      <fo:static-content flow-name="page-footer">
2644        <fo:block space-before.conditionality="retain"
2645                  space-before="{$page-footer-margin}"
2646                  xsl:use-attribute-sets="page-footer">
2647          <xsl:if test="$page-number-print-in-footer = 'true'">
2648            <xsl:text>- </xsl:text>
2649            <fo:page-number/>
2650            <xsl:text> -</xsl:text>
2651          </xsl:if>
2652        </fo:block>
2653      </fo:static-content>
2654      <fo:flow flow-name="xsl-region-body">
2655        <fo:block xsl:use-attribute-sets="body">
2656          <xsl:call-template name="process-common-attributes"/>
2657          <xsl:apply-templates/>
2658        </fo:block>
2659      </fo:flow>
2660    </fo:page-sequence>
2661  </xsl:template>
2662 
2663  <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2664   process common attributes and children
2665  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
2666 
2667  <xsl:template name="process-common-attributes-and-children">
2668    <xsl:call-template name="process-common-attributes"/>
2669    <xsl:apply-templates/>
2670  </xsl:template>
2671 
2672  <xsl:template name="process-common-attributes">
2673    <xsl:attribute name="role">
2674      <xsl:value-of select="concat('html:', local-name())"/>
2675    </xsl:attribute>
2676   
2677    <xsl:choose>
2678      <xsl:when test="@xml:lang">
2679        <xsl:attribute name="xml:lang">
2680          <xsl:value-of select="@xml:lang"/>
2681        </xsl:attribute>
2682      </xsl:when>
2683      <xsl:when test="@lang">
2684        <xsl:attribute name="xml:lang">
2685          <xsl:value-of select="@lang"/>
2686        </xsl:attribute>
2687      </xsl:when>
2688    </xsl:choose>
2689   
2690    <xsl:choose>
2691      <xsl:when test="@id">
2692        <xsl:attribute name="id">
2693          <xsl:value-of select="@id"/>
2694        </xsl:attribute>
2695      </xsl:when>
2696      <xsl:when test="self::html:a/@name">
2697        <xsl:attribute name="id">
2698          <xsl:value-of select="@name"/>
2699        </xsl:attribute>
2700      </xsl:when>
2701    </xsl:choose>
2702   
2703    <xsl:if test="@align">
2704      <xsl:choose>
2705        <xsl:when test="self::html:caption">
2706        </xsl:when>
2707        <xsl:when test="self::html:img or self::html:object">
2708          <xsl:if test="@align = 'bottom' or @align = 'middle' or @align = 'top'">
2709            <xsl:attribute name="vertical-align">
2710              <xsl:value-of select="@align"/>
2711            </xsl:attribute>
2712          </xsl:if>
2713        </xsl:when>
2714        <xsl:otherwise>
2715          <xsl:call-template name="process-cell-align">
2716            <xsl:with-param name="align" select="@align"/>
2717          </xsl:call-template>
2718        </xsl:otherwise>
2719      </xsl:choose>
2720    </xsl:if>
2721    <xsl:if test="@valign">
2722      <xsl:call-template name="process-cell-valign">
2723        <xsl:with-param name="valign" select="@valign"/>
2724      </xsl:call-template>
2725    </xsl:if>
2726   
2727    <xsl:if test="@style">
2728      <xsl:call-template name="process-style">
2729        <xsl:with-param name="style" select="@style"/>
2730      </xsl:call-template>
2731    </xsl:if>
2732   
2733  </xsl:template>
2734 
2735  <xsl:template name="process-style">
2736    <xsl:param name="style"/>
2737    <!-- e.g., style="text-align: center; color: red"
2738         converted to text-align="center" color="red" -->
2739    <xsl:variable name="name"
2740                  select="normalize-space(substring-before($style, ':'))"/>
2741    <xsl:if test="$name">
2742      <xsl:variable name="value-and-rest"
2743                    select="normalize-space(substring-after($style, ':'))"/>
2744      <xsl:variable name="value">
2745        <xsl:choose>
2746          <xsl:when test="contains($value-and-rest, ';')">
2747            <xsl:value-of select="normalize-space(substring-before(
2748                                  $value-and-rest, ';'))"/>
2749          </xsl:when>
2750          <xsl:otherwise>
2751            <xsl:value-of select="$value-and-rest"/>
2752          </xsl:otherwise>
2753        </xsl:choose>
2754      </xsl:variable>
2755      <xsl:choose>
2756        <xsl:when test="$name = 'width' and (self::html:col or self::html:colgroup)">
2757          <xsl:attribute name="column-width">
2758            <xsl:value-of select="$value"/>
2759          </xsl:attribute>
2760        </xsl:when>
2761        <xsl:when test="$name = 'vertical-align' and (
2762                                 self::html:table or self::html:caption or
2763                                 self::html:thead or self::html:tfoot or
2764                                 self::html:tbody or self::html:colgroup or
2765                                 self::html:col or self::html:tr or
2766                                 self::html:th or self::html:td)">
2767          <xsl:choose>
2768            <xsl:when test="$value = 'top'">
2769              <xsl:attribute name="display-align">before</xsl:attribute>
2770            </xsl:when>
2771            <xsl:when test="$value = 'bottom'">
2772              <xsl:attribute name="display-align">after</xsl:attribute>
2773            </xsl:when>
2774            <xsl:when test="$value = 'middle'">
2775              <xsl:attribute name="display-align">center</xsl:attribute>
2776            </xsl:when>
2777            <xsl:otherwise>
2778              <xsl:attribute name="display-align">auto</xsl:attribute>
2779              <xsl:attribute name="relative-align">baseline</xsl:attribute>
2780            </xsl:otherwise>
2781          </xsl:choose>
2782        </xsl:when>
2783        <xsl:otherwise>
2784          <xsl:attribute name="{$name}">
2785            <xsl:value-of select="$value"/>
2786          </xsl:attribute>
2787        </xsl:otherwise>
2788      </xsl:choose>
2789    </xsl:if>
2790    <xsl:variable name="rest"
2791                  select="normalize-space(substring-after($style, ';'))"/>
2792    <xsl:if test="$rest">
2793      <xsl:call-template name="process-style">
2794        <xsl:with-param name="style" select="$rest"/>
2795      </xsl:call-template>
2796    </xsl:if>
2797  </xsl:template>
2798 
2799 
2800  <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2801       Block-level
2802  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
2803 
2804  <xsl:template match="html:h1">
2805    <fo:block xsl:use-attribute-sets="h1">
2806      <xsl:call-template name="process-common-attributes-and-children"/>
2807    </fo:block>
2808  </xsl:template>
2809 
2810  <xsl:template match="html:h2">
2811    <fo:block xsl:use-attribute-sets="h2">
2812      <xsl:call-template name="process-common-attributes-and-children"/>
2813    </fo:block>
2814  </xsl:template>
2815 
2816  <xsl:template match="html:h3">
2817    <fo:block xsl:use-attribute-sets="h3">
2818      <xsl:call-template name="process-common-attributes-and-children"/>
2819    </fo:block>
2820  </xsl:template>
2821 
2822  <xsl:template match="html:h4">
2823    <fo:block xsl:use-attribute-sets="h4">
2824      <xsl:call-template name="process-common-attributes-and-children"/>
2825    </fo:block>
2826  </xsl:template>
2827 
2828  <xsl:template match="html:h5">
2829    <fo:block xsl:use-attribute-sets="h5">
2830      <xsl:call-template name="process-common-attributes-and-children"/>
2831    </fo:block>
2832  </xsl:template>
2833 
2834  <xsl:template match="html:h6">
2835    <fo:block xsl:use-attribute-sets="h6">
2836      <xsl:call-template name="process-common-attributes-and-children"/>
2837    </fo:block>
2838  </xsl:template>
2839 
2840  <xsl:template match="html:p">
2841    <fo:block xsl:use-attribute-sets="p">
2842      <xsl:call-template name="process-common-attributes-and-children"/>
2843    </fo:block>
2844  </xsl:template>
2845 
2846  <!-- initial paragraph, preceded by h1..6 or div -->
2847  <xsl:template match="html:p[preceding-sibling::*[1][
2848                       self::html:h1 or self::html:h2 or self::html:h3 or
2849                       self::html:h4 or self::html:h5 or self::html:h6 or
2850                       self::html:div]]">
2851    <fo:block xsl:use-attribute-sets="p-initial">
2852      <xsl:call-template name="process-common-attributes-and-children"/>
2853    </fo:block>
2854  </xsl:template>
2855 
2856  <!-- initial paragraph, first child of div, body or td -->
2857  <xsl:template match="html:p[not(preceding-sibling::*) and (
2858                       parent::html:div or parent::html:body or
2859                       parent::html:td)]">
2860    <fo:block xsl:use-attribute-sets="p-initial-first">
2861      <xsl:call-template name="process-common-attributes-and-children"/>
2862    </fo:block>
2863  </xsl:template>
2864 
2865  <xsl:template match="html:blockquote">
2866    <fo:block xsl:use-attribute-sets="blockquote">
2867      <xsl:call-template name="process-common-attributes-and-children"/>
2868    </fo:block>
2869  </xsl:template>
2870 
2871  <xsl:template match="html:pre">
2872    <fo:block xsl:use-attribute-sets="pre">
2873      <xsl:call-template name="process-pre"/>
2874    </fo:block>
2875  </xsl:template>
2876 
2877  <xsl:template name="process-pre">
2878    <xsl:call-template name="process-common-attributes"/>
2879    <!-- remove leading CR/LF/CRLF char -->
2880    <xsl:variable name="crlf"><xsl:text>&#xD;&#xA;</xsl:text></xsl:variable>
2881    <xsl:variable name="lf"><xsl:text>&#xA;</xsl:text></xsl:variable>
2882    <xsl:variable name="cr"><xsl:text>&#xD;</xsl:text></xsl:variable>
2883    <xsl:for-each select="node()">
2884      <xsl:choose>
2885        <xsl:when test="position() = 1 and self::text()">
2886          <xsl:choose>
2887            <xsl:when test="starts-with(., $lf)">
2888              <xsl:value-of select="substring(., 2)"/>
2889            </xsl:when>
2890            <xsl:when test="starts-with(., $crlf)">
2891              <xsl:value-of select="substring(., 3)"/>
2892            </xsl:when>
2893            <xsl:when test="starts-with(., $cr)">
2894              <xsl:value-of select="substring(., 2)"/>
2895            </xsl:when>
2896            <xsl:otherwise>
2897              <xsl:apply-templates select="."/>
2898            </xsl:otherwise>
2899          </xsl:choose>
2900        </xsl:when>
2901        <xsl:otherwise>
2902          <xsl:apply-templates select="."/>
2903        </xsl:otherwise>
2904      </xsl:choose>
2905    </xsl:for-each>
2906  </xsl:template>
2907 
2908  <xsl:template match="html:address">
2909    <fo:block xsl:use-attribute-sets="address">
2910      <xsl:call-template name="process-common-attributes-and-children"/>
2911    </fo:block>
2912  </xsl:template>
2913 
2914  <xsl:template match="html:hr">
2915    <fo:block xsl:use-attribute-sets="hr">
2916      <xsl:call-template name="process-common-attributes"/>
2917    </fo:block>
2918  </xsl:template>
2919 
2920  <xsl:template match="html:div">
2921    <!-- need fo:block-container? or normal fo:block -->
2922    <xsl:variable name="need-block-container">
2923      <xsl:call-template name="need-block-container"/>
2924    </xsl:variable>
2925    <xsl:choose>
2926      <xsl:when test="$need-block-container = 'true'">
2927        <fo:block-container>
2928          <xsl:if test="@dir">
2929            <xsl:attribute name="writing-mode">
2930              <xsl:choose>
2931                <xsl:when test="@dir = 'rtl'">rl-tb</xsl:when>
2932                <xsl:otherwise>lr-tb</xsl:otherwise>
2933              </xsl:choose>
2934            </xsl:attribute>
2935          </xsl:if>
2936          <xsl:call-template name="process-common-attributes"/>
2937          <fo:block start-indent="0pt" end-indent="0pt">
2938            <xsl:apply-templates/>
2939          </fo:block>
2940        </fo:block-container>
2941      </xsl:when>
2942      <xsl:otherwise>
2943        <!-- normal block -->
2944        <fo:block>
2945          <xsl:call-template name="process-common-attributes"/>
2946          <xsl:apply-templates/>
2947        </fo:block>
2948      </xsl:otherwise>
2949    </xsl:choose>
2950  </xsl:template>
2951 
2952  <xsl:template name="need-block-container">
2953    <xsl:choose>
2954      <xsl:when test="@dir">true</xsl:when>
2955      <xsl:when test="@style">
2956        <xsl:variable name="s"
2957                      select="concat(';', translate(normalize-space(@style),
2958                                                    ' ', ''))"/>
2959        <xsl:choose>
2960          <xsl:when test="contains($s, ';width:') or
2961                          contains($s, ';height:') or
2962                          contains($s, ';position:absolute') or
2963                          contains($s, ';position:fixed') or
2964                          contains($s, ';writing-mode:')">true</xsl:when>
2965          <xsl:otherwise>false</xsl:otherwise>
2966        </xsl:choose>
2967      </xsl:when>
2968      <xsl:otherwise>false</xsl:otherwise>
2969    </xsl:choose>
2970  </xsl:template>
2971 
2972  <xsl:template match="html:center">
2973    <fo:block text-align="center">
2974      <xsl:call-template name="process-common-attributes-and-children"/>
2975    </fo:block>
2976  </xsl:template>
2977 
2978  <xsl:template match="html:fieldset | html:form | html:dir | html:menu">
2979    <fo:block space-before="1em" space-after="1em">
2980      <xsl:call-template name="process-common-attributes-and-children"/>
2981    </fo:block>
2982  </xsl:template>
2983 
2984  <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2985       List
2986  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
2987 
2988  <xsl:template match="html:ul">
2989    <fo:list-block xsl:use-attribute-sets="ul">
2990      <xsl:call-template name="process-common-attributes-and-children"/>
2991    </fo:list-block>
2992  </xsl:template>
2993 
2994  <xsl:template match="html:li//html:ul">
2995    <fo:list-block xsl:use-attribute-sets="ul-nested">
2996      <xsl:call-template name="process-common-attributes-and-children"/>
2997    </fo:list-block>
2998  </xsl:template>
2999 
3000  <xsl:template match="html:ol">
3001    <fo:list-block xsl:use-attribute-sets="ol">
3002      <xsl:call-template name="process-common-attributes-and-children"/>
3003    </fo:list-block>
3004  </xsl:template>
3005 
3006  <xsl:template match="html:li//html:ol">
3007    <fo:list-block xsl:use-attribute-sets="ol-nested">
3008      <xsl:call-template name="process-common-attributes-and-children"/>
3009    </fo:list-block>
3010  </xsl:template>
3011 
3012  <xsl:template match="html:ul/html:li">
3013    <fo:list-item xsl:use-attribute-sets="ul-li">
3014      <xsl:call-template name="process-ul-li"/>
3015    </fo:list-item>
3016  </xsl:template>
3017 
3018  <xsl:template name="process-ul-li">
3019    <xsl:call-template name="process-common-attributes"/>
3020    <fo:list-item-label end-indent="label-end()"
3021                        text-align="end" wrap-option="no-wrap">
3022      <fo:block>
3023        <xsl:variable name="depth" select="count(ancestor::html:ul)" />
3024        <xsl:choose>
3025          <xsl:when test="$depth = 1">
3026            <fo:inline xsl:use-attribute-sets="ul-label-1">
3027              <xsl:value-of select="$ul-label-1"/>
3028            </fo:inline>
3029          </xsl:when>
3030          <xsl:when test="$depth = 2">
3031            <fo:inline xsl:use-attribute-sets="ul-label-2">
3032              <xsl:value-of select="$ul-label-2"/>
3033            </fo:inline>
3034          </xsl:when>
3035          <xsl:otherwise>
3036            <fo:inline xsl:use-attribute-sets="ul-label-3">
3037              <xsl:value-of select="$ul-label-3"/>
3038            </fo:inline>
3039          </xsl:otherwise>
3040        </xsl:choose>
3041      </fo:block>
3042    </fo:list-item-label>
3043    <fo:list-item-body start-indent="body-start()">
3044      <fo:block>
3045        <xsl:apply-templates/>
3046      </fo:block>
3047    </fo:list-item-body>
3048  </xsl:template>
3049 
3050  <xsl:template match="html:ol/html:li">
3051    <fo:list-item xsl:use-attribute-sets="ol-li">
3052      <xsl:call-template name="process-ol-li"/>
3053    </fo:list-item>
3054  </xsl:template>
3055 
3056  <xsl:template name="process-ol-li">
3057    <xsl:call-template name="process-common-attributes"/>
3058    <fo:list-item-label end-indent="label-end()"
3059                        text-align="end" wrap-option="no-wrap">
3060      <fo:block>
3061        <xsl:variable name="depth" select="count(ancestor::html:ol)" />
3062        <xsl:choose>
3063          <xsl:when test="$depth = 1">
3064            <fo:inline xsl:use-attribute-sets="ol-label-1">
3065              <xsl:number format="{$ol-label-1}"/>
3066            </fo:inline>
3067          </xsl:when>
3068          <xsl:when test="$depth = 2">
3069            <fo:inline xsl:use-attribute-sets="ol-label-2">
3070              <xsl:number format="{$ol-label-2}"/>
3071            </fo:inline>
3072          </xsl:when>
3073          <xsl:otherwise>
3074            <fo:inline xsl:use-attribute-sets="ol-label-3">
3075              <xsl:number format="{$ol-label-3}"/>
3076            </fo:inline>
3077          </xsl:otherwise>
3078        </xsl:choose>
3079      </fo:block>
3080    </fo:list-item-label>
3081    <fo:list-item-body start-indent="body-start()">
3082      <fo:block>
3083        <xsl:apply-templates/>
3084      </fo:block>
3085    </fo:list-item-body>
3086  </xsl:template>
3087 
3088  <xsl:template match="html:dl">
3089    <fo:block xsl:use-attribute-sets="dl">
3090      <xsl:call-template name="process-common-attributes-and-children"/>
3091    </fo:block>
3092  </xsl:template>
3093 
3094  <xsl:template match="html:dt">
3095    <fo:block xsl:use-attribute-sets="dt">
3096      <xsl:call-template name="process-common-attributes-and-children"/>
3097    </fo:block>
3098  </xsl:template>
3099 
3100  <xsl:template match="html:dd">
3101    <fo:block xsl:use-attribute-sets="dd">
3102      <xsl:call-template name="process-common-attributes-and-children"/>
3103    </fo:block>
3104  </xsl:template>
3105 
3106  <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
3107       Table
3108  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
3109
3110  <xsl:template match="html:table">
3111
3112<!-- ### DN: disable fo:table-and-caption
3113    <fo:table-and-caption xsl:use-attribute-sets="table-and-caption">
3114      <xsl:call-template name="make-table-caption"/>
3115     ### -->
3116      <fo:table xsl:use-attribute-sets="table">
3117        <xsl:call-template name="process-table"/>
3118      </fo:table>
3119<!-- ### DN: disable fo:table-and-caption
3120    </fo:table-and-caption>
3121     ### -->
3122  </xsl:template>
3123 
3124  <xsl:template name="make-table-caption">
3125    <xsl:if test="html:caption/@align">
3126      <xsl:attribute name="caption-side">
3127        <xsl:value-of select="html:caption/@align"/>
3128      </xsl:attribute>
3129    </xsl:if>
3130    <xsl:apply-templates select="html:caption"/>
3131  </xsl:template>
3132 
3133  <xsl:template name="process-table">
3134    <xsl:if test="@width">
3135      <xsl:attribute name="inline-progression-dimension">
3136        <xsl:choose>
3137          <xsl:when test="contains(@width, '%')">
3138            <xsl:value-of select="@width"/>
3139          </xsl:when>
3140          <xsl:otherwise>
3141            <xsl:value-of select="@width"/>px</xsl:otherwise>
3142        </xsl:choose>
3143      </xsl:attribute>
3144    </xsl:if>
3145    <xsl:if test="@border or @frame">
3146      <xsl:choose>
3147        <xsl:when test="@border &gt; 0">
3148          <xsl:attribute name="border">
3149            <xsl:value-of select="@border"/>pt</xsl:attribute>
3150        </xsl:when>
3151      </xsl:choose>
3152      <xsl:choose>
3153        <xsl:when test="@border = '0' or @frame = 'void'">
3154          <xsl:attribute name="border-style">hidden</xsl:attribute>
3155        </xsl:when>
3156        <xsl:when test="@frame = 'above'">
3157          <xsl:attribute name="border-style">outset hidden hidden hidden</xsl:attribute>
3158        </xsl:when>
3159        <xsl:when test="@frame = 'below'">
3160          <xsl:attribute name="border-style">hidden hidden outset hidden</xsl:attribute>
3161        </xsl:when>
3162        <xsl:when test="@frame = 'hsides'">
3163          <xsl:attribute name="border-style">outset hidden</xsl:attribute>
3164        </xsl:when>
3165        <xsl:when test="@frame = 'vsides'">
3166          <xsl:attribute name="border-style">hidden outset</xsl:attribute>
3167        </xsl:when>
3168        <xsl:when test="@frame = 'lhs'">
3169          <xsl:attribute name="border-style">hidden hidden hidden outset</xsl:attribute>
3170        </xsl:when>
3171        <xsl:when test="@frame = 'rhs'">
3172          <xsl:attribute name="border-style">hidden outset hidden hidden</xsl:attribute>
3173        </xsl:when>
3174        <xsl:otherwise>
3175          <xsl:attribute name="border-style">outset</xsl:attribute>
3176        </xsl:otherwise>
3177      </xsl:choose>
3178    </xsl:if>
3179    <xsl:if test="@cellspacing">
3180      <xsl:attribute name="border-spacing">
3181        <xsl:value-of select="@cellspacing"/>pt</xsl:attribute>
3182      <xsl:attribute name="border-collapse">separate</xsl:attribute>
3183    </xsl:if>
3184    <xsl:if test="@rules and (@rules = 'groups' or
3185                      @rules = 'rows' or
3186                      @rules = 'cols' or
3187                      @rules = 'all' and (not(@border or @frame) or
3188                          @border = '0' or @frame and
3189                          not(@frame = 'box' or @frame = 'border')))">
3190      <xsl:attribute name="border-collapse">collapse</xsl:attribute>
3191      <xsl:if test="not(@border or @frame)">
3192        <xsl:attribute name="border-style">hidden</xsl:attribute>
3193      </xsl:if>
3194    </xsl:if>
3195    <xsl:call-template name="process-common-attributes"/>
3196    <xsl:apply-templates select="html:col | html:colgroup"/>
3197    <xsl:apply-templates select="html:thead"/>
3198    <xsl:apply-templates select="html:tfoot"/>
3199    <xsl:choose>
3200      <xsl:when test="html:tbody">
3201        <xsl:apply-templates select="html:tbody"/>
3202      </xsl:when>
3203      <xsl:otherwise>
3204        <fo:table-body xsl:use-attribute-sets="tbody">
3205          <xsl:apply-templates select="html:tr"/>
3206        </fo:table-body>
3207      </xsl:otherwise>
3208    </xsl:choose>
3209  </xsl:template>
3210 
3211  <xsl:template match="html:caption">
3212    <fo:table-caption xsl:use-attribute-sets="table-caption">
3213      <xsl:call-template name="process-common-attributes"/>
3214      <fo:block>
3215        <xsl:apply-templates/>
3216      </fo:block>
3217    </fo:table-caption>
3218  </xsl:template>
3219 
3220  <xsl:template match="html:thead">
3221    <fo:table-header xsl:use-attribute-sets="thead">
3222      <xsl:call-template name="process-table-rowgroup"/>
3223    </fo:table-header>
3224  </xsl:template>
3225 
3226  <xsl:template match="html:tfoot">
3227    <fo:table-footer xsl:use-attribute-sets="tfoot">
3228      <xsl:call-template name="process-table-rowgroup"/>
3229    </fo:table-footer>
3230  </xsl:template>
3231 
3232  <xsl:template match="html:tbody">
3233    <fo:table-body xsl:use-attribute-sets="tbody">
3234      <xsl:call-template name="process-table-rowgroup"/>
3235    </fo:table-body>
3236  </xsl:template>
3237 
3238  <xsl:template name="process-table-rowgroup">
3239    <xsl:if test="ancestor::html:table[1]/@rules = 'groups'">
3240      <xsl:attribute name="border">1pt solid</xsl:attribute>
3241    </xsl:if>
3242    <xsl:call-template name="process-common-attributes-and-children"/>
3243  </xsl:template>
3244 
3245  <xsl:template match="html:colgroup">
3246    <fo:table-column xsl:use-attribute-sets="table-column">
3247      <xsl:call-template name="process-table-column"/>
3248    </fo:table-column>
3249  </xsl:template>
3250 
3251  <xsl:template match="html:colgroup[html:col]">
3252    <xsl:apply-templates/>
3253  </xsl:template>
3254 
3255  <xsl:template match="html:col">
3256    <fo:table-column xsl:use-attribute-sets="table-column">
3257      <xsl:call-template name="process-table-column"/>
3258    </fo:table-column>
3259  </xsl:template>
3260 
3261  <xsl:template name="process-table-column">
3262    <xsl:if test="parent::html:colgroup">
3263      <xsl:call-template name="process-col-width">
3264        <xsl:with-param name="width" select="../@width"/>
3265      </xsl:call-template>
3266      <xsl:call-template name="process-cell-align">
3267        <xsl:with-param name="align" select="../@align"/>
3268      </xsl:call-template>
3269      <xsl:call-template name="process-cell-valign">
3270        <xsl:with-param name="valign" select="../@valign"/>
3271      </xsl:call-template>
3272    </xsl:if>
3273    <xsl:if test="@span">
3274      <xsl:attribute name="number-columns-repeated">
3275        <xsl:value-of select="@span"/>
3276      </xsl:attribute>
3277    </xsl:if>
3278    <xsl:call-template name="process-col-width">
3279      <xsl:with-param name="width" select="@width"/>
3280      <!-- it may override parent colgroup's width -->
3281    </xsl:call-template>
3282    <xsl:if test="ancestor::html:table[1]/@rules = 'cols'">
3283      <xsl:attribute name="border">1pt solid</xsl:attribute>
3284    </xsl:if>
3285    <xsl:call-template name="process-common-attributes"/>
3286    <!-- this processes also align and valign -->
3287  </xsl:template>
3288 
3289  <xsl:template match="html:tr">
3290    <fo:table-row xsl:use-attribute-sets="tr">
3291      <xsl:call-template name="process-table-row"/>
3292    </fo:table-row>
3293  </xsl:template>
3294 
3295  <xsl:template match="html:tr[parent::html:table and html:th and not(html:td)]">
3296    <fo:table-row xsl:use-attribute-sets="tr" keep-with-next="always">
3297      <xsl:call-template name="process-table-row"/>
3298    </fo:table-row>
3299  </xsl:template>
3300 
3301  <xsl:template name="process-table-row">
3302    <xsl:if test="ancestor::html:table[1]/@rules = 'rows'">
3303      <xsl:attribute name="border">1pt solid</xsl:attribute>
3304    </xsl:if>
3305    <xsl:call-template name="process-common-attributes-and-children"/>
3306  </xsl:template>
3307 
3308  <xsl:template match="html:th">
3309    <fo:table-cell xsl:use-attribute-sets="th">
3310      <xsl:call-template name="process-table-cell"/>
3311    </fo:table-cell>
3312  </xsl:template>
3313 
3314  <xsl:template match="html:td">
3315    <fo:table-cell xsl:use-attribute-sets="td">
3316      <xsl:call-template name="process-table-cell"/>
3317    </fo:table-cell>
3318  </xsl:template>
3319 
3320  <xsl:template name="process-table-cell">
3321    <xsl:if test="@colspan">
3322      <xsl:attribute name="number-columns-spanned">
3323        <xsl:value-of select="@colspan"/>
3324      </xsl:attribute>
3325    </xsl:if>
3326    <xsl:if test="@rowspan">
3327      <xsl:attribute name="number-rows-spanned">
3328        <xsl:value-of select="@rowspan"/>
3329      </xsl:attribute>
3330    </xsl:if>
3331    <xsl:for-each select="ancestor::html:table[1]">
3332      <xsl:if test="(@border or @rules) and (@rules = 'all' or
3333                    not(@rules) and not(@border = '0'))">
3334        <xsl:attribute name="border-style">inset</xsl:attribute>
3335      </xsl:if>
3336      <xsl:if test="@cellpadding">
3337        <xsl:attribute name="padding">
3338          <xsl:choose>
3339            <xsl:when test="contains(@cellpadding, '%')">
3340              <xsl:value-of select="@cellpadding"/>
3341            </xsl:when>
3342            <xsl:otherwise>
3343              <xsl:value-of select="@cellpadding"/>pt</xsl:otherwise>
3344          </xsl:choose>
3345        </xsl:attribute>
3346      </xsl:if>
3347    </xsl:for-each>
3348    <xsl:if test="not(@align or ../@align or
3349                      ../parent::*[self::html:thead or self::html:tfoot or
3350                      self::html:tbody]/@align) and
3351                  ancestor::html:table[1]/*[self::html:col or
3352                      self::html:colgroup]/descendant-or-self::*/@align">
3353      <xsl:attribute name="text-align">from-table-column()</xsl:attribute>
3354    </xsl:if>
3355    <xsl:if test="not(@valign or ../@valign or
3356                      ../parent::*[self::html:thead or self::html:tfoot or
3357                      self::html:tbody]/@valign) and
3358                  ancestor::html:table[1]/*[self::html:col or
3359                      self::html:colgroup]/descendant-or-self::*/@valign">
3360      <xsl:attribute name="display-align">from-table-column()</xsl:attribute>
3361      <xsl:attribute name="relative-align">from-table-column()</xsl:attribute>
3362    </xsl:if>
3363    <xsl:call-template name="process-common-attributes"/>
3364    <fo:block>
3365      <xsl:apply-templates/>
3366    </fo:block>
3367  </xsl:template>
3368 
3369  <xsl:template name="process-col-width">
3370    <xsl:param name="width"/>
3371    <xsl:if test="$width and $width != '0*'">
3372      <xsl:attribute name="column-width">
3373        <xsl:choose>
3374          <xsl:when test="contains($width, '*')">
3375            <xsl:text>proportional-column-width(</xsl:text>
3376            <xsl:value-of select="substring-before($width, '*')"/>
3377            <xsl:text>)</xsl:text>
3378          </xsl:when>
3379          <xsl:when test="contains($width, '%')">proportional-column-width(<xsl:value-of select="substring-before($width, '%')"/>)</xsl:when>
3380          <xsl:otherwise>
3381            <xsl:value-of select="$width"/>pt</xsl:otherwise>
3382        </xsl:choose>
3383      </xsl:attribute>
3384    </xsl:if>
3385  </xsl:template>
3386 
3387  <xsl:template name="process-cell-align">
3388    <xsl:param name="align"/>
3389    <xsl:if test="$align">
3390      <xsl:attribute name="text-align">
3391        <xsl:choose>
3392          <xsl:when test="$align = 'char'">
3393            <xsl:choose>
3394              <xsl:when test="$align/../@char">
3395                <xsl:value-of select="$align/../@char"/>
3396              </xsl:when>
3397              <xsl:otherwise>
3398                <xsl:value-of select="'.'"/>
3399                <!-- todo: it should depend on xml:lang ... -->
3400              </xsl:otherwise>
3401            </xsl:choose>
3402          </xsl:when>
3403          <xsl:otherwise>
3404            <xsl:value-of select="$align"/>
3405          </xsl:otherwise>
3406        </xsl:choose>
3407      </xsl:attribute>
3408    </xsl:if>
3409  </xsl:template>
3410 
3411  <xsl:template name="process-cell-valign">
3412    <xsl:param name="valign"/>
3413    <xsl:if test="$valign">
3414      <xsl:attribute name="display-align">
3415        <xsl:choose>
3416          <xsl:when test="$valign = 'middle'">center</xsl:when>
3417          <xsl:when test="$valign = 'bottom'">after</xsl:when>
3418          <xsl:when test="$valign = 'baseline'">auto</xsl:when>
3419          <xsl:otherwise>before</xsl:otherwise>
3420        </xsl:choose>
3421      </xsl:attribute>
3422      <xsl:if test="$valign = 'baseline'">
3423        <xsl:attribute name="relative-align">baseline</xsl:attribute>
3424      </xsl:if>
3425    </xsl:if>
3426  </xsl:template>
3427
3428  <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
3429       Inline-level
3430  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
3431 
3432  <xsl:template match="html:b">
3433    <fo:inline xsl:use-attribute-sets="b">
3434      <xsl:call-template name="process-common-attributes-and-children"/>
3435    </fo:inline>
3436  </xsl:template>
3437 
3438  <xsl:template match="html:strong">
3439    <fo:inline xsl:use-attribute-sets="strong">
3440      <xsl:call-template name="process-common-attributes-and-children"/>
3441    </fo:inline>
3442  </xsl:template>
3443 
3444  <xsl:template match="html:strong//html:em | html:em//html:strong">
3445    <fo:inline xsl:use-attribute-sets="strong-em">
3446      <xsl:call-template name="process-common-attributes-and-children"/>
3447    </fo:inline>
3448  </xsl:template>
3449 
3450  <xsl:template match="html:i">
3451    <fo:inline xsl:use-attribute-sets="i">
3452      <xsl:call-template name="process-common-attributes-and-children"/>
3453    </fo:inline>
3454  </xsl:template>
3455 
3456  <xsl:template match="html:cite">
3457    <fo:inline xsl:use-attribute-sets="cite">
3458      <xsl:call-template name="process-common-attributes-and-children"/>
3459    </fo:inline>
3460  </xsl:template>
3461 
3462  <xsl:template match="html:em">
3463    <fo:inline xsl:use-attribute-sets="em">
3464      <xsl:call-template name="process-common-attributes-and-children"/>
3465    </fo:inline>
3466  </xsl:template>
3467 
3468  <xsl:template match="html:var">
3469    <fo:inline xsl:use-attribute-sets="var">
3470      <xsl:call-template name="process-common-attributes-and-children"/>
3471    </fo:inline>
3472  </xsl:template>
3473 
3474  <xsl:template match="html:dfn">
3475    <fo:inline xsl:use-attribute-sets="dfn">
3476      <xsl:call-template name="process-common-attributes-and-children"/>
3477    </fo:inline>
3478  </xsl:template>
3479 
3480  <xsl:template match="html:tt">
3481    <fo:inline xsl:use-attribute-sets="tt">
3482      <xsl:call-template name="process-common-attributes-and-children"/>
3483    </fo:inline>
3484  </xsl:template>
3485 
3486  <xsl:template match="html:code">
3487    <fo:inline xsl:use-attribute-sets="code">
3488      <xsl:call-template name="process-common-attributes-and-children"/>
3489    </fo:inline>
3490  </xsl:template>
3491 
3492  <xsl:template match="html:kbd">
3493    <fo:inline xsl:use-attribute-sets="kbd">
3494      <xsl:call-template name="process-common-attributes-and-children"/>
3495    </fo:inline>
3496  </xsl:template>
3497 
3498  <xsl:template match="html:samp">
3499    <fo:inline xsl:use-attribute-sets="samp">
3500      <xsl:call-template name="process-common-attributes-and-children"/>
3501    </fo:inline>
3502  </xsl:template>
3503 
3504  <xsl:template match="html:big">
3505    <fo:inline xsl:use-attribute-sets="big">
3506      <xsl:call-template name="process-common-attributes-and-children"/>
3507    </fo:inline>
3508  </xsl:template>
3509 
3510  <xsl:template match="html:small">
3511    <fo:inline xsl:use-attribute-sets="small">
3512      <xsl:call-template name="process-common-attributes-and-children"/>
3513    </fo:inline>
3514  </xsl:template>
3515 
3516  <xsl:template match="html:sub">
3517    <fo:inline xsl:use-attribute-sets="sub">
3518      <xsl:call-template name="process-common-attributes-and-children"/>
3519    </fo:inline>
3520  </xsl:template>
3521 
3522  <xsl:template match="html:sup">
3523    <fo:inline xsl:use-attribute-sets="sup">
3524      <xsl:call-template name="process-common-attributes-and-children"/>
3525    </fo:inline>
3526  </xsl:template>
3527 
3528  <xsl:template match="html:s">
3529    <fo:inline xsl:use-attribute-sets="s">
3530      <xsl:call-template name="process-common-attributes-and-children"/>
3531    </fo:inline>
3532  </xsl:template>
3533 
3534  <xsl:template match="html:strike">
3535    <fo:inline xsl:use-attribute-sets="strike">
3536      <xsl:call-template name="process-common-attributes-and-children"/>
3537    </fo:inline>
3538  </xsl:template>
3539 
3540  <xsl:template match="html:del">
3541    <fo:inline xsl:use-attribute-sets="del">
3542      <xsl:call-template name="process-common-attributes-and-children"/>
3543    </fo:inline>
3544  </xsl:template>
3545 
3546  <xsl:template match="html:u">
3547    <fo:inline xsl:use-attribute-sets="u">
3548      <xsl:call-template name="process-common-attributes-and-children"/>
3549    </fo:inline>
3550  </xsl:template>
3551 
3552  <xsl:template match="html:ins">
3553    <fo:inline xsl:use-attribute-sets="ins">
3554      <xsl:call-template name="process-common-attributes-and-children"/>
3555    </fo:inline>
3556  </xsl:template>
3557 
3558  <xsl:template match="html:abbr">
3559    <fo:inline xsl:use-attribute-sets="abbr">
3560      <xsl:call-template name="process-common-attributes-and-children"/>
3561    </fo:inline>
3562  </xsl:template>
3563 
3564  <xsl:template match="html:acronym">
3565    <fo:inline xsl:use-attribute-sets="acronym">
3566      <xsl:call-template name="process-common-attributes-and-children"/>
3567    </fo:inline>
3568  </xsl:template>
3569 
3570  <xsl:template match="html:span">
3571    <fo:inline>
3572      <xsl:call-template name="process-common-attributes-and-children"/>
3573    </fo:inline>
3574  </xsl:template>
3575 
3576  <xsl:template match="html:span[@dir]">
3577    <fo:bidi-override direction="{@dir}" unicode-bidi="embed">
3578      <xsl:call-template name="process-common-attributes-and-children"/>
3579    </fo:bidi-override>
3580  </xsl:template>
3581 
3582  <xsl:template match="html:span[@style and contains(@style, 'writing-mode')]">
3583    <fo:inline-container alignment-baseline="central"
3584                         text-indent="0pt"
3585                         last-line-end-indent="0pt"
3586                         start-indent="0pt"
3587                         end-indent="0pt"
3588                         text-align="center"
3589                         text-align-last="center">
3590      <xsl:call-template name="process-common-attributes"/>
3591      <fo:block wrap-option="no-wrap" line-height="1">
3592        <xsl:apply-templates/>
3593      </fo:block>
3594    </fo:inline-container>
3595  </xsl:template>
3596 
3597  <xsl:template match="html:bdo">
3598    <fo:bidi-override direction="{@dir}" unicode-bidi="bidi-override">
3599      <xsl:call-template name="process-common-attributes-and-children"/>
3600    </fo:bidi-override>
3601  </xsl:template>
3602 
3603  <xsl:template match="html:br">
3604    <fo:block>
3605      <xsl:call-template name="process-common-attributes"/>
3606    </fo:block>
3607  </xsl:template>
3608 
3609  <xsl:template match="html:q">
3610    <fo:inline xsl:use-attribute-sets="q">
3611      <xsl:call-template name="process-common-attributes"/>
3612      <xsl:choose>
3613        <xsl:when test="lang('ja')">
3614          <xsl:text>「</xsl:text>
3615          <xsl:apply-templates/>
3616          <xsl:text>ã€?</xsl:text>
3617        </xsl:when>
3618        <xsl:otherwise>
3619          <!-- lang('en') -->
3620          <xsl:text>“</xsl:text>
3621          <xsl:apply-templates/>
3622          <xsl:text>â€?</xsl:text>
3623          <!-- todo: other languages ...-->
3624        </xsl:otherwise>
3625      </xsl:choose>
3626    </fo:inline>
3627  </xsl:template>
3628 
3629  <xsl:template match="html:q//html:q">
3630    <fo:inline xsl:use-attribute-sets="q-nested">
3631      <xsl:call-template name="process-common-attributes"/>
3632      <xsl:choose>
3633        <xsl:when test="lang('ja')">
3634          <xsl:text>『</xsl:text>
3635          <xsl:apply-templates/>
3636          <xsl:text>ã€?</xsl:text>
3637        </xsl:when>
3638        <xsl:otherwise>
3639          <!-- lang('en') -->
3640          <xsl:text>‘</xsl:text>
3641          <xsl:apply-templates/>
3642          <xsl:text>’</xsl:text>
3643        </xsl:otherwise>
3644      </xsl:choose>
3645    </fo:inline>
3646  </xsl:template>
3647 
3648  <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
3649       Image
3650  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
3651   
3652  <xsl:template match="html:img">
3653    <fo:external-graphic xsl:use-attribute-sets="img">
3654      <xsl:call-template name="process-img"/>
3655    </fo:external-graphic>
3656  </xsl:template>
3657 
3658  <xsl:template match="html:img[ancestor::html:a/@href]">
3659    <fo:external-graphic xsl:use-attribute-sets="img-link">
3660      <xsl:call-template name="process-img"/>
3661    </fo:external-graphic>
3662  </xsl:template>
3663 
3664  <xsl:template name="process-img">
3665    <xsl:attribute name="src">
3666      <xsl:text>url('</xsl:text>
3667      <xsl:value-of select="@src"/>
3668      <xsl:text>')</xsl:text>
3669    </xsl:attribute>
3670    <xsl:if test="@alt">
3671      <xsl:attribute name="role">
3672        <xsl:value-of select="@alt"/>
3673      </xsl:attribute>
3674    </xsl:if>
3675    <xsl:if test="@width">
3676      <xsl:choose>
3677        <xsl:when test="contains(@width, '%')">
3678          <xsl:attribute name="width">
3679            <xsl:value-of select="@width"/>
3680          </xsl:attribute>
3681          <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
3682        </xsl:when>
3683        <xsl:otherwise>
3684          <xsl:attribute name="content-width">
3685            <xsl:value-of select="@width"/>px</xsl:attribute>
3686        </xsl:otherwise>
3687      </xsl:choose>
3688    </xsl:if>
3689    <xsl:if test="@height">
3690      <xsl:choose>
3691        <xsl:when test="contains(@height, '%')">
3692          <xsl:attribute name="height">
3693            <xsl:value-of select="@height"/>
3694          </xsl:attribute>
3695          <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
3696        </xsl:when>
3697        <xsl:otherwise>
3698          <xsl:attribute name="content-height">
3699            <xsl:value-of select="@height"/>px</xsl:attribute>
3700        </xsl:otherwise>
3701      </xsl:choose>
3702    </xsl:if>
3703    <xsl:if test="@border">
3704      <xsl:attribute name="border">
3705        <xsl:value-of select="@border"/>px solid</xsl:attribute>
3706    </xsl:if>
3707    <xsl:call-template name="process-common-attributes"/>
3708  </xsl:template>
3709 
3710  <xsl:template match="html:object">
3711    <xsl:apply-templates/>
3712  </xsl:template>
3713 
3714  <xsl:template match="html:param"/>
3715  <xsl:template match="html:map"/>
3716  <xsl:template match="html:area"/>
3717  <xsl:template match="html:label"/>
3718  <xsl:template match="html:input"/>
3719  <xsl:template match="html:select"/>
3720  <xsl:template match="html:optgroup"/>
3721  <xsl:template match="html:option"/>
3722  <xsl:template match="html:textarea"/>
3723  <xsl:template match="html:legend"/>
3724  <xsl:template match="html:button"/>
3725 
3726  <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
3727       Link
3728  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
3729 
3730  <xsl:template match="html:a">
3731    <fo:inline>
3732      <xsl:call-template name="process-common-attributes-and-children"/>
3733    </fo:inline>
3734  </xsl:template>
3735 
3736  <xsl:template match="html:a[@href]">
3737    <fo:basic-link xsl:use-attribute-sets="a-link">
3738      <xsl:call-template name="process-a-link"/>
3739    </fo:basic-link>
3740  </xsl:template>
3741 
3742  <xsl:template name="process-a-link">
3743    <xsl:call-template name="process-common-attributes"/>
3744    <xsl:choose>
3745      <xsl:when test="starts-with(@href,'#')">
3746        <xsl:attribute name="internal-destination">
3747          <xsl:value-of select="substring-after(@href,'#')"/>
3748        </xsl:attribute>
3749      </xsl:when>
3750      <xsl:otherwise>
3751        <xsl:attribute name="external-destination">
3752          <xsl:text>url('</xsl:text>
3753          <xsl:value-of select="@href"/>
3754          <xsl:text>')</xsl:text>
3755        </xsl:attribute>
3756      </xsl:otherwise>
3757    </xsl:choose>
3758    <xsl:if test="@title">
3759      <xsl:attribute name="role">
3760        <xsl:value-of select="@title"/>
3761      </xsl:attribute>
3762    </xsl:if>
3763    <xsl:apply-templates/>
3764  </xsl:template>
3765 
3766  <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
3767       Ruby
3768  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
3769 
3770  <xsl:template match="html:ruby">
3771    <fo:inline-container alignment-baseline="central"
3772                         block-progression-dimension="1em"
3773                         text-indent="0pt"
3774                         last-line-end-indent="0pt"
3775                         start-indent="0pt"
3776                         end-indent="0pt"
3777                         text-align="center"
3778                         text-align-last="center">
3779      <xsl:call-template name="process-common-attributes"/>
3780      <fo:block font-size="50%"
3781                wrap-option="no-wrap"
3782                line-height="1"
3783                space-before.conditionality="retain"
3784                space-before="-1.1em"
3785                space-after="0.1em"
3786                role="html:rt">
3787        <xsl:for-each select="html:rt | html:rtc[1]/html:rt">
3788          <xsl:call-template name="process-common-attributes"/>
3789          <xsl:apply-templates/>
3790        </xsl:for-each>
3791      </fo:block>
3792      <fo:block wrap-option="no-wrap" line-height="1" role="html:rb">
3793        <xsl:for-each select="html:rb | html:rbc[1]/html:rb">
3794          <xsl:call-template name="process-common-attributes"/>
3795          <xsl:apply-templates/>
3796        </xsl:for-each>
3797      </fo:block>
3798      <xsl:if test="html:rtc[2]/html:rt">
3799        <fo:block font-size="50%"
3800                  wrap-option="no-wrap"
3801                  line-height="1"
3802                  space-before="0.1em"
3803                  space-after.conditionality="retain"
3804                  space-after="-1.1em"
3805                  role="html:rt">
3806          <xsl:for-each select="html:rt | html:rtc[2]/html:rt">
3807            <xsl:call-template name="process-common-attributes"/>
3808            <xsl:apply-templates/>
3809          </xsl:for-each>
3810        </fo:block>
3811      </xsl:if>
3812    </fo:inline-container>
3813  </xsl:template>
3814</xsl:stylesheet>
3815]]></data></item>
3816<item key="id"><![CDATA[xslt]]></item>
3817</dictionary>
3818</item>
3819<item type="dictionary"><dictionary>
3820<item key="file"/>
3821<item key="id"><![CDATA[fop]]></item>
3822</dictionary>
3823</item>
3824</list>
3825</item>
3826<item key="roles" type="list"><list>
3827<item><![CDATA[ZMSAdministrator]]></item>
3828<item><![CDATA[ZMSAuthor]]></item>
3829<item><![CDATA[ZMSEditor]]></item>
3830</list>
3831</item>
3832</dictionary>
3833</item>
3834</dictionary>
3835</item>
3836<item type="dictionary"><dictionary>
3837<item key="type"><![CDATA[filter]]></item>
3838<item key="value" type="dictionary"><dictionary>
3839<item key="acquired" type="int">0</item>
3840<item key="content_type"><![CDATA[text/html]]></item>
3841<item key="description"/>
3842<item key="format"><![CDATA[import]]></item>
3843<item key="id"><![CDATA[xhtmlImport]]></item>
3844<item key="meta_types" type="list"><list>
3845<item><![CDATA[ZMSFolder]]></item>
3846<item><![CDATA[ZMS]]></item>
3847</list>
3848</item>
3849<item key="name"><![CDATA[Word2000 Html-Filter 2.0]]></item>
3850<item key="processes" type="list"><list>
3851<item type="dictionary"><dictionary>
3852<item key="file" type="file">
3853<data content_type="text/plain" filename="tidy.html2zms.conf" type="file"><![CDATA[add-xml-decl: yes
3854enclose-block-text: yes
3855enclose-text: yes
3856hide-comments: yes
3857input-encoding: utf8
3858doctype: omit
3859output-encoding: utf8
3860show-body-only: yes
3861]]></data></item>
3862<item key="id"><![CDATA[tidy]]></item>
3863</dictionary>
3864</item>
3865<item type="dictionary"><dictionary>
3866<item key="file" type="file">
3867<data content_type="text/xml" filename="html2zms.xsl" type="file"><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>
3868<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3869<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
3870
3871
3872<!-- ###################################################################### -->
3873<!-- ### Document                                                           -->
3874<!-- ###################################################################### -->
3875<xsl:template match="/">
3876
3877  <!-- Display this node -->
3878  <ZMSFolder>
3879    <active><lang>1</lang></active>
3880    <title><lang>HTML-Import</lang></title>
3881    <titlealt><lang>HTML-Import</lang></titlealt>
3882   
3883    <!-- Process child-nodes -->
3884    <xsl:for-each select="//h1">
3885      <xsl:apply-templates select="."/>
3886    </xsl:for-each>
3887   
3888  </ZMSFolder>
3889 
3890</xsl:template>
3891
3892
3893
3894<!-- ###################################################################### -->
3895<!-- ### Heading 1                                                          -->
3896<!-- ###################################################################### -->
3897<xsl:template match="h1">
3898
3899  <!-- Level of this node (passed as parameter!) -->
3900  <xsl:param name="level" select="1"/>
3901 
3902  <!-- Name of this node. -->
3903  <xsl:variable name="seq_name" select="name()"/>
3904 
3905  <!-- Maximum for elements is index of this node's following-sibling with the same name. -->
3906  <xsl:variable name="seq_max">
3907    <xsl:choose>
3908      <xsl:when test="count(following-sibling::*[name()=$seq_name])=0">
3909        0
3910      </xsl:when>
3911      <xsl:otherwise>
3912        <xsl:for-each select="following-sibling::*[name()=$seq_name][1]">
3913          <xsl:number level="single" count="*" format="1"/>
3914        </xsl:for-each>
3915      </xsl:otherwise>
3916    </xsl:choose>
3917  </xsl:variable>
3918 
3919  <!-- Display this node -->
3920  <ZMSDocument>
3921    <active><lang>1</lang></active>
3922    <title><lang><xsl:apply-templates/></lang></title>
3923    <titlealt><lang><xsl:apply-templates/></lang></titlealt>
3924     
3925    <!-- Process child-nodes -->
3926    <xsl:for-each select="following-sibling::*">
3927      <xsl:variable name="seq_idx"><xsl:number level="single" count="*" format="1"/></xsl:variable>
3928      <xsl:if test="$seq_max = 0 or $seq_idx &lt; $seq_max">
3929        <xsl:apply-templates select="." />
3930      </xsl:if>
3931    </xsl:for-each>
3932
3933  </ZMSDocument>
3934
3935</xsl:template>
3936
3937
3938
3939<!-- ###################################################################### -->
3940<!-- ### Headings 2..6                                                      -->
3941<!-- ###################################################################### -->
3942<xsl:template match="h2|h3|h4|h5|h6">
3943
3944  <!-- Format -->
3945  <xsl:variable name="format">
3946    <xsl:choose>
3947      <xsl:when test="name()='h2'">headline_2</xsl:when>
3948      <xsl:when test="name()='h3'">headline_3</xsl:when>
3949      <xsl:when test="name()='h4'">headline_4</xsl:when>
3950      <xsl:when test="name()='h5'">headline_5</xsl:when>
3951      <xsl:when test="name()='h6'">headline_6</xsl:when>
3952    </xsl:choose>
3953  </xsl:variable>
3954
3955  <!-- Text -->
3956  <xsl:variable name="text">
3957    <xsl:apply-templates/>
3958  </xsl:variable>
3959
3960  <!-- Display this node -->
3961  <xsl:if test="string-length($text)>0">
3962    <ZMSTextarea>
3963      <active><lang>1</lang></active>
3964      <format><xsl:value-of select="$format"/></format>
3965      <text><lang><xsl:apply-templates/></lang></text>
3966    </ZMSTextarea>
3967  </xsl:if>
3968
3969</xsl:template>
3970
3971
3972
3973<!-- ###################################################################### -->
3974<!-- ### Paragraphs                                                         -->
3975<!-- ###################################################################### -->
3976<xsl:template match="p">
3977
3978  <xsl:choose>
3979
3980    <!-- Process images --> 
3981    <xsl:when test="count(descendant::img)>0">
3982      <xsl:apply-templates/>
3983    </xsl:when>
3984   
3985    <!-- Process paragraph -->
3986    <xsl:otherwise>
3987   
3988      <!-- Format -->
3989      <xsl:variable name="format">
3990        <xsl:choose>
3991          <xsl:when test="@class='MsoCaption'">caption</xsl:when>
3992          <xsl:when test="@class='Merksatz' or @class='Emphasis'">emphasis</xsl:when>
3993          <xsl:otherwise>body</xsl:otherwise>
3994        </xsl:choose>
3995      </xsl:variable>
3996
3997      <!-- Text -->
3998      <xsl:variable name="text">
3999        <xsl:apply-templates/>
4000      </xsl:variable>
4001
4002      <!-- Display this node -->
4003      <xsl:if test="string-length($text)>0">
4004        <ZMSTextarea>
4005          <active><lang>1</lang></active>
4006          <format><xsl:value-of select="$format"/></format>
4007          <text><lang><xsl:apply-templates/></lang></text>
4008        </ZMSTextarea>
4009      </xsl:if>
4010     
4011    </xsl:otherwise>
4012
4013  </xsl:choose>
4014 
4015</xsl:template>
4016
4017
4018
4019<!-- ###################################################################### -->
4020<!-- ### Tables                                                             -->
4021<!-- ###################################################################### -->
4022
4023  <!-- ===== -->
4024  <!-- Table -->
4025  <!-- ===== -->
4026  <xsl:template match="table">
4027    <ZMSTextarea>
4028      <active><lang>1</lang></active>
4029      <format>html</format>
4030      <text>
4031        <lang>
4032          <table>
4033            <xsl:attribute name="border">1</xsl:attribute>
4034            <xsl:apply-templates/>
4035          </table>
4036        </lang>
4037      </text>
4038    </ZMSTextarea>
4039  </xsl:template>
4040
4041  <!-- ========= -->
4042  <!-- Table.Row -->
4043  <!-- ========= -->
4044  <xsl:template match="table/tr">
4045    <tr><xsl:apply-templates/></tr>
4046  </xsl:template>
4047
4048  <!-- ============ -->
4049  <!-- Table.Header -->
4050  <!-- ============ -->
4051  <xsl:template match="table/tr/th">
4052    <th>
4053      <xsl:if test="string-length(@colspan)>0"><xsl:attribute name="colspan"><xsl:value-of select="@colspan" /></xsl:attribute></xsl:if>
4054      <xsl:if test="string-length(@rowspan)>0"><xsl:attribute name="colspan"><xsl:value-of select="@rowspan" /></xsl:attribute></xsl:if>
4055      <xsl:apply-templates/>
4056    </th>
4057  </xsl:template>
4058  <xsl:template match="table/tr/th/p">
4059    <xsl:apply-templates/>
4060  </xsl:template>
4061
4062  <!-- ========== -->
4063  <!-- Table.Cell -->
4064  <!-- ========== -->
4065  <xsl:template match="table/tr/td">
4066    <td>
4067      <xsl:if test="string-length(@colspan)>0"><xsl:attribute name="colspan"><xsl:value-of select="@colspan" /></xsl:attribute></xsl:if>
4068      <xsl:if test="string-length(@rowspan)>0"><xsl:attribute name="colspan"><xsl:value-of select="@rowspan" /></xsl:attribute></xsl:if>
4069      <xsl:apply-templates/>
4070    </td>
4071  </xsl:template>
4072  <xsl:template match="table/tr/td/p">
4073    <xsl:apply-templates/>
4074  </xsl:template>
4075
4076
4077<!-- ###################################################################### -->
4078<!-- ### Lists                                                              -->
4079<!-- ###################################################################### -->
4080
4081  <!-- ============== -->
4082  <!-- Unordered List -->
4083  <!-- ============== -->
4084  <xsl:template match="ul">
4085    <ZMSTextarea>
4086      <active><lang>1</lang></active>
4087      <format>unordered_list</format>
4088      <text><lang><xsl:apply-templates/></lang></text>
4089    </ZMSTextarea>
4090  </xsl:template>
4091
4092  <!-- ============ -->
4093  <!-- Ordered List -->
4094  <!-- ============ -->
4095  <xsl:template match="ol">
4096    <ZMSTextarea>
4097      <active><lang>1</lang></active>
4098      <format>ordered_list</format>
4099      <text><lang><xsl:apply-templates/></lang></text>
4100    </ZMSTextarea>
4101  </xsl:template>
4102
4103  <!-- ========= -->
4104  <!-- List Item -->
4105  <!-- ========= -->
4106  <xsl:template match="li|li/p">
4107    <xsl:apply-templates/>
4108  </xsl:template>
4109
4110
4111
4112
4113<!-- ###################################################################### -->
4114<!-- ### Images                                                         -->
4115<!-- ###################################################################### -->
4116<xsl:template match="img">
4117  <ZMSGraphic>
4118    <active><lang>1</lang></active>
4119    <img><lang><data>
4120      <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
4121      <xsl:attribute name="height"><xsl:value-of select="@width"/></xsl:attribute>
4122      <xsl:attribute name="filename"><xsl:value-of select="@src"/></xsl:attribute>
4123    </data></lang></img>
4124  </ZMSGraphic>
4125</xsl:template>
4126
4127
4128
4129<!-- ###################################################################### -->
4130<!-- ### Character-Formats (Bold, Italic, Underline)                        -->
4131<!-- ###################################################################### -->
4132<xsl:template match="b">
4133  <b><xsl:apply-templates/></b>
4134</xsl:template>
4135<xsl:template match="i">
4136  <i><xsl:apply-templates/></i>
4137</xsl:template>
4138<xsl:template match="u">
4139  <u><xsl:apply-templates/></u>
4140</xsl:template>
4141
4142
4143
4144<!-- ###################################################################### -->
4145<!-- ### Hyperlinks                                                         -->
4146<!-- ###################################################################### -->
4147<xsl:template match="a">
4148  <a>
4149    <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute>
4150    <xsl:attribute name="target">_blank</xsl:attribute>
4151    <xsl:apply-templates/>
4152  </a>
4153</xsl:template>
4154
4155
4156
4157<!-- ###################################################################### -->
4158<!-- ### Text Nodes                                                         -->
4159<!-- ###################################################################### -->
4160<xsl:template match="h1/text()|h2/text()|h3/text()|h4/text()|h5/text()|h6/text()|p/text()|b/text()|i/text()|u/text()">
4161  <xsl:call-template name="output-nl">
4162     <xsl:with-param name="text" select="." />
4163  </xsl:call-template>
4164</xsl:template>
4165
4166
4167
4168<!-- ###################################################################### -->
4169<!-- ### Unhandled Tags                                                     -->
4170<!-- ###################################################################### -->
4171<xsl:template match="html|body|div|span">
4172  <xsl:apply-templates/>
4173</xsl:template>
4174
4175
4176
4177<!-- ###################################################################### -->
4178<!-- ### Unprocessed Tags                                                     -->
4179<!-- ###################################################################### -->
4180<xsl:template match="style|meta|title" />
4181
4182
4183
4184<!-- ###################################################################### -->
4185<!-- ### Procedures / Functions                                             -->
4186<!-- ###################################################################### -->
4187
4188  <!-- ========================================== -->
4189  <!-- replace in $value substring $from with $to -->
4190  <!-- ========================================== -->
4191  <xsl:template name="replace-substring">
4192    <xsl:param name="value" />
4193    <xsl:param name="from" />
4194    <xsl:param name="to" />
4195    <xsl:choose>
4196         <xsl:when test="contains($value,$from)">
4197            <xsl:value-of select="substring-before($value,$from)" />
4198            <xsl:value-of select="$to" />
4199            <xsl:call-template name="replace-substring">
4200               <xsl:with-param name="value" select="substring-after($value,$from)" />
4201               <xsl:with-param name="from" select="$from" />
4202               <xsl:with-param name="to" select="$to" />
4203            </xsl:call-template>
4204         </xsl:when>
4205         <xsl:otherwise>
4206            <xsl:value-of select="$value" />
4207         </xsl:otherwise>
4208    </xsl:choose>
4209  </xsl:template>
4210
4211  <!-- ========= -->
4212  <!-- output-nl -->
4213  <!-- ========= -->
4214  <xsl:template name="output-nl">
4215    <xsl:param name="text" />
4216
4217    <xsl:variable name="tmp">
4218      <xsl:call-template name="replace-substring">
4219        <xsl:with-param name="from" select="'&#xA;'" />
4220        <xsl:with-param name="to" select="' '" />
4221        <xsl:with-param name="value">
4222          <xsl:call-template name="replace-substring">
4223            <xsl:with-param name="from" select="'&#160;'" />
4224            <xsl:with-param name="to" select="''" />
4225            <xsl:with-param name="value" select="$text" />
4226          </xsl:call-template>
4227        </xsl:with-param>
4228      </xsl:call-template>
4229    </xsl:variable>
4230
4231    <xsl:value-of select="$tmp" />
4232  </xsl:template>
4233     
4234<!-- =========================================================== -->
4235     
4236</xsl:stylesheet>
4237
4238]]></data></item>
4239<item key="id"><![CDATA[xslt]]></item>
4240</dictionary>
4241</item>
4242</list>
4243</item>
4244<item key="roles" type="list"><list>
4245<item><![CDATA[ZMSEditor]]></item>
4246<item><![CDATA[ZMSAuthor]]></item>
4247<item><![CDATA[ZMSAdministrator]]></item>
4248</list>
4249</item>
4250</dictionary>
4251</item>
4252</dictionary>
4253</item>
4254<item type="dictionary"><dictionary>
4255<item key="type"><![CDATA[process]]></item>
4256<item key="value" type="dictionary"><dictionary>
4257<item key="acquired" type="int">0</item>
4258<item key="command"><![CDATA[<!-- BO breakpoint -->
4259
4260<dtml-raise type="breakpoint">*** Breakpoint ***</dtml-raise>
4261
4262<!-- EO breakpoint -->]]></item>
4263<item key="id"><![CDATA[breakpoint]]></item>
4264<item key="name"><![CDATA[*** BREAKPOINT ***]]></item>
4265<item key="type"><![CDATA[DTML Method]]></item>
4266</dictionary>
4267</item>
4268</dictionary>
4269</item>
4270<item type="dictionary"><dictionary>
4271<item key="type"><![CDATA[process]]></item>
4272<item key="value" type="dictionary"><dictionary>
4273<item key="acquired" type="int">0</item>
4274<item key="command"><![CDATA[C:\Programme\zms\tidy\tidy.exe -asxml -config {trans} -m {in}]]></item>
4275<item key="id"><![CDATA[tidy]]></item>
4276<item key="name"><![CDATA[<HTML>Tidy]]></item>
4277<item key="type"><![CDATA[process]]></item>
4278</dictionary>
4279</item>
4280</dictionary>
4281</item>
4282<item type="dictionary"><dictionary>
4283<item key="type"><![CDATA[process]]></item>
4284<item key="value" type="dictionary"><dictionary>
4285<item key="acquired" type="int">0</item>
4286<item key="command"><![CDATA[<!-- BO excel2ZMSRecordSet -->
4287
4288<dtml-let xsl="[]">
4289 <dtml-call "xsl.append('<?xml version='+QUOT+'1.0'+QUOT+' encoding='+QUOT+'ISO-8859-1'+QUOT+'?>\n')">
4290 <dtml-call "xsl.append('<xsl:stylesheet version='+QUOT+'1.0'+QUOT+'\n')">
4291 <dtml-call "xsl.append(' xmlns:xsl='+QUOT+'http://www.w3.org/1999/XSL/Transform'+QUOT+'\n')">
4292 <dtml-call "xsl.append(' xmlns:ss='+QUOT+'urn:schemas-microsoft-com:office:spreadsheet'+QUOT+'\n')">
4293 <dtml-call "xsl.append(' xmlns:spreadsheet='+QUOT+'urn:schemas-microsoft-com:office:spreadsheet'+QUOT+'\n')">
4294 <dtml-call "xsl.append('>\n')">
4295 <dtml-call "xsl.append('<xsl:output method='+QUOT+'xml'+QUOT+' encoding='+QUOT+'ISO-8859-1'+QUOT+'/>\n')">
4296 <dtml-call "xsl.append('<xsl:template match='+QUOT+'/'+QUOT+'>\n')">
4297 <dtml-call "xsl.append('<list>\n')">
4298 <dtml-call "xsl.append('<xsl:for-each select='+QUOT+'spreadsheet:Workbook/spreadsheet:Worksheet/spreadsheet:Table/spreadsheet:Row'+QUOT+'>\n')">
4299 <dtml-call "xsl.append('<item type='+QUOT+'dictionary'+QUOT+'>\n')">
4300 <dtml-call "xsl.append('<dictionary>\n')">
4301 <dtml-in "getMetaobjAttrIds(meta_id)[1:]">
4302  <dtml-let index=sequence-index key=sequence-item metaobjAttr="getMetaobjAttr(meta_id,key)">
4303   <dtml-call "xsl.append('<item')">
4304   <dtml-call "xsl.append(' key='+QUOT+key+QUOT)">
4305   <dtml-call "xsl.append(' type='+QUOT+metaobjAttr['type']+QUOT)">
4306   <dtml-call "xsl.append('>')">
4307   <dtml-if "key=='sort_id'">
4308    <dtml-call "xsl.append('<xsl:value-of select='+QUOT+'position()'+QUOT+'/>')">
4309   <dtml-else>
4310    <dtml-call "xsl.append('<xsl:value-of select='+QUOT+'spreadsheet:Cell[%i]/spreadsheet:Data'%index+QUOT+'/>')">
4311   </dtml-if>
4312   <dtml-call "xsl.append('</item>\n')">
4313  </dtml-let>
4314 </dtml-in>
4315 <dtml-call "xsl.append('</dictionary>\n')">
4316 <dtml-call "xsl.append('</item>\n')">
4317 <dtml-call "xsl.append('</xsl:for-each>\n')">
4318 <dtml-call "xsl.append('</list>\n')">
4319 <dtml-call "xsl.append('</xsl:template>\n')">
4320 <dtml-call "xsl.append('</xsl:stylesheet>\n')">
4321 <dtml-call "localfs_write(ZMS_FILTER_CUR_DIR+'/trans.xsl',''.join(xsl),'')">
4322</dtml-let>
4323
4324<!-- EO excel2ZMSRecordSet -->]]></item>
4325<item key="id"><![CDATA[excel2ZMSRecordSet]]></item>
4326<item key="name"><![CDATA[Excel Recordset-Transformation]]></item>
4327<item key="type"><![CDATA[DTML Method]]></item>
4328</dictionary>
4329</item>
4330</dictionary>
4331</item>
4332<item type="dictionary"><dictionary>
4333<item key="type"><![CDATA[process]]></item>
4334<item key="value" type="dictionary"><dictionary>
4335<item key="acquired" type="int">0</item>
4336<item key="command"><![CDATA[C:\Programme\zms\fop\fop.bat {in} {out.pdf}]]></item>
4337<item key="id"><![CDATA[fop]]></item>
4338<item key="name"><![CDATA[FOP (XSLT)]]></item>
4339<item key="type"><![CDATA[process]]></item>
4340</dictionary>
4341</item>
4342</dictionary>
4343</item>
4344<item type="dictionary"><dictionary>
4345<item key="type"><![CDATA[process]]></item>
4346<item key="value" type="dictionary"><dictionary>
4347<item key="acquired" type="int">0</item>
4348<item key="command"><![CDATA[<!-- BO htmlEntities -->
4349
4350<dtml-let htmlEntities="[]" htmlIn="str(localfs_read(ZMS_FILTER_IN,{'mode':'b','threshold':2**16}))">
4351 <dtml-call "htmlEntities.append('<!DOCTYPE html ')">
4352 <dtml-call "htmlEntities.append('     PUBLIC '+QUOT+'-//W3C//DTD XHTML 1.0 Transitional//EN'+QUOT)">
4353 <dtml-call "htmlEntities.append('     '+QUOT+'xhtml1-transitional.dtd'+QUOT+'>')">
4354 <dtml-call "htmlEntities.append('<html xmlns='+QUOT+'http://www.w3.org/1999/xhtml'+QUOT+'>')">
4355 <dtml-call "localfs_write(ZMS_FILTER_OUT,re_sub('<html(.*)>',''.join(htmlEntities),htmlIn))">
4356</dtml-let>
4357
4358<!-- EO htmlEntities -->]]></item>
4359<item key="id"><![CDATA[htmlEntities]]></item>
4360<item key="name"><![CDATA[HTML-Entities]]></item>
4361<item key="type"><![CDATA[DTML Method]]></item>
4362</dictionary>
4363</item>
4364</dictionary>
4365</item>
4366<item type="dictionary"><dictionary>
4367<item key="type"><![CDATA[process]]></item>
4368<item key="value" type="dictionary"><dictionary>
4369<item key="acquired" type="int">0</item>
4370<item key="command"><![CDATA[echo {trans}]]></item>
4371<item key="id"><![CDATA[nop]]></item>
4372<item key="name"><![CDATA[NOP]]></item>
4373<item key="type"><![CDATA[process]]></item>
4374</dictionary>
4375</item>
4376</dictionary>
4377</item>
4378<item type="dictionary"><dictionary>
4379<item key="type"><![CDATA[process]]></item>
4380<item key="value" type="dictionary"><dictionary>
4381<item key="acquired" type="int">0</item>
4382<item key="command"><![CDATA[<!-- BO ZMSRecordSet2Excel -->
4383
4384<!-- EO ZMSRecordSet2Excel -->]]></item>
4385<item key="id"><![CDATA[ZMSRecordSet2Excel]]></item>
4386<item key="name"><![CDATA[RecordSet Excel-Transformation]]></item>
4387<item key="type"><![CDATA[DTML Method]]></item>
4388</dictionary>
4389</item>
4390</dictionary>
4391</item>
4392<item type="dictionary"><dictionary>
4393<item key="type"><![CDATA[process]]></item>
4394<item key="value" type="dictionary"><dictionary>
4395<item key="acquired" type="int">0</item>
4396<item key="command"><![CDATA[java -jar C:\Programme\zms\saxon\saxon.jar {in} {trans} > {out.xml}]]></item>
4397<item key="id"><![CDATA[xslt]]></item>
4398<item key="name"><![CDATA[XSLT (Saxon)]]></item>
4399<item key="type"><![CDATA[process]]></item>
4400</dictionary>
4401</item>
4402</dictionary>
4403</item>
4404<item type="dictionary"><dictionary>
4405<item key="type"><![CDATA[process]]></item>
4406<item key="value" type="dictionary"><dictionary>
4407<item key="acquired" type="int">0</item>
4408<item key="command"><![CDATA[java -jar C:\Programme\zms\saxon\saxon.jar {in} {cur_dir}/trans.xsl > {out.xml}]]></item>
4409<item key="id"><![CDATA[xslt_trans_xsl]]></item>
4410<item key="name"><![CDATA[XSLT (Saxon) {cur_dir}/trans.xsl]]></item>
4411<item key="type"><![CDATA[process]]></item>
4412</dictionary>
4413</item>
4414</dictionary>
4415</item>
4416</list>
Note: See TracBrowser for help on using the repository browser.