DO NOT REPLY [Bug 26187] New: - pdf created is wrong (some text is overwritten)
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=26187. 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=26187 pdf created is wrong (some text is overwritten) Summary: pdf created is wrong (some text is overwritten) Product: Fop Version: 0.20.4 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Blocker Priority: Other Component: pdf renderer AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I use fop.bat to convert fo file to pdf file. It display bad format to the fo file below. But If I change the order of last 2 block elements, It can create pdf in good format. I think It must FOP error. I used fop 0.20.4 and 0.20.5 in win2k. They have the same result. Thanks. /***fo file/ ?xml version=1.0 encoding=gb2312? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master margin-right=0.25in margin-left=0.25in margin-bottom=0.25in margin- top=0.25in page-width=10in page-height=11in master-name=first fo:region-body background-color=#ff/ fo:region-before/ /fo:simple-page-master fo:simple-page-master margin-right=0.25in margin-left=0.25in margin-bottom=0.25in margin- top=0.25in page-width=10in page-height=11in master-name=rest fo:region-body background-color=#ff/ fo:region-before/ /fo:simple-page-master fo:page-sequence-master master-name=psmDW fo:repeatable-page-master-alternatives fo:conditional-page-master-reference master-reference=first page-position=first / fo:conditional-page-master-reference master-reference=rest page-position=rest / !-- recommended fallback procedure -- fo:conditional-page-master-reference master-reference=rest / /fo:repeatable-page-master-alternatives /fo:page-sequence-master /fo:layout-master-set fo:page-sequence master-reference=psmDW fo:static-content flow-name=xsl-region-before /fo:static-content fo:flow flow-name=xsl-region-body fo:block-container background-color=transparent border-style=none position=absolute left=5.553in top=1.083in width=1.937in height=0.146in fo:block background-color=transparent color=#00 font-size=8pt font- family=Cyberbit font-style=normal font-weight=normal text- decoration=none text-align=left/fo:block /fo:block-container fo:block-container background-color=transparent border-style=none position=absolute left=3.896in top=1.083in width=0.980in height=0.146in fo:block background-color=transparent color=#00 font-size=8pt font- family=Cyberbit font-style=normal font-weight=normal text- decoration=none text-align=right/fo:block /fo:block-container fo:block-container background-color=transparent border-style=none position=absolute left=4.926in top=1.083in width=0.551in height=0.146in fo:block background-color=transparent color=#00 font-size=8pt font- family=Cyberbit font-style=normal font-weight=normal text- decoration=none text-align=right/fo:block /fo:block-container fo:block-container background-color=transparent border-style=none position=absolute left=5.553in top=0.927in width=1.937in height=0.146in fo:block background-color=transparent color=#00 font-size=8pt font- family=Cyberbit font-style=normal font-weight=normal text- decoration=none text-align=left/fo:block /fo:block-container fo:block-container background-color=transparent border-style=none position=absolute left=3.896in top=0.927in width=0.980in height=0.146in fo:block background-color=transparent color=#00 font-size=8pt font- family=Cyberbit font-style=normal font-weight=normal text- decoration=none text-align=right/fo:block /fo:block-container fo:block-container background-color=transparent border-style=none position=absolute left=4.926in top=0.927in width=0.551in height=0.146in fo:block background-color=transparent color=#00 font-size=8pt font- family=Cyberbit font-style=normal font-weight=normal text- decoration=none text-align=right/fo:block /fo:block-container fo:block-container background-color=transparent border-style=none position=absolute left=5.553in top=1.240in width=1.937in height=0.146in fo:block background-color=transparent color=#00 font-size=8pt font- family=Cyberbit font-style=normal font-weight=normal text- decoration=none text-align=left/fo:block /fo:block-container fo:block-container background-color=transparent border-style=none position=absolute left=3.896in top=1.240in width=0.980in height=0.146in fo:block background-color=transparent color=#00 font-size=8pt font- family=Cyberbit font-style=normal font-weight=normal text- decoration=none text-align=right/fo:block /fo:block-container fo:block-container background-color=transparent border-style=none position=absolute
cvs commit: xml-fop/src/java/org/apache/fop/datastructs SyncedCircularBuffer.java
pbwest 2004/01/16 07:24:25 Modified:src/java/org/apache/fop/datastructs Tag: FOP_0-20-0_Alt-Design SyncedCircularBuffer.java Log: Added boolean isExhausted to allow SyncedXmlEventsBuffer (which extends SyncedCircularBuffer) to implement the interface XmlEventSource. Revision ChangesPath No revision No revision 1.1.2.3 +16 -9 xml-fop/src/java/org/apache/fop/datastructs/Attic/SyncedCircularBuffer.java Index: SyncedCircularBuffer.java === RCS file: /home/cvs/xml-fop/src/java/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 5 Jan 2004 02:01:38 - 1.1.2.2 +++ SyncedCircularBuffer.java 16 Jan 2004 15:24:25 - 1.1.2.3 @@ -1,10 +1,4 @@ /* - * SyncedCircularBuffer.java - * $Id$ - * - * Created: Tue Nov 6 10:19:03 2001 - * - * * * The Apache Software License, Version 1.1 * @@ -53,8 +47,8 @@ * Software Foundation, please see http://www.apache.org/. * * - * @author a href=mailto:[EMAIL PROTECTED]Peter B. West/a - * @version $Revision$ $Name$ + * $Id$ + * Created: Tue Nov 6 10:19:03 2001 */ package org.apache.fop.datastructs; @@ -70,6 +64,9 @@ * bWarning/b: if the producer or consumer thread dies unexpectedly, * without interrupting the complementary thread's ttwait()/tt, that * process will hang on the ttwait()/tt. + * + * @author a href=mailto:[EMAIL PROTECTED]Peter B. West/a + * @version $Revision$ $Name$ */ public class SyncedCircularBuffer { @@ -234,7 +231,8 @@ /** * Notifies the consumer that the producer has terminated. - * The ttnotifyAll()/tt call allows for processing of the buffer before it fills. + * The ttnotifyAll()/tt call allows for processing of the buffer before + * it fills. */ public void producerExhausted() { synchronized (this) { @@ -244,6 +242,15 @@ notifyAll(); } } +} + +/** + * Is this source of XmlEvents exhausted? + * @return true if the last event from the input stream (END_DOCUMENT) + * has been processed, and the buffer is empty. + */ +public boolean isExhausted() { +return producerFinished isEmpty(); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/xml SyncedXmlEventsBuffer.java
pbwest 2004/01/16 07:32:58 Modified:src/java/org/apache/fop/xml Tag: FOP_0-20-0_Alt-Design SyncedXmlEventsBuffer.java Log: Implement XmlEventSource. Remove qName-based functions. Revision ChangesPath No revision No revision 1.1.2.4 +9 -171 xml-fop/src/java/org/apache/fop/xml/Attic/SyncedXmlEventsBuffer.java Index: SyncedXmlEventsBuffer.java === RCS file: /home/cvs/xml-fop/src/java/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.java15 Jan 2004 03:01:53 - 1.1.2.3 +++ SyncedXmlEventsBuffer.java16 Jan 2004 15:32:58 - 1.1.2.4 @@ -48,10 +48,6 @@ * on behalf of the Apache Software Foundation and was originally created by * James Tauber [EMAIL PROTECTED]. For more information on the Apache * Software Foundation, please see http://www.apache.org/. - * - * - * @author a href=mailto:[EMAIL PROTECTED]Peter B. West/a - * @version $Revision$ $Name$ */ package org.apache.fop.xml; @@ -67,9 +63,16 @@ /** * A synchronized circular buffer for XMLEvents. + * Extends SyncedCircularBuffer and implements XmlEventSource. + * * @see org.apache.fop.datastructs.SyncedCircularBuffer + * @see XmlEventSource + * @author a href=mailto:[EMAIL PROTECTED]Peter B. West/a + * @version $Revision$ $Name$ */ -public class SyncedXmlEventsBuffer extends SyncedCircularBuffer { +public class SyncedXmlEventsBuffer +extends SyncedCircularBuffer +implements XmlEventSource { /** * Constant for idiscardEvent/i field of @@ -310,46 +313,6 @@ /** * Return the next element if it is of the required type and has the - * required ttQName/tt. If the next - * element is not of the required type, push it back onto the buffer. - * @param eventType - the ttint/tt event type. - * @param qName a ttString/tt with the ttQName/tt of the - * required element. - * @param discardWhiteSpace - if true, discard any ttcharacters/tt - * events which contain only whitespace. - * @return an event of the required type. If the next - * event detected is not of the required type, ttnull/tt is returned. - * The erroneous event is pushed back. - * @exception FOPException if buffer errors or interrupts occur. - * @exception NoSuchElementException if the event is not found. - */ -/* -public XmlEvent expectSaxQNameEvent -(int eventType, String qName, boolean discardWhiteSpace) -throws FOPException -{ -XmlEvent ev = getEvent(); -if (discardWhiteSpace) { -while (ev != null ev.type == XmlEvent.CHARACTERS -ev.chars.trim().equals()) { -namespaces.surrenderEvent(ev); -ev = getEvent(); -} -} -if (ev != null ev.type == eventType ev.qName.equals(qName)) { -return ev; -} -if (ev == null) -throw new NoSuchElementException -(XmlEvent.eventTypeName(eventType) - + not found: end of buffer.); -pushBack(ev); -return null; -} -*/ - -/** - * Return the next element if it is of the required type and has the * required URI index and local name. If the next * element is not of the required type, push it back onto the buffer. * @param eventType - the ttint/tt event type. @@ -533,47 +496,6 @@ } /** - * Get the next STARTELEMENT event with the given ttQName/tt - * from the buffer. Discard any other events preceding the - * STARTELEMENT event. - * @param qName a ttString/tt with the ttQName/tt of the - * required STARTELEMENT - * @return a STARTELEMENT event - * @exception FOPException if buffer errors or interrupts occur - * @exception NoSuchElementException if the event is not found - */ -/* -public XmlEvent getStartElement(String qName) throws FOPException -{ -return getSaxQNameEvent(XmlEvent.STARTELEMENT, qName); -} -*/ - -/** - * Return the next element if it is a STARTELEMENT with the given - * ttQName/tt. If the next - * element is not of the required type, push it back onto the buffer. - * @param qName a ttString/tt with the ttQName/tt of the - * required STARTELEMENT - * @param discardWhiteSpace - if true, discard any ttcharacters/tt - * events which contain only whitespace. - * @return a STARTELEMENT event. If the next - * event
cvs commit: xml-fop/src/java/org/apache/fop/xml FoXmlSerialHandler.java
pbwest 2004/01/16 07:38:53 Modified:src/java/org/apache/fop/xml Tag: FOP_0-20-0_Alt-Design FoXmlSerialHandler.java Log: Remove debugging output. Revision ChangesPath No revision No revision 1.1.2.5 +9 -24 xml-fop/src/java/org/apache/fop/xml/Attic/FoXmlSerialHandler.java Index: FoXmlSerialHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/xml/Attic/FoXmlSerialHandler.java,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- FoXmlSerialHandler.java 15 Jan 2004 03:10:58 - 1.1.2.4 +++ FoXmlSerialHandler.java 16 Jan 2004 15:38:53 - 1.1.2.5 @@ -1,6 +1,4 @@ /* - * $Id$ - * * * The Apache Software License, Version 1.1 * @@ -47,10 +45,8 @@ * on behalf of the Apache Software Foundation and was originally created by * James Tauber [EMAIL PROTECTED]. For more information on the Apache * Software Foundation, please see http://www.apache.org/. - * - * - * @author a href=mailto:[EMAIL PROTECTED]Peter B. West/a - * @version $Revision$ $Name$ + * + * $Id$ */ package org.apache.fop.xml; @@ -71,9 +67,14 @@ /** * ttFoXmlSerialHandler/tt is the ttContentHandler/tt for the * background ttXMLReader/tt thread. + * + * @author a href=mailto:[EMAIL PROTECTED]Peter B. West/a + * @version $Revision$ $Name$ */ -public class FoXmlSerialHandler extends DefaultHandler implements Runnable { +public class FoXmlSerialHandler +extends DefaultHandler +implements Runnable { private static final String tag = $Name$; private static final String revision = $Revision$; @@ -112,7 +113,6 @@ // I''m in the thread - run the parser try { parser.parse(source); -//System.out.println(Parser terminating.); } catch (Exception e) { if (errorDump) Driver.dumpError(e); if (foThread != null) { @@ -146,10 +146,7 @@ public void startDocument() throws NoSuchElementException { synchronized (events) { XmlEvent event = acquireXMLEvent(Namespaces.DefAttrNSIndex); -//System.out.println(StartDocument thread -// + Thread.currentThread().getName()); event.type = XmlEvent.STARTDOCUMENT; -//System.out.println(SerialHandler: + event); putEvent(event); } } @@ -160,10 +157,7 @@ public void endDocument() throws NoSuchElementException { synchronized (events) { XmlEvent event = acquireXMLEvent(Namespaces.DefAttrNSIndex); -//System.out.println(EndDocument thread - //+ Thread.currentThread().getName()); event.type = XmlEvent.ENDDOCUMENT; -//System.out.println(SerialHandler: + event); putEvent(event); events.producerExhausted(); } @@ -203,16 +197,12 @@ if (uriIndex == Namespaces.XSLNSpaceIndex) { event.setFoType(FObjectNames.getFOIndex(localName)); } -//System.out.println(startElement: acquired + event.id); -//System.out.println(StartElement thread -// + Thread.currentThread().getName()); event.type = XmlEvent.STARTELEMENT; // Is this from the fo: namespace? event.uriIndex = uriIndex; event.localName = localName; //event.qName = qName; event.attributes = new AttributesImpl(attributes); -//System.out.println(SerialHandler: + event); putEvent(event); } catch (FOPException e) { // TODO Auto-generated catch block @@ -235,9 +225,6 @@ try { int uriIndex = namespaces.getURIIndex(uri); XmlEvent event = namespaces.acquireXMLEvent(uriIndex); -//System.out.println(endElement: acquired + event.id); -//System.out.println(EndElement thread - //+ Thread.currentThread().getName()); event.type = XmlEvent.ENDELEMENT; event.uriIndex = uriIndex; if (uriIndex == Namespaces.XSLNSpaceIndex) { @@ -272,8 +259,6 @@ // which the characters belong. XmlEvent event =
cvs commit: xml-fop/src/java/org/apache/fop/xml XmlEventSource.java XmlEventSourceStack.java
pbwest 2004/01/16 07:41:20 Added: src/java/org/apache/fop/xml Tag: FOP_0-20-0_Alt-Design XmlEventSource.java XmlEventSourceStack.java Log: Interfaces created in preparation for stackable XmlEvent sources for deferred parsing of fo:static-content and fo:marker. Revision ChangesPath No revision No revision 1.1.2.1 +74 -0 xml-fop/src/java/org/apache/fop/xml/Attic/XmlEventSource.java 1.1.2.1 +67 -0 xml-fop/src/java/org/apache/fop/xml/Attic/XmlEventSourceStack.java - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 25873] - [PATCH] abandoning code-generated Property.Maker
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=25873. 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=25873 [PATCH] abandoning code-generated Property.Maker --- Additional Comments From [EMAIL PROTECTED] 2004-01-16 16:58 --- A new revision of the patch where the functionality of corresponding and compound properties are placed in seperate files. As a result, the main Property.Maker class becomes smaller and easier to understand. Performance is 4.5% faster with this patch, mostly due to the caching of the default values of subproperties. The main path through the code is shorter for non-compound properties and the same for compound properties and properties with corresponding. Functionally the patch is neutral, so the it gets the same result. There are some places in the patch marked with TODO where a solution to minor bugs in the existing code has been added as comments. With this revision I think the patch is ready to go in.
DO NOT REPLY [Bug 26096] - subproperty=inherit does not find inherited value.
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=26096. 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=26096 subproperty=inherit does not find inherited value. --- Additional Comments From [EMAIL PROTECTED] 2004-01-16 16:59 --- Created an attachment (id=9979) A unified diff against HEAD.
DO NOT REPLY [Bug 25873] - [PATCH] abandoning code-generated Property.Maker
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=25873. 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=25873 [PATCH] abandoning code-generated Property.Maker --- Additional Comments From [EMAIL PROTECTED] 2004-01-16 17:57 --- Created an attachment (id=9981) A unified diff against HEAD
DO NOT REPLY [Bug 26096] - subproperty=inherit does not find inherited value.
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=26096. 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=26096 subproperty=inherit does not find inherited value. --- Additional Comments From [EMAIL PROTECTED] 2004-01-16 18:01 --- Attachment 9979 is not related to this issue. It appears that bugzilla automaticly moves to the next bug in the My bugs list when a comment is added to a bug report. I wonder if there is a way to delete an attachement?
RE: HashMap
-Original Message- From: Peter B. West [mailto:[EMAIL PROTECTED] snip / I hope you're not casting aspersions on my producer/consumer buffers? Hiya Peter, Great isn't it? The pun only became apparent to me *after* I had typed it up, and look-ee here, it got through nicely :) (If you're joking, that is...) Seriously? Not at all! (BTW: Shouts for your alt-design pages. Very comfortable --although IE seems to have a little trouble with the JavaScript adding a horizontal scrollbar instead of a vertical one; with other browsers no prob whatsoever.) Cheers, Andreas
DO NOT REPLY [Bug 20943] - number-rows-spanned render spanned cell background.
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=20943. 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=20943 number-rows-spanned render spanned cell background. --- Additional Comments From [EMAIL PROTECTED] 2004-01-16 22:18 --- More info: Any children (blocks, whatever) are seemingly clipped at the dimensions the cell would have been with no spanning attributes. In actuality its not clipped, but successive row's background colors are painted on top of the cell, which not only destroys the original cells background color, but hides the content as well. Borders seem to be broken too.
DO NOT REPLY [Bug 20943] - number-rows-spanned render spanned cell background.
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=20943. 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=20943 number-rows-spanned render spanned cell background. --- Additional Comments From [EMAIL PROTECTED] 2004-01-16 22:19 --- Created an attachment (id=9986) Example .fo demonstrating bug 20943
Re: HashMap
Andreas L. Delmelle wrote: Hiya Peter, ... Seriously? Not at all! (BTW: Shouts for your alt-design pages. Very comfortable --although IE seems to have a little trouble with the JavaScript adding a horizontal scrollbar instead of a vertical one; with other browsers no prob whatsoever.) Andreas, I assume this problem is with the iframes? Peter -- Peter B. West http://www.powerup.com.au/~pbwest/resume.html
cvs commit: xml-fop/src/java/org/apache/fop/datastructs SyncedCircularBuffer.java
pbwest 2004/01/16 16:16:10 Modified:src/java/org/apache/fop/datastructs Tag: FOP_0-20-0_Alt-Design SyncedCircularBuffer.java Log: Synchronized isExhausted() Revision ChangesPath No revision No revision 1.1.2.4 +5 -3 xml-fop/src/java/org/apache/fop/datastructs/Attic/SyncedCircularBuffer.java Index: SyncedCircularBuffer.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datastructs/Attic/SyncedCircularBuffer.java,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- SyncedCircularBuffer.java 16 Jan 2004 15:24:25 - 1.1.2.3 +++ SyncedCircularBuffer.java 17 Jan 2004 00:16:10 - 1.1.2.4 @@ -250,7 +250,9 @@ * has been processed, and the buffer is empty. */ public boolean isExhausted() { -return producerFinished isEmpty(); +synchronized (this) { +return producerFinished isEmpty(); +} } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 25873] - [PATCH] abandoning code-generated Property.Maker
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=25873. 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=25873 [PATCH] abandoning code-generated Property.Maker --- Additional Comments From [EMAIL PROTECTED] 2004-01-17 01:05 --- Please give me a couple of days to comment--say 48 hours. My initial thoughts are I like what I see, esp. since appeared to you appeared to unnest the Property.Maker, which looks good, but I'd like to study the code further. Everything looks good though. [Sorry for the delays this week--I was held up on other things--also was sending some emails to W3C trying to understand which properties can be specified to which FO. See http://lists.w3.org/Archives/Public/xsl- editors/2004JanMar/] One difference we have, I can work on, is that I'm not yet ready to get rid of all those interfaces. The current interface implementation is awful and useless--code-generated, separated into 45 different files, not visible while one is coding, etc., etc. I'd like to have them retained, but put into (1) file, actually, just added to the Constants interface (as inner interfaces), say adding about 600 lines in that interface for them all. (I can modify the XSLT code to accomplish that.) We get rid of those 45 files, and they will be no longer autogenerated with each build (but, as with the current Constants.java, we retain the XSLT to re- generate it when we like.) Reason why? I *think*, over the long-term, it is much more programmer-friendly because many/most developers use IDE's with code-complete. I.E., you type in the property value interface name, hit the ., and then you automatically see the 5-7 values relevant for that property. This saves the programmer the headache of looking at the spec each time for which prop values you need to code against, or trying to recall from a huge Constants list the actual values you need, and also making sure all the property options have been coded against. I think it will be a nice sanity-saver for coders. If not, we can always excise them later from Constants.java. Thoughts on this? The only other issue right now--not necessarily related to your patch--is that I'd like us, where possible, to start abstracting the propertyList away from the Layout and Renderers, possibly also the Area Tree. (This was an idea originally put forth by Victor a few weeks back, to general agreement on the list.) FObj already has a getProperty() function which just wraps its internal propertyList.getProperty()--and it's already used in a dozen or so places. Instead of layoutManager calling prop = propList.getProperty() left and right, it will be prop = fObj.getProperty(). This will give us some freedom in how we implement properties without needing to make changes to other parts of our code (i.e., we can even get rid of propertyList.) Thanks, Glen
XSL 1.1 WD fo:retrieve-table-marker
Paul, Excuse me for firing off a comment from the hip, but I have just looked at the putative fo:retrieve-table-marker FO. Prima facie, it looks to behave like fo:retrieve-marker, except with respect to table headers and footers. The difference that immediately occurs to me is that fo:retrieve-marker can logically occurs after the layout of region-body, and, because the dimensions of those regions which are the targets of static-content are size-constrained by the applied master-page. This simplifies the resolution of the marker. With fo:retrieve-table-marker, the possibility seems to exist that the formatting of a table-marker may change the region-body layout, and the page boundaries, to the extent that the source fo:marker may change. We have then another one of those awkward catch-22s of page layout. I may have missed something in my brief scan of the text, and I would appreciate any light on the subject. If my knee-jerk response is correct, fo:retrieve-table-marker can just be added to the list of layout nasties. It is hardly a show-stopper, given the similar unavoidable problems that already exist. Another thing that occurs to me as a result of these considerations is that the editors might comment (even non-normatively) on such issues, and possible strategies for resolving them. Your own non-normative feedback would be much appreciated. Peter -- Peter B. West http://www.powerup.com.au/~pbwest/resume.html
Re: XSL 1.1 WD fo:retrieve-table-marker
Peter B. West wrote: Paul, ... The difference that immediately occurs to me is that fo:retrieve-marker can logically occurs after the layout of region-body, and, because the dimensions of those regions which are the targets of static-content are size-constrained by the applied master-page. This simplifies the resolution of the marker. I'll say that again. The difference that immediately occurs to me is that fo:retrieve-marker can logically occur after the layout of region-body, and, because the dimensions of the target regions of static-content are size-constrained by the applied page-master, the layout of those markers can have no impact on the layout of region-body. This simplifies the resolution of the fo:retrieve-markers. Peter -- Peter B. West http://www.powerup.com.au/~pbwest/resume.html
cvs commit: xml-fop/src/java/org/apache/fop/fo FONode.java
pbwest 2004/01/16 22:31:26 Modified:src/java/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design FONode.java Log: Added numMarkers and int getMarkers. Added MC_LEADER to set of states for stateFlags. Removed unused debugging methods. Revision ChangesPath No revision No revision 1.2.2.7 +27 -20xml-fop/src/java/org/apache/fop/fo/FONode.java Index: FONode.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FONode.java,v retrieving revision 1.2.2.6 retrieving revision 1.2.2.7 diff -u -r1.2.2.6 -r1.2.2.7 --- FONode.java 15 Jan 2004 03:01:54 - 1.2.2.6 +++ FONode.java 17 Jan 2004 06:31:26 - 1.2.2.7 @@ -71,8 +71,10 @@ import org.apache.fop.fo.expr.FunctionNotImplementedException; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.fo.expr.PropertyParser; +import org.apache.fop.fo.flow.FoMarker; import org.apache.fop.fo.properties.Property; import org.apache.fop.messaging.MessageHandler; +import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; import org.apache.fop.xml.SyncedXmlEventsBuffer; import org.apache.fop.xml.Namespaces; @@ -115,6 +117,7 @@ ,MC_FOOTNOTE = 1024 ,MC_MULTI_CASE = 2048 ,MC_ABSOLUTELY_POSITIONED = 4096 + ,MC_LEADER = 8192 ; public static final int @@ -207,6 +210,9 @@ /** Ancestor reference area of this FONode. */ protected FONode ancestorRefArea = null; +/** The number of markers on this FO. */ +protected int numMarkers = 0; + /** * @param foTree an ttFOTree/tt to which this node belongs * @param type the fo type of this FONode. @@ -347,26 +353,6 @@ } /** - * Get the isparsePropsSet/i for this node. - * @return the ttPropertyValue[]/tt. - */ -/* DEBUG -public PropertyValue[] getSparsePropsSet() { -return sparsePropsSet; -} -*/ - -/** - * Get the isparsePropsMap/i for this node. - * @return the ttint[]/tt. - */ -/* DEBUG -public int[] getSparsePropsMap() { -return sparsePropsMap; -} -*/ - -/** * Get the eclosing ttFOTree/tt instance of this ttFONode/tt. * @return the ttFOTree/tt. */ @@ -620,4 +606,25 @@ } } +public int getMarkers() throws FOPException { +XmlEvent ev; + +try { +while ((ev = xmlevents.expectStartElement +(FObjectNames.MARKER, XmlEvent.DISCARD_W_SPACE)) +!= null) { +new FoMarker(getFOTree(), this, (FoXmlEvent)ev, stateFlags); +numMarkers++; +ev = xmlevents.getEndElement( +SyncedXmlEventsBuffer.DISCARD_EV, ev); +namespaces.surrenderEvent(ev); +} +} catch (TreeException e) { +throw new FOPException(e); +} catch (FOPException e) { +throw new FOPException(e); +} +return numMarkers; +} + }// FONode - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo/flow FoLeader.java
pbwest 2004/01/16 22:34:47 Modified:src/java/org/apache/fop/fo/flow Tag: FOP_0-20-0_Alt-Design FoLeader.java Log: Incluide test for nested fo:leader. Call getMarkers in superclass. Revision ChangesPath No revision No revision 1.1.2.6 +15 -9 xml-fop/src/java/org/apache/fop/fo/flow/Attic/FoLeader.java Index: FoLeader.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Attic/FoLeader.java,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -r1.1.2.5 -r1.1.2.6 --- FoLeader.java 15 Jan 2004 03:10:57 - 1.1.2.5 +++ FoLeader.java 17 Jan 2004 06:34:47 - 1.1.2.6 @@ -1,6 +1,4 @@ /* - * $Id$ - * * * The Apache Software License, Version 1.1 * @@ -47,17 +45,16 @@ * on behalf of the Apache Software Foundation and was originally created by * James Tauber [EMAIL PROTECTED]. For more information on the Apache * Software Foundation, please see http://www.apache.org/. - * - * - * @author a href=mailto:[EMAIL PROTECTED]Peter B. West/a + * + * $Id$ */ package org.apache.fop.fo.flow; -// FOP import java.util.Arrays; import java.util.BitSet; +// FOP import org.apache.fop.apps.FOPException; import org.apache.fop.datastructs.TreeException; import org.apache.fop.fo.FONode; @@ -74,6 +71,7 @@ /** * Implements the fo:leader flow object. + * @author a href=mailto:[EMAIL PROTECTED]Peter B. West/a */ public class FoLeader extends FONode { @@ -162,6 +160,15 @@ super(foTree, FObjectNames.LEADER, parent, event, stateFlags, sparsePropsMap, sparseIndices); XmlEvent ev = null; +if ((stateFlags FONode.MC_LEADER) != 0) { +// fo:leader cannot be nested +throw new FOPException( +fo:leader found as descendent of fo:leader); +} +if (getMarkers() != 0) { +throw new FOPException( +fo:marker illegal as child of fo:leader); +} do { try { if ((stateFlags FONode.MC_OUT_OF_LINE) == 0) @@ -170,9 +177,8 @@ ev = xmlevents.expectOutOfLinePcdataOrInline(); if (ev != null) { // Generate the flow object -//System.out.println(Generating flow object for + ev); FObjects.fobjects.makeFlowObject( -foTree, this, ev, stateFlags); +foTree, this, ev, stateFlags | FONode.MC_LEADER); if (ev.getType() != XmlEvent.CHARACTERS) { ev = xmlevents.getEndElement( SyncedXmlEventsBuffer.DISCARD_EV, ev); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo/flow FoListItem.java
pbwest 2004/01/16 22:43:36 Modified:src/java/org/apache/fop/fo/flow Tag: FOP_0-20-0_Alt-Design FoListItem.java Log: Remove local read of fo:markers and local numMarkers. Call superclass getMarkers(). Revision ChangesPath No revision No revision 1.1.2.6 +6 -26 xml-fop/src/java/org/apache/fop/fo/flow/Attic/FoListItem.java Index: FoListItem.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Attic/FoListItem.java,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -r1.1.2.5 -r1.1.2.6 --- FoListItem.java 15 Jan 2004 03:10:57 - 1.1.2.5 +++ FoListItem.java 17 Jan 2004 06:43:36 - 1.1.2.6 @@ -1,6 +1,4 @@ /* - * $Id$ - * * * The Apache Software License, Version 1.1 * @@ -47,9 +45,8 @@ * on behalf of the Apache Software Foundation and was originally created by * James Tauber [EMAIL PROTECTED]. For more information on the Apache * Software Foundation, please see http://www.apache.org/. - * - * - * @author a href=mailto:[EMAIL PROTECTED]Peter B. West/a + * + * $Id$ */ package org.apache.fop.fo.flow; @@ -72,6 +69,8 @@ /** * Implements the fo:list-item flow object. + * + * @author a href=mailto:[EMAIL PROTECTED]Peter B. West/a */ public class FoListItem extends FONode { @@ -129,9 +128,6 @@ } } -/** The number of markers on this FO. */ -private int numMarkers = 0; - /** * Construct an fo:list-item node, and build the fo:list-item subtree. * pContent model for fo:list-item: @@ -151,19 +147,9 @@ stateFlags, sparsePropsMap, sparseIndices); XmlEvent ev; // Look for zero or more markers -String nowProcessing = marker; +getMarkers(); try { -while ((ev = xmlevents.expectStartElement -(FObjectNames.MARKER, XmlEvent.DISCARD_W_SPACE)) - != null) { -new FoMarker(getFOTree(), this, (FoXmlEvent)ev, stateFlags); -numMarkers++; -ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); -namespaces.surrenderEvent(ev); -} - // Look for one list-item-label -nowProcessing = list-item-label; if ((ev = xmlevents.expectStartElement (FObjectNames.LIST_ITEM_LABEL, XmlEvent.DISCARD_W_SPACE)) == null) @@ -175,7 +161,6 @@ namespaces.surrenderEvent(ev); // Look for one list-item-body -nowProcessing = list-item-body; if ((ev = xmlevents.expectStartElement (FObjectNames.LIST_ITEM_BODY, XmlEvent.DISCARD_W_SPACE)) == null) @@ -185,11 +170,6 @@ ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); namespaces.surrenderEvent(ev); -/* -} catch (NoSuchElementException e) { -throw new FOPException -(Unexpected EOF while processing + nowProcessing + .); -*/ } catch(TreeException e) { throw new FOPException(TreeException: + e.getMessage()); } catch(PropertyException e) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo/flow FoTable.java
pbwest 2004/01/16 22:45:00 Modified:src/java/org/apache/fop/fo/flow Tag: FOP_0-20-0_Alt-Design FoTable.java Log: Remove local read of fo:markers and local numMarkers. Call superclass getMarkers(). Revision ChangesPath No revision No revision 1.1.2.6 +3 -24 xml-fop/src/java/org/apache/fop/fo/flow/Attic/FoTable.java Index: FoTable.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Attic/FoTable.java,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -r1.1.2.5 -r1.1.2.6 --- FoTable.java 15 Jan 2004 03:10:57 - 1.1.2.5 +++ FoTable.java 17 Jan 2004 06:44:59 - 1.1.2.6 @@ -142,9 +142,6 @@ } } -/** The number of markers on this FO. */ -private int numMarkers = 0; - /** The number of table-columns on this FO. */ private int numColumns = 0; @@ -179,19 +176,9 @@ stateFlags, sparsePropsMap, sparseIndices); XmlEvent ev; // Look for zero or more markers -String nowProcessing = marker; +getMarkers(); try { -while ((ev = xmlevents.expectStartElement -(FObjectNames.MARKER, XmlEvent.DISCARD_W_SPACE)) - != null) { -new FoMarker(getFOTree(), this, (FoXmlEvent)ev, stateFlags); -numMarkers++; -ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); -namespaces.surrenderEvent(ev); -} - // Look for zero or more table-columns -nowProcessing = table-column; while ((ev = xmlevents.expectStartElement (FObjectNames.TABLE_COLUMN, XmlEvent.DISCARD_W_SPACE)) != null) { @@ -204,7 +191,6 @@ } // Look for optional table-header -nowProcessing = table-header; if ((ev = xmlevents.expectStartElement (FObjectNames.TABLE_HEADER, XmlEvent.DISCARD_W_SPACE)) != null) { @@ -217,7 +203,6 @@ } // Look for optional table-footer -nowProcessing = table-footer; if ((ev = xmlevents.expectStartElement (FObjectNames.TABLE_FOOTER, XmlEvent.DISCARD_W_SPACE)) != null) { @@ -231,7 +216,6 @@ // Look for one or more table-body // must have at least one -nowProcessing = table-body; ev = xmlevents.expectStartElement (FObjectNames.TABLE_BODY, XmlEvent.DISCARD_W_SPACE); if (ev == null) @@ -253,11 +237,6 @@ namespaces.surrenderEvent(ev); } -/* -} catch (NoSuchElementException e) { -throw new FOPException -(Unexpected EOF while processing + nowProcessing + .); -*/ } catch(TreeException e) { throw new FOPException(TreeException: + e.getMessage()); } catch(PropertyException e) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo/flow FoWrapper.java
pbwest 2004/01/16 22:46:20 Modified:src/java/org/apache/fop/fo/flow Tag: FOP_0-20-0_Alt-Design FoWrapper.java Log: Call superclass getMarkers(). Revision ChangesPath No revision No revision 1.1.2.6 +4 -6 xml-fop/src/java/org/apache/fop/fo/flow/Attic/FoWrapper.java Index: FoWrapper.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Attic/FoWrapper.java,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -r1.1.2.5 -r1.1.2.6 --- FoWrapper.java15 Jan 2004 03:10:57 - 1.1.2.5 +++ FoWrapper.java17 Jan 2004 06:46:20 - 1.1.2.6 @@ -1,6 +1,4 @@ /* - * $Id$ - * * * The Apache Software License, Version 1.1 * @@ -48,8 +46,7 @@ * James Tauber [EMAIL PROTECTED]. For more information on the Apache * Software Foundation, please see http://www.apache.org/. * - * - * @author a href=mailto:[EMAIL PROTECTED]Peter B. West/a + * $Id$ */ package org.apache.fop.fo.flow; @@ -73,6 +70,7 @@ /** * Implements the fo:wrapper flow object. + * @author a href=mailto:[EMAIL PROTECTED]Peter B. West/a */ public class FoWrapper extends FONode { @@ -126,6 +124,7 @@ super(foTree, FObjectNames.WRAPPER, parent, event, stateFlags, sparsePropsMap, sparseIndices); XmlEvent ev = null; +getMarkers(); do { try { if ((stateFlags FONode.MC_OUT_OF_LINE) == 0) @@ -134,7 +133,6 @@ ev = xmlevents.expectOutOfLinePcdataOrInlineOrBlock(); if (ev != null) { // Generate the flow object -//System.out.println(Generating flow object for + ev); FObjects.fobjects.makeFlowObject( foTree, this, ev, stateFlags); if (ev.getType() != XmlEvent.CHARACTERS) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo/flow FoMarker.java
pbwest 2004/01/16 22:47:20 Modified:src/java/org/apache/fop/fo/flow Tag: FOP_0-20-0_Alt-Design FoMarker.java Log: Cosmetic changes only. Revision ChangesPath No revision No revision 1.1.2.6 +4 -7 xml-fop/src/java/org/apache/fop/fo/flow/Attic/FoMarker.java Index: FoMarker.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Attic/FoMarker.java,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -r1.1.2.5 -r1.1.2.6 --- FoMarker.java 15 Jan 2004 03:10:57 - 1.1.2.5 +++ FoMarker.java 17 Jan 2004 06:47:20 - 1.1.2.6 @@ -1,6 +1,4 @@ /* - * $Id$ - * * * The Apache Software License, Version 1.1 * @@ -47,9 +45,8 @@ * on behalf of the Apache Software Foundation and was originally created by * James Tauber [EMAIL PROTECTED]. For more information on the Apache * Software Foundation, please see http://www.apache.org/. - * - * - * @author a href=mailto:[EMAIL PROTECTED]Peter B. West/a + * + * $Id$ */ package org.apache.fop.fo.flow; @@ -73,6 +70,7 @@ /** * Implements the fo:marker flow object. + * @author a href=mailto:[EMAIL PROTECTED]Peter B. West/a */ public class FoMarker extends FONode { @@ -137,7 +135,6 @@ ev = xmlevents.expectOutOfLinePcdataOrInlineOrBlock(); if (ev != null) { // Generate the flow object -//System.out.println(Generating flow object for + ev); FObjects.fobjects.makeFlowObject( foTree, this, ev, stateFlags); if (ev.getType() != XmlEvent.CHARACTERS) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]