XML sample |
Top Previous Next |
XSL-FO is a W3C specification. Information is available at the W3C website (http://www.w3.org/)
Crash Magic FO templates support an additional namespace (xmlns:pdEl="http://www.pdmagic.com/pdEl/1.0">) This namespace is used to insert dynamic data into FO templates for rendering to pdf.
Standard XSL-FO content is wrapped inside pdroot and pdfotemplate tags.
<pdroot> <pdfotemplate> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:pdEl="http://www.pdmagic.com/pdEl/1.0"> <fo:layout-master-set> <fo:simple-page-master page-height="8.5in" page-width="11in" margin-top="0.25in" margin-bottom="0in" margin-left="0.25in" margin-right="0.25in" master-name="only"> <fo:region-body region-name="xsl-region-body" margin-top="0in" margin-bottom="0.25in" margin-left="0in" margin-right="0in"/> <fo:region-before region-name="xsl-region-before" extent="0.25in"/> <fo:region-start region-name="xsl-region-start" extent="0in"/> <fo:region-end region-name="xsl-region-end" extent="0in"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="only"> <fo:flow flow-name="xsl-region-body"> <fo:block-container width="100%"> <fo:block text-align="center"> <fo:instream-foreign-object border="solid black 1px" content-width="10.5in"> <svg xml:space="preserve" viewBox="0 0 850 45"> <g> <defs> <linearGradient id="topGrad" x1="0%" y1="0%" x2="100%" y2="100%" spreadMethod="pad"> <stop offset="0%" stop-color="#FFFFFF"/> <stop offset="100%" stop-color="rgb( 50, 118, 210)"/> </linearGradient> </defs>
<rect x="0" y="0" width="850" height="45" style="fill: url(#topGrad); stroke: black;"/> <text y="22" style="font-family: sans-serif; font-size: 18pt; text-anchor: end;" x="840"> <pdEl:Insert ForUseIn="ASCII" Name="Title"/> </text> <text y="42" style="font-family: sans-serif; font-size: 14pt; text-anchor: end;" x="840"> <pdEl:Insert ForUseIn="ASCII" Name="SubTitle"/> </text> </g>
</svg> </fo:instream-foreign-object> </fo:block> </fo:block-container> <fo:block> <fo:table width="10.5in"> <fo:table-body> <fo:table-row> <fo:table-cell> <fo:block text-align="left"> <pdEl:Insert ForUseIn="ASCII" Name="LeftInfo"/> </fo:block> </fo:table-cell> <fo:table-cell> <fo:block text-align="right"> <pdEl:Insert ForUseIn="ASCII" Name="RightInfo"/> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> <fo:block text-align="center"> <pdEl:Insert ForUseIn="FO" Name="Main" Height="6.5in" Width="10.5in"/> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </pdfotemplate> <Settings/> </pdroot>
|