You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

text-transform.fo 6.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. * $Id$
  4. * Copyright (C) 2002 The Apache Software Foundation. All rights reserved.
  5. * For details on use and redistribution please refer to the
  6. * LICENSE file included with these sources."
  7. -->
  8. <!-- This is a test of the XSL-FO text-transform property -->
  9. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xml.apache.org/fop/extensions">
  10. <fo:layout-master-set>
  11. <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">
  12. <fo:region-body margin-top=".375in" region-name="xsl-region-body"/>
  13. <fo:region-before extent=".375in" region-name="xsl-region-before"/>
  14. </fo:simple-page-master>
  15. </fo:layout-master-set>
  16. <fo:page-sequence master-reference="main">
  17. <fo:static-content font-size="14pt" font-family="Times Roman" text-align="center" flow-name="xsl-region-before">
  18. <fo:block>Tests of the XSL-FO text-transform property</fo:block>
  19. </fo:static-content>
  20. <fo:flow flow-name="xsl-region-body" font-family="Times Roman" font-size="11pt" text-align="justify" language="en">
  21. <fo:block space-before.optimum="12pt" font-family="Courier">text-transform="none"</fo:block>
  22. <fo:list-block start-indent="1.5em" text-transform="none">
  23. <fo:list-item>
  24. <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
  25. <fo:list-item-body start-indent="2.2em">
  26. <fo:block>All characters should be left intact. In this example,
  27. only the first character of each sentence should be capitalized.</fo:block>
  28. </fo:list-item-body>
  29. </fo:list-item>
  30. </fo:list-block>
  31. <fo:block space-before.optimum="12pt" font-family="Courier">text-transform="uppercase"</fo:block>
  32. <fo:list-block start-indent="1.5em" text-transform="uppercase">
  33. <fo:list-item>
  34. <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
  35. <fo:list-item-body start-indent="2.2em">
  36. <fo:block>Everything in this paragraph should be upper case.</fo:block>
  37. </fo:list-item-body>
  38. </fo:list-item>
  39. </fo:list-block>
  40. <fo:block space-before.optimum="12pt" font-family="Courier">text-transform="lowercase"</fo:block>
  41. <fo:list-block start-indent="1.5em" text-transform="lowercase">
  42. <fo:list-item>
  43. <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
  44. <fo:list-item-body start-indent="2.2em">
  45. <fo:block>Everything in this paragraph should be lower case.</fo:block>
  46. </fo:list-item-body>
  47. </fo:list-item>
  48. </fo:list-block>
  49. <fo:block space-before.optimum="12pt" font-family="Courier">text-transform="capitalize"</fo:block>
  50. <fo:list-block start-indent="1.5em" text-transform="capitalize">
  51. <fo:list-item>
  52. <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
  53. <fo:list-item-body start-indent="2.2em">
  54. <fo:block>In this test, and all tests in this section, the first
  55. character of each word should be uppercase, and nothing else, unless
  56. otherwise noted.</fo:block>
  57. </fo:list-item-body>
  58. </fo:list-item>
  59. <fo:list-item>
  60. <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
  61. <fo:list-item-body start-indent="2.2em">
  62. <fo:block><fo:inline font-style="italic">apostrophe or right single
  63. quote?: </fo:inline>homer simpson&#x2019;s biggest &#x2018;problem&#x2019; is
  64. probably not Bart.</fo:block>
  65. </fo:list-item-body>
  66. </fo:list-item>
  67. <fo:list-item>
  68. <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
  69. <fo:list-item-body start-indent="2.2em">
  70. <fo:block><fo:inline font-style="italic">ugly ASCII apostrophe or
  71. single quote?: </fo:inline>Don't use a straight apostrophe when you have a
  72. 'real' one available.</fo:block>
  73. </fo:list-item-body>
  74. </fo:list-item>
  75. <fo:list-item>
  76. <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
  77. <fo:list-item-body start-indent="2.2em">
  78. <fo:block><fo:inline font-style="italic">unusual punctuation:
  79. </fo:inline>the man from u.n.c.l.e. (All characters in
  80. the last word should be uppercase).</fo:block>
  81. </fo:list-item-body>
  82. </fo:list-item>
  83. <fo:list-item hyphenate="true" language="en">
  84. <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
  85. <fo:list-item-body start-indent="2.2em">
  86. <fo:block><fo:inline font-style="italic">em-dash:
  87. </fo:inline>indicates a new word—like this.</fo:block>
  88. </fo:list-item-body>
  89. </fo:list-item>
  90. <fo:list-item hyphenate="true" language="en">
  91. <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
  92. <fo:list-item-body start-indent="2.2em">
  93. <fo:block><fo:inline font-style="italic">en-dash:
  94. </fo:inline>indicates a new word–like this.</fo:block>
  95. </fo:list-item-body>
  96. </fo:list-item>
  97. <fo:list-item hyphenate="true" language="en">
  98. <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
  99. <fo:list-item-body start-indent="2.2em">
  100. <fo:block><fo:inline font-style="italic">hyphenation:
  101. </fo:inline>The post-hyphen portion of a word should not be capitalized.
  102. this-expression-should-all-be-treated-as-one-word-and-should-continue-on-following-lines-as-one-word.</fo:block>
  103. </fo:list-item-body>
  104. </fo:list-item>
  105. <fo:list-item hyphenate="true" language="en">
  106. <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
  107. <fo:list-item-body start-indent="2.2em">
  108. <fo:block><fo:inline font-style="italic">automatic hyphenation:</fo:inline>
  109. Internationalization disambiguation.
  110. Internationalization disambiguation.
  111. Internationalization disambiguation.
  112. Internationalization disambiguation.
  113. Internationalization disambiguation.
  114. Internationalization disambiguation.</fo:block>
  115. </fo:list-item-body>
  116. </fo:list-item>
  117. <fo:list-item>
  118. <fo:list-item-label><fo:block>&#x2022;</fo:block></fo:list-item-label>
  119. <fo:list-item-body start-indent="2.2em">
  120. <fo:block><fo:inline font-style="italic">nested wrappers:
  121. </fo:inline>Only the first character of the following word should be capitalized:
  122. <fo:wrapper text-transform="capitalize">e<fo:wrapper>x</fo:wrapper>tensible</fo:wrapper>.
  123. </fo:block>
  124. </fo:list-item-body>
  125. </fo:list-item>
  126. </fo:list-block>
  127. </fo:flow>
  128. </fo:page-sequence>
  129. </fo:root>
  130. <!-- Last Line of $RCSfile$ -->