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

Re: Need help with XSL-FO

Subject: Re: Need help with XSL-FO
From: "Betty L. Harvey" <harvey@xxxxxxxxxx>
Date: Wed, 7 Aug 2002 15:05:58 -0400 (EDT)
Re:  Need help with XSL-FO
Whoops - should be match="MyRootElement", not select="MyRootElement"

Betty

On Wed, 7 Aug 2002, Betty L. Harvey wrote:

> 
> Your <fo:root> element must be inside a <xsl:template>, i.e.,
> 
> <xsl:template select="MyRootElement">
>   <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>      ...
>   </fo:root>
> </xsl:template>
> 
> Betty
> 
> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
> Betty Harvey                         | Phone: 410-787-9200 FAX: 9830 
> Electronic Commerce Connection, Inc. |        
> harvey@xxxxxxxxxx                    | Washington,DC SGML/XML Users Grp
> URL:  http://www.eccnet.com          | http://www.eccnet.com/xmlug/
> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/  
> 
> On Wed, 7 Aug 2002, Sandra Mcdonnell wrote:
> 
> > First, thank you all for the help you've given me already this week.
> > 
> > I am using XML Spy and attempting a transformation to render my XML as a 
> > PDF. XML Spy uses Xalan and FOP. I created the following  XSL based on a 
> > terrific article by Doug Tidwell. I am an ABSOULTE BEGINNER and can't 
> > figure out why I keep getting errors.
> > 
> > <?xml version="1.0" encoding="UTF-8"?>
> > <xsl:stylesheet version="1.0" 
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
> > xmlns:fo="http://www.w3.org/1999/XSL/Format">
> >    
> >     <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
> >     <xsl:output method="text"/>
> > 
> > <xsl:processing-instruction name="cocoon-format" type="text/xslfo"/>
> >    
> >     <xsl:template match="/">
> >         <xsl:apply-templates/>
> >     </xsl:template>
> > 
> > <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
> >         <fo:layout-master-set>
> >             <fo:simple-page-master master-name="standard">
> >                 <fo:region-body region-name="body" extent="1.1in" 
> > page-width="8.5in" page-height="11in" margin-top="1in" 
> > margin-bottom="1in" margin-left="1in" margin-right="1in"/>
> >                 <fo:region-before extent=".75in"/>
> >             </fo:simple-page-master>
> >         </fo:layout-master-set>
> >         <fo:page-sequence master-reference="standard">
> >             <fo:flow flow-name="body">
> >                 <xsl:apply-templates select="Head1"/>
> >                 <xsl:apply-templates select="Head2"/>
> >                 <xsl:apply-templates select="para"/>
> >             </fo:flow>
> >         </fo:page-sequence>
> >     </fo:root>
> > 
> >     <!-- Template to apply to all Head1 nodes -->
> >     <xsl:template match="Head1">
> >         <fo:block font-family="Helvetica" font-size="16pt" 
> > space-before.minimum="12pt" space-after="12pt">
> >             <xsl:apply-templates/>
> >         </fo:block>
> >     </xsl:template>
> >     <!-- Template to apply to all Head2 nodes -->
> >     <xsl:template match="Head2">
> >         <fo:block font-family="Helvetica" font-size="14pt" 
> > space-before.minimum="12pt" space-after="12pt">
> >             <xsl:apply-templates/>
> >         </fo:block>
> >     </xsl:template>
> >     <!-- Template to apply to all para nodes -->
> >     <xsl:template match="para">
> >         <fo:block font-family="Helvetica" font-size="10pt" 
> > space-after="6pt">
> >             <xsl:apply-templates/>
> >         </fo:block>
> >     </xsl:template>
> > </xsl:stylesheet>
> > 
> > 
> > I appreciate any help you fine people can give me, and I apologize for 
> > asking so many questions. I've ordered the XSL-FO book that O'Reilly is 
> > producing, but its not even available until 8/15. I'm just a tech writer 
> > with a few XML (and XSLT, and XPATH, and XML Schema) books, the 
> > internet, and a project to complete.
> > 
> > Thanks again,
> > Sandy
> > 
> > 
> > 
> > 
> >  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> > 
> 
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.