W3C home > Mailing lists > Public > www-xsl-fo@w3.org > October 2002

Re: xsl:fo rendering

From: David Carlisle <davidc@nag.co.uk>
Date: Wed, 16 Oct 2002 11:34:54 +0100
Message-Id: <200210161034.LAA07981@penguin.nag.co.uk>
To: subbu@boltblue.com
CC: www-xsl-fo@w3.org


> 1.How do we write the XSL to produce the above XSL:FO file? I am quite ok with 
> writing xsl style sheets but do not know how to write xsl to produce xsl:fo..

FO is just an XML format to XSLT, XSLT doesn't have (or need) any
special instructions to create FO. So how to write the stylesheet
depends on what the input is.


<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0"
                xmlns:fo="http://www.w3.org/1999/XSL/Format">

<xsl:template match="/">
<fo:root>
<fo:layout-master-set>
	<fo:simple-page-master page-master-name="my-page">
		<fo:region-body  margin="1in"></fo:region-body>
	</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence >
<fo:flow flow-name="xsl-region-body">
		<fo:block> Hello World</fo:block>
	</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>

</xsl:stylesheet>


would produce that document from any input.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.
Received on Wednesday, 16 October 2002 06:35:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:09 GMT