RE: FOP 0.92 Beta : fo:table under fo:table-cell

2006-07-18 Thread Pascal Sancho
Hi Dj,

Search for Error found in your heavy snippet below...

HTH,
Pascal

 -Original Message-
 From: Debasish Jana [mailto:[EMAIL PROTECTED] 
 
 Many thanks for your prompt reply. 
 A sample xsl-fo file is given below.
 
 The problem we see is as follows:
 
 If we render this fo to PDF, the output shows, the tables 
 with borders unaligned on the right side. Ideally, we would 
 love to have the borders of the nested table falling on one 
 another so that it looks nice. 
 
 Any clue, please?
 
 ---
 fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
 xmlns:repro=http://www.anshinsoft.com/fop/extensions;
 
 fo:layout-master-set
 
 fo:simple-page-master master-name=repro0 margin-top=10.0pt
 margin-bottom=10.0pt margin-left=10.0pt margin-right=10.0pt
 page-height=842pt page-width=595pt
 fo:region-body margin-top=20.0pt margin-bottom=15.0pt
 margin-left=10.0pt margin-right=10.0pt /fo:region-body 
 /fo:simple-page-master
 
 /fo:layout-master-set
 
 fo:page-sequence master-reference=repro0
 
 fo:table table-layout=fixed border-top-width=1.0pt
 border-top-style=solid border-top-color=#00
 border-bottom-width=1.0pt border-bottom-style=solid
 border-bottom-color=#00 border-left-width=1.0pt
 border-left-style=solid border-left-color=#00
 border-right-width=1.0pt border-right-style=solid
 border-right-color=#00
 fo:table-column column-width=184.0pt/fo:table-column
 fo:table-column column-width=184.0pt/fo:table-column
 fo:table-column column-width=184.0pt/fo:table-column
 
 fo:table-header
 fo:table-row height=12pt
 fo:table-cell background-color=#6699FF width=184.0pt
 wrap-option=no-wrap display-align=before 
 text-align=left fo:block/fo:block/fo:table-cell
 fo:table-cell background-color=#6699FF width=184.0pt
 wrap-option=no-wrap display-align=before 
 text-align=left fo:block/fo:block/fo:table-cell
 fo:table-cell background-color=#6699FF width=184.0pt
 wrap-option=no-wrap display-align=before 
 text-align=left fo:block/fo:block/fo:table-cell
 /fo:table-row
 /fo:table-header
 
 
 fo:table-body
 fo:table-row height=75pt line-height=85% space-before=0pt
 space-after=0pt padding=0pt border-width=0pt top=0pt 
 bottom=0pt fo:table-cell width=552.0pt 
 number-columns-spanned=3
 wrap-option=no-wrap display-align=before 
 text-align=left fo:block
 
 fo:table table-layout=fixed border-top-width=1.0pt
 border-top-style=solid border-top-color=#00
 border-bottom-width=1.0pt border-bottom-style=solid
 border-bottom-color=#00 border-left-width=1.0pt
 border-left-style=solid border-left-color=#00
 border-right-width=1.0pt border-right-style=solid
 border-right-color=#00
 fo:table-column column-width=550.0pt/fo:table-column
 
 fo:table-header
 fo:table-row height=15pt
 fo:table-cell background-color=#6699FF width=550.0pt
 wrap-option=no-wrap display-align=before 
 text-align=left fo:blockfo:block text-align=left 
 white-space-collapse=false
 linefeed-treatment=preserve white-space-treatment=preserve
 line-height=85%fo:inline color=#00 text-decoration=none
 font-family='Tahoma' font-size=12pt font-weight=normal
 font-style=normalIN/fo:inline/fo:block/fo:block/fo:t
able-cell
 /fo:table-row
 /fo:table-header
 
 
 fo:table-footer
 fo:table-row height=12pt
 fo:table-cell width=550.0pt wrap-option=no-wrap 
 display-align=before
 text-align=left
 fo:block/fo:block/fo:table-cell
 /fo:table-row
 /fo:table-footer
 
 
 fo:table-body
 fo:table-row height=46pt line-height=85% space-before=0pt
 space-after=0pt padding=0pt border-width=0pt top=0pt 
 bottom=0pt fo:table-cell width=550.0pt 
 number-columns-spanned=3
--^
Error found 
Your table consists here in 1 column...
So your table-cell overflows your table here...

 wrap-option=no-wrap display-align=before 
 text-align=left fo:block
 
 fo:table table-layout=fixed border-top-width=1.0pt
 border-top-style=solid border-top-color=#00
 border-bottom-width=1.0pt border-bottom-style=solid
 border-bottom-color=#00 border-left-width=1.0pt
 border-left-style=solid border-left-color=#00
 border-right-width=1.0pt border-right-style=solid
 border-right-color=#00
 fo:table-column column-width=548.0pt/fo:table-column
 
 fo:table-header
 fo:table-row height=15pt
 fo:table-cell background-color=#6699FF width=548.0pt
 wrap-option=no-wrap display-align=before 
 text-align=left fo:blockfo:block text-align=left 
 white-space-collapse=false
 linefeed-treatment=preserve white-space-treatment=preserve
 line-height=85%fo:inline color=#00 text-decoration=none
 font-family='Tahoma' font-size=12pt font-weight=normal
 font-style=normalMA/fo:inline/fo:block/fo:block/fo:t
able-cell
 /fo:table-row
 /fo:table-header
 
 
 fo:table-footer
 fo:table-row height=12pt
 fo:table-cell width=548.0pt wrap-option=no-wrap 
 display-align=before
 text-align=left
 fo:block/fo:block/fo:table-cell
 /fo:table-row
 /fo:table-footer
 
 
 fo:table-body
 fo:table-row height=17pt line-height=85% space-before=0pt
 space-after=0pt padding=0pt 

Re: FOP 0.92 Beta : fo:table under fo:table-cell

2006-07-18 Thread Jeremias Maerki
Well, you just have to use consistent widths. You use different widths
all over the place so it's no surprise the line don't end up in the
right place. Once you use 3*184pt (=552pt) but then you use 550pt and
548pt in other places. You need to be aware that the borders on the
start and end sides (left/right in lr-tb writing mode) are defined to
lie outside the content rectangle [1] and that width properties usually
specify the width of the content rectangle, not the allocation rectangle.
Furthermore, there's no point in specifying width on a table-cell when
the column widths are already specified through table-column elements.
Finally, I'd have a closer eye to FOP's log output, i.e. add width
properties to fo:table elements and fix those height properties all over
the place.

I'd work less with nested tables and more with cell spanning. That will
also make your FO much more readable and it will be easier to deal with
the borders.

[1] http://www.w3.org/TR/xsl11/#area-geo

On 18.07.2006 07:51:29 Debasish Jana wrote:
 Hi:
 
 Many thanks for your prompt reply. 
 A sample xsl-fo file is given below.
 
 The problem we see is as follows:
 
 If we render this fo to PDF, the output shows, the tables with borders
 unaligned on the right side. Ideally, we would love to have the borders of
 the nested table falling on one another so that it looks nice. 
 
 Any clue, please?
 
 Thanking you in anticipation,

snip/


Jeremias Maerki


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



0.92beta not compiling after download

2006-07-18 Thread Babar Ismail








Hi everyone,



I have just downloaded fop-0.92beta-src.zip from ftp://apache.mirrors.tds.net/pub/apache.org/xmlgraphics/fop/source/

I am running on windows platform, using eclipse 3.0 as IDE.
I have unzipped all the code in a folder and created a new project and added
all the external jar files present in the lib folder to the
project. When I do ant build, it builds up succesfully but I see a lot of
compile errors in there. 



Here are a few examples:



1. DOMMathBuilder cannot be resolved or is not a type MathMLElementMapping.java fop0.92beta/examples/mathml/src/org/apache/fop/mathml line
85 



2. The import net cannot be resolved MathMLElement.java fop0.92beta/examples/mathml/src/org/apache/fop/mathml line
39 



3. MathBase cannot be resolved or is not a type MathMLElement.java fop0.92beta/examples/mathml/src/org/apache/fop/mathml line
83



4. DOMMathBuilder cannot be resolved or is not a type MathMLElement.java fop0.92beta/examples/mathml/src/org/apache/fop/mathml line
84



5. The import net cannot be resolved MathMLElementMapping.java fop0.92beta/examples/mathml/src/org/apache/fop/mathml line
30



6. The import net cannot be resolved MathMLElementMapping.java fop0.92beta/examples/mathml/src/org/apache/fop/mathml line
31



I suppose this is due to some missing external libraries.
But I have added all of the jar files in the lib to the classpath (using
eclipse). Do I need to add someother ones aswell?



Did anyone face a similar problem? Can some1 help?



Thanks,

__



Babar Ismail

Software Engineer

Cambridge Docs

[EMAIL PROTECTED]










--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.1/390 - Release Date: 7/17/2006
 


Re: 0.92beta not compiling after download

2006-07-18 Thread Jeremias Maerki
You guessed right. You're missing JEuclid in the class path. You can
download it from http://sourceforge.net/projects/jeuclid

But if you don't need MathML support for now, you can just as well
remove the examples/mathml/src directory from the source directories for
your Eclipse project. The MathML extension is just that, an extension.

HTH

On 18.07.2006 10:25:11 Babar Ismail wrote:
 Hi everyone,
  
 I have just downloaded fop-0.92beta-src.zip from 
 ftp://apache.mirrors.tds.net/pub/apache.org/xmlgraphics/fop/source/
 I am running on windows platform, using eclipse 3.0 as IDE.I have unzipped 
 all the code in a folder and created a new project and addedall the external 
 jar files present in the #8220;lib#8221; folder to theproject. When I do 
 ant build, it builds up succesfully but I see a lot ofcompile errors in 
 there. 
  
 Here are a few examples:
  
 1. DOMMathBuilder cannot be resolved or is not a type 
 MathMLElementMapping.java
 fop0.92beta/examples/mathml/src/org/apache/fop/mathml line85   
  
 2. The import net cannot be resolvedMathMLElement.java  
 fop0.92beta/examples/mathml/src/org/apache/fop/mathml line39 
  
 3. MathBase cannot be resolved or is not a type   MathMLElement.java  
   fop0.92beta/examples/mathml/src/org/apache/fop/mathml line83
  
 4. DOMMathBuilder cannot be resolved or is not a type MathMLElement.java  
   fop0.92beta/examples/mathml/src/org/apache/fop/mathml line84
  
 5. The import net cannot be resolvedMathMLElementMapping.java 
fop0.92beta/examples/mathml/src/org/apache/fop/mathml line30
  
 6. The import net cannot be resolvedMathMLElementMapping.java 
fop0.92beta/examples/mathml/src/org/apache/fop/mathml line31
  
 I suppose this is due to some missing external libraries.But I have added all 
 of the jar files in the lib to the classpath (usingeclipse).  Do I need to 
 add someother ones aswell?
  
 Did anyone face a similar problem? Can some1 help?


Jeremias Maerki


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



RE: 0.92beta not compiling after download

2006-07-18 Thread Babar Ismail
Hi Jeremias,

I still have a few errors in the project. Could you please tell me where to 
find the jar files for the following packages:

The import javax.media cannot be resolved   JAIImage.java   
fop0.92/src/java/org/apache/fop/image   line 28

The import com.sun.media.jai cannot be resolved JAIImage.java   
fop0.92/src/java/org/apache/fop/image   line 33

The import com.sun.jimi cannot be resolved  JimiImage.java  
fop0.92/src/java/org/apache/fop/image   line 31



Thanks a lot for your help

Babar




-Original Message-
From: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 18, 2006 2:00 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: 0.92beta not compiling after download

You guessed right. You're missing JEuclid in the class path. You can
download it from http://sourceforge.net/projects/jeuclid

But if you don't need MathML support for now, you can just as well
remove the examples/mathml/src directory from the source directories for
your Eclipse project. The MathML extension is just that, an extension.

HTH

On 18.07.2006 10:25:11 Babar Ismail wrote:
 Hi everyone,
  
 I have just downloaded fop-0.92beta-src.zip from 
 ftp://apache.mirrors.tds.net/pub/apache.org/xmlgraphics/fop/source/
 I am running on windows platform, using eclipse 3.0 as IDE.I have unzipped 
 all the code in a folder and created a new project and addedall the external 
 jar files present in the #8220;lib#8221; folder to theproject. When I do 
 ant build, it builds up succesfully but I see a lot ofcompile errors in 
 there. 
  
 Here are a few examples:
  
 1. DOMMathBuilder cannot be resolved or is not a type 
 MathMLElementMapping.java
 fop0.92beta/examples/mathml/src/org/apache/fop/mathml line85   
  
 2. The import net cannot be resolvedMathMLElement.java  
 fop0.92beta/examples/mathml/src/org/apache/fop/mathml line39 
  
 3. MathBase cannot be resolved or is not a type   MathMLElement.java  
   fop0.92beta/examples/mathml/src/org/apache/fop/mathml line83
  
 4. DOMMathBuilder cannot be resolved or is not a type MathMLElement.java  
   fop0.92beta/examples/mathml/src/org/apache/fop/mathml line84
  
 5. The import net cannot be resolvedMathMLElementMapping.java 
fop0.92beta/examples/mathml/src/org/apache/fop/mathml line30
  
 6. The import net cannot be resolvedMathMLElementMapping.java 
fop0.92beta/examples/mathml/src/org/apache/fop/mathml line31
  
 I suppose this is due to some missing external libraries.But I have added all 
 of the jar files in the lib to the classpath (usingeclipse).  Do I need to 
 add someother ones aswell?
  
 Did anyone face a similar problem? Can some1 help?


Jeremias Maerki


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


-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.1/390 - Release Date: 7/17/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.1/390 - Release Date: 7/17/2006
 

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



Re: 0.92beta not compiling after download

2006-07-18 Thread Jeremias Maerki
These are the support files for the JIMI and JAI image libraries. You
can find download links here: [1]. Or you can just exclude them from
being compiled.

[1] http://xmlgraphics.apache.org/fop/0.92/graphics.html#packages

On 18.07.2006 11:38:47 Babar Ismail wrote:
 Hi Jeremias,
 
 I still have a few errors in the project. Could you please tell me where to 
 find the jar files for the following packages:
 
   The import javax.media cannot be resolved   JAIImage.java   
 fop0.92/src/java/org/apache/fop/image   line 28
 
   The import com.sun.media.jai cannot be resolved JAIImage.java   
 fop0.92/src/java/org/apache/fop/image   line 33
 
   The import com.sun.jimi cannot be resolved  JimiImage.java  
 fop0.92/src/java/org/apache/fop/image   line 31
 
 
 
 Thanks a lot for your help
 
 Babar
 
 
 
 
 -Original Message-
 From: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, July 18, 2006 2:00 PM
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: 0.92beta not compiling after download
 
 You guessed right. You're missing JEuclid in the class path. You can
 download it from http://sourceforge.net/projects/jeuclid
 
 But if you don't need MathML support for now, you can just as well
 remove the examples/mathml/src directory from the source directories for
 your Eclipse project. The MathML extension is just that, an extension.
 
 HTH
 
 On 18.07.2006 10:25:11 Babar Ismail wrote:
  Hi everyone,
   
  I have just downloaded fop-0.92beta-src.zip from 
  ftp://apache.mirrors.tds.net/pub/apache.org/xmlgraphics/fop/source/
  I am running on windows platform, using eclipse 3.0 as IDE.I have unzipped 
  all the code in a folder and created a new project and addedall the 
  external jar files present in the #8220;lib#8221; folder to theproject. 
  When I do ant build, it builds up succesfully but I see a lot ofcompile 
  errors in there. 
   
  Here are a few examples:
   
  1. DOMMathBuilder cannot be resolved or is not a type 
  MathMLElementMapping.java
  fop0.92beta/examples/mathml/src/org/apache/fop/mathml line85   
   
  2. The import net cannot be resolvedMathMLElement.java  
  fop0.92beta/examples/mathml/src/org/apache/fop/mathml line39 
   
  3. MathBase cannot be resolved or is not a type   MathMLElement.java
  fop0.92beta/examples/mathml/src/org/apache/fop/mathml line83
   
  4. DOMMathBuilder cannot be resolved or is not a type 
  MathMLElement.java
  fop0.92beta/examples/mathml/src/org/apache/fop/mathml line84
   
  5. The import net cannot be resolvedMathMLElementMapping.java   
   fop0.92beta/examples/mathml/src/org/apache/fop/mathml line30
   
  6. The import net cannot be resolvedMathMLElementMapping.java   
   fop0.92beta/examples/mathml/src/org/apache/fop/mathml line31
   
  I suppose this is due to some missing external libraries.But I have added 
  all of the jar files in the lib to the classpath (usingeclipse).  Do I need 
  to add someother ones aswell?
   
  Did anyone face a similar problem? Can some1 help?


Jeremias Maerki


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



marker value to variable

2006-07-18 Thread pat
Hi all,

I have a problem and I'm not able to solve it :-( I'm using marker to generate
subtotat (it works) and for retrievng the subtotal I'm using retrieve-marker
(that works too), but I need to split subtotal to part before decimal point
and after decimal point ant this is the problem. How to store the value from
retrieve-marker to variable or use it directly ???

I'm looking for something like this:
xsl:variable name=qqq
  fo:retrieve-marker .../
/xsl:variable

Is there a way how to do that ???

Thanks a lot.

 Pat

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



Re: marker value to variable

2006-07-18 Thread Glen Mazza

pat wrote:


Hi all,

I have a problem and I'm not able to solve it :-( I'm using marker to generate
subtotat (it works) and for retrievng the subtotal I'm using retrieve-marker
(that works too), but I need to split subtotal to part before decimal point
and after decimal point ant this is the problem. How to store the value from
retrieve-marker to variable or use it directly ???

I'm looking for something like this:
xsl:variable name=qqq
 fo:retrieve-marker .../
/xsl:variable

Is there a way how to do that ???

 

I don't think so.  By the time FOP is processing your input XML, it is 
fully in the FO namespace.  (It initially uses Xalan--or Saxon--to do 
the XSLT transformations, replacing your xsl: elements with the result 
tree of your XSLT transformation.)  The xsl: elements are all gone by 
the time FOP is processing fo:retrieve-marker.


It may be helpful for others to be able to answer your question if you 
let us know what type of data you are handling and why you need this 
functionality.  There may be another way to accomplish what you need here.


Glen


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



Re: marker value to variable

2006-07-18 Thread Andreas L Delmelle

On Jul 18, 2006, at 20:36, Andreas L Delmelle wrote:


(so, one marker/retrieve-marker pair per subtotal).


Errrm... I mean *two* pairs, of course 8)

