[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Working example xml+xsl to .fo file

Subject: Re: Working example xml+xsl to .fo file
From: eleonora46@xxxxxxx
Date: Tue, 18 Nov 2008 19:25:48 +0100
Re:  Working example xml+xsl to .fo file
Martin,

Thanks a million, that works, great help!

-eleonora
-------- Original-Nachricht --------
> Datum: Tue, 18 Nov 2008 19:16:27 +0100
> Von: Martin Honnen <Martin.Honnen@xxxxxx>
> An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Betreff: Re:  Working example xml+xsl to .fo file

> eleonora46@xxxxxxx wrote:
> 
> > No, that is just a working .fo file.
> > I have such sample files in fop package.
> > I need the way from xml+xsl to .fo file.
> 
> Well write a stylesheet that creates an XSL-FO document as its result:
> 
> <xsl:stylesheet
>    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>    xmlns:fo="http://www.w3.org/1999/XSL/Format"
>    version="1.0">
> 
> <xsl:template match="/">
> <fo:root>
>      <fo:layout-master-set>
>          <fo:simple-page-master master-name="LetterPage" 
> page-width="8.5in"
>                                 page-height="11in" >
>              <fo:region-body region-name="PageBody" margin="0.7in"/>
>          </fo:simple-page-master>
>      </fo:layout-master-set>
>      <fo:page-sequence master-reference="LetterPage">
>          <fo:flow flow-name="PageBody">
>              <fo:block>Hello World</fo:block> 
>          </fo:flow>
>      </fo:page-sequence>
> </fo:root>
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> In a real stylesheet you would obviously fill the XSL-FO document with 
> data from an XML document but as a Hello Word example the above 
> suffices, it creates the without taking any data from the XML input.
> 
> If you want a Hello world example for that then use e.g
> 
> <foo>bar</foo>
> 
> as the XML input document and then change the stylesheet to
> 
> <xsl:stylesheet
>    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>    xmlns:fo="http://www.w3.org/1999/XSL/Format"
>    version="1.0">
> 
> <xsl:template match="/">
> <fo:root>
>      <fo:layout-master-set>
>          <fo:simple-page-master master-name="LetterPage" 
> page-width="8.5in"
>                                 page-height="11in" >
>              <fo:region-body region-name="PageBody" margin="0.7in"/>
>          </fo:simple-page-master>
>      </fo:layout-master-set>
>      <fo:page-sequence master-reference="LetterPage">
>          <fo:flow flow-name="PageBody">
>              <fo:block>Hello World <xsl:value-of select="foo"/></fo:block>
> 
>          </fo:flow>
>      </fo:page-sequence>
> </fo:root>
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> 
> 
> -- 
> 
> 	Martin Honnen
> 	http://JavaScript.FAQTs.com/

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehvrt? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.