Re: FOP on JDK 1.1

2002-04-22 Thread jthaemlitz

I had a good results from FOP 0.18.x  you may be able to run FOP 0.19.x.
The Java API changed a little, command line usage is almost identical.

JohnPT





[EMAIL PROTECTED]   
 
APACHE.ORG 
To: [EMAIL PROTECTED]
   
cc:  
04/22/02 02:48 PM  
Subject: Re: FOP on JDK 1.1  
Please respond to fop-user  









I have tried fop_0_20_1 already but it seems to work with Java 2 only. I
will keep downloading the older versions until I find one that I can use
with Java 1.1.

I need to run fop on Mac OS 9 on a machine that cannot be upgraded to Mac
OS
X to run Java 2.

Thanks for your help.

Barbara



 From: Jeremias Maerki [EMAIL PROTECTED]
 Organization: Outline AG, Switzerland
 Reply-To: [EMAIL PROTECTED]
 Date: Mon, 22 Apr 2002 18:49:38 +0200
 To: [EMAIL PROTECTED]
 Subject: Re: FOP on JDK 1.1

 Try 0.20.1 or earlier. You can download it from here:
 http://xml.apache.org/dist/fop/recent/

 What is your environment that you still have to live with JDK 1.1?

 On 21.04.2002 23:58:14 Barbara Slupik wrote:
 Hello

 Which is the last version of FOP that will run under Java 1.1 ?


 Cheers,
 Jeremias Maerki











page-number-citation oddities

2002-04-09 Thread jthaemlitz
I'm having a problem on my index page where the page number does not show
up on the last linked section of an index page.

It's identical code for all the listed items.  They are contained in a
table, which I can send if additional information is needed.  So I have a 2
page index area, the last two page references on each index page don't show
the page number.  Here's the relevant code on the index page.
fo:basic-link color=green internal-destination=reg11
 Page fo:page-number-citation ref-id=reg11/
/fo:basic-link

The link to the internal destination works (so the id seems to be ok) .  In
this case the block on page 86 looks like so.
fo:block font-weight=bold id=reg11 break-before=pageRegion
11/fo:block

The fo:page-number/ tag, located in the static xsl-region-after does
display the correct page number.

Any ideas of what could cause this type of phenomenon?

Thanks,

JohnPT






Re: .fo entity problem ?

2002-04-04 Thread jthaemlitz

I'm having the same problem.  This could be a stylesheet configuration
problem.  When I run my XML through Xalan my ASCII entity references get
mapped to there names.  So if my XML contains #201; when I run it through
Xalan it puts eacute; in my .fo file.  Then when I try to render the FO it
doesn't know what eacute; is.

