cvs commit: xml-fop/src/org/apache/fop/fonts/type1 - New directory
jeremias2002/11/29 00:34:09 xml-fop/src/org/apache/fop/fonts/type1 - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/tools IOUtil.java
jeremias2002/11/29 00:35:43 Added: src/org/apache/fop/tools Tag: fop-0_20_2-maintain IOUtil.java Log: Added some I/O utilities. This class is to be replaced with Jakarta Commons IO as soon as a release is available. Revision ChangesPath No revision No revision 1.1.2.1 +59 -0 xml-fop/src/org/apache/fop/tools/Attic/IOUtil.java - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fonts Glyphs.java
jeremias2002/11/29 00:37:37 Modified:src/org/apache/fop/fonts Tag: fop-0_20_2-maintain Glyphs.java Log: Made the rest of the constants public. Revision ChangesPath No revision No revision 1.7.2.1 +5 -5 xml-fop/src/org/apache/fop/fonts/Glyphs.java Index: Glyphs.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fonts/Glyphs.java,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -u -r1.7 -r1.7.2.1 --- Glyphs.java 1 Aug 2001 09:52:43 - 1.7 +++ Glyphs.java 29 Nov 2002 08:37:36 - 1.7.2.1 @@ -8,9 +8,9 @@ package org.apache.fop.fonts; public class Glyphs { -static String notdef = .notdef; +public static String notdef = .notdef; -static String mac_glyph_names[] = { +public static String mac_glyph_names[] = { /* 0x00 */ notdef, .null, CR, space, exclam, quotedbl, numbersign, dollar, percent, ampersand, quotesingle, parenleft, @@ -68,7 +68,7 @@ ccaron, dmacron }; -static String[] tex8r = { +public static String[] tex8r = { // 0x00 .notdef, dotaccent, fi, fl, fraction, hungarumlaut, Lslash, lslash, ogonek, ring, .notdef, breve, @@ -179,7 +179,7 @@ '\u00fc', '\u00fd', '\u00fe', '\u00ff' }; -static String[] unicode_glyphs = { +public static String[] unicode_glyphs = { \u0041, A, \u00C6, AE, \u01FC, AEacute, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Forresbot WANTED
On Fri, 2002-11-29 at 09:27, Nicola Ken Barozzi wrote: So newer versions will work. The patch cannot be applied to cocoon cvs as fop releases are coming from a branch. So how can we proceed. I would like it to be using fop cvs but this is not really feasible at the moment. Why? Cocoon 2.1 is in alpha. alpha+alpha makes a bit of a difference. If the patch works and fixes the problem, personally I have no problem in patching current Cocoon HEAD (and Forrest). Personally that is, we should hear others... with these versions, what are the problems that instead come up? Are they stable enough? It works fine for me (with fop docs), but not really extensively tested. What about people with other stylesheets which might expose problems and things like Korean language with embedded fonts, this will definitely not work at the moment. We certainly want to work on these things (feedback etc.) but it is hard to say when it will be stable enough for general use. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fonts/type1 PFBData.java PFBParser.java PFMFile.java PFMInputStream.java package.html
jeremias2002/11/29 00:40:54 Modified:src/org/apache/fop/fonts Tag: fop-0_20_2-maintain FontFileReader.java src/org/apache/fop/fonts/apps Tag: fop-0_20_2-maintain PFMReader.java Added: src/org/apache/fop/fonts/type1 Tag: fop-0_20_2-maintain PFBData.java PFBParser.java PFMFile.java PFMInputStream.java package.html Removed: src/org/apache/fop/fonts Tag: fop-0_20_2-maintain PFMFile.java PFMInputStream.java Log: Moved PFM classes to type1 subpackage. Use of org.apache.fop.tools.IOUtil instead of rewriting the same functionality every time. Added a parser and memory representation class for Adobe Type 1 PFB files (Full support for raw and PC format as described in the Download Fonts spec from Adobe). Adjusted the PFMReader for the package move. Added Avalon logging to the PFMReader (adds a dependency to avalon-framework.jar, I will document that) Revision ChangesPath No revision No revision 1.3.2.3 +6 -16 xml-fop/src/org/apache/fop/fonts/FontFileReader.java Index: FontFileReader.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fonts/FontFileReader.java,v retrieving revision 1.3.2.2 retrieving revision 1.3.2.3 diff -u -r1.3.2.2 -r1.3.2.3 --- FontFileReader.java 18 Nov 2002 10:44:41 - 1.3.2.2 +++ FontFileReader.java 29 Nov 2002 08:40:53 - 1.3.2.3 @@ -6,11 +6,13 @@ */ package org.apache.fop.fonts; + import java.io.InputStream; -import java.io.OutputStream; import java.io.File; import java.io.IOException; +import org.apache.fop.tools.IOUtil; + /** * Reads a file into an array and * provides file like functions for array access. @@ -28,8 +30,7 @@ private void init(InputStream in) throws java.io.IOException { java.io.ByteArrayOutputStream bout = new java.io.ByteArrayOutputStream(); try { -copyStream(in, bout); -this.file = bout.toByteArray(); +this.file = IOUtil.toByteArray(in, 5); this.fsize = this.file.length; this.current = 0; } finally { @@ -38,24 +39,13 @@ } -/**@todo Use method from Avalon Excalibur IO or Jakarta Commons IO*/ -private void copyStream(InputStream in, OutputStream out) throws IOException { -final int bufferSize = 2048; -final byte[] buffer = new byte[bufferSize]; -byte[] buf = new byte[bufferSize]; -int bytesRead; -while ((bytesRead = in.read(buf)) != -1) { -out.write(buf, 0, bytesRead); -} -} - /** * Constructor * @param fileName filename to read */ public FontFileReader(String fileName) throws java.io.IOException { File f = new File(fileName); -InputStream in = new java.io.FileInputStream(fileName); +InputStream in = new java.io.FileInputStream(f); try { init(in); } finally { No revision No revision 1.7.2.4 +94 -97xml-fop/src/org/apache/fop/fonts/apps/PFMReader.java Index: PFMReader.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fonts/apps/PFMReader.java,v retrieving revision 1.7.2.3 retrieving revision 1.7.2.4 diff -u -r1.7.2.3 -r1.7.2.4 --- PFMReader.java19 Nov 2002 01:04:07 - 1.7.2.3 +++ PFMReader.java29 Nov 2002 08:40:53 - 1.7.2.4 @@ -1,28 +1,31 @@ /* * $Id$ - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * Copyright (C) 2001-2002 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. */ package org.apache.fop.fonts.apps; -import java.io.*; -import org.w3c.dom.*; -import org.apache.fop.fonts.*; -import java.util.HashMap; -import java.util.ArrayList; +import java.io.File; +import java.io.InputStream; +import java.util.Map; +import java.util.List; import java.util.Iterator; +import org.w3c.dom.*; + +import org.apache.fop.fonts.type1.PFMFile; +import org.apache.avalon.framework.logger.AbstractLogEnabled; +import org.apache.avalon.framework.logger.ConsoleLogger; +import org.apache.avalon.framework.logger.Logger; + /** * A tool which reads PFM files from Adobe Type 1 fonts and creates * XML font metrics file for use in FOP. - * - * @author [EMAIL PROTECTED] */ -public class PFMReader { -private boolean invokedStandalone = false; - -public
cvs commit: xml-fop/src/org/apache/fop/pdf PDFT1Stream.java
jeremias2002/11/29 00:43:08 Modified:src/org/apache/fop/pdf Tag: fop-0_20_2-maintain PDFT1Stream.java Log: Fixes bug with Adobe Type 1 font embedding. PC format encoded PFB files were not decoded. I think that leads to error messages on certain RIP engines. Revision ChangesPath No revision No revision 1.2.2.3 +17 -95xml-fop/src/org/apache/fop/pdf/PDFT1Stream.java Index: PDFT1Stream.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFT1Stream.java,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.3 diff -u -r1.2.2.2 -r1.2.2.3 --- PDFT1Stream.java 31 May 2002 00:17:16 - 1.2.2.2 +++ PDFT1Stream.java 29 Nov 2002 08:43:08 - 1.2.2.3 @@ -10,109 +10,31 @@ // Java import java.io.UnsupportedEncodingException; +// FOP +import org.apache.fop.fonts.type1.PFBData; + public class PDFT1Stream extends PDFStream { -private int origLength; -private int len1, len3; -private byte[] originalData = null; + +private PFBData pfb; -public PDFT1Stream(int num, int len) { +public PDFT1Stream(int num) { super(num); -origLength = len; -} - -private final static boolean byteCmp(byte[] src, int offset, byte[] cmp) { -boolean ret = true; -for (int i = 0; ret == true i cmp.length; i++) { -// System.out.println(Compare: ); -// System.out.println( +src[offset+i]+ +cmp[i]); -if (src[offset + i] != cmp[i]) -ret = false; -} -return ret; } -/** - * calculates the Length1 and Length3 PDFStream attributes for type1 - * font embedding - */ -private void calcLengths(byte[] originalData) { -// Calculate length 1 and 3 -// System.out.println (Checking font, size = +originalData.length); - -// Length1 is the size of the initial ascii portion -// search for currentfile eexec -// Get the first binary number and search backwards for eexec -len1 = 30; - -byte[] eexec; -try { -eexec = currentfile eexec.getBytes(PDFDocument.ENCODING); -} catch (UnsupportedEncodingException ue) { -eexec = currentfile eexec.getBytes(); -} -// System.out.println(Length1=+len1); -while (!byteCmp(originalData, len1 - eexec.length, eexec)) -len1++; -// Skip newline -len1++; - -// Length3 is length of the last portion of the file -len3 = 0; -byte[] cltom; -try { -cltom = cleartomark.getBytes(PDFDocument.ENCODING); -} catch (UnsupportedEncodingException ue) { -cltom = cleartomark.getBytes(); -} - -len3 -= cltom.length; -while (!byteCmp(originalData, origLength + len3, cltom)) { -len3--; -// System.out.println(Len3=+len3); -} -len3 = -len3; -len3++; -// Eat 512 zeroes -int numZeroes = 0; -byte[] ws1; -try { -ws1 = \n.getBytes(PDFDocument.ENCODING); -} catch (UnsupportedEncodingException ue) { -ws1 = \n.getBytes(); -} -byte[] ws2; -try { -ws2 = \r.getBytes(PDFDocument.ENCODING); -} catch (UnsupportedEncodingException ue) { -ws2 = \r.getBytes(); -} -byte[] ws3; -try { -ws3 = 0.getBytes(PDFDocument.ENCODING); -} catch (UnsupportedEncodingException ue) { -ws3 = 0.getBytes(); -} -while ((originalData[origLength - len3] == ws1[0] || originalData[origLength - len3] == ws2[0] || originalData[origLength - len3] == ws3[0]) -numZeroes 512) { -len3++; -if (originalData[origLength - len3] == ws3[0]) -numZeroes++; -} -// System.out.println(Length3=+len3); -} // overload the base object method so we don't have to copy // byte arrays around so much protected int output(java.io.OutputStream stream) throws java.io.IOException { +if (pfb == null) throw new NullPointerException(pfb must not be null at this point); int length = 0; String filterEntry = applyFilters(); -String preData = new String(this.number + + this.generation -+ obj\n /Length -+ (_data.size() + 1) + + filterEntry -+ + /Length1 + len1 + /Length2
cvs commit: xml-fop/src/org/apache/fop/render/pdf/fonts SingleByteFont.java
jeremias2002/11/29 00:44:23 Modified:src/org/apache/fop/render/pdf/fonts Tag: fop-0_20_2-maintain SingleByteFont.java Log: Use new PFBParser to read PFB files so they are properly decoded. Use org.apache.fop.tools.IOUtil for simpler code. Revision ChangesPath No revision No revision 1.3.2.4 +48 -60xml-fop/src/org/apache/fop/render/pdf/fonts/SingleByteFont.java Index: SingleByteFont.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/fonts/SingleByteFont.java,v retrieving revision 1.3.2.3 retrieving revision 1.3.2.4 diff -u -r1.3.2.3 -r1.3.2.4 --- SingleByteFont.java 8 Nov 2002 10:25:28 - 1.3.2.3 +++ SingleByteFont.java 29 Nov 2002 08:44:23 - 1.3.2.4 @@ -7,19 +7,24 @@ package org.apache.fop.render.pdf.fonts; -import org.apache.fop.fonts.Glyphs; +//Java +import java.io.InputStream; +import java.io.BufferedInputStream; +import java.util.Map; +import java.net.URL; + +//FOP +import org.apache.fop.messaging.MessageHandler; import org.apache.fop.layout.FontDescriptor; import org.apache.fop.pdf.PDFStream; import org.apache.fop.pdf.PDFT1Stream; import org.apache.fop.pdf.PDFTTFStream; import org.apache.fop.render.pdf.CodePointMapping; import org.apache.fop.render.pdf.Font; +import org.apache.fop.fonts.type1.PFBParser; +import org.apache.fop.fonts.type1.PFBData; +import org.apache.fop.tools.IOUtil; -import java.io.FileInputStream; -import java.io.InputStream; -import java.io.BufferedInputStream; -import java.util.Map; -import java.net.URL; /** * Generic SingleByte font @@ -34,9 +39,7 @@ public int xHeight = 0; public int ascender = 0; public int descender = 0; -public int[] fontBBox = { -0, 0, 0, 0 -}; +public int[] fontBBox = {0, 0, 0, 0}; public URL embedFileName = null; public String embedResourceName = null; @@ -60,10 +63,11 @@ } public final Map getKerningInfo() { -if (useKerning) +if (useKerning) { return kerning; -else +} else { return new java.util.HashMap(); +} } public byte getSubType() { @@ -108,63 +112,45 @@ InputStream instream = null; // Get file first -if (embedFileName != null) -try { -instream = embedFileName.openStream(); -} catch (Exception e) { -System.out.println(Failed to embed fontfile: - + embedFileName); -} +if (embedFileName != null) try { +instream = embedFileName.openStream(); +} catch (Exception e) { +MessageHandler.error(Failed to embed fontfile: + + embedFileName); +} // Get resource -if (instream == null embedResourceName != null) -try { -instream = -new BufferedInputStream(this.getClass().getResourceAsStream(embedResourceName)); -} catch (Exception e) { -System.out.println(Failed to embed fontresource: - + embedResourceName); -} +if (instream == null embedResourceName != null) try { +instream = +new BufferedInputStream(this.getClass().getResourceAsStream(embedResourceName)); +} catch (Exception e) { +MessageHandler.error(Failed to embed fontresource: + + embedResourceName); +} -if (instream == null) +if (instream == null) { return (PDFStream)null; +} -// Read fontdata -byte[] file = new byte[128000]; -int fsize = 0; - +// Read fontdata try { -int l = instream.read(file, 0, 128000); -fsize += l; - -if (l == 128000) { -// More to read - needs to extend -byte[] tmpbuf; - -while (l 0) { -tmpbuf = new byte[file.length + 64000]; -System.arraycopy(file, 0, tmpbuf, 0, file.length); -l = instream.read(tmpbuf, file.length, 64000); -fsize += l; -file = tmpbuf; - -if (l 64000)// whole file read. No need to loop again -l = 0; -} -} - if (subType == org.apache.fop.pdf.PDFFont.TYPE1) { -embeddedFont = new PDFT1Stream(i, fsize); -
cvs commit: xml-fop CHANGES
jeremias2002/11/29 00:45:14 Modified:.Tag: fop-0_20_2-maintain CHANGES Log: Update changes for Type 1 embedding bugfix Revision ChangesPath No revision No revision 1.10.2.34 +4 -1 xml-fop/CHANGES Index: CHANGES === RCS file: /home/cvs/xml-fop/CHANGES,v retrieving revision 1.10.2.33 retrieving revision 1.10.2.34 diff -u -r1.10.2.33 -r1.10.2.34 --- CHANGES 28 Nov 2002 15:23:22 - 1.10.2.33 +++ CHANGES 29 Nov 2002 08:45:14 - 1.10.2.34 @@ -1,5 +1,8 @@ == Done since 0.20.4 release +- Fix embedding of Adobe Type 1 fonts. PFB file encoded in PC format were + not decoded prior to embedding. This may explain error messages with + certain RIP engines. (Jeremias Maerki) - Added infinite loop detection (just halts processing, see bug #8878) Submitted by: Rhett Aultman ([EMAIL PROTECTED]) - Added autoselecting portrait/landscape on PCL Renderer (see bug #6638) @@ -9,7 +12,7 @@ - Updated examples/fo files to remove all errors and warnings during build Submitted by: Manuel Mall [EMAIL PROTECTED] (see bug #13867) - Perfomance tuning (reduced object creation etc.) (see bug #14103) - Submitted by: Henrik Olsson [EMAIL PROTECTED] + Submitted by: Henrik Olsson [EMAIL PROTECTED] - Update to Xerces 2.2.1 (Jeremias Maerki) - Fixed EOFException in TTFReader (Bug #14576) Submitted by: Bernard D'Have [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop build.xml
jeremias2002/11/29 00:46:16 Modified:.Tag: fop-0_20_2-maintain build.xml Log: Fix generation of javadocs Added optional target to generate a source jar for Eclipse Revision ChangesPath No revision No revision 1.44.2.29 +18 -0 xml-fop/build.xml Index: build.xml === RCS file: /home/cvs/xml-fop/build.xml,v retrieving revision 1.44.2.28 retrieving revision 1.44.2.29 diff -u -r1.44.2.28 -r1.44.2.29 --- build.xml 19 Nov 2002 13:42:55 - 1.44.2.28 +++ build.xml 29 Nov 2002 08:46:15 - 1.44.2.29 @@ -670,6 +670,12 @@ package name=org.apache.fop.fonts/ package name=org.apache.fop.fonts.*/ /group + classpath refid=libs-build-classpath/ + classpath +fileset dir=${lib.dir} + include name=ant*.jar/ +/fileset + /classpath /javadoc /target @@ -733,6 +739,18 @@ tar tarfile=${name}-${version}-src.tar basedir=${dist.src.dir} includes=**/ gzip zipfile=${name}-${version}-src.tar.gz src=${name}-${version}-src.tar / delete file=${name}-${version}-src.tar/ + + /target + + !-- === -- + !-- Optional targets for Eclipse-- + !-- === -- + target name=src-jar depends=prepare-src description=Generates a source zip for Eclipse +jar jarfile=${build.dir}/${name}-src.jar + fileset dir=${build.src} +include name=**/*.java/ + /fileset +/jar /target - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Forresbot WANTED
oops, wrong mailing list. On Fri, 2002-11-29 at 09:37, Keiron Liddle wrote: On Fri, 2002-11-29 at 09:27, Nicola Ken Barozzi wrote: So newer versions will work. The patch cannot be applied to cocoon cvs as fop releases are coming from a branch. So how can we proceed. I would like it to be using fop cvs but this is not really feasible at the moment. Why? Cocoon 2.1 is in alpha. alpha+alpha makes a bit of a difference. If the patch works and fixes the problem, personally I have no problem in patching current Cocoon HEAD (and Forrest). Personally that is, we should hear others... with these versions, what are the problems that instead come up? Are they stable enough? It works fine for me (with fop docs), but not really extensively tested. What about people with other stylesheets which might expose problems and things like Korean language with embedded fonts, this will definitely not work at the moment. We certainly want to work on these things (feedback etc.) but it is hard to say when it will be stable enough for general use. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: cvs commit: fonts...
Should we put the fix for the ArrayIndexOutOfBoundsException into the branch. Namely line 224 in TTFFile (HEAD): // the last character 65535 = .notdef // may have a range offset if (cmapRangeOffsets[i] != 0 j != 65535) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Adobe Type 1 font embedding bug fixed
I've just committed a fix to CVS that corrects Type 1 font embedding. PFB files encoded in PC format (as described in the spec #5040) were not decoded which I think leads to errors on certain RIP engines. Due to lack of such a machine I can't test if this really fixes the error but it is nonetheless a likely reason for failure. I'll write to that little group of people I think have experienced this problem to find out if this really improved things. The PFB parser I've written checks if the PFB file is encoded in PC format. If it's not, the file is parsed in exactly the same way it was parsed before I applied the bugfix. I call that format the RAW format. There's another one: MAC format. I haven't written a parser for this one. So if Mac users want to embedd Type1 fonts they should also use the PC format fonts right now. Will also add this to the trunk soon. References: - Adobe, Supporting Downloadable PostScript Language Fonts (#5040) found here: http://partners.adobe.com/asn/developer/technotes/fonts.html Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: cvs commit: fonts...
will do. On 29.11.2002 09:57:05 Keiron Liddle wrote: Should we put the fix for the ArrayIndexOutOfBoundsException into the branch. Namely line 224 in TTFFile (HEAD): // the last character 65535 = .notdef // may have a range offset if (cmapRangeOffsets[i] != 0 j != 65535) { Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: docs for maintenance release
On Thu, 2002-11-28 at 17:33, Christian Geisert wrote: Hi, for the documentation for the maintenance release I think the best thing is to copy src/documentation over from trunk and then add a simple exec command=forrest to build.xml Comments? The track.png in status.html needs a update. How is it done? There is an svg document in docs/xml-docs/data/. Once the svg2png works then we could use it directly. Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
cvs commit: xml-fop/src/documentation/content/xdocs/design/understanding area_tree.xml book.xml fo_tree.xml images.xml index.xml layout_managers.xml pdf_library.xml properties.xml renderers.xml svg.xml xml_parsing.xml
keiron 2002/11/29 01:18:23 Added: src/documentation/content/xdocs/design/understanding area_tree.xml book.xml fo_tree.xml images.xml index.xml layout_managers.xml pdf_library.xml properties.xml renderers.xml svg.xml xml_parsing.xml Log: converted across understanding docs Revision ChangesPath 1.1 xml-fop/src/documentation/content/xdocs/design/understanding/area_tree.xml Index: area_tree.xml === ?xml version=1.0 standalone=no? !DOCTYPE document PUBLIC -//APACHE//DTD Documentation V1.1//EN http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/resources/schema/dtd/document-v11.dtd; document header titleArea Tree/title /header body section titleArea Tree/title section titleArea Tree/title pThe Area Tree is an internal representation of the result document. This is a set of java classes that can put together a set of objects that represent the pages and their contents./p pThis information is created by the layout managers and is rendered to the output using a renderer./p pThe Area Tree follows the description of the area tree in the XSL:FO specification./p pThe Area Tree consists of a set of pages, the actual implemenation places these in a set of page sequences./p /section section titlePages/title pA page consists of a page+viewport pair./p pThe PageViewPort and Page with the regions is created by the LayoutMasterSet. The contents are then placed by the layout managers. Once the layout of a page is complete then it is added to the Area Tree./p pInside the page is a set of RegionViewport+Region pairs for each region on the page./p/section section titleBlocks/title pBlock level areas contain either other blocks or line areas (which is a special block area)./pp A block is either positoned or stacked with other block areas./p /section section titleInline Areas/title pInline areas are stacked in a line area. Inline areas are objects such as character, viewport, inline-container, leader and space. A special inline area Word is also used for a group of consecutive characters./p pThe image and instream foreign object areas are placed inside a viewport. The leader (with use content) and unresolved page number areas are resolved to other inline areas./p pOnce a LineArea is filled with inline areas then the inline areas need to be aligned and adjusted to fill the line properly./p /section section titleTraits/title pA trait is information associated with an area. This could be information such as text colour or is-first./p pTraits provide information about an area. The traits are derived from properties on the formatting object or are generated during the layout process. Many of the layout traits do not have actual values but can be derived from the Area Tree. Other traits that apply when rendering the areas are set on the area. Since setting the same value on every area would use a lot of memory then the traits are derived from default or parent values./p pA dominant trait on a block area is set, for example font colour, so that every line area with the same dominant value can derive it. The text inline areas then get the font colour set on the inline area or from the line area or from the block area./p /section section titleForward References/title pThe Area Tree maintains a set of mappings from the reference to pages./p pThe PageViewPort holds the list of forward references that need resolving so that if a references is resolved during layout the page can be easily found and then fixed. Once all the forward references are resolved then the page is ready to be rendered./p pTo layout a page any areas that cannot be resolved need to reserve space. Once the inline area is resolved then the complete line should be adjusted to accomodate any change in space used by the area./p /section section titleCaching/title pWe may need to cache pages due to forward references or when keeping all pages./p pThis is done by serializing the Page. The PageViewport is retained to be used as a key for page references and backward references. The Page is serialized to an object stream and then all of the page contents are released. The Page is then recoved by reading from the object stream./p pThe PageViewport retains information about id areas for easy access./p /section section titleExtensions/title pThe Area Tree holds the Output Document extensions. This is information such as pdf bookmarks or other output document specific information that is not handled by XSL:FO./p pIt is also possible to create custom areas that extend a normal area. The actual data that is
cvs commit: xml-fop/src/org/apache/fop/fonts TTFFile.java
jeremias2002/11/29 01:27:00 Modified:src/org/apache/fop/fonts Tag: fop-0_20_2-maintain TTFFile.java Log: fixed (possibly) a problem where certain fonts had a range value for the last character causing it to try to get invalid info also handles the lack of support for non-unicode cmap tables better. Submitted by: Keiron Liddle Some style improvements. Revision ChangesPath No revision No revision 1.6.2.5 +86 -63xml-fop/src/org/apache/fop/fonts/TTFFile.java Index: TTFFile.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fonts/TTFFile.java,v retrieving revision 1.6.2.4 retrieving revision 1.6.2.5 diff -u -r1.6.2.4 -r1.6.2.5 --- TTFFile.java 5 Nov 2002 07:53:48 - 1.6.2.4 +++ TTFFile.java 29 Nov 2002 09:26:59 - 1.6.2.5 @@ -137,8 +137,9 @@ // System.out.println(Platform ID: +cmap_pid+ // Encoding: +cmap_eid); -if (cmap_pid == 3 cmap_eid == 1) -cmap_unioffset = cmap_offset; +if (cmap_pid == 3 cmap_eid == 1) { +cmap_unioffset = cmap_offset; +} } if (cmap_unioffset = 0) { @@ -185,7 +186,7 @@ cmap_deltas[i] = in.readTTFShort(); } -int startRangeOffset = in.getCurrentPos(); +//int startRangeOffset = in.getCurrentPos(); for (int i = 0; i (cmap_segCountX2 / 2); i++) { cmap_rangeOffsets[i] = in.readTTFUShort(); @@ -205,12 +206,15 @@ j++) { // Update lastChar -if (j 256 j lastChar) +if (j 256 j lastChar) { lastChar = (short)j; +} if (mtxPtr mtx_tab.length) { int glyphIdx; -if (cmap_rangeOffsets[i] != 0) { +// the last character 65535 = .notdef +// may have a range offset +if (cmap_rangeOffsets[i] != 0 j != 65535) { int glyphOffset = glyphIdArrayOffset + ((cmap_rangeOffsets[i] / 2) + (j - cmap_startCounts[i]) + (i) - cmap_segCountX2 / 2) @@ -222,21 +226,20 @@ unicodeMapping.add(new UnicodeMapping(glyphIdx, j)); mtx_tab[glyphIdx].unicodeIndex.add(new Integer(j)); // Also add winAnsiWidth -ArrayList v = -(ArrayList)ansiIndex.get(new Integer(j)); -if (v != null) { -for (int k = 0; k v.size(); k++ ) { -Integer aIdx = (Integer)v.get(k); -ansiWidth[aIdx.intValue()] = -mtx_tab[glyphIdx].wx; -/* - * System.out.println(Added width + - * mtx_tab[glyphIdx].wx + - * uni: + j + - * ansi: + aIdx.intValue()); - */ -} -} +ArrayList v = (ArrayList)ansiIndex.get(new Integer(j)); +if (v != null) { +for (int k = 0; k v.size(); k++ ) { +Integer aIdx = (Integer)v.get(k); +ansiWidth[aIdx.intValue()] = +mtx_tab[glyphIdx].wx; +/* + * System.out.println(Added width + + * mtx_tab[glyphIdx].wx + + * uni: + j + + * ansi: + aIdx.intValue()); + */ +} +} /* * System.out.println(Idx: + * glyphIdx + @@ -250,34 +253,35 @@ glyphIdx = (j + cmap_deltas[i]) 0x; -if (glyphIdx mtx_tab.length) +if (glyphIdx mtx_tab.length) { mtx_tab[glyphIdx].unicodeIndex.add(new Integer(j)); -else +} else { System.out.println(Glyph + glyphIdx + out of range: +
DO NOT REPLY [Bug 4767] - SVG text is distored in PDF output
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=4767. 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=4767 SVG text is distored in PDF output --- Additional Comments From [EMAIL PROTECTED] 2002-11-29 09:45 --- The numbers being output are rounded to 5 decimal places. This will mean that the curves are distorted if the numbers are very close together. This should be handled better in the future. For now you can scale the text of draw as normal text without curves. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
cvs commit: xml-fop CHANGES
olegt 2002/11/29 01:46:19 Modified:.Tag: fop-0_20_2-maintain CHANGES Log: Updated changes for page-height=auto bug fix. Revision ChangesPath No revision No revision 1.10.2.35 +1 -0 xml-fop/CHANGES Index: CHANGES === RCS file: /home/cvs/xml-fop/CHANGES,v retrieving revision 1.10.2.34 retrieving revision 1.10.2.35 diff -u -r1.10.2.34 -r1.10.2.35 --- CHANGES 29 Nov 2002 08:45:14 - 1.10.2.34 +++ CHANGES 29 Nov 2002 09:46:18 - 1.10.2.35 @@ -1,5 +1,6 @@ == Done since 0.20.4 release +- Fixed infinite loop when page-height=auto (Oleg Tkachenko) - Fix embedding of Adobe Type 1 fonts. PFB file encoded in PC format were not decoded prior to embedding. This may explain error messages with certain RIP engines. (Jeremias Maerki) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 11926] - Text in SVG produces a corrupt PDF
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=11926. 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=11926 Text in SVG produces a corrupt PDF [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2002-11-29 10:17 --- I cannot reproduce the problem. Do you still get this problem with the cvs branch. Maybe it is something to do with embedding fonts. Propbably need more information in order to track down this bug if it still is occuring. If the problem still exists then reopen the bug. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Alt-Design status: XML handling
Bertrand Delacretaz wrote: Great work Peter! It makes a lot of sense to use higher-level than SAX events, and thanks for explaining this so clearly. If you allow me a suggestion regarding the structure of the code: maybe using some table-driven stuff instead of the many if statements in FoSimplePageMaster would be more readable? Something like: class EventHandler { EventHandler(String regionName,boolean discardSpace,boolean required) ... } /** table of event handlers that must be applied, in order */ EventHandler [] handlers = { new EventHandler(FObjectNames.REGION_BODY,true,true), new EventHandler(FObjectNames.REGION_BEFORE,true,false) }; ...then, in FoSimplePageMaster(...) loop over handlers and let them process the events. I don't know if this applies in general but it might be clearer to read and less risky to modify. Bertrand, Sorry this one slipped through the cracks. Some such approach may be a good idea, but I would be loathe to call it EventHandler. The whole point about pull parsing is to move away from event handling. I would think of these more as methods with parameters like optional, single or multiple, any. Peter -- Peter B. West [EMAIL PROTECTED] http://www.powerup.com.au/~pbwest/ Lord, to whom shall we go? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Problems with examples
W. Eliot Kimber wrote: strictly. But it probably should issue a warning, at least. I'll submit that on the XEP support list. RenderX reports that this change will be in the next maintenance release of XEP. Cheers, E. -- W. Eliot Kimber, [EMAIL PROTECTED] Consultant, ISOGEN International 1016 La Posada Dr., Suite 240 Austin, TX 78752 Phone: 512.656.4139 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo FoRoot.java
pbwest 2002/11/29 08:02:58 Modified:src/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design FoRoot.java Log: Added pool.surrenderEvent() calls. Revision ChangesPath No revision No revision 1.1.2.18 +8 -3 xml-fop/src/org/apache/fop/fo/Attic/FoRoot.java Index: FoRoot.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/Attic/FoRoot.java,v retrieving revision 1.1.2.17 retrieving revision 1.1.2.18 diff -u -r1.1.2.17 -r1.1.2.18 --- FoRoot.java 23 Nov 2002 14:28:57 - 1.1.2.17 +++ FoRoot.java 29 Nov 2002 16:02:58 - 1.1.2.18 @@ -135,6 +135,8 @@ // Clean up the fo:layout-master-set event pageSequenceMasters = layoutMasters.getPageSequenceMasters(); xmlevents.getEndElement(ev); +//System.out.println(Surrendering layout-master-set ev); +pool.surrenderEvent(ev); layoutMasters.deleteSubTree(); // Look for optional declarations @@ -146,6 +148,8 @@ declarations = numChildren(); new FoDeclarations(getFOTree(), this, ev); xmlevents.getEndElement(ev); +//System.out.println(Surrendering declarations ev); +pool.surrenderEvent(ev); } // Process page-sequences here @@ -164,6 +168,7 @@ // Loop over remaining fo:page-sequences new FoPageSequence(getFOTree(), this, ev); xmlevents.getEndElement(ev); +pool.surrenderEvent(ev); } } catch (NoSuchElementException e) { throw new FOPException - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo FONode.java
pbwest 2002/11/29 08:09:16 Modified:src/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design FONode.java Log: Wrapped attribute handling in exception catching and logging. Get event pool. Revision ChangesPath No revision No revision 1.19.2.29 +38 -21xml-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.28 retrieving revision 1.19.2.29 diff -u -r1.19.2.28 -r1.19.2.29 --- FONode.java 22 Nov 2002 02:48:34 - 1.19.2.28 +++ FONode.java 29 Nov 2002 16:09:16 - 1.19.2.29 @@ -7,6 +7,7 @@ import org.apache.fop.fo.properties.Property; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.fo.expr.PropertyParser; +import org.apache.fop.fo.expr.FunctionNotImplementedException; import org.apache.fop.datatypes.Ints; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.datatypes.PropertyValueList; @@ -19,6 +20,7 @@ import org.apache.fop.datastructs.ROBitSet; import org.apache.fop.apps.FOPException; import org.apache.fop.xml.FoXMLEvent; +import org.apache.fop.xml.FoXMLEventPool; import org.apache.fop.xml.SyncedFoXmlEventsBuffer; import org.apache.fop.xml.XMLNamespaces; import org.apache.fop.messaging.MessageHandler; @@ -105,7 +107,10 @@ PAGESEQ | FLOW | STATIC | TITLE | MC_MARKER; /** The buffer from which parser events are drawn. */ -protected SyncedFoXmlEventsBuffer xmlevents; +protected final SyncedFoXmlEventsBuffer xmlevents; + +/** The pool of ttFoXMLEvent/tts associated with ixmlevents/i. */ +protected final FoXMLEventPool pool; /** The namespaces object associated with ixmlevents/i. */ protected XMLNamespaces namespaces; @@ -222,6 +227,7 @@ this.numProps = sparseIndices.length; attrBitSet = FOPropertySets.getAttrROBitSet(stateFlags); xmlevents = foTree.xmlevents; +pool = xmlevents.getPool(); namespaces = xmlevents.getNamespaces(); exprParser = foTree.exprParser; propertySet = new PropertyValue[PropNames.LAST_PROPERTY_INDEX + 1]; @@ -248,7 +254,7 @@ int property; int prop = foKeys[propx].intValue(); if ( ! attrBitSet.get(prop)) { -MessageHandler.log(Ignoring +MessageHandler.logln(Ignoring + PropNames.getPropertyName(prop) + on + FObjectNames.getFOName(type) @@ -258,30 +264,41 @@ continue; } String attrValue = foAttributes.getFoAttrValue(prop); -props = handleAttrValue(prop, attrValue); -ptype = props.getType(); -if (ptype != PropertyValue.LIST) { -property = props.getProperty(); -// Update the propertySet -propertySet[property] = props; -specifiedProps.set(property); -// Handle corresponding properties here -} else { // a list -PropertyValue value; -Iterator propvals = ((PropertyValueList)props).iterator(); -while (propvals.hasNext()) { -value = (PropertyValue)(propvals.next()); -property = value.getProperty(); -propertySet[value.getProperty()] = value; +try { +props = handleAttrValue(prop, attrValue); +ptype = props.getType(); +if (ptype != PropertyValue.LIST) { +property = props.getProperty(); +// Update the propertySet +propertySet[property] = props; specifiedProps.set(property); // Handle corresponding properties here +} else { // a list +PropertyValue value; +Iterator propvals = ((PropertyValueList)props).iterator(); +while (propvals.hasNext()) { +value = (PropertyValue)(propvals.next()); +property = value.getProperty(); +propertySet[value.getProperty()] = value; +specifiedProps.set(property); +// Handle corresponding properties here +} } +} catch (FunctionNotImplementedException e) { +MessageHandler.logln +(Function not implemented: + e.getMessage() + + . Ignoring property ' +
cvs commit: xml-fop/src/org/apache/fop/fo/flow FoBasicLink.java FoBidiOverride.java FoBlockContainer.java FoBlock.java FoFloat.java FoFlow.java FoFootnoteBody.java FoFootnote.java FoInlineContainer.java FoInline.java FoLeader.java FoListBlock.java FoListItemBody.java FoListItemLabel.java FoMarker.java FoMultiCase.java FoMultiProperties.java FoMultiSwitch.java FoMultiToggle.java FoStaticContent.java FoTableBody.java FoTableCaption.java FoTableCell.java FoTableFooter.java FoTableHeader.java FoTable.java FoTableRow.java FoTitle.java FoWrapper.java
pbwest 2002/11/29 08:19:52 Modified:src/org/apache/fop/fo/flow Tag: FOP_0-20-0_Alt-Design FoBasicLink.java FoBidiOverride.java FoBlockContainer.java FoBlock.java FoFloat.java FoFlow.java FoFootnoteBody.java FoFootnote.java FoInlineContainer.java FoInline.java FoLeader.java FoListBlock.java FoListItemBody.java FoListItemLabel.java FoMarker.java FoMultiCase.java FoMultiProperties.java FoMultiSwitch.java FoMultiToggle.java FoStaticContent.java FoTableBody.java FoTableCaption.java FoTableCell.java FoTableFooter.java FoTableHeader.java FoTable.java FoTableRow.java FoTitle.java FoWrapper.java Log: Removed redundant getXmlevents() call. Revision ChangesPath No revision No revision 1.1.2.9 +2 -3 xml-fop/src/org/apache/fop/fo/flow/Attic/FoBasicLink.java Index: FoBasicLink.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Attic/FoBasicLink.java,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -u -r1.1.2.8 -r1.1.2.9 --- FoBasicLink.java 21 Nov 2002 10:29:59 - 1.1.2.8 +++ FoBasicLink.java 29 Nov 2002 16:19:50 - 1.1.2.9 @@ -113,7 +113,6 @@ { super(foTree, FObjectNames.BASIC_LINK, parent, event, stateFlags, sparsePropsMap, sparseIndices); -xmlevents = foTree.getXmlevents(); FoXMLEvent ev = null; do { try { 1.1.2.9 +2 -3 xml-fop/src/org/apache/fop/fo/flow/Attic/FoBidiOverride.java Index: FoBidiOverride.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Attic/FoBidiOverride.java,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -u -r1.1.2.8 -r1.1.2.9 --- FoBidiOverride.java 21 Nov 2002 10:34:37 - 1.1.2.8 +++ FoBidiOverride.java 29 Nov 2002 16:19:50 - 1.1.2.9 @@ -100,7 +100,6 @@ { super(foTree, FObjectNames.BIDI_OVERRIDE, parent, event, stateFlags, sparsePropsMap, sparseIndices); -xmlevents = foTree.getXmlevents(); FoXMLEvent ev = null; do { try { 1.1.2.9 +2 -3 xml-fop/src/org/apache/fop/fo/flow/Attic/FoBlockContainer.java Index: FoBlockContainer.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Attic/FoBlockContainer.java,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -u -r1.1.2.8 -r1.1.2.9 --- FoBlockContainer.java 21 Nov 2002 10:45:08 - 1.1.2.8 +++ FoBlockContainer.java 29 Nov 2002 16:19:50 - 1.1.2.9 @@ -116,7 +116,6 @@ // absolutely positioned areas. They are not allowed as descendents // of fo:title, fo:float or fo:footnote. They are not allowed to // have any fo:marker children. -xmlevents = foTree.getXmlevents(); FoXMLEvent ev = null; try { // Get at least one %block; 1.1.2.9 +2 -3 xml-fop/src/org/apache/fop/fo/flow/Attic/FoBlock.java Index: FoBlock.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Attic/FoBlock.java,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -u -r1.1.2.8 -r1.1.2.9 --- FoBlock.java 21 Nov 2002 10:49:11 - 1.1.2.8 +++ FoBlock.java 29 Nov 2002 16:19:50 - 1.1.2.9 @@ -125,7 +125,6 @@ { super(foTree, FObjectNames.BLOCK, parent, event, stateFlags, sparsePropsMap, sparseIndices); -xmlevents = foTree.getXmlevents(); FoXMLEvent ev = null; do { try { 1.1.2.8 +2 -3 xml-fop/src/org/apache/fop/fo/flow/Attic/FoFloat.java Index: FoFloat.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Attic/FoFloat.java,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -u -r1.1.2.7 -r1.1.2.8 --- FoFloat.java 21 Nov 2002 10:53:08 - 1.1.2.7 +++ FoFloat.java 29 Nov 2002 16:19:50 - 1.1.2.8 @@ -89,7 +89,6 @@ { super(foTree, FObjectNames.FLOAT, parent, event, stateFlags, sparsePropsMap, sparseIndices); -xmlevents = foTree.getXmlevents(); FoXMLEvent ev = null; if ((stateFlags
cvs commit: xml-fop/src/org/apache/fop/fo/flow FoListItem.java
pbwest 2002/11/29 08:23:28 Modified:src/org/apache/fop/fo/flow Tag: FOP_0-20-0_Alt-Design FoListItem.java Log: Fixed bad test conditions. Removed redundant getXmlevents() call. Revision ChangesPath No revision No revision 1.1.2.9 +4 -5 xml-fop/src/org/apache/fop/fo/flow/Attic/FoListItem.java Index: FoListItem.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Attic/FoListItem.java,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -u -r1.1.2.8 -r1.1.2.9 --- FoListItem.java 23 Nov 2002 14:25:37 - 1.1.2.8 +++ FoListItem.java 29 Nov 2002 16:23:28 - 1.1.2.9 @@ -106,7 +106,6 @@ super(foTree, FObjectNames.LIST_ITEM, parent, event, stateFlags, sparsePropsMap, sparseIndices); FoXMLEvent ev; -xmlevents = foTree.getXmlevents(); // Look for zero or more markers String nowProcessing = marker; try { @@ -122,7 +121,7 @@ nowProcessing = list-item-label; if ((ev = xmlevents.expectStartElement (FObjectNames.LIST_ITEM_LABEL, XMLEvent.DISCARD_W_SPACE)) - != null) + == null) throw new FOPException (No list-item-label in list-item.); new FoListItemLabel(getFOTree(), this, ev, stateFlags); @@ -132,7 +131,7 @@ nowProcessing = list-item-body; if ((ev = xmlevents.expectStartElement (FObjectNames.LIST_ITEM_BODY, XMLEvent.DISCARD_W_SPACE)) - != null) + == null) throw new FOPException (No list-item-body in list-item.); new FoListItemBody(getFOTree(), this, ev, stateFlags); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo/properties TextDecoration.java
pbwest 2002/11/29 08:30:17 Modified:src/org/apache/fop/fo/properties Tag: FOP_0-20-0_Alt-Design TextDecoration.java Log: Add getAlternativeIndex(). Revision ChangesPath No revision No revision 1.1.2.5 +7 -6 xml-fop/src/org/apache/fop/fo/properties/Attic/TextDecoration.java Index: TextDecoration.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/properties/Attic/TextDecoration.java,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- TextDecoration.java 31 Oct 2002 02:55:11 - 1.1.2.4 +++ TextDecoration.java 29 Nov 2002 16:30:17 - 1.1.2.5 @@ -56,6 +56,12 @@ ,BLINK }; +private int getAlternativeIndex(String alt) throws PropertyException { +for (int i = 1; i alternatives.length; i++) +if (alt.equals(alternatives[i])) return i; +throw new PropertyException(Invalid text decoration: + alt); +} + public PropertyValue refineParsing (int propindex, FONode foNode, PropertyValue list) throws PropertyException @@ -93,12 +99,7 @@ str2 = str.substring(3); negate = true; } -try { -i = getEnumIndex(str2); -} catch (PropertyException e) { -throw new PropertyException -(text-decoration: unknown value + str); -} +i = getAlternativeIndex(str2); if (negate) offMask |= decorations[i]; else onMask |= decorations[i]; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo/properties ColorCommon.java
pbwest 2002/11/29 08:46:21 Modified:src/org/apache/fop/fo/properties Tag: FOP_0-20-0_Alt-Design ColorCommon.java Log: Added refineParsing() and getColor() methods. Corrected spelling of fuchsia. Revision ChangesPath No revision No revision 1.1.2.2 +118 -1xml-fop/src/org/apache/fop/fo/properties/Attic/ColorCommon.java Index: ColorCommon.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/properties/Attic/ColorCommon.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- ColorCommon.java 19 Oct 2002 03:40:07 - 1.1.2.1 +++ ColorCommon.java 29 Nov 2002 16:46:21 - 1.1.2.2 @@ -1,9 +1,16 @@ package org.apache.fop.fo.properties; +import org.apache.fop.fo.PropNames; +import org.apache.fop.fo.FONode; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.fo.properties.Property; +import org.apache.fop.datatypes.PropertyValue; +import org.apache.fop.datatypes.ColorType; +import org.apache.fop.datatypes.EnumType; +import org.apache.fop.datatypes.NCName; import org.apache.fop.datastructs.ROStringArray; import org.apache.fop.datatypes.Ints; +import org.apache.fop.messaging.MessageHandler; /** * Pseudo-property class for common color values occurring in a @@ -33,7 +40,7 @@ ,aqua ,black ,blue - ,fuschia + ,fuchsia ,gray ,green ,lime @@ -48,6 +55,116 @@ ,yellow ,transparent }; + +/** + * Return the ColorType derived from the argument. + * The argument must be either a ColorType already, in which case + * it is returned unchanged, or an NCName whose string value is a + * standard color or 'transparent'. + * @param value ttPropertyValue/tt + * @return ttColorValue/tt equivalent of the argument + * @exception ttPropertyException/tt + */ +protected static ColorType getColor(PropertyValue value) +throws PropertyException +{ +int property = value.getProperty(); +int type = value.getType(); +if (type == PropertyValue.COLOR_TYPE) return (ColorType)value; +// Must be a color enum +if (type != PropertyValue.NCNAME) +throw new PropertyException +(value.getClass().getName() + instead of color for ++ PropNames.getPropertyName(property)); +// We have an NCName - hope it''s a color +NCName ncname = (NCName)value; +// Must be a standard color +EnumType enum = null; +ColorType color = null; +String name = ncname.getNCName(); +try { +try { +enum = new EnumType(property, name); +} catch (PropertyException e) { +System.out.println(PropertyException: + e.getMessage()); +MessageHandler.logln(name + + is not a standard color for ' ++ PropNames.getPropertyName(property) + + '. Trying as a system-color.); +} +if (enum != null) +color = new ColorType(property, enum.getEnumValue()); +else +color = new ColorType(property, name); +} catch (PropertyException e) { +throw new PropertyException +(name + not a standard or system color for ++ PropNames.getPropertyName(property)); +} +return color; +} + +/** + * 'value' is a PropertyValue. + * + * It must contain + * either + * a ColorType value + * a NCName containing a standard color name or 'transparent' + * a FromParent value, + * a FromNearestSpecified value, + * or an Inherit value. + * + * @param propindex - the ttint/tt property index. + * @param foNode - the ttFONode/tt being built + * @param value ttPropertyValue/tt returned by the parser + * @return ttPropertyValue/tt the refined value + */ +public PropertyValue refineParsing +(int propindex, FONode foNode, PropertyValue value) +throws PropertyException +{ +return refineParsing(propindex, foNode, value, NOT_NESTED); +} + +/** + * Do the work for the three argument refineParsing method. + * @param propindex - the ttint/tt property index. + * @param foNode - the ttFONode/tt being built + * @param value ttPropertyValue/tt returned by the parser + * @param nested ttboolean/tt indicating whether this method is
cvs commit: xml-fop/src/org/apache/fop/fo/pagination FoLayoutMasterSet.java FoPageSequenceMaster.java FoSimplePageMaster.java
pbwest 2002/11/29 09:11:54 Modified:src/org/apache/fop/fo/pagination Tag: FOP_0-20-0_Alt-Design FoLayoutMasterSet.java FoPageSequenceMaster.java FoSimplePageMaster.java Log: Added surrenderEvent() calls. Revision ChangesPath No revision No revision 1.1.2.17 +4 -6 xml-fop/src/org/apache/fop/fo/pagination/Attic/FoLayoutMasterSet.java Index: FoLayoutMasterSet.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/Attic/FoLayoutMasterSet.java,v retrieving revision 1.1.2.16 retrieving revision 1.1.2.17 diff -u -r1.1.2.16 -r1.1.2.17 --- FoLayoutMasterSet.java21 Nov 2002 08:11:50 - 1.1.2.16 +++ FoLayoutMasterSet.java29 Nov 2002 17:11:54 - 1.1.2.17 @@ -108,9 +108,6 @@ setupPageMasters(event); // No need to clean up the build tree, because the whole subtree // will be deleted. -// This is problematical: while Node is obliged to belong to a Tree, -// any remaining references to elements of the subtree will keep the -// whole subtree from being GCed. makeSparsePropsSet(); } @@ -176,6 +173,7 @@ (Aargh! expectStartElement(events, list)); // Flush the master event xmlevents.getEndElement(ev); +pool.surrenderEvent(ev); } while (true); } catch (NoSuchElementException e) { // Unexpected end of file 1.1.2.15 +4 -2 xml-fop/src/org/apache/fop/fo/pagination/Attic/FoPageSequenceMaster.java Index: FoPageSequenceMaster.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/Attic/FoPageSequenceMaster.java,v retrieving revision 1.1.2.14 retrieving revision 1.1.2.15 diff -u -r1.1.2.14 -r1.1.2.15 --- FoPageSequenceMaster.java 13 Nov 2002 04:15:19 - 1.1.2.14 +++ FoPageSequenceMaster.java 29 Nov 2002 17:11:54 - 1.1.2.15 @@ -215,6 +215,7 @@ throw new FOPException (Aargh! expectStartElement(events, list)); xmlevents.getEndElement(ev); +pool.surrenderEvent(ev); } while (true); } catch (NoSuchElementException e) { throw new FOPException(Unexpected EOF in page-sequence-master.); @@ -304,6 +305,7 @@ //(Found conditional-page-master-reference); new FoConditionalPageMasterReference(foTree, this, ev); this.xmlevents.getEndElement(ev); +this.pool.surrenderEvent(ev); } while (true); } catch (NoSuchElementException e) { // End of file reached 1.1.2.12 +7 -2 xml-fop/src/org/apache/fop/fo/pagination/Attic/FoSimplePageMaster.java Index: FoSimplePageMaster.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/Attic/FoSimplePageMaster.java,v retrieving revision 1.1.2.11 retrieving revision 1.1.2.12 diff -u -r1.1.2.11 -r1.1.2.12 --- FoSimplePageMaster.java 13 Nov 2002 04:15:19 - 1.1.2.11 +++ FoSimplePageMaster.java 29 Nov 2002 17:11:54 - 1.1.2.12 @@ -104,6 +104,7 @@ // Process region-body regionBody = new FoRegionBody(foTree, this, regionEv); xmlevents.getEndElement(regionEv); +pool.surrenderEvent(regionEv); // Remaining regions are optional if ((regionEv = xmlevents.expectStartElement @@ -112,6 +113,7 @@ { regionBefore = new FoRegionBefore(foTree, this, regionEv); xmlevents.getEndElement(regionEv); +pool.surrenderEvent(regionEv); } if ((regionEv = xmlevents.expectStartElement @@ -120,6 +122,7 @@ { regionAfter = new FoRegionAfter(foTree, this, regionEv); xmlevents.getEndElement(regionEv); +pool.surrenderEvent(regionEv); } if ((regionEv = xmlevents.expectStartElement @@ -128,6 +131,7 @@ { regionStart = new FoRegionStart(foTree, this, regionEv); xmlevents.getEndElement(regionEv); +pool.surrenderEvent(regionEv); } if ((regionEv = xmlevents.expectStartElement @@ -136,6 +140,7 @@ { regionEnd = new FoRegionEnd(foTree, this, regionEv); xmlevents.getEndElement(regionEv); +pool.surrenderEvent(regionEv); } // Clean up the build environment
cvs commit: xml-fop/src/org/apache/fop/xml XMLNamespaces.java
pbwest 2002/11/29 09:24:05 Modified:src/org/apache/fop/xml Tag: FOP_0-20-0_Alt-Design XMLNamespaces.java Log: Added sequence, seqMask and getSequence(). Revision ChangesPath No revision No revision 1.1.2.3 +28 -3 xml-fop/src/org/apache/fop/xml/Attic/XMLNamespaces.java Index: XMLNamespaces.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/xml/Attic/XMLNamespaces.java,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- XMLNamespaces.java3 Oct 2002 03:27:29 - 1.1.2.2 +++ XMLNamespaces.java29 Nov 2002 17:24:05 - 1.1.2.3 @@ -67,6 +67,31 @@ */ private ArrayList uris; +/** + * A sequence object for use by ttXMLEvent/tts. Because an + * ttXMLEvent/tt object must always be associated with an + * iXMLNamespace/i object, this namespace object will act as a + * singleton for ttXMLEvent/tts. This field provides a + * counter for those objects. The range of values which may be + * assigned to isequence/i is restricted by iseqMask/i. + */ +private int sequence = 0; + +/** Mask to restrict the range of values within which isequence/i + * may cycle. + */ +public final int seqMask = (1 20) - 1; + +/** + * The access function for the sequence. + * @return the next positive sequence number. This number may wrap + * but is guaranteed to be within the range seqMask = sequence = 0. + */ +public int getSequence() { +sequence = ++sequence seqMask; +return sequence; +} + public XMLNamespaces() { uriIndices = new HashMap(4); uris = new ArrayList(4); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/xml XMLEventPool.java
pbwest 2002/11/29 09:27:02 Modified:src/org/apache/fop/xml Tag: FOP_0-20-0_Alt-Design XMLEventPool.java Log: Made some fields final. Added BitSet eventSet for clash detection. Used eventSet in acquire and surrender. Revision ChangesPath No revision No revision 1.1.2.3 +32 -7 xml-fop/src/org/apache/fop/xml/Attic/XMLEventPool.java Index: XMLEventPool.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/xml/Attic/XMLEventPool.java,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- XMLEventPool.java 27 Nov 2002 03:27:11 - 1.1.2.2 +++ XMLEventPool.java 29 Nov 2002 17:27:02 - 1.1.2.3 @@ -2,8 +2,10 @@ import org.apache.fop.apps.FOPException; import org.apache.fop.xml.XMLEvent; +import org.apache.fop.messaging.MessageHandler; import java.util.ArrayList; +import java.util.BitSet; /* * $Id$ @@ -23,21 +25,33 @@ private static final String revision = $Revision$; /** Required argument for constructing new ttXMLEvent/tts. */ -protected XMLNamespaces namespaces; +protected final XMLNamespaces namespaces; /** The pool realized as a ArrayList. */ -protected ArrayList pool; +protected final ArrayList pool; /** The number of events in the list. */ protected int poolSize = 0; /** The maximum number of events in the list. */ protected int maxPoolSize = 0; /** + * Set of currently pooled events. The size of this set is limited by + * the range of values that the ttXMLEvent/tt iid/i field can + * assume. This, in turn, is limited by to the range of values returned + * by the ttXMLNamespaces/tt igetSequence()/i method. + * If there is a signficant disparity between the frequency of + * pool acquire and surrender invocations, an id clash may arise in + * the current set. + */ +protected final BitSet eventSet; + +/** * The one-argument constructor requires inamespaces/i. * @param namespaces - an ttXMLNamespaces/tt object. */ public XMLEventPool(XMLNamespaces namespaces) { this.namespaces = namespaces; pool = new ArrayList(); +eventSet = new BitSet(); } /** @@ -48,6 +62,7 @@ public XMLEventPool(XMLNamespaces namespaces, int initialSize) { this.namespaces = namespaces; pool = new ArrayList(initialSize); +eventSet = new BitSet(initialSize); } /** @@ -57,7 +72,9 @@ public synchronized XMLEvent acquireXMLEvent() { if (poolSize == 0) return new XMLEvent(namespaces); -return ((XMLEvent)(pool.get(--poolSize))).clear(); +XMLEvent ev = ((XMLEvent)(pool.get(--poolSize))).clear(); +eventSet.clear(ev.id); +return ev; } /** @@ -65,7 +82,15 @@ * @param ev - the event being returned. */ public synchronized void surrenderEvent(XMLEvent ev) { -if (maxPoolSize poolSize) +System.out.println(surrenderEvent + ev.id + poolSize + poolSize); +if (ev == null) return; +if (eventSet.get(ev.id)) { +MessageHandler.logln +(Event clash in XMLEvent pool. Id + ev.id); +return; +} +eventSet.set(ev.id); +if (pool.size() poolSize) pool.set(poolSize++, ev); else { pool.add(ev); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/xml FoXMLEventPool.java
pbwest 2002/11/29 09:29:10 Modified:src/org/apache/fop/xml Tag: FOP_0-20-0_Alt-Design FoXMLEventPool.java Log: Modified acquireFoXMLEvent(). Revision ChangesPath No revision No revision 1.1.2.3 +7 -4 xml-fop/src/org/apache/fop/xml/Attic/FoXMLEventPool.java Index: FoXMLEventPool.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/xml/Attic/FoXMLEventPool.java,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- FoXMLEventPool.java 27 Nov 2002 03:31:16 - 1.1.2.2 +++ FoXMLEventPool.java 29 Nov 2002 17:29:10 - 1.1.2.3 @@ -45,8 +45,11 @@ * @return an ttFoXMLEvent/tt. */ public synchronized FoXMLEvent acquireFoXMLEvent() { -FoXMLEvent ev = (FoXMLEvent)(acquireXMLEvent()); +if (poolSize == 0) +return new FoXMLEvent(namespaces); +FoXMLEvent ev = ((FoXMLEvent)(pool.get(--poolSize))).clearFo(); ev.setFoType(FObjectNames.NO_FO); +eventSet.clear(ev.id); return ev; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/xml FoXMLSerialHandler.java
pbwest 2002/11/29 09:31:46 Modified:src/org/apache/fop/xml Tag: FOP_0-20-0_Alt-Design FoXMLSerialHandler.java Log: Use pool.acquireFoXMLEvent(). Revision ChangesPath No revision No revision 1.1.2.4 +10 -8 xml-fop/src/org/apache/fop/xml/Attic/FoXMLSerialHandler.java Index: FoXMLSerialHandler.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/xml/Attic/FoXMLSerialHandler.java,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- FoXMLSerialHandler.java 23 Nov 2002 14:42:05 - 1.1.2.3 +++ FoXMLSerialHandler.java 29 Nov 2002 17:31:46 - 1.1.2.4 @@ -108,7 +108,7 @@ */ public void startDocument() throws NoSuchElementException { synchronized (events) { -FoXMLEvent event = new FoXMLEvent(namespaces); +FoXMLEvent event = pool.acquireFoXMLEvent(); //System.out.println(StartDocument thread // + Thread.currentThread().getName()); event.type = XMLEvent.STARTDOCUMENT; @@ -122,7 +122,7 @@ */ public void endDocument() throws NoSuchElementException { synchronized (events) { -FoXMLEvent event = new FoXMLEvent(namespaces); +FoXMLEvent event = pool.acquireFoXMLEvent(); //System.out.println(EndDocument thread //+ Thread.currentThread().getName()); event.type = XMLEvent.ENDDOCUMENT; @@ -145,7 +145,8 @@ throws NoSuchElementException { synchronized (events) { -FoXMLEvent event = new FoXMLEvent(namespaces); +FoXMLEvent event = pool.acquireFoXMLEvent(); +//System.out.println(startElement: acquired + event.id); //System.out.println(StartElement thread // + Thread.currentThread().getName()); event.type = XMLEvent.STARTELEMENT; @@ -175,7 +176,8 @@ throws NoSuchElementException { synchronized (events) { -FoXMLEvent event = new FoXMLEvent(namespaces); +FoXMLEvent event = pool.acquireFoXMLEvent(); +//System.out.println(endElement: acquired + event.id); //System.out.println(EndElement thread //+ Thread.currentThread().getName()); event.type = XMLEvent.ENDELEMENT; @@ -202,7 +204,7 @@ throws NoSuchElementException { synchronized (events) { -FoXMLEvent event = new FoXMLEvent(namespaces); +FoXMLEvent event = pool.acquireFoXMLEvent(); //System.out.println(characters thread // + Thread.currentThread().getName()); event.type = XMLEvent.CHARACTERS; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/xml SyncedFoXmlEventsBuffer.java
pbwest 2002/11/29 09:33:51 Modified:src/org/apache/fop/xml Tag: FOP_0-20-0_Alt-Design SyncedFoXmlEventsBuffer.java Log: Set pool. Use surrenderEvent(). Revision ChangesPath No revision No revision 1.1.2.6 +23 -10 xml-fop/src/org/apache/fop/xml/Attic/SyncedFoXmlEventsBuffer.java Index: SyncedFoXmlEventsBuffer.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/xml/Attic/SyncedFoXmlEventsBuffer.java,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -r1.1.2.5 -r1.1.2.6 --- SyncedFoXmlEventsBuffer.java 23 Nov 2002 14:42:05 - 1.1.2.5 +++ SyncedFoXmlEventsBuffer.java 29 Nov 2002 17:33:51 - 1.1.2.6 @@ -50,7 +50,7 @@ { super(); namespaces = new XMLNamespaces(); -pool = new FoXMLEventPool(namespaces); +pool = new FoXMLEventPool(namespaces, DEFAULTBUFSIZE); } /** @@ -160,6 +160,7 @@ ! (ev.type == eventType ev.uriIndex == uriIndex ev.localName.equals(localName))) { +pool.surrenderEvent(ev); ev = getEvent(); } if (ev == null) @@ -185,6 +186,7 @@ FoXMLEvent ev = getEvent(); while (ev != null ! (ev.type == eventType ev.foType == foType)) { +pool.surrenderEvent(ev); ev = getEvent(); } if (ev == null) @@ -214,6 +216,7 @@ if (discardWhiteSpace) { while (ev != null ev.type == XMLEvent.CHARACTERS ev.chars.trim().equals()) { +pool.surrenderEvent(ev); ev = getEvent(); } } @@ -251,6 +254,7 @@ if (discardWhiteSpace) { while (ev != null ev.type == XMLEvent.CHARACTERS ev.chars.trim().equals()) { +pool.surrenderEvent(ev); ev = getEvent(); } } @@ -290,6 +294,7 @@ if (discardWhiteSpace) { while (ev != null ev.type == XMLEvent.CHARACTERS ev.chars.trim().equals()) { +pool.surrenderEvent(ev); ev = getEvent(); } } @@ -329,6 +334,7 @@ if (discardWhiteSpace) { while (ev != null ev.type == XMLEvent.CHARACTERS ev.chars.trim().equals()) { +pool.surrenderEvent(ev); ev = getEvent(); } } @@ -541,6 +547,7 @@ // getEvent() returns null, the expectStartElement() calls // return null. ev = getEvent(); +pool.surrenderEvent(ev); } while (ev != null); // Exit from this while loop is only by discovery of null event throw new NoSuchElementException @@ -618,6 +625,7 @@ // getEvent() returns null, the expectStartElement() calls // will throw a NoSuchElementException ev = getEvent(); +pool.surrenderEvent(ev); } while (ev != null); // Exit from this while loop is only by discovery of null event throw new NoSuchElementException @@ -678,6 +686,7 @@ // getEvent() returns null, the expectStartElement() calls // will throw a NoSuchElementException ev = getEvent(); +pool.surrenderEvent(ev); } while (ev != null); // Exit from this while loop is only by discovery of null event throw new NoSuchElementException @@ -736,6 +745,7 @@ // getEvent() returns null, the expectStartElement() calls // will throw a NoSuchElementException ev = getEvent(); +pool.surrenderEvent(ev); } while (ev != null); // Exit from this while loop is only by discovery of null event throw new NoSuchElementException @@ -788,15 +798,17 @@ FoXMLEvent ev; do { try { -ev = expectStartElement(set, discardWhiteSpace); -if (ev != null) return ev; -// The non-matching event has been pushed back. -// Get it and discard. Note that if the first attempt to -// getEvent() returns null, the expectStartElement() calls -// will throw a NoSuchElementException -ev = getEvent(); +ev = expectStartElement(set, discardWhiteSpace); +if (ev != null) return ev; +// The non-matching event has been pushed back. +// Get it and discard. Note that if the first attempt to +
cvs commit: xml-fop/src/org/apache/fop/xml XMLEvent.java
pbwest 2002/11/29 09:35:24 Modified:src/org/apache/fop/xml Tag: FOP_0-20-0_Alt-Design XMLEvent.java Log: Add id field. Revision ChangesPath No revision No revision 1.1.2.9 +16 -7 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.8 retrieving revision 1.1.2.9 diff -u -r1.1.2.8 -r1.1.2.9 --- XMLEvent.java 27 Nov 2002 03:25:18 - 1.1.2.8 +++ XMLEvent.java 29 Nov 2002 17:35:24 - 1.1.2.9 @@ -67,6 +67,9 @@ protected AttributesImpl attributes; protected XMLNamespaces namespaces; +/** Sequence id for this iXMLEvent/i. */ +public final int id; + /** * The one-argument constructor uses the default initialization values: * NOEVENT for the event itype/i, and null references for all others @@ -74,6 +77,7 @@ */ public XMLEvent (XMLNamespaces namespaces) { this.namespaces = namespaces; +id = namespaces.getSequence(); } /** @@ -84,13 +88,14 @@ String localName, String qName, AttributesImpl attributes, XMLNamespaces namespaces) { +this.namespaces = namespaces; +id = namespaces.getSequence(); this.type = type; this.chars = chars; this.uriIndex = uriIndex; this.localName = localName; this.qName = qName; this.attributes = attributes; -this.namespaces = namespaces; } /** @@ -98,24 +103,26 @@ * ttXMLEvent/tt object. */ public XMLEvent(XMLEvent ev) { +namespaces = ev.namespaces; +id = namespaces.getSequence(); type = ev.type; chars = ev.chars; uriIndex = ev.uriIndex; localName = ev.localName; qName = ev.qName; attributes = ev.attributes; -namespaces = ev.namespaces; } public XMLEvent(int type, String chars, XMLNamespaces namespaces) { +this.namespaces = namespaces; +id = namespaces.getSequence(); this.type = type; this.chars = chars; -this.namespaces = namespaces; } /** * Clear the fields of this event. Provided for pool operations. - * The inamespaces/i field is not cleared. + * Neither the inamespaces/i nor the iid/i field is cleared. * @return the cleared event. */ public XMLEvent clear() { @@ -225,6 +232,8 @@ public String toString() { String tstr; tstr = eventTypeName(type); +tstr = tstr + \nSeq + id; +tstr = tstr + \nNamespaces + namespaces.hashCode(); tstr = tstr + \nURI + uriIndex + + namespaces.getIndexURI(uriIndex); tstr = tstr + \n + Local Name + localName; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: docs for maintenance release
Peter B. West wrote: Victor Mote wrote: Christian Geisert wrote: for the documentation for the maintenance release I think the best thing is to copy src/documentation over from trunk and then add a simple exec command=forrest to build.xml Comments? I had a thought left over from our discussion of branching a few weeks ago that might help here. I convinced myself at the time that, when checking out the maintenance branch, using the -f option on a checkout would get the trunk version of any files that aren't on the maintenance branch. I am headed out the door or I would try it right now. I suppose that it is possible that doing so would also check out some files that would break the build or override something that we don't want overridden, but I think it would be worth a try. It should do. However, you will still have to 'cvs add' and 'cvs commit' them on the maintenance branch. Another possibility. especially for directories are not going to be merged back into the HEAD and whose content is largely the same, is to merge them out from HEAD into maint. Actually, there is no need for this. All we want here is a way to get the documentation built for the maintenance release. However, even if we wanted to use this on a regular basis in the maintenance branch, there is no need to branch these files -- they essentially are shared between the trunk and the maintenance branch. Victor Mote - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
DO NOT REPLY [Bug 4511] - Underlining not applied to end of hyphenated line
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=4511. 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=4511 Underlining not applied to end of hyphenated line [EMAIL PROTECTED] changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2002-11-29 21:10 --- Should be fixed in CVS. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
DO NOT REPLY [Bug 14962] - Bug in ID Generation
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=14962. 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=14962 Bug in ID Generation --- Additional Comments From [EMAIL PROTECTED] 2002-11-29 22:00 --- Provide an example fo document, please. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Problems with examples
W. Eliot Kimber wrote: strictly. But it probably should issue a warning, at least. I'll submit that on the XEP support list. RenderX reports that this change will be in the next maintenance release of XEP. btw, apart from mandatory first region-body there is also region-before?, region-after?, region-start?, region-end? ordered sequence. Are they planning to validate it also? -- Oleg Tkachenko eXperanto team Multiconn Technologies, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
DO NOT REPLY [Bug 4511] - Underlining not applied to end of hyphenated line
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=4511. 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=4511 Underlining not applied to end of hyphenated line --- Additional Comments From [EMAIL PROTECTED] 2002-11-29 22:21 --- Right, Joerg (glad to see you again). Attached test case works fine using fop0.20.5cvs. Phil, verify it please. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
cvs commit: xml-fop/docs/examples/tables background.fo borders.fo break.fo headfoot.fo keep.fo omit.fo space.fo widowsorphans.fo
olegt 2002/11/29 16:27:56 Modified:docs/examples/fo Tag: fop-0_20_2-maintain bordershorthand.fo character.fo contlabel.fo corresprop.fo fonts.fo hyphen.fo inhprop.fo link.fo list.fo normal.fo normalex.fo pdfoutline.fo readme.fo simple.fo table.fo textdeko.fo docs/examples/markers Tag: fop-0_20_2-maintain hide.fo docs/examples/pagination Tag: fop-0_20_2-maintain basic1.fo basic2.fo docs/examples/svg Tag: fop-0_20_2-maintain embedding.fo external.fo docs/examples/tables Tag: fop-0_20_2-maintain background.fo borders.fo break.fo headfoot.fo keep.fo omit.fo space.fo widowsorphans.fo Log: Fixed overlaping regions. Revision ChangesPath No revision No revision 1.1.2.2 +2 -2 xml-fop/docs/examples/fo/bordershorthand.fo Index: bordershorthand.fo === RCS file: /home/cvs/xml-fop/docs/examples/fo/bordershorthand.fo,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- bordershorthand.fo6 Dec 2001 21:28:18 - 1.1.2.1 +++ bordershorthand.fo30 Nov 2002 00:27:53 - 1.1.2.2 @@ -28,7 +28,7 @@ margin-bottom=2cm margin-left=2.0cm + 0.5cm margin-right=(5cm * 1cm) div 2cm - fo:region-body margin-top=3cm/ + fo:region-body margin-top=3cm margin-bottom=1.5cm/ fo:region-before extent=3cm/ fo:region-after extent=1.5cm/ /fo:simple-page-master @@ -41,7 +41,7 @@ margin-bottom=round(2.4) * 1cm margin-left=2.5 * 1cm margin-right=5.5cm - 3cm - fo:region-body margin-top=2.5cm/ + fo:region-body margin-top=2.5cm margin-bottom=1.5cm/ fo:region-before extent=2.5cm/ fo:region-after extent=1.5cm/ /fo:simple-page-master 1.1.4.2 +1 -1 xml-fop/docs/examples/fo/character.fo Index: character.fo === RCS file: /home/cvs/xml-fop/docs/examples/fo/character.fo,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -u -r1.1.4.1 -r1.1.4.2 --- character.fo 6 Dec 2001 21:28:18 - 1.1.4.1 +++ character.fo 30 Nov 2002 00:27:53 - 1.1.4.2 @@ -25,7 +25,7 @@ margin-bottom=2cm margin-left=2.5cm margin-right=2.5cm - fo:region-body margin-top=3cm/ + fo:region-body margin-top=3cm margin-bottom=1.5cm/ fo:region-before extent=3cm/ fo:region-after extent=1.5cm/ /fo:simple-page-master 1.1.2.2 +1 -1 xml-fop/docs/examples/fo/Attic/contlabel.fo Index: contlabel.fo === RCS file: /home/cvs/xml-fop/docs/examples/fo/Attic/contlabel.fo,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- contlabel.fo 24 Nov 2002 22:22:47 - 1.1.2.1 +++ contlabel.fo 30 Nov 2002 00:27:53 - 1.1.2.2 @@ -10,8 +10,8 @@ page-width=21cm page-height=29.7cm master-name=first - fo:region-before extent=1cm/ fo:region-body margin-top=2cm margin-bottom=1.5cm/ + fo:region-before extent=1cm/ fo:region-after extent=1.0cm/ /fo:simple-page-master /fo:layout-master-set 1.1.4.2 +2 -2 xml-fop/docs/examples/fo/corresprop.fo Index: corresprop.fo === RCS file: /home/cvs/xml-fop/docs/examples/fo/corresprop.fo,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -u -r1.1.4.1 -r1.1.4.2 --- corresprop.fo 6 Dec 2001 21:28:18 - 1.1.4.1 +++ corresprop.fo 30 Nov 2002 00:27:53 - 1.1.4.2 @@ -28,7 +28,7 @@ margin-bottom=2cm margin-left=2.0cm + 0.5cm margin-right=(5cm * 1cm) div 2cm - fo:region-body margin-top=3cm/ + fo:region-body margin-top=3cm margin-bottom=1.5cm/ fo:region-before extent=3cm/ fo:region-after extent=1.5cm/ /fo:simple-page-master @@ -41,7 +41,7 @@ margin-bottom=round(2.4) * 1cm margin-left=2.5 * 1cm margin-right=5.5cm - 3cm - fo:region-body margin-top=2.5cm/ + fo:region-body margin-top=2.5cm margin-bottom=1.5cm/ fo:region-before extent=2.5cm/ fo:region-after extent=1.5cm/ /fo:simple-page-master 1.7.4.4
DO NOT REPLY [Bug 8815] - Irritating overlapping regions in examples
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=8815. 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=8815 Irritating overlapping regions in examples [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2002-11-30 00:30 --- Fixed in cvs. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
DO NOT REPLY [Bug 14962] - Bug in ID Generation
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=14962. 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=14962 Bug in ID Generation --- Additional Comments From [EMAIL PROTECTED] 2002-11-30 06:37 --- Created an attachment (id=3993) FOP Complains although there is no duplicate id - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]