?Bug in width calculation?

2002-09-20 Thread m . schaeffler

 Kevin Yeung wrote:
  I am having troubles with long strings and table cells.
 
 The common approach is to put zero width spaces into
 the product number in order to give FOP a chance to
 break the line. Note that 0.20.4 appears to have a bug
 in the width calculation, you'll probably have to get
 the code form the CVS maintenance branch.
 But see also the thread about hyphenation.
 
 J.Pietschmann

I am trying to solve a problem wich could well be connected with some width
calculation. Could you please point me to the bug your quoting?

-- 
Thanks a lot!

Markus Schäffler
--

Werden Sie mit uns zum OnlineStar 2002! Jetzt GMX wählen -
und tolle Preise absahnen! http://www.onlinestar.de


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




FO:Problem with number-rows-spanned

2002-09-20 Thread Skladovs, Victor

Dear Friends!


could you please help me to solve the following problem (I use
fop-0.20.2.):

I have to build a long table. That's no problem. But if my first column
(the first cell in the first column) has number-rows-spanned=40,
I've got an endless loop.
My table looks like that:


header  header
header


|
|
|
|
|column2
(number-rows-
spanned=20)

|
|
|
|
|
|
|
|

column1
(number
-
rows-
spanned=40)

|
|
|
|column2
(number-rows-
spanned=20)
|
|
|
|


I have established that fop is trying to place the first column on one
page (it works with 30 for example). If fop fails to do that, an endless
loop appears and a pdf document can not be done.

Can anybody tell me how to solve this?


Regards,
Viktor


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




DO NOT REPLY [Bug 12854] New: - The path for the font-matrix files is in unix format under windows

2002-09-20 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12854.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12854

The path for the font-matrix files is in unix format under windows

   Summary: The path for the font-matrix files is in unix format
under windows
   Product: Fop
   Version: 0.20.4
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Normal
  Priority: Other
 Component: pdf renderer
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When adding more fonts to the conf/userconfig.xml file, the path for the files 
are /c:/etc/etc istead of c:\etc\etc, and i can't change it because it is 
only allowed to write the filename, not the entire path, in the userconfig.xml 
file. 

Please have a look at this and mail me if you have more questions : 
[EMAIL PROTECTED]

Best regards,

Casper Madsen

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




AW: AW: AW: AW: Embedding FOP in Java

2002-09-20 Thread Amin Schoeib

Hi J.Pietschmann,
Thanks for your help.
Can you tell me, where I can download 0.20.5cvs version of FOP ???

Thanxx

Schoeib


-Ursprüngliche Nachricht-
Von: J.Pietschmann [mailto:[EMAIL PROTECTED]] 
Gesendet: Donnerstag, 19. September 2002 21:46
An: [EMAIL PROTECTED]
Betreff: Re: AW: AW: AW: Embedding FOP in Java


Amin Schoeib wrote:
 I tried the code of JohnPT.
...
 java.lang.NullPointerException
  at org.apache.fop.fo.flow.Flow.setFlowName(Unknown Source)  at 
 org.apache.fop.fo.flow.Flow.init(Unknown Source)

This is the real problem. Ensure your fo:flow has a flow
name specified:
  fo:flow flow-name=xsl-region-body

Actually, FOP attempts to tell you exactly this but falls
over due to, well, some sort of mess...
(This is fixed in 0.20.5cvs)

J.Pietschmann


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


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




Re: AW: AW: AW: AW: Embedding FOP in Java

2002-09-20 Thread Paul . Hussein


http://xml.apache.org/forrest/xml-site/cvs.html#N1008F

module is xml-fop, not sure what the branch is sorry, think it might be
20.2

Hope this helps.

Regards

Paul.





Amin Schoeib [EMAIL PROTECTED] on 20/09/2002 13:14:26

Please respond to [EMAIL PROTECTED]



To:   [EMAIL PROTECTED]
cc:
Subject:  AW: AW: AW: AW: Embedding FOP in Java

Hi J.Pietschmann,
Thanks for your help.
Can you tell me, where I can download 0.20.5cvs version of FOP ???

Thanxx

Schoeib