2 step process
Run XML file through XSL to generate .fo file (#201; get's mapped to
eacute;)
Run .fo file through FOP to generate .pdf (FOP don't know eacute;)

Is there a way to stop Xalan from converting ASCII entity references to
there names?

My stylesheet is declared like this
xsl:stylesheet
  version=1.0
  xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
  xmlns:lxslt=http://xml.apache.org/xslt;
  xmlns:redirect=org.apache.xalan.xslt.extensions.Redirect
  xmlns:pdf=class:PDFWriter
  xmlns:fo=http://www.w3.org/1999/XSL/Format;
  extension-element-prefixes=redirect pdf
  exclude-result-prefixes=lxslt

JohnPT





[EMAIL PROTECTED]   
 
APACHE.ORG 
To: [EMAIL PROTECTED]  
   
cc:  
04/04/02 01:34 PM  
Subject: Re: .fo entity problem ?
Please respond to fop-user  









RAYMOND Romain wrote:
 Is there a way to escape entity problems (such as eacute;) in the .fo
 file ?
 We realize a first transformation to obtain a .fo file which is there
 after
 treated by FOP (Driver.run() ...).
 Problem is that we generate this fo file with entities inside, so is
 there
 methods to pass an entity resolver to FOP transformer (as URIResolver
 for classic transformer) ?

I don't quite understand what your problem is.
If you generate the FO file with XSLT, it is not necessary
to generate entities in the result, in particular it is
not necessary to generate entities representing characters,
like eacute;. This is especially mysterious as XSLT is not
designed to make it easy to put entities in the transformation
result.
The best way to deal with it is to avoid putting enities
in the FO. If you generate the file with XSLT, simply
remove all tricks which generate the entities. If you have
to put special characters into the result, you can always
resort to numerical character references, like #201; for
eacute;.

Furthermore a JAXP entity resolver is only responsible
for mapping a public and system ids to files. It does
not expand entitiy references, this is the task of the
parser itself. You have to supply a DTD with the entity
definitions to the parser in order to get the job done.

J.Pietschmann












Re: .fo entity problem ?

2002-04-04 Thread jthaemlitz

J.

Wow good call.

So I have a master stylesheet that imports other stylesheets that each do
there own thing.   Three render HTML pages, one renders JPEG's, two render
PDF's.  Is there a way to set the output to XML in 3 of the stylesheets and
HTML in the other 3?

When I try to do this (by setting xsl:output in different imported
stylesheets) I get a vaiant of the following exception:
XSLT Error (javax.xml.transform.TransformerConfigurationException): method
can not be multiply defined at the same import level! Old value = html; New
value = xml

WHY I THINK I NEED ISO-8859-1 ENCODING: I did have xsl:output method
=html encoding=iso-8859-1/.  This has to be there because our NeoWare
Linux boxes did not render Cascading Stylesheets correctly if the HTML was
UTF-8 encoded (Netscape default is Western) [font's would appear styled
unstyled randomly].  So in the HTML imported XSL stylesheets I declared
xsl:output method=html encoding=iso-8859-1/.

Could you point me in the right direction to get this to work?  Or should I
just have the XML renderd stuff under one stylesheet and make another
stylesheet to do the HTML stuff?  One master stylesheet is so nice.

Thanks a bunch,

JohnPT





[EMAIL PROTECTED]   
 
APACHE.ORG 
To: [EMAIL PROTECTED]  
   
cc:  
04/04/02 02:37 PM  
Subject: Re: .fo entity problem ?
Please respond to fop-user  









[EMAIL PROTECTED] wrote:
 I'm having the same problem.  This could be a stylesheet configuration
 problem.  When I run my XML through Xalan my ASCII entity references get
 mapped to there names.  So if my XML contains #201; when I run it
through
 Xalan it puts eacute; in my .fo file.  Then when I try to render the FO
it
 doesn't know what eacute; is.

 2 step process
 Run XML file through XSL to generate .fo file (#201; get's mapped to
 eacute;)
 Run .fo file through FOP to generate .pdf (FOP don't know eacute;)

 Is there a way to stop Xalan from converting ASCII entity references to
 there names?

You simply have to use the XML output method:
  xsl:output method=xml/
This is, BTW, the default.

Check whether you have set the output method to HTML.
Check included and imported XSL files as well. If you
run the processor embedded, check also the code whether
it sets it (this overrides the declaration in the XSL
file).

 My stylesheet is declared like this
 xsl:stylesheet
   version=1.0
   xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
   xmlns:lxslt=http://xml.apache.org/xslt;
   xmlns:redirect=org.apache.xalan.xslt.extensions.Redirect
   xmlns:pdf=class:PDFWriter
   xmlns:fo=http://www.w3.org/1999/XSL/Format;
   extension-element-prefixes=redirect pdf
   exclude-result-prefixes=lxslt

These are namespaces and have no influence on the
output format whatsoever.
However, why do you need the redirect and pdf namespaces?
Are you triggering FOP from within the XSLT file? There
are easier ways to do this...

J.Pietschmann











Re: Page sequence error

2002-03-26 Thread jthaemlitz

This doesn't seem to correspond to your exception, but you should probably
move your fo:flow before you call your ccjob template.  Otherwise you
create a new flow each time you get another ccjob.  I'd try making the
following mod and remove the flow from your ccjob template

  fo:page-sequence master-name=a4p
  fo:flow flow-name=xsl-region-body
xsl:apply-templates select=ccjob/
  /fo:flow
  /fo:page-sequence


JohnPT





[EMAIL PROTECTED]   
 
APACHE.ORG 
To: [EMAIL PROTECTED]
   
cc:  
03/26/02 03:57 AM  
Subject: Page sequence error 
Please respond to fop-user  









When running FOP on my XML document via XSL, I get the following error:

[ERROR]: org.apache.fop.apps.FOPException: 'master-reference' for
'fo:page-sequence'matches no 'simple-page-master' or
'page-sequence-master'

which is odd since according to all the documentation I can find, there
is no master-reference property for a page-sequence object. The
master-name property is equal to the master-name specified when I
defined my simple-page-master object.

My XSL looks like:

?xml version=1.0?
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 xmlns:fo=http://www.w3.org/1999/XSL/Format;

  fo:layout-master-set
fo:simple-page-master
   margin-right=1.5cm
   margin-left=1.5cm
   margin-bottom=1cm
   margin-top=1.5cm
   page-width=21cm
   page-height=29.7cm
master-name=a4p
  fo:region-body/
/fo:simple-page-master

fo:simple-page-master
   margin-right=1.5cm
   margin-left=1.5cm
   margin-bottom=1cm
   margin-top=1.5cm
   page-width=29.7cm
   page-height=21cm
master-name=a4l
  fo:region-body/
/fo:simple-page-master
  /fo:layout-master-set

  fo:page-sequence master-name=a4p
  fo:flow flow-name=xsl-region-body
xsl:apply-templates select=ccjob/
  /fo:flow
  /fo:page-sequence

/fo:root
/xsl:template

xsl:template match=ccjob
  fo:flow flow-name=xsl-region-body

fo:block font-size=18pt
font-family=sans-serif
line-height=20pt
space-after.optimum=12pt
color=black
text-align=center
Site Installation and Commissioning Test Report
/fo:block

fo:table space-after.optimum=12pt
  fo:table-column column-width=2cm/
  fo:table-column column-width=2.5cm/
  fo:table-column column-width=3cm/
  fo:table-column column-width=3.5cm/
  fo:table-column column-width=3cm/
  fo:table-column column-width=4cm/

  fo:table-body font-size=10pt font-family=sans-serif

fo:table-row line-height=12pt
  fo:table-cell
fo:block text-align=left
Site ID:
/fo:block
  /fo:table-cell
  fo:table-cell
fo:block text-align=left
xsl:value-of select=siteid/
/fo:block
  /fo:table-cell
  fo:table-cell
fo:block text-align=left
Job number:
/fo:block
  /fo:table-cell
  fo:table-cell
fo:block text-align=left
xsl:value-of select=jobnumber/
/fo:block
  /fo:table-cell
  fo:table-cell
fo:block text-align=left
Site type:
/fo:block
  /fo:table-cell
  fo:table-cell
fo:block text-align=left
xsl:value-of select=sitetype/
/fo:block
  /fo:table-cell
/fo:table-row

  /fo:table-body
/fo:table
  /fo:flow
/xsl:template

/xsl:stylesheet













Re: [ERROR]: Logger not set

2001-12-26 Thread jthaemlitz

using org.apache.log, you can do the following, or modify for your needs

Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
PatternFormatter formatter = new PatternFormatter( 
[%{priority}]:%{message}\n%{throwable} );
LogTarget target = new StreamTarget(System.out, formatter);
hierarchy.setDefaultLogTarget(target);
Logger log = hierarchy.getLoggerFor(fop);

JohnPT





[EMAIL PROTECTED]   
  
APACHE.ORG
To: '[EMAIL PROTECTED]'   
   
[EMAIL PROTECTED]
12/26/01 03:56 PM 
cc:   
Please respond to fop-user
Subject: [ERROR]: Logger not set  








How does one set the logger ?

Thanks
Lakshmi










Re: True Type Fonts in Fop

2001-12-17 Thread jthaemlitz


They were Type 1 PFM fonts.  They looked fine when they were viewed with
Acrobat on NeoWare Linux.  But they would not print (standard Linux lpr
poscript was used).

JohnPT





[EMAIL PROTECTED]   
  
APACHE.ORG
To: [EMAIL PROTECTED]   
  
cc:   
12/17/01 02:25 AM 
Subject: Re: True Type Fonts in Fop   
Please respond to fop-user  









On 2001.12.14 18:05 [EMAIL PROTECTED] wrote:

 We noticed that when fonts are embeded by FOP they are imported with
 Windows encoding (in Adobe File-Document Info.-Fonts...).  If you use
 a
 Adobe tool to embeded a font it's encoding is Built-in (or something to
 that effect).  We found our Unix boxes needed things tweaked,similar to
 whats described by Chuck below, to make the FOP embeded fonts work.  The
 Windows encoding happened even if the FOP processing was run on a
 non-Windows computer.

 I still don't get why that works like that.  A clean solution to this
 would
 be something nice for the documentation library :)

 JohnPT

I there is precise information then it should be documented.

What type of font were you embedding, was it a windows font. Could it be
possible that the font cannot be used on another platform.
The fonts are embedded, they are not converted.