File: test-fo.xml

package info (click to toggle)
cocoon 1.8-1
  • links: PTS
  • area: contrib
  • in suites: woody
  • size: 12,016 kB
  • ctags: 3,793
  • sloc: xml: 16,682; java: 8,089; sh: 174; makefile: 61
file content (110 lines) | stat: -rw-r--r-- 3,707 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?xml version="1.0"?>

<?cocoon-format type="text/xslfo"?>

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
 <fo:layout-master-set>
  <fo:simple-page-master page-master-name="one" margin-left="100pt" margin-right="100pt">
   <fo:region-body margin-top="50pt" margin-bottom="50pt"/>
  </fo:simple-page-master>
 </fo:layout-master-set>
 
 <fo:page-sequence>
  <fo:sequence-specification>
   <fo:sequence-specifier-repeating page-master-first="one" page-master-repeating="one"/>
  </fo:sequence-specification>
  
  <fo:flow font-size="12pt" line-height="12pt">
 
   <fo:block text-align="centered" font-size="24pt" line-height="28pt">Welcome 
   to Cocoon</fo:block>

   <fo:block space-before.optimum="30pt" text-align="justified">This is an 
   example of the use of XSL formatting objects rendered in PDF. Cocoon uses
   the Apache FOP project to do this. It is early days, but FOP is increasingly 
   supporting more and more formatting objects.</fo:block>
  
   <fo:block text-align="justified" space-before.optimum="30pt">What follows 
   is a list:</fo:block>
  
   <fo:list-block space-before.optimum="6pt">
    <fo:list-item space-before.optimum="12pt">
     <fo:list-item-label>
      <fo:block>1.</fo:block>
     </fo:list-item-label>
     <fo:list-item-body>
      <fo:block text-align="justified">This is item one. It is going to go 
      for a little longer to see if this list-item-body correctly wraps. 
      There, that should be enough.</fo:block>
     </fo:list-item-body>
    </fo:list-item>

    <fo:list-item space-before.optimum="12pt">
     <fo:list-item-label>
      <fo:block>2.</fo:block>
     </fo:list-item-label>
     <fo:list-item-body>
      <fo:block text-align="justified">This is item two. It has two blocks in 
      the body. This is the first.</fo:block>
      <fo:block text-align="justified" space-before.optimum="6pt">This is the second.</fo:block>
     </fo:list-item-body>
    </fo:list-item>
 
    <fo:list-item space-before.optimum="12pt">
     <fo:list-item-label>
      <fo:block>3.</fo:block>
     </fo:list-item-label>
     <fo:list-item-body>
      <fo:block text-align="justified">This is item three.</fo:block>
     </fo:list-item-body>
    </fo:list-item>
   </fo:list-block>

   <fo:block text-align="justified" space-before.optimum="30pt">Now a table:</fo:block>
      
   <fo:table space-before.optimum="6pt" text-align="centered">
    <fo:table-column column-width="150pt"/>
    <fo:table-column column-width="150pt"/>   
    <fo:table-body>
     <fo:table-row space-before.optimum="6pt">
      <fo:table-cell>
       <fo:block>Cell (1,1)</fo:block>
      </fo:table-cell>
      <fo:table-cell>
       <fo:block>Cell (1,2)</fo:block>
      </fo:table-cell>
     </fo:table-row>
     <fo:table-row space-before.optimum="6pt">
      <fo:table-cell>
       <fo:block>Cell (2,1)</fo:block>
      </fo:table-cell>
      <fo:table-cell>
       <fo:block>Cell (2,2)</fo:block>
      </fo:table-cell>
     </fo:table-row>
     <fo:table-row space-before.optimum="6pt">
      <fo:table-cell>
       <fo:block>Cell (3,1)</fo:block>
      </fo:table-cell>
      <fo:table-cell>
       <fo:block>Cell (3,2)</fo:block>
      </fo:table-cell>
     </fo:table-row>
    </fo:table-body>
   </fo:table>

   <fo:block text-align="justified" space-before.optimum="30pt">This is a
   text paragraph. This paragraph has to be long enough that it wraps so I 
   can test out text-align. That means I have to keep going and going until 
   I get at least a few lines to play with. I wonder if that's enough. Let 
   me go and check. Yep.</fo:block>
   
   <!-- <fo:display-graphic href="c:\cocoon.jpg"/> -->
      
  </fo:flow>
  
 </fo:page-sequence>
 
</fo:root>