FOPRunXSLTExt/examples/balisage2014.xml
changeset 55 873cf39a5e9c
parent 51 53a9f2fe79d0
child 56 b184e200b875
equal deleted inserted replaced
54:3fe35c97a8a8 55:873cf39a5e9c
     2 <header>Print and Page Layout <svg href="ppl-logo.svg" id="logo"/> Community Group<lb/>XSLT Extensions</header>
     2 <header>Print and Page Layout <svg href="ppl-logo.svg" id="logo"/> Community Group<lb/>XSLT Extensions</header>
     3 
     3 
     4 <box id="box001" width="2240pt" height="540pt">
     4 <box id="box001" width="2240pt" height="540pt">
     5 <paragraph id="para001">The XSLT extension functions from the Print and Page Layout Community Group @ W3C (see <url>https://www.w3.org/community/ppl/wiki/XSLTExtensions</url>) allow you to run your XSL-FO formatter within your XSLT transform, and do it as often as you like, to get an area tree and make decisions based on formatted areas to do things like:</paragraph>
     5 <paragraph id="para001">The XSLT extension functions from the Print and Page Layout Community Group @ W3C (see <url>https://www.w3.org/community/ppl/wiki/XSLTExtensions</url>) allow you to run your XSL-FO formatter within your XSLT transform, and do it as often as you like, to get an area tree and make decisions based on formatted areas to do things like:</paragraph>
     6 <list id="list009">
     6 <list id="list009">
     7   <item label="*">Adjust the start-indent of a fo:list-block based on the length of the longest fo:list-item-label; or</item>
     7   <item label="*">Adjust the start-indent of a <code>fo:list-block</code> based on the length of the longest <code>fo:list-item-label</code>; or</item>
     8   <item label="*">Size this text to be <font-size/> so it fits this box.</item>
     8   <item label="*">Size this text to be <font-size/> so it fits this box.</item>
     9 </list>
     9 </list>
    10 </box>
    10 </box>
    11 <box id="box002" width="2240pt" height="560pt" columns="2" border="none">
    11 <box id="box002" width="2240pt" height="630pt" columns="2" border="none">
    12 <title>XSLT and XSL-FO Processors</title>
    12 <title>XSLT and XSL-FO Processors</title>
    13 <paragraph id="para002">The extension is available for Java and DotNet and uses either the Apache FOP XSL formatter or Antenna House AHF formatter to produce the area trees.</paragraph>
    13 <paragraph id="para002">The extension is available for Java and DotNet and uses either the Apache FOP XSL formatter or Antenna House AHF formatter to produce the area trees.</paragraph>
    14 <paragraph>The single Java jar file covers four combinations of XSLT processor and XSL-FO formatter:</paragraph>
    14 <paragraph>The single Java jar file covers four combinations of XSLT processor and XSL-FO formatter:</paragraph>
    15 <list id="list001">
    15 <list id="list001">
    16   <item label="*">Saxon 9.5 and FOP</item>
    16   <item label="*">Saxon 9.5 and FOP</item>
    61   </item>
    61   </item>
    62   <item>
    62   <item>
    63     <function>ppl:sum-lengths-to-pt($lengths as xs:string*) as xs:double</function>
    63     <function>ppl:sum-lengths-to-pt($lengths as xs:string*) as xs:double</function>
    64     <def>Returns the length, in points (1/72 of an inch), of the sum of a sequence of lengths represented as strings, e.g., &#x201C;<code>6pt</code>&#x201D;, etc.</def>
    64     <def>Returns the length, in points (1/72 of an inch), of the sum of a sequence of lengths represented as strings, e.g., &#x201C;<code>6pt</code>&#x201D;, etc.</def>
    65   </item>
    65   </item>
       
    66   <item>
       
    67     <function>bogus</function>
       
    68     <def>Not a function, just an illustration of how, by using the extension functions to find the formatted size of the function definition, the <code>fo:list-item-body</code> moves down only for long function definitions.</def>
       
    69   </item>
    66 </api-list>
    70 </api-list>
    67 </box>
    71 </box>
    68 </example>
    72 </example>