AW: AW: AW: Embedding FOP in Java

2002-09-18 Thread Amin Schoeib
Title: Nachricht



Hi,
I 
tried the code of JohnPT. 
Here 
the result:
When I 
compile it, I become the following error:

"PdfRenderer.java": Error #: 300 : method 
setLogger(org.apache.log.Logger) not found in class org.apache.fop.apps.Driver 
at line 94, column 11
To 
make the code running I took out the line with setLogger.
The 
code compiled succesfully, but when I execute it I become the 
following:

[ERROR] Logger not set

[INFO] 
building formatting object tree

[WARNING] Screen logger not set.

javax.xml.transform.TransformerException

at 
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:725)

at 
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:426)

at 
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:215)

at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2324)

at 
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2147)

at 
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1203)

at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:665)

at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1119)

at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1097)

at 
beraterfondsdaten.PdfRenderer.run(PdfRenderer.java:105)

at 
beraterfondsdaten.PdfRenderer.run(PdfRenderer.java:69)

at 
beraterfondsdaten.PdfRenderer.run(PdfRenderer.java:122)

at beraterfondsdaten.Trans.main(Trans.java:9)

-

Could 
not print stack trace...

-

java.lang.NullPointerException

at org.apache.fop.fo.flow.Flow.setFlowName(Unknown 
Source)

at org.apache.fop.fo.flow.Flow.init(Unknown 
Source)

at org.apache.fop.fo.flow.Flow$Maker.make(Unknown 
Source)

at org.apache.fop.fo.FOTreeBuilder.startElement(Unknown 
Source)

at 
org.apache.xalan.transformer.ResultTreeHandler.flushElem(ResultTreeHandler.java:858)

at 
org.apache.xalan.transformer.ResultTreeHandler.flushPending(ResultTreeHandler.java:952)

at 
org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.java:306)

at 
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:716)

at 
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:426)

at 
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:215)

at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2324)

at 
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2147)

at 
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1203)

at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:665)

at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1119)

at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1097)

at 
beraterfondsdaten.PdfRenderer.run(PdfRenderer.java:105)

at 
beraterfondsdaten.PdfRenderer.run(PdfRenderer.java:69)

at 
beraterfondsdaten.PdfRenderer.run(PdfRenderer.java:122)

at beraterfondsdaten.Trans.main(Trans.java:9)

I 
don't understand that, I use the newest versions of FOP,XALAN,XERXES nd JAXP but 
it don't want to work.
What 
reason can this errors have?

thanxx