-Ursprüngliche Nachricht-
Von: J.Pietschmann [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 19. September 2002 21:46
An: [EMAIL PROTECTED]
Betreff: Re: AW: AW: AW: Embedding FOP in Java


Amin Schoeib wrote:
 I tried the code of JohnPT.
...
 java.lang.NullPointerException
  at org.apache.fop.fo.flow.Flow.setFlowName(Unknown Source)  at
 org.apache.fop.fo.flow.Flow.init(Unknown Source)

This is the real problem. Ensure your fo:flow has a flow
name specified:
  fo:flow flow-name=xsl-region-body

Actually, FOP attempts to tell you exactly this but falls
over due to, well, some sort of mess...
(This is fixed in 0.20.5cvs)

J.Pietschmann


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


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







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




AW: AW: AW: AW: AW: Embedding FOP in Java

2002-09-20 Thread Amin Schoeib

Under this adress I found only version 0.20.4!
But where is the 0.20.5cvs version?


-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Gesendet: Freitag, 20. September 2002 14:35
An: [EMAIL PROTECTED]
Betreff: Re: AW: AW: AW: AW: Embedding FOP in Java



http://xml.apache.org/forrest/xml-site/cvs.html#N1008F

module is xml-fop, not sure what the branch is sorry, think it might be
20.2

Hope this helps.

Regards

Paul.





Amin Schoeib [EMAIL PROTECTED] on 20/09/2002 13:14:26

Please respond to [EMAIL PROTECTED]



To:   [EMAIL PROTECTED]
cc:
Subject:  AW: AW: AW: AW: Embedding FOP in Java

Hi J.Pietschmann,
Thanks for your help.
Can you tell me, where I can download 0.20.5cvs version of FOP ???

Thanxx

Schoeib


-Ursprüngliche Nachricht-
Von: J.Pietschmann [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 19. September 2002 21:46
An: [EMAIL PROTECTED]
Betreff: Re: AW: AW: AW: Embedding FOP in Java


Amin Schoeib wrote:
 I tried the code of JohnPT.
...
 java.lang.NullPointerException
  at org.apache.fop.fo.flow.Flow.setFlowName(Unknown Source)  at 
 org.apache.fop.fo.flow.Flow.init(Unknown Source)

This is the real problem. Ensure your fo:flow has a flow
name specified:
  fo:flow flow-name=xsl-region-body

Actually, FOP attempts to tell you exactly this but falls
over due to, well, some sort of mess...
(This is fixed in 0.20.5cvs)

J.Pietschmann


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


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







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


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




DO NOT REPLY [Bug 12864] New: - Incorrect behaviour for multiple columns on page

2002-09-20 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12864.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12864

Incorrect behaviour for multiple columns on page

   Summary: Incorrect behaviour for multiple columns on page
   Product: Fop
   Version: 0.20.4
  Platform: Other
OS/Version: Linux
Status: NEW
  Severity: Normal
  Priority: Other
 Component: pdf renderer
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When I specify region-body, and say that there shall be 2 columns,
column gap is put after second column, not just between them. 

I was able to work around by reducing margin-right on page master
by amount of gap.

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




Re: ?Bug in width calculation?

2002-09-20 Thread J.Pietschmann

[EMAIL PROTECTED] wrote:
 I am trying to solve a problem wich could well be connected with some width
 calculation. Could you please point me to the bug your quoting?

The problem is that all Unicode spaces which don't have
a glyph in the selected font (i.e. none other than #x20)
get the with of # assigned if the # character has
a glyph in the font.
All other unmapped characters also get the # width,
or the width of the character which happens to have
to code 0x23, but usually this doesn't matter because
you'll see the wrong character in the PDF.

J.Pietschmann


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




DO NOT REPLY [Bug 8778] - Infinite loop while rendering list-block

2002-09-20 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8778.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8778

Infinite loop while rendering list-block

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

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




DO NOT REPLY [Bug 8778] - Infinite loop while rendering list-block

2002-09-20 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8778.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8778

Infinite loop while rendering list-block

[EMAIL PROTECTED] changed:

   What|Removed |Added

 AssignedTo|[EMAIL PROTECTED]  |[EMAIL PROTECTED]
 Status|ASSIGNED|NEW

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




RE: Page breaking infinite loop

2002-09-20 Thread Rhett Aultman


A little musing on the infinite loop issue...

It seems that, for the most part, each layout manager turns predominately to its 
children LMs to see what they're up to.  As a result, it's not easy to spot at a high 
level (ala the PageLayoutManager) that some singular element is holding the entire 
works up.  In the case of one of my stripped-down infinite loop tests, it's a single 
string of text that is constantly spilling off the page.  The only indication I can 
seem to locate in code that its TextLayoutManager is not making progress in laying it 
out is that, at every time its getNextBreakPoss() method is called, it can poll itself 
to see what character in its internal array it's starting the positioning at, and 
discover that, call after call, it's making no progress and trying to constantly 
reposition the same string starting at the same character number...every time.

I'm suspecting that, in general, these low men on the totem pole are the only LMs in 
any position to spot the abject lack of progress that characterizes the infinite loop. 
 At that point, they need to send a notice up the line that they suspect an infinite 
loop.

Now, here's the hard part as I see it- our users are defining page sequences of 
variable size, and so it just might take many iterations in general to finally reach a 
page with room for the object in question.  Would the correct policy in this case be 
for there to be a callback process from the low-level LMs to send messages up the line 
back to their PageLMs so that they can keep an eye on the page sequencing and, after 
all possible pages have been tried, give up?

Or would an acceptable solution to the maintenance branch (which is a dead-end branch) 
just be to let the cycle run for, say, 20 iterations and, at that time, assume an 
infinite loop and throw an Exception to break the cycle?

-Original Message-
From: Keiron Liddle [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 19, 2002 3:56 AM
To: FOP
Subject: Re: Page breaking infinite loop


On Wed, 2002-09-18 at 20:38, Christian Geisert wrote:
 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

If you want to fix that bug why not simply do a null check and maybe try
the system class loader.

 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]




Re: Embedding FOP in Java

2002-09-20 Thread J.Pietschmann

Amin Schoeib wrote:
 Under this adress I found only version 0.20.4!
 But where is the 0.20.5cvs version?

Get a CVS client application and look into
docs/html-docs/download.html for further hints.

J.Pietschmann



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




DO NOT REPLY [Bug 12876] New: - Multipage tables - NullPointerException

2002-09-20 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12876.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12876

Multipage tables - NullPointerException

   Summary: Multipage tables - NullPointerException
   Product: Fop
   Version: 0.20.4
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Major
  Priority: Other
 Component: pdf renderer
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When attempting to create multipage tables, sometimes a NullPointerException is 
thrown. It seems to happen when there is a need to automatically break a page 
and move some content to the next. When breaks are inserted manually (by means 
of e.g. break-before attribute) the exception is not thown.

The attached archive contains three examples of fop's behaviour:

no_output/
No output was generated becaue of the NullPointerException.

incorrect_output/
A break was inserted manually in line 1350. No exception but an image is 
missing in the resulting PDF.

correct_output/
A break was inserted manually in line 1338. No exception, correct output.

BTW: the *.fo files were generated by (a bit tweaked) DOCBOOK stylesheets.

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




DO NOT REPLY [Bug 12876] - Multipage tables - NullPointerException

2002-09-20 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12876.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12876

Multipage tables - NullPointerException





--- Additional Comments From [EMAIL PROTECTED]  2002-09-20 21:07 ---
Created an attachment (id=3155)
examples of fop's behaviour

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




Java issues with FOP

2002-09-20 Thread jclane


I've just started playing with FOP, and I'm trying to create a system to create a 
simple pdf file to test the entire process. I'm running into a problem with my 
application
however, and I'm not sure what it is that I'm doing wrong.

Here's the Error:

javax.xml.parsers.FactoryConfigurationError: Unexpected InvocationTargetException
 at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
 at org.apache.fop.apps.Driver.getParserClassName(Unknown Source)
 at org.apache.fop.svg.SVGElementMapping.setupSVG(Unknown Source)
 at org.apache.fop.svg.SVGElementMapping.addToBuilder(Unknown Source)
 at org.apache.fop.apps.Driver.addElementMapping(Unknown Source)
 at org.apache.fop.apps.Driver.addElementMapping(Unknown Source)
 at org.apache.fop.apps.Driver.setupDefaultMappings(Unknown Source)
 at org.apache.fop.apps.Driver.init(Unknown Source)
 at org.apache.fop.apps.Driver.init(Unknown Source)
 at JavaAgent.NotesMain(JavaAgent.java:34)
 at lotus.domino.AgentBase.runNotes(AgentBase.java:161)
 at lotus.domino.NotesThread.run(NotesThread.java:208)

As you can probably tell, I'm trying to do this in Lotus Notes/Domino (Release 6 with 
the 1.3.1 JVM). I've looked at the embedding section on the FOP website and based on 
that
information my line 34 in my code looks like this:

org.apache.fop.apps.Driver driver = new org.apache.fop.apps.Driver(rtsource, pdfout);


The rtsource and pdfout lines are here:

org.xml.sax.InputSource rtsource = new org.xml.sax.InputSource(c:\\importtest.xml);
FileOutputStream pdfout = new FileOutputStream(c:\\foptest.pdf);


I've also tried mirroring the code in the Servlet example, but on the line :

Driver driver = new Driver();

I get the same error.

The input file is a valid xml file, so I don't know why I'm getting the unknown source 
problem. My next step will be to run this outside of my Domino system on a Websphere
server, but the entire goal is to make it work with my Domino system to take advantage 
of it's offline capabilities.



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




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

2002-09-20 Thread pbwest

pbwest  2002/09/20 21:13:23

  Modified:src/org/apache/fop/datatypes Tag: FOP_0-20-0_Alt-Design
PropertyValue.java
  Log:
  Added INHERITED_VALUE type
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.3   +19 -18xml-fop/src/org/apache/fop/datatypes/Attic/PropertyValue.java
  
  Index: PropertyValue.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/datatypes/Attic/PropertyValue.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- PropertyValue.java18 Sep 2002 15:24:12 -  1.1.2.2
  +++ PropertyValue.java21 Sep 2002 04:13:23 -  1.1.2.3
  @@ -32,22 +32,23 @@
   ,FROM_NEAREST_SPECIFIED = 9
  ,FROM_PARENT = 10
  ,INHERIT = 11
  -   ,INTEGER = 12
  -  ,LANGUAGE = 13
  -   ,LITERAL = 14
  -,MAPPED_NUMERIC = 15
  - ,MIME_TYPE = 16
  -,NCNAME = 17
  -  ,NONE = 18
  -   ,NUMERIC = 19
  -,SCRIPT = 20
  - ,SHADOW_EFFECT = 21
  - ,SLASH = 22
  -  ,TEXT_DECORATIONS = 23
  -,TEXT_DECORATOR = 24
  -  ,TIME = 25
  -  ,URI_TYPE = 26
  -  ,LIST = 27
  +   ,INHERITED_VALUE = 12
  +   ,INTEGER = 13
  +  ,LANGUAGE = 14
  +   ,LITERAL = 15
  +,MAPPED_NUMERIC = 16
  + ,MIME_TYPE = 17
  +,NCNAME = 18
  +  ,NONE = 19
  +   ,NUMERIC = 20
  +,SCRIPT = 21
  + ,SHADOW_EFFECT = 22
  + ,SLASH = 23
  +  ,TEXT_DECORATIONS = 24
  +,TEXT_DECORATOR = 25
  +  ,TIME = 26
  +  ,URI_TYPE = 27
  +  ,LIST = 28
   
   ,LAST_PROPERTY_TYPE = LIST;
   
  
  
  

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




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

2002-09-20 Thread pbwest

pbwest  2002/09/20 21:32:12

  Modified:src/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design
PropertySets.java
  Log:
  Comment extended
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.13  +8 -3  xml-fop/src/org/apache/fop/fo/Attic/PropertySets.java
  
  Index: PropertySets.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/Attic/PropertySets.java,v
  retrieving revision 1.1.2.12
  retrieving revision 1.1.2.13
  diff -u -r1.1.2.12 -r1.1.2.13
  --- PropertySets.java 18 Sep 2002 15:42:12 -  1.1.2.12
  +++ PropertySets.java 21 Sep 2002 04:32:12 -  1.1.2.13
  @@ -718,6 +718,11 @@
   int expandedProp = expansion.get(i);
   PropertyValue expandedPropValue;
   //   The PropertyValue must be cloneable
  +// Generally, this method will be called with one of the
  +// pseudo-values - Inherit, FromParent or FromNearestSpecified
  +// e.g. - and becaue those properties may have individual
  +// IndirectValue settings, the value for each expanded
  +// property must be unique.`
   try {
   expandedPropValue = (PropertyValue)(value.clone());
   } catch (CloneNotSupportedException e) {
  
  
  

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




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

2002-09-20 Thread pbwest

pbwest  2002/09/20 21:34:41

  Modified:src/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design
PropertyConsts.java
  Log:
  Added and applied static final arrays to Method.invoke()
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.9   +68 -22xml-fop/src/org/apache/fop/fo/Attic/PropertyConsts.java
  
  Index: PropertyConsts.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/Attic/PropertyConsts.java,v
  retrieving revision 1.1.2.8
  retrieving revision 1.1.2.9
  diff -u -r1.1.2.8 -r1.1.2.9
  --- PropertyConsts.java   18 Sep 2002 15:42:12 -  1.1.2.8
  +++ PropertyConsts.java   21 Sep 2002 04:34:40 -  1.1.2.9
  @@ -24,6 +24,7 @@
   import java.util.StringTokenizer;
   
   import org.apache.fop.fo.FOTree;
  +import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.PropNames;
   import org.apache.fop.fo.Properties;
   import org.apache.fop.fo.expr.PropertyException;
  @@ -64,6 +65,26 @@
   private static final String packageName = org.apache.fop.fo;
   
   /**
  + * Single element ttClass/tt array for serial use by static methods.
  + */
  +private static final Class[] oneClass = new Class[1];
  +/**
  + * Two element ttClass/tt array for serial use by static methods.
  + */
  +private static final Class[] twoClasses = new Class[2];
  +/**
  + * Single element ttObject/tt array for serial use by static methods.
  + */
  +private static final Object[] oneObject = new Object[1];
  +/**
  + * Two element ttObject/tt array for serial use by static methods.
  + */
  +private static final Object[] twoObjects = new Object[2];
  +private static final Class intClass = int.class;
  +private static final Class integerClass = Integer.class;
  +
  +/**
  + * Get the property index of a property name.
* @param property ttString/tt name of the FO property
* @return ttint/tt index of the named FO property in the array of
* property names.
  @@ -72,7 +93,7 @@
   public static int getPropertyIndex(String property)
   throws PropertyException
   {
  -Integer integer = (Integer)toIndex.get((Object)property);
  +Integer integer = (Integer)toIndex.get(property);
   if (integer == null)
   throw new PropertyException
   (Property  + property +  not found.);
  @@ -80,6 +101,7 @@
   }
   
   /**
  + * Get the property index of a property class name.
* @param propertyClassName String name of the FO property class
* @return int index of the named FO property class in the array of
* property class names.
  @@ -89,7 +111,7 @@
   throws PropertyException
   {
   Integer integer =
  -(Integer)classToIndex.get((Object)propertyClass);
  +(Integer)classToIndex.get(propertyClass);
   if (integer == null)
   throw new PropertyException
   (Property class  + propertyClass +  not found.);
  @@ -97,6 +119,7 @@
   }
   
   /**
  + * Get the initial value type for a property name.
* @param property String name of the FO property
* @return int enumerated initialValueType.  These constants are defined
* as static final ints in this class.  Note that an undefined property
  @@ -110,6 +133,7 @@
   }
   
   /**
  + * get the initial value type for a property index.
* @param propertyIndex int index of the FO property
* @return int enumerated initialValueType.  These constants are defined
* as static final ints in this class.  Note that an undefined property
  @@ -120,6 +144,7 @@
   }
   
   /**
  + * Get the initial value for a property index.
* @param property ttint/tt index of the property
* @return ttPropertyValue/tt from property's igetInitialValue/i
* method
  @@ -130,11 +155,10 @@
   {
   Method method = null;
   try {
  -method = classes[property].getMethod
  -(getInitialValue, new Class[] {int.class});
  -return (PropertyValue)
  -(method.invoke
  - (null, new Object[] {Ints.consts.get(property)}));
  +oneClass[0] = intClass;
  +method = classes[property].getMethod(getInitialValue, oneClass);
  +oneObject[0] = Ints.consts.get(property);
  +return (PropertyValue)(method.invoke(null, oneObject));
   } catch (NoSuchMethodException nsme) {
   throw new PropertyException
   (No getInitialValue method in 
  @@ -146,6 +170,30 @@
   }
   }
   
  +/**
  + * @param foNode the node whose properties are 

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

2002-09-20 Thread pbwest

pbwest  2002/09/20 21:39:32

  Modified:src/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design
Properties.java
  Log:
  Changed FOTree arg to refineParsing() to FONode.
   Added resolve() calls to IndirectValues.
  Added refineExpansionList() and applied to shorthand expansions.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.25  +245 -155  xml-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.24
  retrieving revision 1.1.2.25
  diff -u -r1.1.2.24 -r1.1.2.25
  --- Properties.java   18 Sep 2002 15:42:12 -  1.1.2.24
  +++ Properties.java   21 Sep 2002 04:39:30 -  1.1.2.25
  @@ -60,6 +60,7 @@
   import org.apache.fop.datatypes.ShadowEffect;
   import org.apache.fop.datatypes.Slash;
   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;
   
  @@ -313,19 +314,19 @@
*
* pThis method is overriden by individual property classes which
* require specific processing.
  - * @param foTree - the ttFOTree/tt being built
  + * @param foNode - the ttFONode/tt being built
* @param value - ttPropertyValue/tt returned by the parser
*/
   public static PropertyValue refineParsing
  -(FOTree foTree, PropertyValue value)
  +(FONode foNode, PropertyValue value)
   throws PropertyException
   {
  -return refineParsing(foTree, value, NOT_NESTED);
  +return refineParsing(foNode, value, NOT_NESTED);
   }
   
   /**
* Do the work for the two argument refineParsing method.
  - * @param foTree - the ttFOTree/tt being built
  + * @param foNode - the ttFONode/tt being built
* @param value - ttPropertyValue/tt returned by the parser
* @param nested - ttboolean/tt indicating whether this method is
* called normally (false), or as part of another irefineParsing/i
  @@ -333,13 +334,14 @@
* @see #refineParsing(FOTree,PropertyValue)
*/
   protected static PropertyValue refineParsing
  -(FOTree foTree, PropertyValue value, boolean nested)
  +(FONode foNode, PropertyValue value, boolean nested)
   throws PropertyException
   {
   int property = value.getProperty();
   String propName = PropNames.getPropertyName(property);
   int datatype = PropertyConsts.dataTypes.get(property);
   int proptype = value.getType();
  +PropertyValue pv;
   switch (proptype) {
   case PropertyValue.NUMERIC:
   // Can be any of
  @@ -363,7 +365,7 @@
   if ((datatype  ENUM) != 0)
   return new EnumType(property, ncname);
   if ((datatype  MAPPED_LENGTH) != 0)
  -return (new MappedNumeric(property, ncname, foTree))
  +return (new MappedNumeric(property, ncname, foNode.foTree))
   .getMappedNumValue();
   case PropertyValue.LITERAL:
   // Can be LITERAL or CHARACTER_T
  @@ -396,10 +398,28 @@
   if ((datatype  MIMETYPE) != 0) return value;
   throw new PropertyException
   (mimetype invalid for  + propName);
  +// The following types cannot have their values validated in advance.
  +// The result must be validated from within the property type.
  +case PropertyValue.FROM_PARENT:
  +pv = ((FromParent)value).resolve(foNode);
  +if (pv == value) return value;  // unable to resolve
  +// TODO: validate here
  +return pv;
  +case PropertyValue.FROM_NEAREST_SPECIFIED:
  +pv = ((FromNearestSpecified)value).resolve(foNode);
  +if (pv == value) return value;  // unable to resolve
  +// TODO: validate here
  +return pv;
  +case PropertyValue.INHERITED_VALUE:
  +pv = ((InheritedValue)value).resolve(foNode);
  +if (pv == value) return value;  // unable to resolve
  +// TODO: validate here
  +return pv;
   default:
   if ( ! nested) {
   if (proptype == PropertyValue.INHERIT) {
  -if ((datatype  INHERIT) != 0) return value;
  +if ((datatype  INHERIT) != 0)
  +return ((Inherit)value).resolve(foNode);
   throw new PropertyException
   ('inherit' 

Re: AW: AW: AW: Embedding FOP in Java

2002-09-20 Thread Richard Van Deren
I never got the logger to work.   I hope that you post your solution.
It looks like there are errors in the documentation.   I read it several times.
There was a change to avalon's logger.  Then you can add your own via the LogKit.
I tried it several ways.
I get a mismatch in the Logger class and LogKitLogger.

public  LogKitLogger log = null;

JavaCompile.default CompileJava>FopService.service 
MyFop.java:197: incompatible types
found   : org.apache.log.Logger
required: org.apache.avalon.framework.logger.LogKitLogger
log = Hierarchy.getDefaultHierarchy().getLoggerFor("fop");
public void setMyLogger() {
log = Hierarchy.getDefaultHierarchy().getLoggerFor("fop"); // incompatible types
logger.setPriority( Priority.DEBUG );
logger.debug( "This is a debug message" );
Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
PatternFormatter formatter = new PatternFormatter(
"[%{priority}]: %{message}\n%{throwable}" );

LogTarget target = null;
target = new StreamTarget(System.out, formatter);

hierarchy.setDefaultLogTarget(target);
log = hierarchy.getLoggerFor("fop");
log.setPriority(Priority.INFO);
NSSystem.log("Logger is not set problem with logger compile");
}
On Wednesday, September 18, 2002, at 06:59 AM, Amin Schoeib wrote:

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:31
An: [EMAIL PROTECTED]
Betreff: Re: AW: AW: Embedding FOP in Java


I created a convenience class called PdfRenderer.  It cache's a stylesheet and then you can process files or streams throught