]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
test for the text-transform function
authorWilliam Victor Mote <vmote@apache.org>
Sun, 1 Dec 2002 22:18:36 +0000 (22:18 +0000)
committerWilliam Victor Mote <vmote@apache.org>
Sun, 1 Dec 2002 22:18:36 +0000 (22:18 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195700 13f79535-47bb-0310-9956-ffa450edef68

test/xml/bugtests/text-transform.fo [new file with mode: 0644]

diff --git a/test/xml/bugtests/text-transform.fo b/test/xml/bugtests/text-transform.fo
new file mode 100644 (file)
index 0000000..ae1160c
--- /dev/null
@@ -0,0 +1,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\97like 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\96like 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$ -->
\ No newline at end of file