ZVON > References > Zvon Example Repository
Example repository: index | categories | search

All > XSL FO > General > bordershorthand


Title: bordershorthand
Origin: Apache FOP 0.18.1 examples

PDF output | FO file
ElementsAttributes
fo:blockbackground-color | border-after-color | border-after-width | border-before-color | border-before-width | border-bottom | border-bottom-color | border-bottom-width | border-color | border-end-width | border-left | border-left-width | border-right | border-right-width | border-start-width | border-style | border-top | border-top-color | border-top-width | border-width | color | end-indent | font-family | font-size | line-height | padding | padding-after | padding-before | padding-bottom | padding-end.length | padding-left | padding-right | padding-start.length | padding-top | space-after | space-after.optimum | start-indent | text-align |
fo:conditional-page-master-referencemaster-name | page-position |
fo:flowflow-name |
fo:layout-master-set
fo:page-number
fo:page-sequencemaster-name |
fo:page-sequence-mastermaster-name |
fo:region-afterextent |
fo:region-beforeextent |
fo:region-bodymargin-top |
fo:repeatable-page-master-alternatives
fo:root
fo:simple-page-mastermargin-bottom | margin-left | margin-right | margin-top | master-name | page-height | page-width |
fo:static-contentflow-name |

Warning! These examples are related to XSL FO Working Draft, you need to use attribute "page-sequence/@master-reference" instead of "page-sequence/@master-name".


Source

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" >
     <fo:layout-master-set>
          <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>
          <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"/>
                    <fo:conditional-page-master-reference master-name="rest"/>
               </fo:repeatable-page-master-alternatives>
          </fo:page-sequence-master>
     </fo:layout-master-set>
     <fo:page-sequence master-name="basicPSM">
          <fo:static-content flow-name="xsl-region-before">
               <fo:block text-align="end" font-size="10pt" font-family="serif" line-height="1em + 4pt"> Border and Padding Shorthand Tests - p.
                    <fo:page-number/>
               </fo:block>
          </fo:static-content>
          <fo:flow flow-name="xsl-region-body">
               <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(128,128,128)" color="rgb(255,255,255)" text-align="center" padding-top="3pt"> Border and Padding Shorthand Tests </fo:block>
               <fo:block font-size="12pt" font-family="sans-serif" line-height="1.25em" space-after="12pt" text-align="start" background-color="rgb(150,150,150)" start-indent="3mm" end-indent="3mm" padding-left="3mm" padding-right="3mm" padding-top="4mm" padding-bottom="4mm" border-style="dashed" border-left-width="1pt" border-right-width="1pt" border-top-width="2pt" border-bottom-width="2pt" border-top-color="rgb(100,100,100)" border-bottom-color="rgb(200,200,200)"> 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>
               <fo:block font-size="12pt" font-family="sans-serif" line-height="1.25em" space-after="12pt" text-align="start" background-color="rgb(150,150,150)" start-indent="3mm" end-indent="3mm" padding="3mm + 1mm 3mm" border-top="rgb(100,100,100) 1pt + 1pt dashed" border-bottom="2pt rgb(200,200,200) solid" border-left="solid 1pt" border-right="solid 1pt"> In this example, padding and border properties are specified using shorthand properties: padding, border-width, border-color. 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-after="3pt" text-align="start" background-color="rgb(150,150,150)" start-indent="3mm" end-indent="3mm" padding-before="4mm" padding-after="4mm" padding-start.length="3mm" padding-end.length="3mm" border-style="solid" border-start-width="1pt" border-end-width="1pt" border-before-width="2pt" border-after-width="2pt" border-before-color="rgb(100,100,100)" border-after-color="rgb(200,200,200)"> 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-after="3pt" text-align="start" background-color="rgb(200,200,200)" start-indent="3mm" end-indent="3mm" padding="3mm" padding-before="4mm" padding-after="4mm" border-width="2pt" border-style="solid" border-color="black" border-start-width="1pt" border-end-width="1pt" border-before-width="2pt" border-after-width="2pt" border-before-color="rgb(200,200,200)" border-after-color="rgb(100,100,100)"> In this example, padding and border properties are specified using shorthand and 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:flow>
     </fo:page-sequence>
</fo:root>



Sponsored links: Domain Names, VoIP Internettelefonie, DSL, SDSL, ADSL, UNLIMITED Web Hosting by HostDepartment, conference call service, answering service