aboutsummaryrefslogtreecommitdiffstats
path: root/fop/test/xml/bugtests/text-transform.fo
blob: ae1160cca9774d51a120bed49d6deb00a9d67b66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?xml version="1.0" encoding="UTF-8"?>

<!--
 * $Id$
 * Copyright (C) 2002 The Apache Software Foundation. All rights reserved.
 * For details on use and redistribution please refer to the
 * LICENSE file included with these sources."
-->

<!-- This is a test of the XSL-FO text-transform property -->
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xml.apache.org/fop/extensions">
  <fo:layout-master-set>
    <fo:simple-page-master master-name="main" page-height="8.5in" page-width="5.5in" margin-top=".5in" margin-bottom=".5in" margin-left=".5in" margin-right=".5in">
      <fo:region-body margin-top=".375in" region-name="xsl-region-body"/>
      <fo:region-before extent=".375in" region-name="xsl-region-before"/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="main">
    <fo:static-content font-size="14pt" font-family="Times Roman" text-align="center" flow-name="xsl-region-before">
      <fo:block>Tests of the XSL-FO text-transform property</fo:block>
    </fo:static-content>
    <fo:flow flow-name="xsl-region-body" font-family="Times Roman" font-size="11pt" text-align="justify" language="en">
      <fo:block space-before.optimum="12pt" font-family="Courier">text-transform="none"</fo:block>
      <fo:list-block start-indent="1.5em" text-transform="none">
        <fo:list-item>
          <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
          <fo:list-item-body start-indent="2.2em">
            <fo:block>All characters should be left intact. In this example,
only the first character of each sentence should be capitalized.</fo:block>
          </fo:list-item-body>
        </fo:list-item>
      </fo:list-block>
      <fo:block space-before.optimum="12pt" font-family="Courier">text-transform="uppercase"</fo:block>
      <fo:list-block start-indent="1.5em" text-transform="uppercase">
        <fo:list-item>
          <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
          <fo:list-item-body start-indent="2.2em">
            <fo:block>Everything in this paragraph should be upper case.</fo:block>
          </fo:list-item-body>
        </fo:list-item>
      </fo:list-block>
      <fo:block space-before.optimum="12pt" font-family="Courier">text-transform="lowercase"</fo:block>
      <fo:list-block start-indent="1.5em" text-transform="lowercase">
        <fo:list-item>
          <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
          <fo:list-item-body start-indent="2.2em">
            <fo:block>Everything in this paragraph should be lower case.</fo:block>
          </fo:list-item-body>
        </fo:list-item>
      </fo:list-block>
      <fo:block space-before.optimum="12pt" font-family="Courier">text-transform="capitalize"</fo:block>
      <fo:list-block start-indent="1.5em" text-transform="capitalize">
        <fo:list-item>
          <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
          <fo:list-item-body start-indent="2.2em">
            <fo:block>In this test, and all tests in this section, the first
character of each word should be uppercase, and nothing else, unless
otherwise noted.</fo:block>
          </fo:list-item-body>
        </fo:list-item>
        <fo:list-item>
          <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
          <fo:list-item-body start-indent="2.2em">
            <fo:block><fo:inline font-style="italic">apostrophe or right single
quote?: </fo:inline>homer simpson&#x2019;s biggest &#x2018;problem&#x2019; is
probably not Bart.</fo:block>
          </fo:list-item-body>
        </fo:list-item>
        <fo:list-item>
          <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
          <fo:list-item-body start-indent="2.2em">
            <fo:block><fo:inline font-style="italic">ugly ASCII apostrophe or
single quote?: </fo:inline>Don't use a straight apostrophe when you have a
'real' one available.</fo:block>
          </fo:list-item-body>
        </fo:list-item>
        <fo:list-item>
          <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
          <fo:list-item-body start-indent="2.2em">
            <fo:block><fo:inline font-style="italic">unusual punctuation:
              </fo:inline>the man from u.n.c.l.e. (All characters in
                the last word should be uppercase).</fo:block>
          </fo:list-item-body>
        </fo:list-item>
        <fo:list-item hyphenate="true" language="en">
          <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
          <fo:list-item-body start-indent="2.2em">
            <fo:block><fo:inline font-style="italic">em-dash:
</fo:inline>indicates a new word�like this.</fo:block>
          </fo:list-item-body>
        </fo:list-item>
        <fo:list-item hyphenate="true" language="en">
          <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
          <fo:list-item-body start-indent="2.2em">
            <fo:block><fo:inline font-style="italic">en-dash:
</fo:inline>indicates a new word�like this.</fo:block>
          </fo:list-item-body>
        </fo:list-item>
        <fo:list-item hyphenate="true" language="en">
          <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
          <fo:list-item-body start-indent="2.2em">
            <fo:block><fo:inline font-style="italic">hyphenation:
</fo:inline>The post-hyphen portion of a word should not be capitalized.
this-expression-should-all-be-treated-as-one-word-and-should-continue-on-following-lines-as-one-word.</fo:block>
          </fo:list-item-body>
        </fo:list-item>
        <fo:list-item hyphenate="true" language="en">
          <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
          <fo:list-item-body start-indent="2.2em">
            <fo:block><fo:inline font-style="italic">automatic hyphenation:</fo:inline>
Internationalization disambiguation.
Internationalization disambiguation.
Internationalization disambiguation.
Internationalization disambiguation.
Internationalization disambiguation.
Internationalization disambiguation.</fo:block>
          </fo:list-item-body>
        </fo:list-item>
        <fo:list-item>
          <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
          <fo:list-item-body start-indent="2.2em">
            <fo:block><fo:inline font-style="italic">nested wrappers:
</fo:inline>Only the first character of the following word should be capitalized:
<fo:wrapper text-transform="capitalize">e<fo:wrapper>x</fo:wrapper>tensible</fo:wrapper>.
            </fo:block>
          </fo:list-item-body>
        </fo:list-item>
      </fo:list-block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>

<!-- Last Line of $RCSfile$ -->