cvs commit: xml-fop/src/org/apache/fop/datastructs SyncedCircularBuffer.java

2002-10-18 Thread pbwest
pbwest  2002/10/18 20:09:04

  Modified:src/org/apache/fop/datastructs Tag: FOP_0-20-0_Alt-Design
SyncedCircularBuffer.java
  Log:
  DEFAULTBUFSIZE increased to 128.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.3   +3 -3  
xml-fop/src/org/apache/fop/datastructs/Attic/SyncedCircularBuffer.java
  
  Index: SyncedCircularBuffer.java
  ===
  RCS file: 
/home/cvs/xml-fop/src/org/apache/fop/datastructs/Attic/SyncedCircularBuffer.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- SyncedCircularBuffer.java 3 Oct 2002 03:29:02 -   1.1.2.2
  +++ SyncedCircularBuffer.java 19 Oct 2002 03:09:04 -  1.1.2.3
  @@ -28,7 +28,7 @@
*/
   public class SyncedCircularBuffer {
   
  -private final static int DEFAULTBUFSIZE = 32;
  +private final static int DEFAULTBUFSIZE = 128;
   
   private Object[] buf;
   private int size = 0;
  
  
  

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




cvs commit: xml-fop/src/org/apache/fop/xml UriLocalName.java SyncedXmlEventsBuffer.java XMLEvent.java

2002-10-18 Thread pbwest
pbwest  2002/10/18 20:05:42

  Modified:src/org/apache/fop/xml Tag: FOP_0-20-0_Alt-Design
SyncedXmlEventsBuffer.java XMLEvent.java
  Added:   src/org/apache/fop/xml Tag: FOP_0-20-0_Alt-Design
UriLocalName.java
  Log:
  UriLocalName separated from XMLEvent.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.4   +13 -13xml-fop/src/org/apache/fop/xml/Attic/SyncedXmlEventsBuffer.java
  
  Index: SyncedXmlEventsBuffer.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/xml/Attic/SyncedXmlEventsBuffer.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- SyncedXmlEventsBuffer.java9 Oct 2002 06:07:03 -   1.1.2.3
  +++ SyncedXmlEventsBuffer.java19 Oct 2002 03:05:42 -  1.1.2.4
  @@ -69,7 +69,7 @@
   XMLEvent ev;
   try {
   ev = (XMLEvent)get();
  -System.out.println("getEvent: " + ev);
  +//System.out.println("getEvent: " + ev);
   return ev;
   } catch (InterruptedException e) {
   throw new FOPException(e);
  @@ -450,11 +450,11 @@
   } catch (NoSuchElementException e) {
   // Keep trying
   }
  -} else if (o instanceof XMLEvent.UriLocalName) {
  +} else if (o instanceof UriLocalName) {
   try {
   ev = expectStartElement
  -(((XMLEvent.UriLocalName) o).getUriIndex(),
  - ((XMLEvent.UriLocalName) o).getLocalName(),
  +(((UriLocalName) o).uriIndex,
  + ((UriLocalName) o).localName,
discardWhiteSpace);
   // Found it!
   return ev;
  @@ -473,7 +473,7 @@
* Get one of a array of possible STARTELEMENT events.  Scan and discard
* events until a STARTELEMENT event is found whose URI index and
* local name matches one of those in the argument
  - * XMLEvent.UriLocalName[] array.
  + * UriLocalName[] array.
* @param list an array containing UriLocalName
* objects with the URI index and local name of
* @param discardWhiteSpace - if true, discard any characters
  @@ -484,7 +484,7 @@
* @exception NoSuchElementException if the event is not found
*/
   public XMLEvent getStartElement
  -(XMLEvent.UriLocalName[] list, boolean discardWhiteSpace)
  +(UriLocalName[] list, boolean discardWhiteSpace)
   throws FOPException
   {
   XMLEvent ev;
  @@ -509,8 +509,8 @@
   /**
* Expect one of an array of possible STARTELEMENT events.  The next
* STARTELEMENT must have a URI index and local name which match
  - * an element of the argument XMLEvent.UriLocalName[] list.
  - * @param list an XMLEvent.UriLocalName[] array containing the
  + * an element of the argument UriLocalName[] list.
  + * @param list an UriLocalName[] array containing the
* namespace Uri index and LocalName
* of possible events, one of which must be the next returned.
* @param discardWhiteSpace - if true, discard any characters
  @@ -520,14 +520,14 @@
* @exception NoSuchElementException if the event is not found
*/
   public XMLEvent expectStartElement
  -(XMLEvent.UriLocalName[] list, boolean discardWhiteSpace)
  +(UriLocalName[] list, boolean discardWhiteSpace)
   throws FOPException
   {
   XMLEvent ev;
   for (int i = 0; i < list.length; i++) {
   try {
  -ev = expectStartElement(list[i].getUriIndex(),
  -list[i].getLocalName(),
  +ev = expectStartElement(list[i].uriIndex,
  +list[i].localName,
   discardWhiteSpace);
   // Found it!
   return ev;
  
  
  
  1.1.2.5   +3 -39 xml-fop/src/org/apache/fop/xml/Attic/XMLEvent.java
  
  Index: XMLEvent.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/xml/Attic/XMLEvent.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- XMLEvent.java 10 Oct 2002 17:10:44 -  1.1.2.4
  +++ XMLEvent.java 19 Oct 2002 03:05:42 -  1.1.2.5
  @@ -216,40 +216,4 @@
   return tstr;
   }
   
  -/**
  - * A nested class for holding an passing a URI index and local name
  - * pair, as used in the containing XMLEvent class.
  - */
  -public static clas

cvs commit: xml-fop/lib batik.jar bsf.jar buildtools.jar jimi-1.0.jar jimi-License.txt stylebook.jar xalan-1.2.2.jar xalan-2.0.0.jar xalanj1compat.jar

2002-10-18 Thread pbwest
pbwest  2002/10/18 19:11:54

  Removed: lib  Tag: FOP_0-20-0_Alt-Design batik.jar bsf.jar
buildtools.jar jimi-1.0.jar jimi-License.txt
stylebook.jar xalan-1.2.2.jar xalan-2.0.0.jar
xalanj1compat.jar
  Log:
  Only using parser for testing

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




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

2002-10-18 Thread pbwest
pbwest  2002/10/18 19:04:19

  Modified:src/org/apache/fop/datatypes Tag: FOP_0-20-0_Alt-Design
Numeric.java
  Log:
  Added subtract/add(double) and isInteger().
  Removed setPower().
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.9   +42 -11xml-fop/src/org/apache/fop/datatypes/Attic/Numeric.java
  
  Index: Numeric.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/datatypes/Attic/Numeric.java,v
  retrieving revision 1.1.2.8
  retrieving revision 1.1.2.9
  diff -u -r1.1.2.8 -r1.1.2.9
  --- Numeric.java  9 Oct 2002 05:45:56 -   1.1.2.8
  +++ Numeric.java  19 Oct 2002 02:04:19 -  1.1.2.9
  @@ -14,6 +14,7 @@
   
   import org.apache.fop.datatypes.AbstractPropertyValue;
   import org.apache.fop.fo.expr.PropertyException;
  +import org.apache.fop.fo.PropNames;
   import org.apache.fop.fo.PropertyConsts;
   import org.apache.fop.fo.Properties;
   import org.apache.fop.datatypes.PropertyValue;
  @@ -287,14 +288,6 @@
   }
   
   /**
  - * Set the power.  A complement to the setValue method.
  - * @param power - the int power.
  - */
  -protected void setPower(int power) {
  -this.power = power;
  -}
  -
  -/**
* @return int current baseunit of this Numeric.
*/
   public int getBaseunit() {
  @@ -374,6 +367,14 @@
   }
   
   /**
  + * This object is an integer if it is a number and the
  + * rounded value is equal to the value.
  + */
  +public boolean isInteger() {
  +return (isNumber() && (double)(Math.round(value)) == value);
  +}
  +
  +/**
* This object is an EMS factor if the baseunit is EMS.  Power is
* guaranteed to be zero for EMS baseunit.
*/
  @@ -499,6 +500,21 @@
   }
   
   /**
  + * Subtract a double from the current value.
  + * @param op - the value to subtract.
  + * @return Numeric; this object.
  + * @throws PropertyException if this is not a number.
  + */
  +public Numeric subtract(double op) throws PropertyException {
  +// Check of same dimension
  +if (power != 0 || baseunit != NUMBER)
  +throw new PropertyException
  +("Can't subtract number from length.");
  +value -= op;
  +return this;
  +}
  +
  +/**
* Add the operand to the current value.
* @param op The value to add.
* @return Numeric; this object.
  @@ -523,6 +539,21 @@
   
   // Add each type of value
   value += op.value;
  +return this;
  +}
  +
  +/**
  + * Add a double to the current value.
  + * @param op - the value to add.
  + * @return Numeric; this object.
  + * @throws PropertyException if this is not a number.
  + */
  +public Numeric add(double op) throws PropertyException {
  +// Check of same dimension
  +if (power != 0 || baseunit != NUMBER)
  +throw new PropertyException
  +("Can't add number to length.");
  +value += op;
   return this;
   }
   
  
  
  

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




Re: Does anyone working on FOP AWT previe ?

2002-10-18 Thread Oleg Tkachenko
IvanLatysh wrote:


Does anyone working on embedding FOP into Swing/AWT applications ?

Guys from x-smiles team do it, look at http://www.x-smiles.org.


Because there are 20.4 version, but System.exit(0); still there.

Do you mean awt viewer? afair it was fixed a long time ago, get cvs 
maintenance version, which works fine.

--
Oleg Tkachenko
eXperanto team
Multiconn International, Israel


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



Re: Root element is required in a well-formed document

2002-10-18 Thread Oleg Tkachenko
Venkata Rao Nadella wrote:


I am trying to convert XML File to PDF using FOP. I am getting following 
error although root element is present.
 
[ERROR]: The root element is required in a well-formed document.
 
Can someone help me in figuring out why I am getting this error?
Input fo document you are supplying to fop is not well-formed. Check out 
your xsl stylesheet (if any) or fop embedding code (if any).

--
Oleg Tkachenko
eXperanto team
Multiconn International, Israel


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



DO NOT REPLY [Bug 13699] - PDF-Renderer Not Threadsafe

2002-10-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=13699

PDF-Renderer Not Threadsafe

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |



--- Additional Comments From [EMAIL PROTECTED]  2002-10-18 19:13 ---

Hello!

It's not really fisex. 
We tested 0.20.3 and also 0.20.4.
In MT-Envs we had exceptions!!!

To resolve:

1) in org.apache.fop.image.AbstractFopImage:

public  _synchronized_  byte[] getBitmaps() throws FopImageException {
if (this.m_bitmaps == null)
this.loadImage();

return this.m_bitmaps;
}


2) (may be superflowous because of (1)
in org.apache.fop.image.analyser.ImageReaderFactory:

static public ImageReader Make(String uri,
  InputStream in) throws FopImageException {

synchronized (sem) {
if (formats==null) {
// need to use a config file and remove static methods
formats = new Vector();
formats.addElement(new JPEGReader());
formats.addElement(new BMPReader());
formats.addElement(new GIFReader());
formats.addElement(new PNGReader());
formats.addElement(new TIFFReader());
formats.addElement(new EPSReader());
formats.addElement(new SVGReader());
//
}
}
 .


Okay! ThatÄs not really good solution. But it scales without bottleneck.

Ciao,
Joachim

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




Root element is required in a well-formed document

2002-10-18 Thread Venkata Rao Nadella



Hi,
 
I am trying to 
convert XML File to PDF using FOP. I am getting following error although root 
element is present.
 
[ERROR]: The root 
element is required in a well-formed document.
 
Can someone help me 
in figuring out why I am getting this error?
 
Thanks,
Venkat
 
This e-mail is the property of NewRiver, Inc.  The information transmitted is 
confidential and may be privileged, and is only intended for the recipient to 
whom it is addressed. Any review, distribution, dissemination, reliance upon or 
other use of this information by persons other than the intended recipient is 
prohibited. NewRiver makes no representations or warranties of any kind, whether 
express or implied, with respect to the information. NewRiver and the sender 
shall have no responsibility or liability for any reliance on the 
information.  If you have received 
this e-mail in error, please notify the sender by reply e-mail and delete and 
destroy any copies of this e-mail.
 


Does anyone working on FOP AWT previe ?

2002-10-18 Thread IvanLatysh
Hi,

Does anyone working on embedding FOP into Swing/AWT applications ?

Because there are 20.4 version, but System.exit(0); still there.


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




DO NOT REPLY [Bug 13464] - part of word missing when broken across pages

2002-10-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=13464

part of word missing when broken across pages

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|Blocker |Normal
  Component|pdf renderer|page-master/layout
   Priority|Other   |Low



--- Additional Comments From [EMAIL PROTECTED]  2002-10-18 13:02 ---
The maintenance code works for the attached sample due to some changes in the
code. Unfortunately, the real bug is not fixed, its only much more unlikely
to run into it.
The following FO fails with the current code:

http://www.w3.org/1999/XSL/Format";>
  

  

  
  

  blah blablablawurb

  

The text "blah blablabla" is laid out into a line, the second word "blablabla"
is not added as a child but stored into the pending area list, because it could
for a word with following text and wrapped. The fo:inline causes the following
text "wurb" to be delivered separately to the line layout routine, and it
overflows the line. In normal operation, the pending text would have been added
to the next line. In the example, this happens at the end of a page, and this
means a new block is started from scratch which gets the "wurb" but does not
know about the pending "blablabla" text.
I have no idea how to fix this so that it would work with tables, and it's
probably not worth it. I will add a diagnostic.

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




DO NOT REPLY [Bug 13734] New: - Hyphenation does not work correctly on long string with many '-'

2002-10-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=13734

Hyphenation does not work correctly on long string with many '-'

   Summary: Hyphenation does not work correctly on long string with
many '-'
   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]


The string :

Thr-Thr-Tyr-Ala-Thr-Gly-Ala-Ala-Arg-Ala-Ala-Arg-Ala-Ala-Tyr-Cys-Ala-Tyr-Gly-Ala-
Arg-Gly-Ala-Arg-Gly-Ala-Arg-Gly-Thr-Asn

is hyphenated like that in all language I have tried :

 Thr-
 Thr-
 Tyr-
 Ala-
 Thr-
 Gly-
 Ala-
 Ala-
 Arg-
 Ala-
 Ala-
 Arg-
 Ala-
 Ala-
 Tyr-
 Cys-
 Ala-
 Tyr-
 Gly-
Ala-Arg-Gly-Ala-Arg-Gly-Ala-Arg-Gly-Thr-Asn

Should be like that :

Thr-Thr-Tyr-Ala-Thr-Gly-Ala-Ala-Arg-Ala-Ala-
Arg-Ala-Ala-Tyr-Cys-Ala-Tyr-Gly-Ala-Arg-Gly-
Ala-Arg-Gly-Ala-Arg-Gly-Thr-Asn

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




Re: Performance tuning.

2002-10-18 Thread Henrik Olsson

Hi Jeremias.

I have started the task to create diffs.
But it makes it a bit complecated since there are about 10 diffrent things i have done to the code and some things affects more then 20 source files.

So the question are: Do You want all the changes in one bunch or them separated in 10 diffrent groups that belongs together?

Henrik









Jeremias Maerki <[EMAIL PROTECTED]>
2002-10-17 10:56
Please respond to fop-dev

        
        To:        [EMAIL PROTECTED]
        cc:        
        Subject:        Re: Performance tuning.


Henrik,

that sounds very interesting. Normal procedures for sending changes is
to create a unified CVS diff file. You'll find some instructions
following the URL below:
http://xml.apache.org/source.html

It's best if you post the two diff files (against the maintenance branch
and the main branch) in a BugZilla entry, so it's not likely to get lost.
One of the committers (I'll try to do it during the weekend if you
can submit it it before then) will then review and apply the patch to
the codebase.

BugZilla is here: http://nagoya.apache.org/bugzilla/

Thanks a lot!

> I have runned several performance tests on the FOP and and I have found
> out several bottle necks (especially in the PropertyListBuilder).
> Most things is about reducing gc and some others about not so well written
> code.
>
> The result of this tunings gives me a speed of 3 time faster than the
> original FOP.
>
> So what do I do to get the code in to the fop-project (the problems are
> both in the fop 0.20.4 and in the DEV 1.0).
>
> I have also figured out some more thing but they are not so general but it
> makes the FOP as fast as a comersial tool written in C++ (StreamServe).

Jeremias Maerki


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




Re: Maintenance release

2002-10-18 Thread Oleg Tkachenko
Christian Geisert wrote:


I haven't had much time recently to work on the next (final)
maintenance release and will be on holiday the next two
weeks (honeymoon ;-)

Hearty congratulations!

 but then we really should get the release

out and so I propose the end of the first week of november
as target date for the release candidate.

Sounds fine. What about ToDo list, some annoying bugs? btw, as it's supposed 
to be the last maintenance release I think we have to clean up bugzilla, it's 
168 opened bugs still in there, many of them I believe obsoleted and hardly 
solvable, like "FOP 0.17 does not work with WebSphere V3.5 OS/390" one.

--
Oleg Tkachenko
eXperanto team
Multiconn International, Israel


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



Re: Performance tuning.

2002-10-18 Thread Jeremias Maerki
Hi Henrik

> I have started the task to create diffs.

Great.

> But it makes it a bit complecated since there are about 10 diffrent things 
> i have done to the code and some things affects more then 20 source files.
> 
> So the question are: Do You want all the changes in one bunch or them 
> separated in 10 diffrent groups that belongs together?

Have you tried to run the diff from the "src" directory? Then, CVS
should create a diff that spans all modified files in this directory. I
hope this helps. Before I became a committer I used to do the diffing in
WinCVS and copy/paste the results together to a single file. But I heard
that's not best practice. I hope this helps.

Jeremias Maerki


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




Re: Performance tuning.

2002-10-18 Thread Martin Poeschl
Henrik Olsson wrote:


Hi.
I have runned several performance tests on the FOP and and I have found
out several bottle necks (especially in the PropertyListBuilder).
Most things is about reducing gc and some others about not so well written
code.

The result of this tunings gives me a speed of 3 time faster than the
original FOP.


WOW!!!


So what do I do to get the code in to the fop-project (the problems are
both in the fop 0.20.4 and in the DEV 1.0).

I have also figured out some more thing but they are not so general but it
makes the FOP as fast as a comersial tool written in C++ (StreamServe).


could you make your patched version available somewhere???
if you don't have a server, just send it to my private mail and i'll put it in my home_dir at the 
apache server ;-)

martin



Henrik.





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