diff options
author | Karen Lease <klease@apache.org> | 2001-01-02 21:49:15 +0000 |
---|---|---|
committer | Karen Lease <klease@apache.org> | 2001-01-02 21:49:15 +0000 |
commit | 12b359838542b24b5de58dd5b2a3e46aa6042a64 (patch) | |
tree | 70972697562f4d3c4936833d9d7394342ef3e3a8 | |
parent | bc77d284c5d95b00da3c63d5ab6dab21873235eb (diff) | |
download | xmlgraphics-fop-12b359838542b24b5de58dd5b2a3e46aa6042a64.tar.gz xmlgraphics-fop-12b359838542b24b5de58dd5b2a3e46aa6042a64.zip |
update for new properties functionality
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193945 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | docs/examples/fo/corresprop.fo | 237 | ||||
-rw-r--r-- | docs/examples/fo/inhprop.fo | 3 |
2 files changed, 240 insertions, 0 deletions
diff --git a/docs/examples/fo/corresprop.fo b/docs/examples/fo/corresprop.fo new file mode 100644 index 000000000..bc859f98f --- /dev/null +++ b/docs/examples/fo/corresprop.fo @@ -0,0 +1,237 @@ +<?xml version="1.0" encoding="utf-8"?> + + +<!-- example for a simple fo file. At the beginning the page layout is set. +Below fo:root there is always +- a single fo:layout-master-set which defines one or more page layouts +- an optional fo:declarations, +- and a sequence of one or more fo:page-sequences containing the text and formatting instructions --> + +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + + <fo:layout-master-set> + <!-- fo:layout-master-set defines in its children the page layout: + the pagination and layout specifications + - page-masters: have the role of describing the intended subdivisions + of a page and the geometry of these subdivisions + - page-sequence-masters: have the role of describing the sequence + of page-masters that will be used to generate + pages during the formatting of an fo:page-sequence + + --> + + <!-- layout for the first page --> + <fo:simple-page-master master-name="first" + page-height="29.7cm" + page-width="21cm" + margin-top="1cm" + margin-bottom="2cm" + margin-left="2.0cm + 0.5cm" + margin-right="(5cm * 1cm) div 2cm"> + <fo:region-body margin-top="3cm"/> + <fo:region-before extent="3cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + + <!-- layout for the other pages --> + <fo:simple-page-master master-name="rest" + page-height="abs(-30cm + .3cm)" + page-width="(10cm * 2) + 1cm" + margin-top="round(.5) * 1cm" + margin-bottom="round(2.4) * 1cm" + margin-left="2.5 * 1cm" + margin-right="5.5cm - 3cm"> + <fo:region-body margin-top="2.5cm"/> + <fo:region-before extent="2.5cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + +<fo:page-sequence-master master-name="basicPSM" > + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-name="first" + page-position="first" /> + <fo:conditional-page-master-reference master-name="rest" + page-position="rest" /> + <!-- recommended fallback procedure --> + <fo:conditional-page-master-reference master-name="rest" /> + </fo:repeatable-page-master-alternatives> +</fo:page-sequence-master> + + </fo:layout-master-set> + <!-- end: defines page layout --> + + <!-- actual layout --> + <fo:page-sequence master-name="basicPSM"> + + <!-- header --> + <fo:static-content flow-name="xsl-region-before"> + <fo:block text-align="end" + font-size="10pt" + font-family="serif" + line-height="1em + 4pt" > + Corresponding Property Tests - p. <fo:page-number/> + </fo:block> + </fo:static-content> + + <fo:flow flow-name="xsl-region-body"> + + <!-- defines text title level 1--> + <fo:block font-size="min(18pt,20pt)" + font-family="sans-serif" + line-height="max(24pt,18pt)" + space-after.optimum="5 mod 3 * 7.5pt" + background-color="rgb(0,0,255)" + color="rgb(255,255,255)" + text-align="center" + padding-top="3pt"> + Corresponding Property Tests + </fo:block> + + <!-- Normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-after="12pt" + text-align="start" + background-color="rgb(200,200,200)" + start-indent="3mm" end-indent="3mm" + padding-left="3mm" padding-right="3mm" + padding-top="4mm" padding-bottom="4mm" + border-left-width="1pt" border-right-width="1pt" + border-top-width="2pt" border-bottom-width="2pt" + border-top-color="red" border-bottom-color="blue"> +In this example, padding and border properties are specified using absolute properties: +padding-left, padding-right, padding-top, and padding-bottom, etc. +According to the specification, a request for the absolute (top, bottom, left, right) versions of these properties should use the relative ones if they are specified. +</fo:block> + + <!-- Normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-after="3pt" + text-align="start" + background-color="rgb(200,200,200)" + start-indent="3mm" end-indent="3mm" + padding-before="4mm" padding-after="4mm" + padding-start.length="3mm" padding-end.length="3mm" + border-start-width="1pt" border-end-width="1pt" + border-before-width="2pt" border-after-width="2pt" + border-before-color="red" border-after-color="blue"> +In this example, padding and border properties are specified using writing-mode relative properties: +padding-before, padding-after, padding-start, and padding-end, etc. +According to the specification, a request for the absolute (top, bottom, left, right) versions of these properties should use the relative ones if they are specified. +</fo:block> + + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-before="12pt" + space-after="3pt" + text-align="start" + start-indent="1cm"> + This block has a start-indent of 1cm and no borders or padding. It has +no margin-left set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block. + </fo:block> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-before="12pt" + space-after="3pt" + text-align="start" + margin-left="1cm"> + This block has a margin-left of 1cm and no borders or padding. It has +no start-indent set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block. + </fo:block> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-before="12pt" + space-after="3pt" + text-align="start" + start-indent="1cm" + padding-left="4mm" border-left-width="1mm"> + This block has a start-indent of 1cm, padding-left of 4mm and border-left-width of 1mm. It has +no margin-left set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block. + </fo:block> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-before="12pt" + space-after="3pt" + text-align="start" + margin-left="5mm" + padding-left="4mm" border-left-width="1mm"> + This block has a margin-left of 5mm, padding-left of 4mm and border-left-width of 1mm. (Margin is outside the border rectangle.) It has +no start-indent set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block. + </fo:block> + + <!-- defines text title level 1--> + <fo:block font-size="14pt" + font-family="serif" + font-weight="bold" + line-height="16pt" + space-after="6pt" + text-align="center" + break-before="page"> + End-indent tests + </fo:block> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-before="12pt" + space-after="3pt" + text-align="end" + end-indent="1cm"> + This block has an end-indent of 1cm and no borders or padding. It has +no margin-right set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block. + </fo:block> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-before="12pt" + space-after="3pt" + text-align="end" + margin-right="1cm"> + This block has a margin-right of 1cm and no borders or padding. It has +no end-indent set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block. + </fo:block> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-before="12pt" + space-after="3pt" + text-align="end" + end-indent="1cm" + padding-end="4mm" border-end-width="1mm"> + This block has an end-indent of 1cm, padding-end of 4mm and border-end-width of 1mm. It has +no margin-right set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block. + </fo:block> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-before="12pt" + space-after="3pt" + text-align="end" + margin-right="5mm" + padding-right="4mm" border-right-width="1mm"> + This block has a margin-right of 5mm, padding-right of 4mm and +border-right-width of 1mm. (Margin is outside the border rectangle.) It has +no end-indent set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block. + </fo:block> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="1.25em" + space-before="12pt" + space-after="3pt" + text-align="end" + margin-right="5mm" + padding-end="4mm" border-end-width="1mm"> + This block has a margin-right of 5mm, padding-end of 4mm and +border-end-width of 1mm. (Margin is outside the border rectangle.) It has +no end-indent set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block. + </fo:block> + + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/docs/examples/fo/inhprop.fo b/docs/examples/fo/inhprop.fo index 3ea986cc4..16b2fde0a 100644 --- a/docs/examples/fo/inhprop.fo +++ b/docs/examples/fo/inhprop.fo @@ -94,6 +94,8 @@ Below fo:root there is always space-before.optimum="10pt" space-after.optimum="10pt" text-align="start" + keep-with-next.within-page="always" + keep-together.within-page="always" padding-top="3pt"> Function: object from-parent( <fo:inline font-weight='bold'>NCName</fo:inline>) </fo:block> @@ -103,6 +105,7 @@ Below fo:root there is always font-family="sans-serif" line-height="1.25em" space-after="3pt" + keep-together="auto" text-align="start"> The from-parent function returns a computed value of the property whose name matches the argument specified. The value returned is that |