Schoeib

  
  -Ursprüngliche Nachricht-Von: 
  [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
  Gesendet: Dienstag, 17. September 2002 16:31An: 
  [EMAIL PROTECTED]Betreff: Re: AW: AW: Embedding FOP in 
  JavaI created a 
  convenience class called PdfRenderer. It cache's a stylesheet and then 
  you can process files or streams throught it. You can also pass 
  parameters to your stylesheet with a hashtable (probably should have been a 
  Hashmap). Anyway, it's not perfect, but it works and the class file 
  shows exactly what classes and packages are needed. // you can call the class on xml files with the 
  following 2 lines of code PdfRenderer 
  render = new PdfRenderer( "myxslfile.xsl" ); render.run("input.xml", "output.pdf"); // or if you are building a xml string in memory you 
  can do something like the following String xmlString = "tagsome kind of xml/tag"; 
  Source strSource = new StreamSource( new 
  StringReader(xmlString) ); OutputStream out = new FileOutputStream("outputstream.pdf"); 
  render.run( strSource, out ); 
  // or if you have a DOM object you can do 
  something like the following Hashtable 
  xslParams = new Hashtable(2); xslParams.put( "parameter1", "value1" ); xslParams.put( "parameter2", "value2" ); 
  Source source = new DOMSource( node ); 
  render.run( source, new FileOutputStream( 
  "dom.pdf" ), xslParams ); // 
  configs are done globally (statically) so you can call your config file 
  anytime before the run statements File userConfigFile = new File( "userconfig.xml" ); org.apache.fop.apps.Options options = new 
  

Re: Fix for paragraph breaking

2002-09-18 Thread jaccoud

   
 
  J.Pietschmann  
 
  [EMAIL PROTECTED]Para: [EMAIL PROTECTED],   
 
  e[EMAIL PROTECTED]  
 
   cc: 
 
  17/09/2002 17:36 Assunto:  Re: Fix for paragraph 
breaking.
  Favor responder a
 
  fop-dev  
 
   
 
   
 








[EMAIL PROTECTED] wrote:
 I fixed a problem that FOP had with breaking loong words. If these
 words were too long to fit on one line, and no hyphenation was selected,
 the word would go beyond the right side of the page.

Sorry, commit denied for a variety of reasons:
1. It is not clear whether the problem you attempt to fix is a problem
at all. Actually, it can be argued FOPs behaviour is correct, annoying
as it may be sometimes. This is the main showstopper.


Although I concur that FOP should never break words while hyphenation is
off, I sympathise with Mr. Baals. I had a similar problem with URLs, which
can become quite long and do not fit in the hyphenation rules for any
language. If they grow beyond the line width there is no way of getting it
right without inserting spaces manually yech/ . While using discretionary
hyphens can solve the problem localy (I do not remember FOP taking them
into account while hyphenating; it is most handy when a word has irregular
hyphenation), it would be counterproductive.

I suggest we write a special language hyphenation file for URLs -- it is
not a natural language, but it is one nevertheless, with its own lexical
rules. (Can someone provide me with a pointer to the pertinent spec?)
Stylesheets like DocBook's can take advantage of this by specifying the new
language code, something like x-url. This approach can also be used with
programming languages or other similar stuff, and it has already been
proven to work with languages that can produce very long words (Herr
Pietschmann und die xml:lang='de' Leute soll mit mir einstimmig sein ;-).
However, the hyphen would not be a good choice as the character to use in
the breaking point: a better choice would be to use ellipses (...) in the
preceeding AND in the following line. Can this be achieved?

I can write such an hyphenation file if you people agree this is a sensible
solution.


=
Marcelo Jaccoud Amaral
Petrobrás (http://www.petrobras.com.br)
mailto:[EMAIL PROTECTED]
voice: +55 21 2534-3485
fax: +55 21 2534-1809
=
If brute force doesn't work, maybe you're not using enough brute force.




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




Re: Long table cell text gets outside cell

2002-09-18 Thread jaccoud


This is the same problem I spoke about in the 'Fix for paragraph breaking'
thread.

=
Marcelo Jaccoud Amaral
Petrobrás (http://www.petrobras.com.br)
mailto:[EMAIL PROTECTED]
voice: +55 21 2534-3485
fax: +55 21 2534-1809
=
There are only 10 kinds of people in the world: those who understand binary
and those who don't.



   
 
  Kevin Yeung  
 
  [EMAIL PROTECTED]Para: [EMAIL PROTECTED]
 
  et.hk   cc: 
 
   Assunto:  Long table cell text gets 
outside cell 
  17/09/2002 23:43 
 
  Favor responder a
 
  fop-dev  
 
   
 
   
 




Hi all

I am having troubles with long strings and table cells.

I have a 10-column table and one of the columns displays the primary key
of a product. The PK is a very long string without spaces or breaks. The
string overflows to the neighbouring cells and therefore becomes
unreadable. Another column, printed with a long description, is nicely
stretched vertically to accommodate because there are spaces between
words.

When constructing this table, I did not set column width and each column
has each width. What I would like to see is that the PK gets wrapped to
the next line within the column.

Now:
-+--+--
|1)  PK-10237-AJD873H-d87CJC e|
|+--+--

Desired:
-+--+--
|1)  |PK-10237-A|e|
||JD873H-d87| |
||CJC   | |
-+--+--

Thanks

--
K


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







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




size of images placed using fo:external-graphic

2002-09-18 Thread Ambar Roy

Hi,
When I place a image using external-graphic without
specifying the size of the image, the image is rendered at a
fixed dpi (72 dpi perhaps). This happens even if the file
has a method of specifying dpi, like JPG files. Why does
this happen? According to the XSL spec, the image should be
placed as per the size of the image if content-width and
content-height is set to auto.
I suppose this is a known bug/feature of fop, or I am
misinterpreting the XSL spec. Is it a difficult thing to
modify the FOP source to achieve this result. I am using
FOP-20.4. Can I expect to do this in a reasonable amount of
time? I have experience with java and c++ programming, but I
haven't really tried to hack the FOP source. Any pointers?

Ambar Roy


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




RE: size of images placed using fo:external-graphic

2002-09-18 Thread Buchtík, Michal

There's only one pointer (i thing).
Try to specify width and/or height of fo:external-graphic
search list archive http://marc.theaimsgroup.com/?l=fop-devr=1w=2

I look to source code, and IMHO you must modify
src/org/apache/fop/images and src/org/apache/fop/images/analyzer
classes to suport DPI (extract dpi from file and compute right
width/height)

Michal

-Original Message-
From: Ambar Roy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 2:01 PM
To: [EMAIL PROTECTED]
Subject: size of images placed using fo:external-graphic


Hi,
When I place a image using external-graphic without
specifying the size of the image, the image is rendered at a
fixed dpi (72 dpi perhaps). This happens even if the file
has a method of specifying dpi, like JPG files. Why does
this happen? According to the XSL spec, the image should be
placed as per the size of the image if content-width and
content-height is set to auto.
I suppose this is a known bug/feature of fop, or I am
misinterpreting the XSL spec. Is it a difficult thing to
modify the FOP source to achieve this result. I am using
FOP-20.4. Can I expect to do this in a reasonable amount of
time? I have experience with java and c++ programming, but I
haven't really tried to hack the FOP source. Any pointers?

Ambar Roy


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

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




Page breaking infinite loop

2002-09-18 Thread Rhett Aultman


I'm having a very involved working weekend this weekend, and I'm writing my list of 
things to do.  There's some openings in it, and I thought I might tackle the infinite 
loop that occurs in the page breaking test as has been documented in some previous 
bugs in our Bugzilla.  Before I settled in to that, though, I wanted to make sure my 
effort wasn't being repeated elsewhere.  I haven't seen anyone resolve the bug, so I'm 
assuming it's still needing work.  Is anyone else out there working on this, or should 
I roll up my sleeves and get to it?

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




cvs commit: xml-fop/src/org/apache/fop/area/inline Anchor.java Character.java FilledArea.java ForeignObject.java Image.java InlineArea.java InlineParent.java Leader.java Space.java UnresolvedPageNumber.java Viewport.java Word.java Stretch.java

2002-09-18 Thread keiron

keiron  2002/09/18 06:50:14

  Modified:src/org/apache/fop/area Area.java BeforeFloat.java
Block.java BlockParent.java BlockViewport.java
BodyRegion.java Flow.java Footnote.java
LineArea.java LineTrait.java MainReference.java
MinOptMax.java Page.java RegionReference.java
RegionViewport.java Resolveable.java Span.java
Title.java Trait.java TreeExt.java
   src/org/apache/fop/area/inline Anchor.java Character.java
FilledArea.java ForeignObject.java Image.java
InlineArea.java InlineParent.java Leader.java
Space.java UnresolvedPageNumber.java Viewport.java
Word.java
  Removed: src/org/apache/fop/area/inline Stretch.java
  Log:
  cleaned up some of the area tree
  removed parent and min/opt/max from area tree, layout managers can handle all this
  fixed a number of style errors
  
  Revision  ChangesPath
  1.9   +48 -58xml-fop/src/org/apache/fop/area/Area.java
  
  Index: Area.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/Area.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Area.java 13 Sep 2002 08:21:53 -  1.8
  +++ Area.java 18 Sep 2002 13:50:13 -  1.9
  @@ -105,86 +105,59 @@
   
   private int areaClass = CLASS_NORMAL;
   private int ipd;
  +private HashMap props = null;
   
  -protected Area parent = null; // Doesn't need to be saved in serialization
  -
  +/**
  + * Get the area class of this area.
  + *
  + * @return the area class
  + */
   public int getAreaClass() {
   return areaClass;
   }
   
  +/**
  + * Set the area class of this area.
  + *
  + * @param areaClass the area class
  + */
   public void setAreaClass(int areaClass) {
   this.areaClass = areaClass;
   }
   
  +/**
  + * Set the inline progression dimension of this area.
  + *
  + * @param i the new inline progression dimension
  + */
   public void setIPD(int i) {
   ipd = i;
   }
   
  +/**
  + * Get the inline progression dimension of this area.
  + *
  + * @return the inline progression dimension
  + */
   public int getIPD() {
   return ipd;
   }
   
   /**
  - * Return a length range describing the minimum, optimum and maximum
  - * lengths available for content in the block-progression-direction.
  - * This is calculated from the theoretical maximum size of the area
  - * and its current content.
  - */
  -public MinOptMax getAvailBPD() {
  -return MinOptMax.subtract(getMaxBPD(), getContentBPD());
  -}
  -
  -/**
  - * Return a length range describing the theoretical maximum size of an
  - * area in the block-progression-direction.
  - * For areas holding normal flowing or floating content in paged media,
  - * this depends on the size of the body. In general the answer is the
  - * gotten from the parent. At the body level, the calculation accounts
  - * for the sizes of the conditional areas.
  - */
  -public MinOptMax getMaxBPD() {
  -if (parent != null) {
  -return parent.getMaxBPD();
  -} else {
  -return new MinOptMax();
  -}
  -}
  -
  -/**
  - * Return a length range describing the minimum, optimum and maximum
  - * lengths of all area content in the block-progression-direction.
  - * This is based on the allocation rectangles of all content in
  - * the area.
  + * Add a child to this area.
  + * The default is to do nothing. Subclasses must override
  + * to do something if they can have child areas.
  + *
  + * @param child the child area to add
*/
  -public MinOptMax getContentBPD() {
  -return new MinOptMax();
  +public void addChild(Area child) {
   }
   
   /**
  - * Return a length range describing the minimum, optimum and maximum
  - * lengths of the area's allocation rectangle
  - * in the block-progression-direction.
  - * This is based on the allocation rectangles of all content in
  - * the area.
  - * The default implementation simply returns the same as the content BPD.
  - * If an Area has before or after border and padding, these contribute
  - * to the allocation BPD, depending on conditionality.
  + * Add a trait property to this area.
  + *
  + * @param prop the Trait to add
*/
  -public MinOptMax getAllocationBPD() {
  -return getContentBPD();
  -}
  -
  -public void setParent(Area parent) {
  -this.parent = parent;
  -}
  -
  -// Do nothing! Let 

cvs commit: xml-fop/src/org/apache/fop/fo FObject.java

2002-09-18 Thread pbwest

pbwest  2002/09/18 06:56:24

  Modified:src/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design
FObject.java
  Log:
  Added tag and revision.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.3   +3 -3  xml-fop/src/org/apache/fop/fo/Attic/FObject.java
  
  Index: FObject.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/Attic/FObject.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- FObject.java  27 Jun 2002 12:55:18 -  1.1.2.2
  +++ FObject.java  18 Sep 2002 13:56:24 -  1.1.2.3
  @@ -10,7 +10,7 @@
   
   import org.apache.fop.apps.FOPException;
   import org.apache.fop.fo.expr.PropertyException;
  -import org.apache.fop.for.FObjects;
  +import org.apache.fop.fo.FObjects;
   
   /**
* Base class for all Flow Objects
  
  
  

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




cvs commit: xml-fop/src/org/apache/fop/fo/expr AbstractPropertyValue.java PropertyValue.java PropertyValueList.java PropertyTriplet.java

2002-09-18 Thread pbwest

pbwest  2002/09/18 07:02:02

  Removed: src/org/apache/fop/fo/expr Tag: FOP_0-20-0_Alt-Design
AbstractPropertyValue.java PropertyValue.java
PropertyValueList.java PropertyTriplet.java
  Log:
  Moved to org.apache.fop.datatypes.

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




cvs commit: xml-fop/src/org/apache/fop/datatypes AbstractPropertyValue.java PropertyValue.java PropertyValueList.java PropertyTriplet.java

2002-09-18 Thread pbwest

pbwest  2002/09/18 07:02:48

  Added:   src/org/apache/fop/datatypes Tag: FOP_0-20-0_Alt-Design
AbstractPropertyValue.java PropertyValue.java
PropertyValueList.java PropertyTriplet.java
  Log:
  Moved from org.apache.fop.fo.expr.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.1   +140 -0
xml-fop/src/org/apache/fop/datatypes/Attic/AbstractPropertyValue.java
  
  
  
  
  1.1.2.1   +85 -0 xml-fop/src/org/apache/fop/datatypes/Attic/PropertyValue.java
  
  
  
  
  1.1.2.1   +253 -0
xml-fop/src/org/apache/fop/datatypes/Attic/PropertyValueList.java
  
  
  
  
  1.1.2.1   +238 -0xml-fop/src/org/apache/fop/datatypes/Attic/PropertyTriplet.java
  
  
  
  

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




cvs commit: xml-fop/src/org/apache/fop/area/inline Word.java

2002-09-18 Thread keiron

keiron  2002/09/18 07:04:32

  Modified:src/org/apache/fop/fo/flow Leader.java
   src/org/apache/fop/area/inline Word.java
  Log:
  fixed compile error
  
  Revision  ChangesPath
  1.28  +1 -2  xml-fop/src/org/apache/fop/fo/flow/Leader.java
  
  Index: Leader.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Leader.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- Leader.java   13 Sep 2002 08:21:54 -  1.27
  +++ Leader.java   18 Sep 2002 14:04:31 -  1.28
  @@ -24,7 +24,6 @@
   import org.apache.fop.area.MinOptMax;
   import org.apache.fop.area.inline.Space;
   import org.apache.fop.area.inline.Word;
  -import org.apache.fop.area.inline.Stretch;
   import org.apache.fop.area.inline.InlineParent;
   import org.apache.fop.area.inline.FilledArea;
   import org.apache.fop.util.CharUtilities;
  
  
  
  1.7   +5 -3  xml-fop/src/org/apache/fop/area/inline/Word.java
  
  Index: Word.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/inline/Word.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Word.java 18 Sep 2002 13:50:14 -  1.6
  +++ Word.java 18 Sep 2002 14:04:32 -  1.7
  @@ -10,9 +10,11 @@
   import org.apache.fop.render.Renderer;
   
   public class Word extends InlineArea {
  -
   // character info: font, char spacing, colour, baseline
  -private String word;
  +/**
  + * The word for this word area.
  + */
  +protected String word;
   private int iWSadjust = 0;
   
   public void render(Renderer renderer) {
  
  
  

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




cvs commit: xml-fop/src/org/apache/fop/datatypes/indirect - New directory

2002-09-18 Thread pbwest

pbwest  2002/09/18 07:06:29

  xml-fop/src/org/apache/fop/datatypes/indirect - New directory

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




cvs commit: xml-fop/src/org/apache/fop/render/pdf PDFRenderer.java

2002-09-18 Thread keiron

keiron  2002/09/18 07:12:42

  Modified:src/org/apache/fop/render AbstractRenderer.java
   src/org/apache/fop/render/pdf PDFRenderer.java
  Log:
  updated for area tree and prepare for block border and back
  
  Revision  ChangesPath
  1.25  +24 -6 xml-fop/src/org/apache/fop/render/AbstractRenderer.java
  
  Index: AbstractRenderer.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/AbstractRenderer.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- AbstractRenderer.java 13 Sep 2002 08:21:55 -  1.24
  +++ AbstractRenderer.java 18 Sep 2002 14:12:42 -  1.25
  @@ -278,7 +278,7 @@
* @param bf  The before float area
*/
   protected void renderBeforeFloat(BeforeFloat bf) {
  -List blocks = bf.getBlocks();
  +List blocks = bf.getChildAreas();
   if (blocks != null) {
   renderBlocks(blocks);
   Block sep = bf.getSeparator();
  @@ -294,7 +294,7 @@
* @param footnote  The footnote
*/
   protected void renderFootnote(Footnote footnote) {
  -List blocks = footnote.getBlocks();
  +List blocks = footnote.getChildAreas();
   if (blocks != null) {
   Block sep = footnote.getSeparator();
   if (sep != null) {
  @@ -343,7 +343,7 @@
*/
   protected void renderFlow(Flow flow) {
   // the normal flow reference area contains stacked blocks
  -List blocks = flow.getBlocks();
  +List blocks = flow.getChildAreas();
   renderBlocks(blocks);
   
   }
  @@ -356,6 +356,7 @@
   protected void renderBlock(Block block) {
   List children = block.getChildAreas();
   if (children == null) {
  +handleBlockTraits(block);
   // simply move position
   currentBPPosition += block.getHeight();
   } else if (block instanceof BlockViewport) {
  @@ -366,8 +367,10 @@
   int saveBP = currentBPPosition;
   
   if (block.getPositioning() == Block.ABSOLUTE) {
  -currentIPPosition += block.getXOffset();
  -currentBPPosition += block.getYOffset();
  +currentIPPosition = containingIPPosition + block.getXOffset();
  +currentBPPosition = containingBPPosition + block.getYOffset();
  +
  +handleBlockTraits(block);
   
   renderBlocks(children);
   
  @@ -378,6 +381,8 @@
   currentIPPosition += block.getXOffset();
   currentBPPosition += block.getYOffset();
   
  +handleBlockTraits(block);
  +
   renderBlocks(children);
   
   // stacked and relative blocks effect stacking
  @@ -388,6 +393,18 @@
   }
   
   /**
  + * Handle block traits.
  + * This method is called when the correct ip and bp posiiton is
  + * set. This should be overridden to draw border and background
  + * traits for the block area.
  + *
  + * @param block the block area
  + */
  +protected void handleBlockTraits(Block block) {
  +// draw border and background
  +}
  +
  +/**
* Renders a block viewport.
*
* @param bvThe block viewport
  @@ -405,6 +422,7 @@
   currentBPPosition = 0;
   
   startVParea(ctm);
  +handleBlockTraits(bv);
   renderBlocks(children);
   endVParea();
   
  
  
  
  1.124 +49 -14xml-fop/src/org/apache/fop/render/pdf/PDFRenderer.java
  
  Index: PDFRenderer.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/PDFRenderer.java,v
  retrieving revision 1.123
  retrieving revision 1.124
  diff -u -r1.123 -r1.124
  --- PDFRenderer.java  13 Sep 2002 08:21:55 -  1.123
  +++ PDFRenderer.java  18 Sep 2002 14:12:42 -  1.124
  @@ -17,7 +17,6 @@
   import org.apache.fop.apps.FOPException;
   import org.apache.fop.apps.Version;
   import org.apache.fop.fo.properties.RuleStyle;
  -//import org.apache.fop.datatypes.*;
   import org.apache.fop.pdf.PDFStream;
   import org.apache.fop.pdf.PDFDocument; 
   import org.apache.fop.pdf.PDFInfo;
  @@ -50,6 +49,7 @@
   import org.apache.fop.area.inline.InlineParent;
   import org.apache.fop.layout.FontState;
   import org.apache.fop.layout.FontMetric;
  +import org.apache.fop.traits.BorderProps;
   
   import org.w3c.dom.Document;
   
  @@ -117,47 +117,47 @@
   /**
* the current stream to add PDF commands to
*/
  -PDFStream currentStream;
  +protected PDFStream currentStream;
   
   /**
* the current annotation list to add annotations to
*/
  -PDFAnnotList currentAnnotList;
  +protected PDFAnnotList currentAnnotList;
   
   

cvs commit: xml-fop/src/org/apache/fop/layoutmgr/table Body.java Cell.java TableLayoutManager.java

2002-09-18 Thread keiron

keiron  2002/09/18 07:15:05

  Modified:src/org/apache/fop/layoutmgr BlockLayoutManager.java
BlockStackingLayoutManager.java
FlowLayoutManager.java
InlineStackingLayoutManager.java
LeafNodeLayoutManager.java LineLayoutManager.java
PageLayoutManager.java
   src/org/apache/fop/layoutmgr/table Body.java Cell.java
TableLayoutManager.java
  Log:
  start of spacing and borders
  
  Revision  ChangesPath
  1.20  +66 -3 xml-fop/src/org/apache/fop/layoutmgr/BlockLayoutManager.java
  
  Index: BlockLayoutManager.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layoutmgr/BlockLayoutManager.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- BlockLayoutManager.java   13 Sep 2002 08:21:54 -  1.19
  +++ BlockLayoutManager.java   18 Sep 2002 14:15:04 -  1.20
  @@ -9,11 +9,18 @@
   
   import org.apache.fop.fo.FObj;
   import org.apache.fop.fo.TextInfo;
  +import org.apache.fop.fo.PropertyManager;
   import org.apache.fop.area.Area;
   import org.apache.fop.area.BlockParent;
   import org.apache.fop.area.Block;
   import org.apache.fop.area.LineArea;
   import org.apache.fop.area.MinOptMax;
  +import org.apache.fop.area.Trait;
  +import org.apache.fop.traits.LayoutProps;
  +import org.apache.fop.layout.BorderAndPadding;
  +import org.apache.fop.layout.BackgroundProps;
  +import org.apache.fop.traits.SpaceVal;
  +import org.apache.fop.traits.BorderProps;
   
   import java.util.ListIterator;
   import java.util.ArrayList;
  @@ -26,6 +33,10 @@
   
   private Block curBlockArea;
   
  +LayoutProps layoutProps;
  +BorderAndPadding borderProps;
  +BackgroundProps backgroundsPops;
  +
   int lead = 12000;
   int lineHeight = 14000;
   int follow = 2000;
  @@ -96,12 +107,23 @@
   lineHeight = ti.lineHeight;
   }
   
  +/**
  + * This method provides a hook for a LayoutManager to intialize traits
  + * for the areas it will create, based on Properties set on its FO.
  + */
  +protected void initProperties(PropertyManager pm) {
  +layoutProps = pm.getLayoutProps();
  +borderProps = pm.getBorderAndPadding();
  +backgroundsPops = pm.getBackgroundProps();
  +}
  +
   public BreakPoss getNextBreakPoss(LayoutContext context) {
   LayoutManager curLM ; // currently active LM
   
   MinOptMax stackSize = new MinOptMax();
   // if starting add space before
  -// stackSize.add(spaceBefore);
  +stackSize.add(layoutProps.spaceBefore.space);
  +
   BreakPoss lastPos = null;
   
   while ((curLM = getChildLM()) != null) {
  @@ -127,7 +149,7 @@
   while (!curLM.isFinished()) {
   if ((bp = curLM.getNextBreakPoss(childLC)) != null) {
   stackSize.add(bp.getStackingSize());
  -if (stackSize.min  context.getStackLimit().max) {
  +if (stackSize.opt  context.getStackLimit().max) {
   // reset to last break
   if (lastPos != null) {
   reset(lastPos.getPosition());
  @@ -148,6 +170,9 @@
   }
   }
   }
  +if(getChildLM() == null) {
  +stackSize.add(layoutProps.spaceAfter.space);
  +}
   BreakPoss breakPoss = new BreakPoss(
   new LeafPosition(this, childBreaks.size() - 1));
   breakPoss.setStackingSize(stackSize);
  @@ -160,6 +185,11 @@
   public void addAreas(PositionIterator parentIter,
LayoutContext layoutContext) {
   getParentArea(null);
  +
  +// if adjusted space before
  +double adjust = layoutContext.getSpaceAdjust();
  +addBlockSpacing(adjust, layoutProps.spaceBefore.space);
  +
   addID();
   
   LayoutManager childLM ;
  @@ -179,6 +209,9 @@
   
   flush();
   
  +// if adjusted space after
  +addBlockSpacing(adjust, layoutProps.spaceAfter.space);
  +
   childBreaks.clear();
   curBlockArea = null;
   }
  @@ -196,6 +229,10 @@
   public Area getParentArea(Area childArea) {
   if (curBlockArea == null) {
   curBlockArea = new Block();
  +
  +// set traits
  +addBorders(curBlockArea);
  +
   // Set up dimensions
   // Must get dimensions from parent area
   Area parentArea = parentLM.getParentArea(curBlockArea);
  @@ -207,6 +244,32 @@
   return curBlockArea;
   }
   
  +public void addBorders(Block curBlockArea) {
  +BorderProps bps = 

cvs commit: xml-fop/src/org/apache/fop/datatypes/indirect FromNearestSpecified.java FromParent.java IndirectValue.java InheritedValue.java Inherit.java

2002-09-18 Thread pbwest

pbwest  2002/09/18 07:21:07

  Added:   src/org/apache/fop/datatypes/indirect Tag:
FOP_0-20-0_Alt-Design FromNearestSpecified.java
FromParent.java IndirectValue.java
InheritedValue.java Inherit.java
  Log:
  Moved from org.apache.fop.datatypes
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.1   +106 -0
xml-fop/src/org/apache/fop/datatypes/indirect/Attic/FromNearestSpecified.java
  
  
  
  
  1.1.2.1   +85 -0 
xml-fop/src/org/apache/fop/datatypes/indirect/Attic/FromParent.java
  
  
  
  
  1.1.2.1   +190 -0
xml-fop/src/org/apache/fop/datatypes/indirect/Attic/IndirectValue.java
  
  
  
  
  1.1.2.1   +120 -0
xml-fop/src/org/apache/fop/datatypes/indirect/Attic/InheritedValue.java
  
  
  
  
  1.1.2.1   +92 -0 xml-fop/src/org/apache/fop/datatypes/indirect/Attic/Inherit.java
  
  
  
  

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




cvs commit: xml-fop/src/org/apache/fop/datatypes AbstractPropertyValue.java Angle.java Auto.java Bool.java ColorType.java CountryType.java EnumType.java FontFamilySet.java Frequency.java InheritCompound.java IntegerType.java LanguageType.java Literal.java MappedNumeric.java MimeType.java NCName.java None.java Numeric.java PropertyTriplet.java PropertyValue.java PropertyValueList.java ScriptType.java ShadowEffect.java Slash.java StringType.java TextDecorations.java TextDecorator.java Time.java UriType.java

2002-09-18 Thread pbwest

pbwest  2002/09/18 08:24:13

  Modified:src/org/apache/fop/datatypes Tag: FOP_0-20-0_Alt-Design
AbstractPropertyValue.java Angle.java Auto.java
Bool.java ColorType.java CountryType.java
EnumType.java FontFamilySet.java Frequency.java
InheritCompound.java IntegerType.java
LanguageType.java Literal.java MappedNumeric.java
MimeType.java NCName.java None.java Numeric.java
PropertyTriplet.java PropertyValue.java
PropertyValueList.java ScriptType.java
ShadowEffect.java Slash.java StringType.java
TextDecorations.java TextDecorator.java Time.java
UriType.java
  Log:
  Changes to import names.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.2   +4 -4  
xml-fop/src/org/apache/fop/datatypes/Attic/AbstractPropertyValue.java
  
  Index: AbstractPropertyValue.java
  ===
  RCS file: 
/home/cvs/xml-fop/src/org/apache/fop/datatypes/Attic/AbstractPropertyValue.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- AbstractPropertyValue.java18 Sep 2002 14:02:47 -  1.1.2.1
  +++ AbstractPropertyValue.java18 Sep 2002 15:24:11 -  1.1.2.2
  @@ -1,10 +1,10 @@
  -package org.apache.fop.fo.expr;
  +package org.apache.fop.datatypes;
   
   import org.apache.fop.fo.PropertyConsts;
   import org.apache.fop.fo.PropNames;
   import org.apache.fop.fo.Properties;
   import org.apache.fop.fo.expr.PropertyException;
  -import org.apache.fop.fo.expr.PropertyValue;
  +import org.apache.fop.datatypes.PropertyValue;
   
   /*
* AbstractPropertyValue.java
  
  
  
  1.1.2.5   +4 -4  xml-fop/src/org/apache/fop/datatypes/Attic/Angle.java
  
  Index: Angle.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/datatypes/Attic/Angle.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- Angle.java27 Aug 2002 15:14:48 -  1.1.2.4
  +++ Angle.java18 Sep 2002 15:24:11 -  1.1.2.5
  @@ -1,8 +1,8 @@
   package org.apache.fop.datatypes;
   
   import org.apache.fop.fo.expr.PropertyException;
  -import org.apache.fop.fo.expr.PropertyValue;
  -import org.apache.fop.fo.expr.AbstractPropertyValue;
  +import org.apache.fop.datatypes.PropertyValue;
  +import org.apache.fop.datatypes.AbstractPropertyValue;
   import org.apache.fop.fo.Properties;
   
   /*
  
  
  
  1.1.2.4   +5 -5  xml-fop/src/org/apache/fop/datatypes/Attic/Auto.java
  
  Index: Auto.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/datatypes/Attic/Auto.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- Auto.java 27 Aug 2002 15:14:48 -  1.1.2.3
  +++ Auto.java 18 Sep 2002 15:24:11 -  1.1.2.4
  @@ -1,7 +1,7 @@
   package org.apache.fop.datatypes;
   
  -import org.apache.fop.fo.expr.PropertyValue;
  -import org.apache.fop.fo.expr.AbstractPropertyValue;
  +import org.apache.fop.datatypes.PropertyValue;
  +import org.apache.fop.datatypes.AbstractPropertyValue;
   import org.apache.fop.fo.expr.PropertyException;
   import org.apache.fop.fo.Properties;
   
  
  
  
  1.1.2.4   +5 -5  xml-fop/src/org/apache/fop/datatypes/Attic/Bool.java
  
  Index: Bool.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/datatypes/Attic/Bool.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- Bool.java 27 Aug 2002 15:14:48 -  1.1.2.3
  +++ Bool.java 18 Sep 2002 15:24:11 -  1.1.2.4
  @@ -2,8 +2,8 @@
   package org.apache.fop.datatypes;
   
   import org.apache.fop.fo.expr.PropertyException;
  -import org.apache.fop.fo.expr.PropertyValue;
  -import org.apache.fop.fo.expr.AbstractPropertyValue;
  +import org.apache.fop.datatypes.PropertyValue;
  +import org.apache.fop.datatypes.AbstractPropertyValue;
   import org.apache.fop.fo.Properties;
   
   /*
  
  
  
  1.15.2.6  +4 -4  xml-fop/src/org/apache/fop/datatypes/ColorType.java
  
  Index: ColorType.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/datatypes/ColorType.java,v
  retrieving revision 1.15.2.5
  retrieving revision 1.15.2.6
  diff -u -r1.15.2.5 -r1.15.2.6
  --- ColorType.java27 Aug 2002 15:14:48 -  1.15.2.5
  +++ ColorType.java18 Sep 2002 15:24:11 -  1.15.2.6
  @@ -11,8 +11,8 @@
   
   import org.apache.fop.fo.expr.PropertyException;
   import 

cvs commit: xml-fop/src/org/apache/fop/fo/expr PropertyParser.java SystemFontFunction.java

2002-09-18 Thread pbwest

pbwest  2002/09/18 08:35:03

  Modified:src/org/apache/fop/fo/expr Tag: FOP_0-20-0_Alt-Design
PropertyParser.java SystemFontFunction.java
  Log:
  Changes to import names.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.5.2.10  +8 -8  xml-fop/src/org/apache/fop/fo/expr/PropertyParser.java
  
  Index: PropertyParser.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/expr/PropertyParser.java,v
  retrieving revision 1.5.2.9
  retrieving revision 1.5.2.10
  diff -u -r1.5.2.9 -r1.5.2.10
  --- PropertyParser.java   16 Sep 2002 05:23:50 -  1.5.2.9
  +++ PropertyParser.java   18 Sep 2002 15:35:03 -  1.5.2.10
  @@ -13,8 +13,8 @@
   import org.apache.fop.fo.FOTree;
   import org.apache.fop.fo.expr.SystemFontFunction;
   
  -import org.apache.fop.fo.expr.PropertyValue;
  -import org.apache.fop.fo.expr.PropertyValueList;
  +import org.apache.fop.datatypes.PropertyValue;
  +import org.apache.fop.datatypes.PropertyValueList;
   import org.apache.fop.datatypes.Numeric;
   import org.apache.fop.datatypes.Literal;
   import org.apache.fop.datatypes.NCName;
  @@ -26,8 +26,6 @@
   import org.apache.fop.datatypes.Frequency;
   import org.apache.fop.datatypes.Angle;
   import org.apache.fop.datatypes.Bool;
  -import org.apache.fop.datatypes.Inherit;
  -import org.apache.fop.datatypes.InheritedValue;
   import org.apache.fop.datatypes.Auto;
   import org.apache.fop.datatypes.None;
   import org.apache.fop.datatypes.Slash;
  @@ -35,8 +33,10 @@
   import org.apache.fop.datatypes.StringType;
   import org.apache.fop.datatypes.MimeType;
   import org.apache.fop.datatypes.UriType;
  -import org.apache.fop.datatypes.FromParent;
  -import org.apache.fop.datatypes.FromNearestSpecified;
  +import org.apache.fop.datatypes.indirect.Inherit;
  +import org.apache.fop.datatypes.indirect.InheritedValue;
  +import org.apache.fop.datatypes.indirect.FromParent;
  +import org.apache.fop.datatypes.indirect.FromNearestSpecified;
   
   import java.util.HashMap;
   
  
  
  
  1.1.2.4   +5 -3  xml-fop/src/org/apache/fop/fo/expr/Attic/SystemFontFunction.java
  
  Index: SystemFontFunction.java
  ===
  RCS file: 
/home/cvs/xml-fop/src/org/apache/fop/fo/expr/Attic/SystemFontFunction.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- SystemFontFunction.java   28 Jun 2002 03:32:29 -  1.1.2.3
  +++ SystemFontFunction.java   18 Sep 2002 15:35:03 -  1.1.2.4
  @@ -13,6 +13,8 @@
   import org.apache.fop.fo.expr.PropertyException;
   import org.apache.fop.fo.expr.FunctionNotImplementedException;
   import org.apache.fop.datastructs.ROIntArray;
  +import org.apache.fop.datatypes.PropertyValue;
  +import org.apache.fop.datatypes.PropertyValueList;
   
   /**
* Implement the system font function.
  
  
  

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




cvs commit: xml-fop/src/org/apache/fop/fo FONode.java FOTree.java Properties.java PropertyConsts.java PropertySets.java

2002-09-18 Thread pbwest

pbwest  2002/09/18 08:42:13

  Modified:src/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design FONode.java
FOTree.java Properties.java PropertyConsts.java
PropertySets.java
  Log:
  Changes to import names.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.19.2.8  +6 -6  xml-fop/src/org/apache/fop/fo/FONode.java
  
  Index: FONode.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FONode.java,v
  retrieving revision 1.19.2.7
  retrieving revision 1.19.2.8
  diff -u -r1.19.2.7 -r1.19.2.8
  --- FONode.java   18 Sep 2002 06:01:51 -  1.19.2.7
  +++ FONode.java   18 Sep 2002 15:42:12 -  1.19.2.8
  @@ -5,11 +5,11 @@
   import org.apache.fop.fo.FObjects;
   import org.apache.fop.fo.expr.PropertyException;
   import org.apache.fop.fo.expr.PropertyParser;
  -import org.apache.fop.fo.expr.PropertyValue;
  -import org.apache.fop.fo.expr.PropertyValueList;
  -import org.apache.fop.fo.expr.PropertyTriplet;
  +import org.apache.fop.datatypes.PropertyValue;
  +import org.apache.fop.datatypes.PropertyValueList;
  +import org.apache.fop.datatypes.PropertyTriplet;
   import org.apache.fop.datastructs.Tree;
  -import org.apache.fop.datatypes.Inherit;
  +import org.apache.fop.datatypes.indirect.Inherit;
   import org.apache.fop.apps.FOPException;
   import org.apache.fop.xml.XMLEvent;
   import org.apache.fop.xml.SyncedXmlEventsBuffer;
  
  
  
  1.1.2.11  +5 -5  xml-fop/src/org/apache/fop/fo/Attic/FOTree.java
  
  Index: FOTree.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/Attic/FOTree.java,v
  retrieving revision 1.1.2.10
  retrieving revision 1.1.2.11
  diff -u -r1.1.2.10 -r1.1.2.11
  --- FOTree.java   18 Sep 2002 06:06:24 -  1.1.2.10
  +++ FOTree.java   18 Sep 2002 15:42:12 -  1.1.2.11
  @@ -3,7 +3,7 @@
   import org.apache.fop.datastructs.Tree;
   import org.apache.fop.datatypes.Ints;
   import org.apache.fop.datatypes.Numeric;
  -import org.apache.fop.datatypes.Inherit;
  +import org.apache.fop.datatypes.indirect.Inherit;
   import org.apache.fop.datatypes.Auto;
   import org.apache.fop.datatypes.None;
   import org.apache.fop.datatypes.TextDecorations;
  @@ -16,8 +16,8 @@
   import org.apache.fop.fo.Properties;
   import org.apache.fop.fo.PropertyConsts;
   import org.apache.fop.fo.PropNames;
  -import org.apache.fop.fo.expr.PropertyValue;
  -import org.apache.fop.fo.expr.PropertyTriplet;
  +import org.apache.fop.datatypes.PropertyValue;
  +import org.apache.fop.datatypes.PropertyTriplet;
   import org.apache.fop.fo.expr.PropertyException;
   import org.apache.fop.fo.expr.PropertyParser;
   
  
  
  
  1.1.2.24  +11 -10xml-fop/src/org/apache/fop/fo/Attic/Properties.java
  
  Index: Properties.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/Attic/Properties.java,v
  retrieving revision 1.1.2.23
  retrieving revision 1.1.2.24
  diff -u -r1.1.2.23 -r1.1.2.24
  --- Properties.java   15 Sep 2002 05:00:54 -  1.1.2.23
  +++ Properties.java   18 Sep 2002 15:42:12 -  1.1.2.24
  @@ -25,9 +25,9 @@
   import org.apache.fop.fo.PropertyConsts;
   import org.apache.fop.fo.FOTree;
   import org.apache.fop.fo.FObjects;
  -import org.apache.fop.fo.expr.PropertyValue;
  -import org.apache.fop.fo.expr.AbstractPropertyValue;
  -import org.apache.fop.fo.expr.PropertyValueList;
  +import org.apache.fop.datatypes.PropertyValue;
  +import org.apache.fop.datatypes.AbstractPropertyValue;
  +import org.apache.fop.datatypes.PropertyValueList;
   import org.apache.fop.fo.expr.PropertyException;
   import org.apache.fop.fo.expr.PropertyNotImplementedException;
   import org.apache.fop.fo.expr.SystemFontFunction;
  @@ -53,15 +53,15 @@
   import org.apache.fop.datatypes.Literal;
   import org.apache.fop.datatypes.Auto;
   import org.apache.fop.datatypes.None;
  -import org.apache.fop.datatypes.Inherit;
   import org.apache.fop.datatypes.ColorType;
   import org.apache.fop.datatypes.FontFamilySet;
   import org.apache.fop.datatypes.TextDecorations;
   import org.apache.fop.datatypes.TextDecorator;
   import org.apache.fop.datatypes.ShadowEffect;
  -import org.apache.fop.datatypes.FromParent;
  -import org.apache.fop.datatypes.FromNearestSpecified;
   import org.apache.fop.datatypes.Slash;
  +import org.apache.fop.datatypes.indirect.Inherit;
  +import org.apache.fop.datatypes.indirect.FromParent;
  +import org.apache.fop.datatypes.indirect.FromNearestSpecified;
   
   /**
* Parent class for all of the individual property classes.  It also contains
  @@ -4385,7 +4385,8 @@
   // First, check that we have a list
   if (type != PropertyValue.LIST) {
   if ( ! nested  type == PropertyValue.INHERIT) 

block containers

2002-09-18 Thread kieran . donovan


Running Fop 0.20.3 we cannot get fo:Block-containers to work at all.

We are translating from XSLT with XML to PDF.
e.g.

Fop -xml test1.xml   -xsl test1.xsl   -pdf test1.pdf

Any ideas ??

thanks,

Kieran




XSLT
==

xsl:template match=INSNAME
fo:block font=12pt Times color=black space-before=6pt space-after
=9pt 
  fo:inline font-weight=boldInsured name/fo:inline
/fo:block


fo:block-container border-color=black border-style=solid border-width
=.5mm height=0.5cm width=2.49cm top=7.0cm left=6.0cm padding
=.6mm position=absolute
 fo:block text-align=start space-after.optimum=3pt line-height
=15pt font-family=sans-serif font-size=12ptxsl:value-of select
=.//fo:block
/fo:block-container


RESULT
=
.
.

DEBUG]: Pages rendererd: 0

[ERROR]: org.apache.fop.layout.BlockArea
org.apache.fop.apps.FOPException: org.apache.fop.layout.BlockArea
at org.apache.fop.apps.Driver.render(Driver.java:486)
at
org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:72)
at org.apache.fop.apps.Fop.main(Fop.java:19)

-

javax.xml.transform.TransformerException: org.apache.fop.layout.BlockArea
at
org.apache.xalan.transformer.TrAXFilter.parse(TrAXFilter.java:137)
at org.apache.fop.apps.Driver.render(Driver.java:481)
at
org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:72)
at org.apache.fop.apps.Fop.main(Fop.java:19)

-
javax.xml.transform.TransformerException: org.apache.fop.layout.BlockArea
at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1212)
at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2894)
at java.lang.Thread.run(Unknown Source)
-
java.lang.ClassCastException: org.apache.fop.layout.BlockArea
at
org.apache.fop.fo.flow.BlockContainer.layout(BlockContainer.java:109)
at org.apache.fop.fo.flow.Block.layout(Block.java:262)
at org.apache.fop.fo.flow.Flow.layout(Flow.java:156)
at org.apache.fop.fo.flow.Flow.layout(Flow.java:113)
at
org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:296)
at
org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:200)
at
org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:182)
at
org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.java:284)
at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:749)
at
org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:495)
at
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:193)
at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154)
at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2097)
at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2029)
at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1189)
at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2894)
at java.lang.Thread.run(Unknown Source)




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




Re: Page breaking infinite loop

2002-09-18 Thread Christian Geisert

Rhett Aultman schrieb:
 I'm having a very involved working weekend this weekend, and I'm writing my list of 
things to do.  There's some openings in it, and I thought I might tackle the infinite 
loop that occurs in the page breaking test as has been documented in some previous 
bugs in our Bugzilla.  Before I settled in to that, though, I wanted to make sure my 
effort wasn't being repeated elsewhere.  I haven't seen anyone resolve the bug, so 
I'm assuming it's still needing work.  Is anyone else out there working on this, or 
should I roll up my sleeves and get to it?

Go for it! (don't forget to assign the bug to yourself)

By the way .. any comments from you (as a classloader expert ;-)
on the following bug:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10255

Christian


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




RE: Page breaking infinite loop

2002-09-18 Thread Rhett Aultman

I'll make the bug assignment.

As for the bug mentioned, FOP can't be embedded in Tomcat 4.0.4, I have to say this- 
we've been using various versions of FOP under Tomcat 4.0.4 for a while...at least, 
until my supervisor switched us to Jetty.  Everything ran fine.  I have made no 
*EXPLICIT* attempt at reproducing that bug, but I can make some guesses on what might 
be going on.  I mentioned this in a previous post, but I'll speculate it again- what I 
think is happening in this case is a function of where the FOP classes were getting 
loaded from.  Clearly, this person wasn't packing FOP in a WAR, since if that were the 
case, no class packed in a WAR could get to its own classloader, which would mean web 
applications of all kinds (including some I've written here at FCCI) would have 
experienced this problem in Tomcat 4.0.4.  So, my best guess, without having analyzed 
Tomcat 4.0.4 source, would be that they are putting FOP in a directory that's loading 
classes Tomcat wants to keep protected from other parts of the program being able to 
access.  I suppose that they could load classes with a classloader that would kill the 
classloader reference of the Class object for the sake of internal security.  

Quite why they would want to do this, I have no idea, but like I said, I haven't read 
much TC 4.0.4 source to know.  The bug report says it was due to a change in 
security, so it just might have something to do with allowing applications in WARs to 
have access to classes loaded by some library classloader, but denying them access 
to that classloader, which I guess would be a technique to prevent web applications 
from having access to a classloader that has domain over lots of Tomcat internals.  
That seems like a bit of a roundabout to go through, but it might be what's going on.

I can say right now that I suspect I will have enough time this weekend to work on one 
thing we'd like cleared up.  If you guys would rather see the root of this TC 4.0.4 
classloader bug pinned down, I can work on that instead.  I really just want to put my 
effort where it's needed

I'm not sure when I became a classloader expert, but I won't complain. ;)

-Original Message-
From: Christian Geisert [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 2:39 PM
To: [EMAIL PROTECTED]
Subject: Re: Page breaking infinite loop


Rhett Aultman schrieb:
 I'm having a very involved working weekend this weekend, and I'm writing my list of 
things to do.  There's some openings in it, and I thought I might tackle the infinite 
loop that occurs in the page breaking test as has been documented in some previous 
bugs in our Bugzilla.  Before I settled in to that, though, I wanted to make sure my 
effort wasn't being repeated elsewhere.  I haven't seen anyone resolve the bug, so 
I'm assuming it's still needing work.  Is anyone else out there working on this, or 
should I roll up my sleeves and get to it?

Go for it! (don't forget to assign the bug to yourself)

By the way .. any comments from you (as a classloader expert ;-)
on the following bug:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10255

Christian


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


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




cvs commit: xml-fop/src/org/apache/fop/render AbstractRenderer.java

2002-09-18 Thread keiron

keiron  2002/09/18 12:27:38

  Modified:src/org/apache/fop/render AbstractRenderer.java
  Log:
  prevent npe with empty flow
  
  Revision  ChangesPath
  1.26  +4 -3  xml-fop/src/org/apache/fop/render/AbstractRenderer.java
  
  Index: AbstractRenderer.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/AbstractRenderer.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- AbstractRenderer.java 18 Sep 2002 14:12:42 -  1.25
  +++ AbstractRenderer.java 18 Sep 2002 19:27:38 -  1.26
  @@ -344,8 +344,9 @@
   protected void renderFlow(Flow flow) {
   // the normal flow reference area contains stacked blocks
   List blocks = flow.getChildAreas();
  -renderBlocks(blocks);
  -
  +if(blocks != null) {
  +renderBlocks(blocks);
  +}
   }
   
   /**
  
  
  

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




uneven table borders

2002-09-18 Thread Steve Cameron

Can anyone provide me with an example of a 'nice' looking PDF table
generated with Fop. I have tried a few border options and end up with
lines of different width along different sides of the table and rows.

I do not have any more time to play with this and am hoping someone can
steer me in the right direction with an example or two.

thanks

Stephen Cameron
Systems Support Analyst
Fortis Clearing Sydney
phone: +61 2 9233 6497
email: [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, email: [EMAIL PROTECTED]




Re: Fix for paragraph breaking

2002-09-18 Thread Kevin Yeung

Hi there

I don't see why this is the 'correct' behaviour. If a long string cannot
be read, it is not correct, is it? The software is not serving its
purpose.

And I'm concerned about writing a URL hyphenation. What about long strings
that are neither natural language nor URL? I sometimes need to print long
primary key, which has hyphen in itself. How will the extra hyphens affect
my PK?

I think we should just break the text at margin and wrap the string to the
next line.

Just my 2 cents

Kevin

On Wed, 18 Sep 2002 [EMAIL PROTECTED] wrote:

 Date: Wed, 18 Sep 2002 08:36:08 -0300
 From: [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Re: Fix for paragraph breaking
 
 Sorry, commit denied for a variety of reasons:
 1. It is not clear whether the problem you attempt to fix is a problem
 at all. Actually, it can be argued FOPs behaviour is correct, annoying
 as it may be sometimes. This is the main showstopper.
 
 
 Although I concur that FOP should never break words while hyphenation is
 off, I sympathise with Mr. Baals. I had a similar problem with URLs, which
 can become quite long and do not fit in the hyphenation rules for any
 language. If they grow beyond the line width there is no way of getting it
 right without inserting spaces manually yech/ . While using discretionary
 hyphens can solve the problem localy (I do not remember FOP taking them
 into account while hyphenating; it is most handy when a word has irregular
 hyphenation), it would be counterproductive.
 
 I suggest we write a special language hyphenation file for URLs -- it is
 not a natural language, but it is one nevertheless, with its own lexical
 rules. (Can someone provide me with a pointer to the pertinent spec?)
 Stylesheets like DocBook's can take advantage of this by specifying the new
 language code, something like x-url. This approach can also be used with
 programming languages or other similar stuff, and it has already been
 proven to work with languages that can produce very long words (Herr
 Pietschmann und die xml:lang='de' Leute soll mit mir einstimmig sein ;-).
 However, the hyphen would not be a good choice as the character to use in
 the breaking point: a better choice would be to use ellipses (...) in the
 preceeding AND in the following line. Can this be achieved?
 
 I can write such an hyphenation file if you people agree this is a sensible
 solution.
 
 
 =
 Marcelo Jaccoud Amaral
 Petrobrás (http://www.petrobras.com.br)
 mailto:[EMAIL PROTECTED]
 voice: +55 21 2534-3485
 fax: +55 21 2534-1809
 =
 If brute force doesn't work, maybe you're not using enough brute force.
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 
 
 

--
K


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




Re: warning: broke cvs

2002-09-18 Thread Keiron Liddle

On Wed, 2002-09-18 at 17:13, Keiron Liddle wrote:
 Just a warning, I seem to have broken cvs HEAD.
 It was working then I made a few changes, checked it in and it stopped
 working.
 
 I will fix it once I figure out what is wrong (probably something really
 simple)!

It's fixed now, just an npe.

Need to do some better error handling in the render pages model.



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