Partial resolution of this issue was not in FOP but in the XSL stylesheet used.

I have XML data in the layout of: 

<file>
        <line></line>
        <line></line>
        <line></line>
        <line></line>
        <page>
                <line>this</line>
                <line>is</line>
                <line>the</line>
                <line>report</line>
                <line>data</line>
        </page>
<file>

And a stylesheet containing:

  <?xml version="1.0" ?> 
  <xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns:fo="http://www.w3.org/1999/XSL/Format";>
  <xsl:output method="xml" indent="yes" /> 
  <!--  $Header: /cvs/FCS/cgi/invoices/gst_monthly/gst_monthly_fop.xsl,v 1.4 
2003/08/19 04:39:05 asc Exp $ 
  --> 
  <xsl:template match="/">
  <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
  <!--  defines the layout master 
  --> 
  <fo:layout-master-set>
  <fo:simple-page-master master-name="first" page-height="29.7cm" 
page-width="21cm">
  <fo:region-body margin-top="0.5cm" margin-bottom="0.0cm" margin-left="1.0cm" 
margin-right="1.0cm" /> 
  <fo:region-before extent="5cm" /> 
  <fo:region-after extent="2cm" /> 
  </fo:simple-page-master>
  <fo:simple-page-master master-name="remainder" page-height="29.7cm" 
page-width="21cm">
  <fo:region-body margin-top="0.5cm" margin-bottom="0.0cm" margin-left="1.0cm" 
margin-right="1.0cm" /> 
  <fo:region-before extent="5cm" /> 
  <fo:region-after extent="2cm" /> 
  </fo:simple-page-master>
  </fo:layout-master-set>
  <xsl:apply-templates /> 
  </fo:root>
  </xsl:template>

  <xsl:template match="page">
  <!--  starts actual page layout 
  --> 
  <fo:page-sequence master-reference="first">
  <!--  HEADER - insert the logos in the fo:region-before 
  --> 
  <fo:static-content flow-name="xsl-region-before">
  <!--  FORTIS DETAILS 
  --> 
  <fo:block-container height="1.0cm" width="12.0cm" top="0.5cm" left="0.5cm" 
position="absolute">
  <fo:block font-size="18pt" font-weight="bold">FORTIS CLEARING SYDNEY PTY 
LTD</fo:block> 
  </fo:block-container>
  <fo:block-container height="1.5cm" width="6.5cm" top="1.2cm" left="0.5cm" 
position="absolute">
  <fo:block font-size="9pt" line-height="10pt">A.C.N. 081 279 889</fo:block> 
  <fo:block font-size="9pt" line-height="10pt">A.B.N. 36 081 279 889</fo:block> 
  <fo:block-container height="2.5cm" width="6.5cm" top="2.1cm" left="0.5cm" 
position="absolute">
  <fo:block font-size="9pt" line-height="10pt">Level 11, 5 Elizabeth 
Street,</fo:block> 
  <fo:block font-size="9pt" line-height="10pt">Sydney, NSW 2000 
Australia</fo:block> 
  <fo:block font-size="9pt" line-height="10pt">GPO Box 3562, Sydney NSW 
1043</fo:block> 
  <fo:block font-size="9pt" line-height="10pt">Tel: +61 2 9223 9990</fo:block> 
  <fo:block font-size="9pt" line-height="10pt">Fax: +61 2 9236 4400</fo:block> 
  <fo:block font-size="9pt" line-height="10pt">Email: [EMAIL 
PROTECTED]</fo:block> 
  </fo:block-container>
  <fo:block-container height="4cm" width="4cm" top="0cm" left="14.5cm" 
position="absolute">
  <fo:block>
  <fo:external-graphic height="4cm" 
src="file:/fcs/images/fortis_logo_colour.gif" /> 
  </fo:block>
  </fo:block-container>
  </fo:static-content>
  <fo:flow flow-name="xsl-region-body">
  <fo:block-container height="15cm" width="18cm" top="5cm" left="1cm" 
position="absolute" font-size="9pt" line-height="10pt" font-family="Courier" 
wrap-option="no-wrap" linefeed-treatment="preserve" 
white-space-treatment="preserve" white-space-collapse="false">
  <xsl:apply-templates /> 
  </fo:block-container>
  </fo:flow>
  </fo:page-sequence>
  </xsl:template>

  <xsl:template match="line">
  <fo:block>
  <xsl:value-of select="." /> 
  </fo:block>
  </xsl:template>
  </xsl:stylesheet>

The exception was stopped if the line

  <xsl:template match="line">

was changed to be 

  <xsl:template match="page/line">

I do not understand why this is happening, any suggestions


In general I am very pleased to see the progress that has been made with FOP, 
it has served us well over the past 2 years in generating PDF contract notes. I 
started to investigate an upgrade to see if we could generate larger files and 
the rendering at every fo:page-sequence works well for us. Also I am pleased to 
see the addition of PDF outlines. My thanks to the developers.

Stephen Cameron
Systems Support Analyst
Fortis Clearing Sydney
phone: +61 2 9233 6497
email: [EMAIL PROTECTED]


-----Original Message-----
From: Chris Bowditch [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 19 August 2003 6:01 PM
To: [EMAIL PROTECTED]
Subject: Re: FW: Java exception


>From: "Steve Cameron" <[EMAIL PROTECTED]>
> > Hello,
> >
> > I am currently upgrading to FOP 0.20.5 from 0.14.0.
> >
> > I get a java exception in an example that was previously working as
>follows:
> >

<snip/>

One of the things that changed in version 0.20.x of FOP is master-name 
attribute on the page-sequence elements which became master-reference 
instead. If you still have master-name attributes on your page-sequences, then 
FOP often seems to throw a NullPointerException.

Chris

SC: thanks for this suggestion but FOP does actually warn me about this error.

_________________________________________________________________
Stay in touch with absent friends - get MSN Messenger 
http://www.msn.co.uk/messenger


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



=========================================================================
This e-mail is sent for the sole attention of the identified addressee
and its contents are provided for information purposes only. Fortis 
Clearing Sydney Pty Ltd makes no warranty or representation as to the 
accuracy and completeness of any information and does not assume whatever
commitment hereby. Legally binding obligations can only arise for, or be 
entered into on behalf of, Fortis Clearing Sydney Pty Ltd by means of 
a written instrument, signed by two duly authorised representatives of 
Fortis Clearing Sydney Pty Ltd. Fortis Clearing Sydney Pty Ltd excludes 
any liability whatsoever for any direct or consequential loss arising 
from the use of, or reliance on, this e-mail or its contents.
=========================================================================


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to