Cheers,

Andreas


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



Re: Possible memory leak

2006-07-18 Thread Andreas L Delmelle

On Jul 5, 2006, at 16:21, karthik wrote:

Hi,

Sorry to get back so late.

Thanks for your comments. Looks like for sure there are FOP  
references hanging

around that GC could not clear up, which eventually kills the process.


[Since you've been profiling the process anyway, I feel like taking  
advantage of this. Hope you don't mind... ;)]


Which types of references? What kind of objects? Any pattern  
emerging? Any specific type of object we should definitely take a  
closer look at?



Below is
a higher-level layout of the xsl. Let me know if you see anything  
to improve.


Not immediately. It seems OK, but then, since it is higher-level, we  
still haven't seen what the page-sequences contain? How many pages by  
average? Minimum? Maximum? Do they contain a lot of large and/or  
nested tables?


Oh, just noticed something that does not look completely right to me,  
though.
Don't know what the rest thinks; could be that I need to brush up my  
XSLT :/


Here we go:

!-- For each DOCUMENT, call template --
xsl:for-each select=DOCUMENT
  xsl:call-template name=DOCUMENT
  /xsl:call-template
/xsl:for-each
/fo:root
/xsl:template

!-- DOCUMENT template--
xsl:template name=DOCUMENT

   ^
...

  fo:flow flow-name=xsl-region-body
xsl:apply-templates/
!--last page reference --
fo:block id={generate-id(.)}/

  ^
This somehow seems dangerous, because:
what exactly is the context-node (.) defined to be inside a named  
template? IOW: is it always and necessarily the context-node within  
the calling template/for-each?


If I were you, I'd replace that entire construct by:

xsl:apply-templates select=DOCUMENT /
...
xsl:template match=DOCUMENT

Any reason in particular you're using for-each-call-template instead  
of apply-templates?



Cheers,

Andreas


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



Re: Possible memory leak

2006-07-18 Thread Andreas L Delmelle

On Jul 18, 2006, at 22:23, Andreas L Delmelle wrote:


snip /
Oh, just noticed something that does not look completely right to  
me, though.
Don't know what the rest thinks; could be that I need to brush up  
my XSLT :/


OK, my bad. It is literally defined in the Rec: Unlike apply- 
templates, call-template does not change the current node or current  
node list.


Still, I'm wondering:
Any reason in particular you're using for-each-call-template  
instead of apply-templates?



Thanks,

Andreas


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