cvs commit: xml-fop/src/org/apache/fop/fo/flow ExternalGraphic.java
arved 01/06/10 10:02:24 Modified:src/org/apache/fop/fo/flow ExternalGraphic.java Log: SGK/AHS: inling of images Revision ChangesPath 1.9 +61 -9 xml-fop/src/org/apache/fop/fo/flow/ExternalGraphic.java Index: ExternalGraphic.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/ExternalGraphic.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ExternalGraphic.java 2001/03/04 21:34:51 1.8 +++ ExternalGraphic.java 2001/06/10 17:02:24 1.9 @@ -44,9 +44,7 @@ import org.apache.fop.fo.*; import org.apache.fop.messaging.MessageHandler; import org.apache.fop.fo.properties.*; -import org.apache.fop.layout.Area; -import org.apache.fop.layout.BlockArea; -import org.apache.fop.layout.FontState; +import org.apache.fop.layout.*; import org.apache.fop.apps.FOPException; import org.apache.fop.image.*; @@ -58,6 +56,8 @@ public class ExternalGraphic extends FObj { + int breakAfter; + int breakBefore; int align; int startIndent; int endIndent; @@ -103,7 +103,7 @@ this.id = this.properties.get("id").getString(); area.getIDReferences().createID(id); - +/* if (area instanceof BlockArea) { area.end(); } @@ -114,6 +114,7 @@ forcedStartOffset; } +*/ this.marker = 0; } @@ -172,13 +173,64 @@ imageArea.start(); imageArea.end(); - area.addChild(imageArea); - area.increaseHeight(imageArea.getHeight()); + //area.addChild(imageArea); + //area.increaseHeight(imageArea.getHeight()); if (spaceAfter != 0) { area.addDisplaySpace(spaceAfter); } + if (breakBefore == BreakBefore.PAGE || ((spaceBefore + imageArea.getHeight()) > area.spaceLeft())){ + return new Status(Status.FORCE_PAGE_BREAK); + } + + if (breakBefore == BreakBefore.ODD_PAGE) { + return new Status(Status.FORCE_PAGE_BREAK_ODD); + } + + if (breakBefore == BreakBefore.EVEN_PAGE) { + return new Status(Status.FORCE_PAGE_BREAK_EVEN); + } + + + if (area instanceof BlockArea) { + BlockArea ba = (BlockArea)area; + LineArea la = ba.getCurrentLineArea(); + if(la == null) { + return new Status(Status.AREA_FULL_NONE); + } + la.addPending(); + if(imageArea.getContentWidth() > la.getRemainingWidth()) { + la = ba.createNextLineArea(); + if(la == null) { + return new Status(Status.AREA_FULL_NONE); + } + } + la.addInlineArea(imageArea); + } else { + area.addChild(imageArea); + area.increaseHeight(imageArea.getContentHeight()); + } + imageArea.setPage(area.getPage()); + + if (breakAfter == BreakAfter.PAGE) { + this.marker = BREAK_AFTER; + return new Status(Status.FORCE_PAGE_BREAK); + } + + if (breakAfter == BreakAfter.ODD_PAGE) { + this.marker = BREAK_AFTER; + return new Status(Status.FORCE_PAGE_BREAK_ODD); + } + + if (breakAfter == BreakAfter.EVEN_PAGE) { + this.marker = BREAK_AFTER; + return new Status(Status.FORCE_PAGE_BREAK_EVEN); + } + + + + } catch (MalformedURLException urlex) { // bad URL @@ -191,9 +243,9 @@ imgex.getMessage()); } - if (area instanceof BlockArea) { - area.start(); - } + //if (area instanceof BlockArea) { + // area.start(); + //} return new
cvs commit: xml-fop/src/org/apache/fop/image ImageArea.java
arved 01/06/10 10:02:41 Modified:src/org/apache/fop/image ImageArea.java Log: SGK/AHS: inling of images Revision ChangesPath 1.8 +42 -3 xml-fop/src/org/apache/fop/image/ImageArea.java Index: ImageArea.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/image/ImageArea.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ImageArea.java2000/10/19 11:18:35 1.7 +++ ImageArea.java2001/06/10 17:02:41 1.8 @@ -1,4 +1,4 @@ -/*-- $Id: ImageArea.java,v 1.7 2000/10/19 11:18:35 eschaeffer Exp $ -- +/*-- $Id: ImageArea.java,v 1.8 2001/06/10 17:02:41 arved Exp $ -- The Apache Software License, Version 1.1 @@ -54,24 +54,32 @@ import org.apache.fop.fo.properties.TextAlign; import org.apache.fop.layout.*; +import org.apache.fop.layout.inline.*; + import org.apache.fop.render.Renderer; import java.util.Vector; import java.util.Enumeration; -public class ImageArea extends Area { +public class ImageArea extends InlineArea { protected int xOffset = 0; +protected int align; +protected int valign; protected FopImage image; + public ImageArea(FontState fontState, FopImage img, int AllocationWidth, int width, int height, int startIndent, int endIndent, int align) { - super(fontState,width,height); + super(fontState,width,0,0,0); this.currentHeight = height; this.contentRectangleWidth = width; + this.height = height; this.image = img; + this.align = align; +/* switch (align) { case TextAlign.START: xOffset = startIndent; @@ -90,6 +98,7 @@ xOffset = startIndent + ((endIndent - startIndent) - width)/2; break; } + */ } public int getXOffset() { @@ -107,4 +116,34 @@ public int getImageHeight() { return currentHeight; } + +public void setAlign(int align) +{ + this.align = align; + } + +public int getAlign() +{ + return this.align; + } + +public void setVerticalAlign(int align) +{ + this.valign = align; + } + +public int getVerticalAlign() +{ + return this.valign; + } + + public void setStartIndent(int startIndent) + { +xOffset = startIndent; + } + + + } + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/render/pdf PDFRenderer.java
arved 01/06/10 10:04:36 Modified:src/org/apache/fop/render/pdf PDFRenderer.java Log: SGK/AHS: inlining of images Revision ChangesPath 1.69 +3 -2 xml-fop/src/org/apache/fop/render/pdf/PDFRenderer.java Index: PDFRenderer.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/PDFRenderer.java,v retrieving revision 1.68 retrieving revision 1.69 diff -u -r1.68 -r1.69 --- PDFRenderer.java 2001/06/06 19:56:09 1.68 +++ PDFRenderer.java 2001/06/10 17:04:36 1.69 @@ -1,4 +1,4 @@ -/* $Id: PDFRenderer.java,v 1.68 2001/06/06 19:56:09 tore Exp $ +/* $Id: PDFRenderer.java,v 1.69 2001/06/10 17:04:36 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources." @@ -231,7 +231,7 @@ */ public void renderImageArea(ImageArea area) { // adapted from contribution by BoBoGi -int x = this.currentAreaContainerXPosition + area.getXOffset(); +int x = this.currentXPosition + area.getXOffset(); int y = this.currentYPosition; int w = area.getContentWidth(); int h = area.getHeight(); @@ -260,6 +260,7 @@ (((float)(y - h)) / 1000f) + " cm\n" + "/Im" + xObjectNum + " Do\nQ\nBT\n"); } + this.currentXPosition += area.getContentWidth(); } /** render a foreign object area */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/docs/examples build.xml
arved 01/06/15 17:11:33 Modified:docs/examples build.xml Log: hyphen.fo breaks; removed from testing Revision ChangesPath 1.17 +2 -2 xml-fop/docs/examples/build.xml Index: build.xml === RCS file: /home/cvs/xml-fop/docs/examples/build.xml,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- build.xml 2001/03/29 07:34:55 1.16 +++ build.xml 2001/06/16 00:11:32 1.17 @@ -57,7 +57,7 @@ - + @@ -97,7 +97,7 @@ - + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo/pagination PageNumberGenerator.java
arved 01/07/07 22:03:49 Added: src/org/apache/fop/fo/pagination PageNumberGenerator.java Log: Supports page-number formatting Revision ChangesPath 1.1 xml-fop/src/org/apache/fop/fo/pagination/PageNumberGenerator.java Index: PageNumberGenerator.java === /*-- $Id: PageNumberGenerator.java,v 1.1 2001/07/08 05:03:48 arved Exp $ -- * Copyright (C) 2001 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.fo.pagination; import org.apache.fop.fo.properties.*; import org.apache.fop.messaging.MessageHandler; // Java import java.util.*; /** * This class uses the 'format', 'groupingSeparator', 'groupingSize', * and 'letterValue' properties on fo:page-sequence to return a String * corresponding to the supplied integer page number. */ public class PageNumberGenerator { private String format; private char groupingSeparator; private int groupingSize; private int letterValue; //constants private int DECIMAL = 1;// '0*1' private int LOWERALPHA = 2; // 'a' private int UPPERALPHA = 3; // 'A' private int LOWERROMAN = 4; // 'i' private int UPPERROMAN = 5; // 'I' // flags private int formatType = DECIMAL; private int minPadding = 0; // for decimal formats // preloaded strings of zeros private String zeros[] = { "", "0", "00", "000", "", "0" }; public PageNumberGenerator( String format, char groupingSeparator, int groupingSize, int letterValue ) { this.format = format; this.groupingSeparator = groupingSeparator; this.groupingSize = groupingSize; this.letterValue = letterValue; // the only accepted format strings are currently '0*1' 'a', 'A', 'i' // and 'I' int fmtLen = format.length(); if (fmtLen == 1) { if (format.equals("1")) { formatType = DECIMAL; minPadding = 0; } else if (format.equals("a")) { formatType = LOWERALPHA; } else if (format.equals("A")) { formatType = UPPERALPHA; } else if (format.equals("i")) { formatType = LOWERROMAN; } else if (format.equals("I")) { formatType = UPPERROMAN; } else { // token not handled MessageHandler.log("'format' token not recognized; using '1'"); formatType = DECIMAL; minPadding = 0; } } else { // only accepted token is '0+1'at this stage.Because of the // wonderful regular expression support in Java, we will resort to a // loop for (int i = 0; i < fmtLen-1; i++) { if (format.charAt(i) != '0') { MessageHandler.log("'format' token not recognized; using '1'"); formatType = DECIMAL; minPadding = 0; } else { minPadding = fmtLen - 1; } } } } public String makeFormattedPageNumber(int number) { String pn = null; if (formatType == DECIMAL) { pn = Integer.toString(number); if (minPadding >= pn.length()) { int nz = minPadding - pn.length() + 1; pn = zeros[nz] + pn; } } else if ((formatType == LOWERROMAN) || (formatType == UPPERROMAN)) { pn = makeRoman(number); if (formatType == UPPERROMAN) pn
cvs commit: xml-fop/src/org/apache/fop/fo/pagination PageSequence.java
arved 01/07/07 22:04:11 Modified:src/org/apache/fop/fo/pagination PageSequence.java Log: Supports page-number formatting Revision ChangesPath 1.30 +14 -3 xml-fop/src/org/apache/fop/fo/pagination/PageSequence.java Index: PageSequence.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/PageSequence.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- PageSequence.java 2001/06/22 08:52:08 1.29 +++ PageSequence.java 2001/07/08 05:04:10 1.30 @@ -1,4 +1,4 @@ -/*-- $Id: PageSequence.java,v 1.29 2001/06/22 08:52:08 keiron Exp $ -- +/*-- $Id: PageSequence.java,v 1.30 2001/07/08 05:04:10 arved Exp $ -- * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -83,8 +83,10 @@ private Page currentPage; + // page number and elated formatting variables private int currentPageNumber = 0; - + private PageNumberGenerator pageNumberGenerator; + /** specifies page numbering type (auto|auto-even|auto-odd|explicit) */ private int pageNumberType; @@ -144,8 +146,14 @@ } masterName = this.properties.get("master-name").getString(); - + // get the 'format' properties + this.pageNumberGenerator = + new PageNumberGenerator( this.properties.get("format").getString(), + this.properties.get("grouping-separator").getCharacter(), + this.properties.get("grouping-size").getNumber().intValue(), + this.properties.get("letter-value").getEnum() + ); } public void addFlow(Flow flow) throws FOPException { @@ -219,6 +227,9 @@ tempIsFirstPage, isEmptyPage); currentPage.setNumber(this.currentPageNumber); + String formattedPageNumber = + pageNumberGenerator.makeFormattedPageNumber(this.currentPageNumber); + currentPage.setFormattedNumber(formattedPageNumber); this.root.setRunningPageNumberCounter(this.currentPageNumber); MessageHandler.log(" [" + currentPageNumber); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/layout Page.java
arved 01/07/07 22:04:57 Modified:src/org/apache/fop/layout Page.java Log: Supports page-number formatting Revision ChangesPath 1.12 +11 -2 xml-fop/src/org/apache/fop/layout/Page.java Index: Page.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/Page.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- Page.java 2001/06/12 11:37:43 1.11 +++ Page.java 2001/07/08 05:04:56 1.12 @@ -1,4 +1,4 @@ -/* $Id: Page.java,v 1.11 2001/06/12 11:37:43 keiron Exp $ +/* $Id: Page.java,v 1.12 2001/07/08 05:04:56 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -30,7 +30,8 @@ private AreaTree areaTree; protected int pageNumber = 0; - + protected String formattedPageNumber; + protected Vector linkSets = new Vector(); private Vector idList = new Vector(); @@ -49,6 +50,14 @@ public int getNumber() { return this.pageNumber; +} + + public void setFormattedNumber(String number) { + this.formattedPageNumber = number; + } + +public String getFormattedNumber() { + return this.formattedPageNumber; } void addAfter(AreaContainer area) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo/flow PageNumber.java
arved 01/07/07 22:05:17 Modified:src/org/apache/fop/fo/flow PageNumber.java Log: Supports page-number formatting Revision ChangesPath 1.17 +2 -2 xml-fop/src/org/apache/fop/fo/flow/PageNumber.java Index: PageNumber.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/PageNumber.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- PageNumber.java 2001/03/04 21:34:51 1.16 +++ PageNumber.java 2001/07/08 05:05:16 1.17 @@ -1,4 +1,4 @@ -/*-- $Id: PageNumber.java,v 1.16 2001/03/04 21:34:51 klease Exp $ -- +/*-- $Id: PageNumber.java,v 1.17 2001/07/08 05:05:16 arved Exp $ -- The Apache Software License, Version 1.1 @@ -110,7 +110,7 @@ area.getIDReferences().initializeID(id, area); } - String p = Integer.toString(area.getPage().getNumber()); + String p = area.getPage().getFormattedNumber(); this.marker = FOText.addText((BlockArea) area, propMgr.getFontState(area.getFontInfo()), red, green, blue, wrapOption, null, whiteSpaceCollapse, p.toCharArray(), 0, p.length(), ts, VerticalAlign.BASELINE); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/codegen foproperties.xml
arved 01/07/08 13:58:27 Modified:src/codegen foproperties.xml Log: Support 'format' property on fo:page-sequence Revision ChangesPath 1.17 +44 -0 xml-fop/src/codegen/foproperties.xml Index: foproperties.xml === RCS file: /home/cvs/xml-fop/src/codegen/foproperties.xml,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- foproperties.xml 2001/04/11 21:39:02 1.16 +++ foproperties.xml 2001/07/08 20:58:27 1.17 @@ -1363,6 +1363,50 @@ before + + format + false + String + 1 + + + grouping-separator + false + Character + none + + + grouping-size + false + Number + + 0 + + + letter-value + false + Enum + + alphabetic + traditional + auto + + auto + + + force-page-count + false + Enum + + even + odd + end-on-even + end-on-odd + no-force + auto + + auto + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo/pagination PageSequence.java
arved 01/07/08 20:01:15 Modified:src/org/apache/fop/fo/pagination PageSequence.java Log: AHS: support 'force-page-count' Revision ChangesPath 1.31 +97 -6 xml-fop/src/org/apache/fop/fo/pagination/PageSequence.java Index: PageSequence.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/PageSequence.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- PageSequence.java 2001/07/08 05:04:10 1.30 +++ PageSequence.java 2001/07/09 03:01:12 1.31 @@ -1,4 +1,4 @@ -/*-- $Id: PageSequence.java,v 1.30 2001/07/08 05:04:10 arved Exp $ -- +/*-- $Id: PageSequence.java,v 1.31 2001/07/09 03:01:12 arved Exp $ -- * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -83,10 +83,15 @@ private Page currentPage; - // page number and elated formatting variables + // page number and related formatting variables + private String ipnValue; private int currentPageNumber = 0; private PageNumberGenerator pageNumberGenerator; + private int forcePageCount = 0; + private int pageCount = 0; + private boolean isForcing = false; + /** specifies page numbering type (auto|auto-even|auto-odd|explicit) */ private int pageNumberType; @@ -125,8 +130,7 @@ _flowMap = new Hashtable(); thisIsFirstPage = true; // we are now on the first page of the page sequence -String ipnValue = - this.properties.get("initial-page-number").getString(); +ipnValue = this.properties.get("initial-page-number").getString(); if (ipnValue.equals("auto")) { pageNumberType = AUTO; @@ -154,6 +158,8 @@ this.properties.get("grouping-size").getNumber().intValue(), this.properties.get("letter-value").getEnum() ); + + this.forcePageCount = this.properties.get("force-page-count").getEnum(); } public void addFlow(Flow flow) throws FOPException { @@ -177,11 +183,12 @@ this.layoutMasterSet.resetPageMasters(); + int firstAvailPageNumber = 0; do { // makePage() moved to after the page-number computations, // but store the page-number at this point for that method, // since we want the 'current' current page-number... -int firstAvailPageNumber = +firstAvailPageNumber = this.root.getRunningPageNumberCounter(); boolean tempIsFirstPage = false; @@ -260,9 +267,12 @@ } MessageHandler.log("]"); areaTree.addPage(currentPage); + this.pageCount++; // used for 'force-page-count' calculations } while (flowsAreIncomplete()) ; - + // handle the 'force-page-count' + forcePage(areaTree, firstAvailPageNumber); + MessageHandler.logln(""); } @@ -398,6 +408,12 @@ private SimplePageMaster getNextSimplePageMaster( PageSequenceMaster sequenceMaster, int currentPageNumber, boolean thisIsFirstPage, boolean isEmptyPage) { + // handle forcing + if (isForcing) { + String nextPageMaster = getNextPageMasterName(sequenceMaster, + currentPageNumber, false, true); + return this.layoutMasterSet.getSimplePageMaster(nextPageMaster); + } String nextPageMaster = getNextPageMasterName(sequenceMaster, currentPageNumber, thisIsFirstPage, isEmptyPage); return this.layoutMasterSet.getSimplePageMaster(nextPageMaster); @@ -522,6 +538,7 @@ private boolean isFlowForMasterNameDone(String masterName) { // parameter is master-name of PMR; we need to locate PM // referenced by this, and determine whether flow(s) are OK + if (isForcing) return false; if (masterName != null) { SimplePageMaster spm = @@ -545,4 +562,78 @@ public void setIsFlowSet(boolean isFlowSet) { this.isFlowSet = isFlowSet; } + + public String getIpnValue() { + return ipnValue; + } + + public int getCurrentPageNumber() { + return currentPageNumber; + } + + private void forcePage(AreaTree areaTree, int firstAvailPageNumber) { + boolean makePage = fa
cvs commit: xml-fop/src/org/apache/fop/fo/pagination RepeatablePageMasterAlternatives.java
arved 01/07/08 20:02:43 Modified:src/org/apache/fop/fo/pagination RepeatablePageMasterAlternatives.java Log: AHS: restore ability to do blank pages Revision ChangesPath 1.5 +2 -2 xml-fop/src/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java Index: RepeatablePageMasterAlternatives.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- RepeatablePageMasterAlternatives.java 2000/11/15 10:26:23 1.4 +++ RepeatablePageMasterAlternatives.java 2001/07/09 03:02:39 1.5 @@ -1,4 +1,4 @@ -/*-- $Id: RepeatablePageMasterAlternatives.java,v 1.4 2000/11/15 10:26:23 fotis Exp $ -- +/*-- $Id: RepeatablePageMasterAlternatives.java,v 1.5 2001/07/09 03:02:39 arved Exp $ -- The Apache Software License, Version 1.1 @@ -134,7 +134,7 @@ (ConditionalPageMasterReference)conditionalPageMasterRefs.elementAt(i); // 0-indexed page number - if (cpmr.isValid(currentPageNumber + 1, thisIsFirstPage,false)) + if (cpmr.isValid(currentPageNumber + 1, thisIsFirstPage,isEmptyPage)) { pm = cpmr.getMasterName(); break; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo/pagination Root.java
arved 01/07/08 20:03:28 Modified:src/org/apache/fop/fo/pagination Root.java Log: AHS: support 'force-page-count' Revision ChangesPath 1.11 +20 -6 xml-fop/src/org/apache/fop/fo/pagination/Root.java Index: Root.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/Root.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- Root.java 2001/06/22 08:52:08 1.10 +++ Root.java 2001/07/09 03:03:24 1.11 @@ -1,4 +1,4 @@ -/*-- $Id: Root.java,v 1.10 2001/06/22 08:52:08 keiron Exp $ -- +/*-- $Id: Root.java,v 1.11 2001/07/09 03:03:24 arved Exp $ -- * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -42,7 +42,6 @@ /** keeps count of page number from over PageSequence instances*/ private int runningPageNumberCounter = 0; - protected Root(FObj parent, PropertyList propertyList) throws FOPException { super(parent, propertyList); @@ -54,24 +53,39 @@ } } - protected int getRunningPageNumberCounter() { return this.runningPageNumberCounter; } - protected void setRunningPageNumberCounter(int count) { this.runningPageNumberCounter = count; } - /** @deprecated handled by addChild now */ public void addPageSequence(PageSequence pageSequence) { this.pageSequences.addElement(pageSequence); } - + public int getPageSequenceCount() { + return pageSequences.size(); + } + + /** + * Some properties, such as 'force-page-count', require a + * page-sequence to know about some properties of the next. + * @returns succeeding PageSequence; null if none + */ + public PageSequence getSucceedingPageSequence(PageSequence current) { + int currentIndex = pageSequences.indexOf(current); + if (currentIndex == -1) return null; + if (currentIndex < (pageSequences.size()-1)) { + return (PageSequence)pageSequences.elementAt(currentIndex+1); + } else { + return null; + } + } + public LayoutMasterSet getLayoutMasterSet() { return this.layoutMasterSet; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo PropertyManager.java
arved 01/07/12 19:29:50 Modified:src/org/apache/fop/fo PropertyManager.java Log: AHS: addressing break boundary conditions Revision ChangesPath 1.3 +47 -4 xml-fop/src/org/apache/fop/fo/PropertyManager.java Index: PropertyManager.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/PropertyManager.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- PropertyManager.java 2001/04/11 21:41:34 1.2 +++ PropertyManager.java 2001/07/13 02:29:47 1.3 @@ -1,4 +1,4 @@ -/*-- $Id: PropertyManager.java,v 1.2 2001/04/11 21:41:34 klease Exp $ -- */ +/*-- $Id: PropertyManager.java,v 1.3 2001/07/13 02:29:47 arved Exp $ -- */ /* * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the @@ -9,12 +9,15 @@ import org.apache.fop.layout.FontState; import org.apache.fop.layout.FontInfo; import org.apache.fop.layout.BorderAndPadding; +import org.apache.fop.fo.properties.BreakAfter; import org.apache.fop.fo.properties.BreakBefore; import org.apache.fop.fo.properties.Constants; import org.apache.fop.layout.HyphenationProps; import org.apache.fop.apps.FOPException; import java.text.MessageFormat; import java.text.FieldPosition; +import org.apache.fop.layout.Area; +import org.apache.fop.layout.ColumnArea; public class PropertyManager { @@ -103,15 +106,55 @@ return hyphProps; } - public int checkBreakBefore() { + public int checkBreakBefore(Area area) { + if (!(area instanceof ColumnArea)) + return Status.OK; + ColumnArea colArea = (ColumnArea)area; switch(properties.get("break-before").getEnum()) { case BreakBefore.PAGE: - return Status.FORCE_PAGE_BREAK; + // if first ColumnArea, and empty, return OK + if (!colArea.hasChildren() && (colArea.getColumnIndex() == 1)) + return Status.OK; + else + return Status.FORCE_PAGE_BREAK; case BreakBefore.ODD_PAGE: - return Status.FORCE_PAGE_BREAK_ODD; + // if first ColumnArea, empty, _and_ in odd page, + // return OK + if (!colArea.hasChildren() && (colArea.getColumnIndex() == 1) && + (colArea.getPage().getNumber() % 2 != 0)) + return Status.OK; + else + return Status.FORCE_PAGE_BREAK_ODD; case BreakBefore.EVEN_PAGE: + // if first ColumnArea, empty, _and_ in even page, + // return OK + if (!colArea.hasChildren() && (colArea.getColumnIndex() == 1) && + (colArea.getPage().getNumber() % 2 == 0)) + return Status.OK; + else return Status.FORCE_PAGE_BREAK_EVEN; case BreakBefore.COLUMN: + // if ColumnArea is empty return OK + if (!area.hasChildren()) + return Status.OK; + else + return Status.FORCE_COLUMN_BREAK; + default: +return Status.OK; +} + } + + public int checkBreakAfter(Area area) { + if (!(area instanceof org.apache.fop.layout.ColumnArea)) + return Status.OK; +switch(properties.get("break-after").getEnum()) { + case BreakAfter.PAGE: + return Status.FORCE_PAGE_BREAK; + case BreakAfter.ODD_PAGE: + return Status.FORCE_PAGE_BREAK_ODD; + case BreakAfter.EVEN_PAGE: + return Status.FORCE_PAGE_BREAK_EVEN; + case BreakAfter.COLUMN: return Status.FORCE_COLUMN_BREAK; default: return Status.OK; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo/flow Block.java
arved 01/07/12 19:30:37 Modified:src/org/apache/fop/fo/flow Block.java Log: AHS: addressing break boundary conditions Revision ChangesPath 1.34 +21 -73xml-fop/src/org/apache/fop/fo/flow/Block.java Index: Block.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Block.java,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- Block.java2001/03/05 04:39:56 1.33 +++ Block.java2001/07/13 02:30:33 1.34 @@ -1,52 +1,8 @@ -/*-- $Id: Block.java,v 1.33 2001/03/05 04:39:56 keiron Exp $ -- - - - The Apache Software License, Version 1.1 - - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - [EMAIL PROTECTED] - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - 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/>. - +/*-- $Id: Block.java,v 1.34 2001/07/13 02:30:33 arved Exp $-- */ +/* + * Copyright (C) 2001 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.fo.flow; @@ -147,10 +103,14 @@ area.getIDReferences().createID(id); this.marker = 0; - int breakStatus; - if ((breakStatus = propMgr.checkBreakBefore()) != Status.OK) { -return new Status(breakStatus); - } + + // no break if first in area tree, or leading in context + // area + int breakBeforeStatus = propMgr.checkBreakBefore(area); + if (breakBeforeStatus != Status.OK) { + return new Status(breakBeforeStatus); + } + int numChildren = this.children.s
cvs commit: xml-fop/src/org/apache/fop/layout Area.java
arved 01/07/12 19:31:16 Modified:src/org/apache/fop/layout Area.java Log: AHS: addressing break boundary conditions Revision ChangesPath 1.20 +5 -1 xml-fop/src/org/apache/fop/layout/Area.java Index: Area.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/Area.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- Area.java 2001/06/12 11:37:35 1.19 +++ Area.java 2001/07/13 02:31:14 1.20 @@ -1,4 +1,4 @@ -/* $Id: Area.java,v 1.19 2001/06/12 11:37:35 keiron Exp $ +/* $Id: Area.java,v 1.20 2001/07/13 02:31:14 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -120,6 +120,10 @@ public Vector getChildren() { return this.children; +} + +public boolean hasChildren() { +return (this.children.size() != 0); } public int getContentWidth() { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo/flow TableRow.java
arved 01/07/14 17:17:13 Modified:src/org/apache/fop/fo/flow TableRow.java Log: Weiqi Gao: checkBreakBefore signature Revision ChangesPath 1.47 +2 -2 xml-fop/src/org/apache/fop/fo/flow/TableRow.java Index: TableRow.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/TableRow.java,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- TableRow.java 2001/07/11 21:27:36 1.46 +++ TableRow.java 2001/07/15 00:17:13 1.47 @@ -1,4 +1,4 @@ -/*-- $Id: TableRow.java,v 1.46 2001/07/11 21:27:36 klease Exp $ -- +/*-- $Id: TableRow.java,v 1.47 2001/07/15 00:17:13 arved Exp $ -- * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -237,7 +237,7 @@ } this.marker = 0; - int breakStatus = propMgr.checkBreakBefore(); + int breakStatus = propMgr.checkBreakBefore(area); if (breakStatus != Status.OK) return new Status(breakStatus); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/codegen foproperties.xml
arved 01/07/16 03:35:47 Modified:src/codegen foproperties.xml Log: AHS: initial marker support Revision ChangesPath 1.21 +15 -4 xml-fop/src/codegen/foproperties.xml Index: foproperties.xml === RCS file: /home/cvs/xml-fop/src/codegen/foproperties.xml,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- foproperties.xml 2001/07/12 10:19:36 1.20 +++ foproperties.xml 2001/07/16 10:35:47 1.21 @@ -1527,25 +1527,36 @@ marker-class-name false -ToBeImplemented +String retrieve-class-name false -ToBeImplemented +String retrieve-position false -ToBeImplemented +Enum + +first-starting-within-page +first-including-carryover +last-starting-within-page +last-ending-within-page + first-starting-within-page retrieve-boundary false -ToBeImplemented +Enum + +page +page-sequence +document + page-sequence - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo FONode.java FObj.java
arved 01/07/16 03:36:48 Modified:src/org/apache/fop/fo FONode.java FObj.java Log: AHS: initial marker support Revision ChangesPath 1.16 +36 -2 xml-fop/src/org/apache/fop/fo/FONode.java Index: FONode.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FONode.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- FONode.java 2001/05/19 00:59:06 1.15 +++ FONode.java 2001/07/16 10:36:48 1.16 @@ -1,4 +1,4 @@ -/*-- $Id: FONode.java,v 1.15 2001/05/19 00:59:06 arved Exp $ -- +/*-- $Id: FONode.java,v 1.16 2001/07/16 10:36:48 arved Exp $ -- * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources." @@ -10,11 +10,14 @@ // FOP import org.apache.fop.apps.FOPException; import org.apache.fop.layout.Area; +import org.apache.fop.layout.AreaClass; import org.apache.fop.layout.LinkSet; import org.apache.fop.system.BufferManager; +import org.apache.fop.fo.flow.Marker; // Java import java.util.Vector; +import java.util.Hashtable; /** * base class for nodes in the formatting object tree @@ -23,6 +26,8 @@ protected FObj parent; +protected String areaClass = AreaClass.UNASSIGNED; + public BufferManager bufferManager; public Vector children = new Vector(); // made public for searching for id's @@ -50,11 +55,22 @@ protected LinkSet linkSet; +// count of areas generated-by/returned-by +public int areasGenerated = 0; + +// markers +protected Hashtable markers; + protected FONode(FObj parent) { - this.parent = parent; + this.parent = parent; if (parent != null) { this.bufferManager = parent.bufferManager; } + + markers = new Hashtable(); + + if (null != parent) + this.areaClass = parent.areaClass; } public void setIsInTableCell() { @@ -202,4 +218,22 @@ } ((FONode) children.elementAt(this.marker)).rollback(snapshot); } + + + public void addMarker(Marker marker) throws FOPException { + String mcname = marker.getMarkerClassName(); + if (!markers.containsKey(mcname) && children.isEmpty()) + markers.put(mcname, marker); + else + throw new FOPException("fo:marker must be an initial child," + + "and 'marker-class-name' must be unique for same parent"); + } + + public boolean hasMarkers() { + return !markers.isEmpty(); + } + + public Vector getMarkers() { + return new Vector(markers.values()); + } } 1.18 +1 -3 xml-fop/src/org/apache/fop/fo/FObj.java Index: FObj.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FObj.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- FObj.java 2001/06/07 06:47:59 1.17 +++ FObj.java 2001/07/16 10:36:48 1.18 @@ -1,4 +1,4 @@ -/* $Id: FObj.java,v 1.17 2001/06/07 06:47:59 keiron Exp $ +/* $Id: FObj.java,v 1.18 2001/07/16 10:36:48 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -158,7 +158,5 @@ p=parent); this.properties.setWritingMode(p.getProperty("writing-mode").getEnum()); } - - } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo/flow Block.java
arved 01/07/16 03:37:58 Modified:src/org/apache/fop/fo/flow Block.java Log: AHS: initial marker support Revision ChangesPath 1.35 +13 -1 xml-fop/src/org/apache/fop/fo/flow/Block.java Index: Block.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Block.java,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- Block.java2001/07/13 02:30:33 1.34 +++ Block.java2001/07/16 10:37:57 1.35 @@ -1,4 +1,4 @@ -/*-- $Id: Block.java,v 1.34 2001/07/13 02:30:33 arved Exp $-- */ +/*-- $Id: Block.java,v 1.35 2001/07/16 10:37:57 arved Exp $-- */ /* * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the @@ -159,6 +159,17 @@ this.blockArea = new BlockArea(propMgr.getFontState(area.getFontInfo()), area.getAllocationWidth(), area.spaceLeft(), startIndent, endIndent, textIndent, align, alignLast, lineHeight); + this.blockArea.generatedBy = this; + this.areasGenerated++; + if (this.areasGenerated == 1) + this.blockArea.isFirst = true; + // for normal areas this should be the only pair + this.blockArea.addLineagePair(this, this.areasGenerated); + + // markers + if (this.hasMarkers()) + this.blockArea.addMarkers(this.getMarkers()); + this.blockArea.setParent(area); // BasicLink needs it blockArea.setPage(area.getPage()); blockArea.setBackgroundColor(backgroundColor); @@ -248,6 +259,7 @@ } //MessageHandler.error(" b:OK" + marker + " "); + this.blockArea.isLast = true; return new Status(Status.OK); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo/flow Marker.java
arved 01/07/16 03:43:40 Modified:src/org/apache/fop/fo/flow Marker.java Log: AHS: initial marker support Revision ChangesPath 1.2 +68 -23xml-fop/src/org/apache/fop/fo/flow/Marker.java Index: Marker.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Marker.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Marker.java 2001/07/13 12:36:09 1.1 +++ Marker.java 2001/07/16 10:43:40 1.2 @@ -1,4 +1,5 @@ -/*-- $Id: Marker.java,v 1.1 2001/07/13 12:36:09 keiron Exp $ -- +/*-- $Id: Marker.java,v 1.2 2001/07/16 10:43:40 arved Exp $-- */ +/* * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -9,30 +10,74 @@ // FOP import org.apache.fop.fo.*; import org.apache.fop.messaging.MessageHandler; -import org.apache.fop.fo.flow.*; import org.apache.fop.fo.properties.*; -import org.apache.fop.layout.AreaTree; +import org.apache.fop.layout.*; +import org.apache.fop.datatypes.*; import org.apache.fop.apps.FOPException; -/** - */ -public class Marker extends ToBeImplementedElement { - -public static class Maker extends FObj.Maker { -public FObj make(FObj parent, - PropertyList propertyList) throws FOPException { -return new Marker(parent, propertyList); -} -} - -public static FObj.Maker maker() { -return new Marker.Maker(); -} - -protected Marker(FObj parent, - PropertyList propertyList) throws FOPException { -super(parent, propertyList); -this.name = "fo:marker"; -} +public class Marker extends FObjMixed { + private String markerClassName; + private Area registryArea; + + public static class Maker extends FObj.Maker { + public FObj make(FObj parent, PropertyList propertyList) throws FOPException { + return new Marker(parent, propertyList); + } + } + + public static FObj.Maker maker() { + return new Marker.Maker(); + } + + public Marker(FObj parent, PropertyList propertyList) { + super(parent, propertyList); + this.name = "fo:marker"; + + // do check to see that 'this' is under fo:flow + + this.markerClassName = this.properties.get("marker-class-name").getString(); + + // check to ensure that no other marker with same parent + // has this 'marker-class-name' is in addMarker() method + try { + parent.addMarker(this); + } catch (FOPException fopex) { + MessageHandler.error("marker cannot be added to '" + parent + "'"); + } + } + + public Status layout(Area area) throws FOPException { + // no layout action desired + this.registryArea = area; + area.getPage().registerMarker(this); + // System.out.println("Marker being registered in area '" + area + "'"); + return new Status(Status.OK); + } + + public Status layoutMarker(Area area) throws FOPException { + if (this.marker == START) + this.marker = 0; + + int numChildren = this.children.size(); + for (int i = this.marker; i < numChildren; i++) { + FONode fo = (FONode) children.elementAt(i); + + Status status; + if ((status = fo.layout(area)).isIncomplete()) { + this.marker = i; + return status; + } + } + + return new Status(Status.OK); + } + + public String getMarkerClassName() { + return markerClassName; + } + + public Area getRegistryArea() { + return registryArea; + } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo/flow RetrieveMarker.java
arved 01/07/16 03:43:51 Modified:src/org/apache/fop/fo/flow RetrieveMarker.java Log: AHS: initial marker support Revision ChangesPath 1.2 +103 -22 xml-fop/src/org/apache/fop/fo/flow/RetrieveMarker.java Index: RetrieveMarker.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/RetrieveMarker.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- RetrieveMarker.java 2001/07/13 12:36:16 1.1 +++ RetrieveMarker.java 2001/07/16 10:43:51 1.2 @@ -1,4 +1,5 @@ -/*-- $Id: RetrieveMarker.java,v 1.1 2001/07/13 12:36:16 keiron Exp $ -- +/*-- $Id: RetrieveMarker.java,v 1.2 2001/07/16 10:43:51 arved Exp $-- */ +/* * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -9,30 +10,110 @@ // FOP import org.apache.fop.fo.*; import org.apache.fop.messaging.MessageHandler; -import org.apache.fop.fo.flow.*; import org.apache.fop.fo.properties.*; -import org.apache.fop.layout.AreaTree; +import org.apache.fop.layout.*; +import org.apache.fop.datatypes.*; import org.apache.fop.apps.FOPException; -/** - */ -public class RetrieveMarker extends ToBeImplementedElement { +// Java +import java.util.Vector; -public static class Maker extends FObj.Maker { -public FObj make(FObj parent, - PropertyList propertyList) throws FOPException { -return new RetrieveMarker(parent, propertyList); -} -} - -public static FObj.Maker maker() { -return new RetrieveMarker.Maker(); -} - -protected RetrieveMarker(FObj parent, - PropertyList propertyList) throws FOPException { -super(parent, propertyList); -this.name = "fo:retrieve-marker"; -} +public class RetrieveMarker extends FObjMixed { + private String retrieveClassName; + private int retrievePosition; + private int retrieveBoundary; + + public static class Maker extends FObj.Maker { + public FObj make(FObj parent, PropertyList propertyList) throws FOPException { + return new RetrieveMarker(parent, propertyList); + } + } + + public static FObj.Maker maker() { + return new RetrieveMarker.Maker(); + } + + public RetrieveMarker(FObj parent, PropertyList propertyList) { + super(parent, propertyList); + this.name = "fo:retrieve-marker"; + + this.retrieveClassName = this.properties.get("retrieve-class-name").getString(); + this.retrievePosition = this.properties.get("retrieve-position").getEnum(); + this.retrieveBoundary = this.properties.get("retrieve-boundary").getEnum(); + } + + public Status layout(Area area) throws FOPException { + // locate qualifying areas by 'marker-class-name' and + // 'retrieve-boundary'. Initially we will always check + // the containing page + Page containingPage = area.getPage(); + Marker bestMarker = searchPage(containingPage); + + // if marker not yet found, and 'retrieve-boundary' permits, + // search forward by Page + /* insert code for searching forward by Page, if allowed */ + + Status status = new Status(Status.AREA_FULL_NONE); + if (null != bestMarker) { + // System.out.println("Laying out marker in area '" + area + "'"); + status = bestMarker.layoutMarker(area); + } + + return status; + } + + private Marker searchPage(Page page) throws FOPException { + Vector pageMarkers = page.getMarkers(); + if (pageMarkers.isEmpty()) + return null; + + // search forward if 'first-starting-within-page' or + // 'first-including-carryover' + Marker fallback = null; + if (retrievePosition == RetrievePosition.FIC) { + for (int c = 0; c < pageMarkers.size(); c++) { + Marker currentMarker = (Marker)pageMarkers.elementAt(c); + if (currentMarker.getMarkerClassName().equals(retrieveClassName)) + return currentMarker; + } + + } else if (retrievePosition == R
cvs commit: xml-fop/src/org/apache/fop/fo/pagination Root.java PageSequence.java
arved 01/07/16 03:45:08 Modified:src/org/apache/fop/fo/pagination Root.java PageSequence.java Log: AHS: initial marker support Revision ChangesPath 1.12 +2 -1 xml-fop/src/org/apache/fop/fo/pagination/Root.java Index: Root.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/Root.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- Root.java 2001/07/09 03:03:24 1.11 +++ Root.java 2001/07/16 10:45:08 1.12 @@ -1,4 +1,4 @@ -/*-- $Id: Root.java,v 1.11 2001/07/09 03:03:24 arved Exp $ -- +/*-- $Id: Root.java,v 1.12 2001/07/16 10:45:08 arved Exp $ -- * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -48,6 +48,7 @@ this.name = "fo:root"; pageSequences = new Vector(); + if (parent != null) { throw new FOPException("root must be root element"); } 1.32 +5 -3 xml-fop/src/org/apache/fop/fo/pagination/PageSequence.java Index: PageSequence.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/PageSequence.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- PageSequence.java 2001/07/09 03:01:12 1.31 +++ PageSequence.java 2001/07/16 10:45:08 1.32 @@ -1,4 +1,4 @@ -/*-- $Id: PageSequence.java,v 1.31 2001/07/09 03:01:12 arved Exp $ -- +/*-- $Id: PageSequence.java,v 1.32 2001/07/16 10:45:08 arved Exp $ -- * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -241,8 +241,6 @@ MessageHandler.log(" [" + currentPageNumber); -formatStaticContent(areaTree); - if ((status.getCode() == Status.FORCE_PAGE_BREAK_EVEN) && ((currentPageNumber % 2) == 1)) { } else if ( (status.getCode() == Status.FORCE_PAGE_BREAK_ODD) && @@ -265,6 +263,10 @@ } } + + // because of markers, do after fo:flow +formatStaticContent(areaTree); + MessageHandler.log("]"); areaTree.addPage(currentPage); this.pageCount++; // used for 'force-page-count' calculations - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/layout Page.java Area.java
arved 01/07/16 03:45:43 Modified:src/org/apache/fop/layout Page.java Area.java Log: AHS: initial marker support Revision ChangesPath 1.13 +12 -1 xml-fop/src/org/apache/fop/layout/Page.java Index: Page.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/Page.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Page.java 2001/07/08 05:04:56 1.12 +++ Page.java 2001/07/16 10:45:43 1.13 @@ -1,4 +1,4 @@ -/* $Id: Page.java,v 1.12 2001/07/08 05:04:56 arved Exp $ +/* $Id: Page.java,v 1.13 2001/07/16 10:45:43 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -38,10 +38,13 @@ private Vector footnotes = null; + private Vector markers = null; + Page(AreaTree areaTree, int height, int width) { this.areaTree = areaTree; this.height = height; this.width = width; + markers = new Vector(); } public void setNumber(int number) { @@ -172,4 +175,12 @@ } footnotes.addElement(fb); } + + public void registerMarker(Marker marker) { + markers.addElement(marker); + } + + public Vector getMarkers() { + return this.markers; + } } 1.21 +31 -3 xml-fop/src/org/apache/fop/layout/Area.java Index: Area.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/Area.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- Area.java 2001/07/13 02:31:14 1.20 +++ Area.java 2001/07/16 10:45:43 1.21 @@ -1,4 +1,4 @@ -/* $Id: Area.java,v 1.20 2001/07/13 02:31:14 arved Exp $ +/* $Id: Area.java,v 1.21 2001/07/16 10:45:43 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -8,9 +8,11 @@ // FOP import org.apache.fop.datatypes.*; +import org.apache.fop.fo.flow.Marker; // Java import java.util.Vector; +import java.util.Hashtable; abstract public class Area extends Box { @@ -46,12 +48,29 @@ private IDReferences idReferences; + protected Vector markers; + + // as defined in Section 6.1.1 + public org.apache.fop.fo.FObj generatedBy; // corresponds to 'generated-by' trait + protected Hashtable returnedBy; + + // as defined in Section 6.1.1 + protected String areaClass; + + // as defined in Section 4.2.2 + public boolean isFirst = false; + public boolean isLast = false; + /* author : Seshadri G ** the fo which created it */ + // This is deprecated and should be phased out in + // favour of using 'generatedBy' public org.apache.fop.fo.FObj foCreator; public Area (FontState fontState) { - setFontState(fontState); + setFontState(fontState); + this.markers = new Vector(); + this.returnedBy = new Hashtable(); } /** @@ -64,10 +83,12 @@ * for this Area (its allocation rectangle) */ public Area (FontState fontState, int allocationWidth, int maxHeight) { - setFontState(fontState); + setFontState(fontState); this.allocationWidth = allocationWidth; this.contentRectangleWidth = allocationWidth; this.maxHeight = maxHeight; + this.markers = new Vector(); + this.returnedBy = new Hashtable(); } private void setFontState(FontState fontState) { @@ -340,4 +361,11 @@ return bp; } + public void addMarkers(Vector markers) { + markers.addAll(markers); + } + + public void addLineagePair(org.apache.fop.fo.FObj fo, int areaPosition) { + returnedBy.put(fo, new Integer(areaPosition)); + } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/layout AreaClass.java
arved 01/07/16 03:46:15 Added: src/org/apache/fop/layout AreaClass.java Log: AHS: initial marker support Revision ChangesPath 1.1 xml-fop/src/org/apache/fop/layout/AreaClass.java Index: AreaClass.java === /* $Id: AreaClass.java,v 1.1 2001/07/16 10:46:14 arved Exp $ * Copyright (C) 2001 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.layout; import org.apache.fop.apps.FOPException; public class AreaClass { public static String UNASSIGNED = "unassigned"; public static String XSL_NORMAL = "xsl-normal"; public static String XSL_ABSOLUTE = "xsl-absolute"; public static String XSL_FOOTNOTE = "xsl-footnote"; public static String XSL_SIDE_FLOAT = "xsl-side-float"; public static String XSL_BEFORE_FLOAT = "xsl-before-float"; // checker method public static String setAreaClass(String areaClass) throws FOPException { if (areaClass.equals(XSL_NORMAL) || areaClass.equals(XSL_ABSOLUTE) || areaClass.equals(XSL_FOOTNOTE) || areaClass.equals(XSL_SIDE_FLOAT) || areaClass.equals(XSL_BEFORE_FLOAT)) return areaClass; else throw new FOPException("Unknown area class '" + areaClass + "'"); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo/flow FootnoteBody.java Marker.java StaticContent.java
arved 01/07/16 20:14:29 Modified:src/org/apache/fop/fo/flow FootnoteBody.java Marker.java StaticContent.java Log: AHS: improving area information Revision ChangesPath 1.4 +4 -1 xml-fop/src/org/apache/fop/fo/flow/FootnoteBody.java Index: FootnoteBody.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/FootnoteBody.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- FootnoteBody.java 2001/03/04 21:34:51 1.3 +++ FootnoteBody.java 2001/07/17 03:14:29 1.4 @@ -1,4 +1,4 @@ -/*-- $Id: FootnoteBody.java,v 1.3 2001/03/04 21:34:51 klease Exp $ -- +/*-- $Id: FootnoteBody.java,v 1.4 2001/07/17 03:14:29 arved Exp $ -- The Apache Software License, Version 1.1 @@ -54,6 +54,7 @@ // FOP import org.apache.fop.fo.*; import org.apache.fop.layout.Area; +import org.apache.fop.layout.AreaClass; import org.apache.fop.apps.FOPException; import org.apache.fop.fo.properties.*; import org.apache.fop.layout.*; @@ -85,6 +86,7 @@ throws FOPException { super(parent, propertyList); this.name = "fo:footnote-body"; + this.areaClass = AreaClass.setAreaClass(AreaClass.XSL_FOOTNOTE); } public Status layout(Area area) throws FOPException { @@ -96,6 +98,7 @@ area.getAllocationWidth(), area.spaceLeft(), startIndent, endIndent, textIndent, align, alignLast, lineHeight); + blockArea.generatedBy = this; blockArea.setPage(area.getPage()); blockArea.start(); 1.3 +2 -1 xml-fop/src/org/apache/fop/fo/flow/Marker.java Index: Marker.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Marker.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Marker.java 2001/07/16 10:43:40 1.2 +++ Marker.java 2001/07/17 03:14:29 1.3 @@ -1,4 +1,4 @@ -/*-- $Id: Marker.java,v 1.2 2001/07/16 10:43:40 arved Exp $-- */ +/*-- $Id: Marker.java,v 1.3 2001/07/17 03:14:29 arved Exp $-- */ /* * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the @@ -50,6 +50,7 @@ public Status layout(Area area) throws FOPException { // no layout action desired this.registryArea = area; + area.addMarker(this); area.getPage().registerMarker(this); // System.out.println("Marker being registered in area '" + area + "'"); return new Status(Status.OK); 1.14 +4 -1 xml-fop/src/org/apache/fop/fo/flow/StaticContent.java Index: StaticContent.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/StaticContent.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- StaticContent.java2001/05/16 09:27:27 1.13 +++ StaticContent.java2001/07/17 03:14:29 1.14 @@ -1,4 +1,4 @@ -/*-- $Id: StaticContent.java,v 1.13 2001/05/16 09:27:27 keiron Exp $ -- +/*-- $Id: StaticContent.java,v 1.14 2001/07/17 03:14:29 arved Exp $ -- * * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the @@ -62,6 +62,9 @@ } + if (area instanceof org.apache.fop.layout.AreaContainer) + ((org.apache.fop.layout.AreaContainer)area).setAreaName(regionClass); + if (regionClass.equals(RegionBefore.REGION_CLASS)) { area.setAbsoluteHeight(-area.getMaxHeight()); } else if (regionClass.equals(RegionAfter.REGION_CLASS)) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/layout Area.java AreaContainer.java BodyAreaContainer.java ColumnArea.java
arved 01/07/16 20:15:57 Modified:src/org/apache/fop/layout Area.java AreaContainer.java BodyAreaContainer.java ColumnArea.java Log: AHS: improving area information Revision ChangesPath 1.22 +9 -1 xml-fop/src/org/apache/fop/layout/Area.java Index: Area.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/Area.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- Area.java 2001/07/16 10:45:43 1.21 +++ Area.java 2001/07/17 03:15:57 1.22 @@ -1,4 +1,4 @@ -/* $Id: Area.java,v 1.21 2001/07/16 10:45:43 arved Exp $ +/* $Id: Area.java,v 1.22 2001/07/17 03:15:57 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -361,11 +361,19 @@ return bp; } + public void addMarker(Marker marker) { + markers.addElement(marker); + } + public void addMarkers(Vector markers) { markers.addAll(markers); } public void addLineagePair(org.apache.fop.fo.FObj fo, int areaPosition) { returnedBy.put(fo, new Integer(areaPosition)); + } + + public Vector getMarkers() { + return markers; } } 1.13 +13 -1 xml-fop/src/org/apache/fop/layout/AreaContainer.java Index: AreaContainer.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/AreaContainer.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- AreaContainer.java2001/06/12 11:37:36 1.12 +++ AreaContainer.java2001/07/17 03:15:57 1.13 @@ -1,4 +1,4 @@ -/* $Id: AreaContainer.java,v 1.12 2001/06/12 11:37:36 keiron Exp $ +/* $Id: AreaContainer.java,v 1.13 2001/07/17 03:15:57 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -20,6 +20,10 @@ private int yPosition; // should be able to take value 'top' and 'bottom' too private int position; + // use this for identifying the general usage of the area, + // like 'main-reference-area' or 'region-before' + private String areaName; + public AreaContainer(FontState fontState, int xPosition, int yPosition, int allocationWidth, int maxHeight, int position) { @@ -63,4 +67,12 @@ public void shiftYPosition(int value) { yPosition += value; } + + public String getAreaName() { + return areaName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } } 1.9 +4 -1 xml-fop/src/org/apache/fop/layout/BodyAreaContainer.java Index: BodyAreaContainer.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/BodyAreaContainer.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- BodyAreaContainer.java2001/06/12 11:37:37 1.8 +++ BodyAreaContainer.java2001/07/17 03:15:57 1.9 @@ -1,4 +1,4 @@ -/* $Id: BodyAreaContainer.java,v 1.8 2001/06/12 11:37:37 keiron Exp $ +/* $Id: BodyAreaContainer.java,v 1.9 2001/07/17 03:15:57 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -68,13 +68,16 @@ mainRefAreaHeight = maxHeight - beforeFloatRefAreaHeight - footnoteRefAreaHeight; beforeFloatReferenceArea = new AreaContainer(fontState, xPosition, yPosition, allocationWidth, beforeFloatRefAreaHeight, Position.ABSOLUTE); + beforeFloatReferenceArea.setAreaName("before-float-reference-area"); this.addChild(beforeFloatReferenceArea); mainReferenceArea = new AreaContainer(fontState, xPosition, yPosition, allocationWidth, mainRefAreaHeight, Position.ABSOLUTE); + mainReferenceArea.setAreaName("main-reference-area"); this.addChild(mainReferenceArea); int footnoteRefAreaYPosition = yPosition - mainRefAreaHeight; footnoteReferenceArea = new AreaContainer(fontState, xPosition, footnoteRefAreaYPosition, allocationWidth, footnoteRefAreaHeight, Position.ABSOLUTE); + footnoteReferenceArea.setAreaName("footnote-reference-area"); this.addChild(footnoteReferenceArea); // all padding and border-width must be 0
cvs commit: xml-fop/src/org/apache/fop/render/xml XMLRenderer.java
arved 01/07/16 20:16:29 Modified:src/org/apache/fop/render/xml XMLRenderer.java Log: AHS: improving area information Revision ChangesPath 1.19 +32 -6 xml-fop/src/org/apache/fop/render/xml/XMLRenderer.java Index: XMLRenderer.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/xml/XMLRenderer.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- XMLRenderer.java 2001/06/05 12:51:53 1.18 +++ XMLRenderer.java 2001/07/17 03:16:29 1.19 @@ -1,4 +1,4 @@ -/* $Id: XMLRenderer.java,v 1.18 2001/06/05 12:51:53 keiron Exp $ +/* $Id: XMLRenderer.java,v 1.19 2001/07/17 03:16:29 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources." @@ -149,7 +149,7 @@ * @param area the area container to render */ public void renderAreaContainer(AreaContainer area) { -writeStartTag(""); +writeStartTag(""); Enumeration e = area.getChildren().elements(); while (e.hasMoreElements()) { Box b = (Box) e.nextElement(); @@ -194,9 +194,35 @@ * @param area the block area to render */ public void renderBlockArea(BlockArea area) { -writeStartTag(""); + StringBuffer baText = new StringBuffer(); + baText.append(""); +writeStartTag(baText.toString()); + + // write out marker info + java.util.Vector markers = area.getMarkers(); + if (!markers.isEmpty()) { + writeStartTag(""); + for (int m = 0; m < markers.size(); m++) { + org.apache.fop.fo.flow.Marker marker = + (org.apache.fop.fo.flow.Marker)markers.elementAt(m); + StringBuffer maText = new StringBuffer(); + maText.append(""); + writeEmptyElementTag(maText.toString()); + } + writeEndTag(""); + } + Enumeration e = area.getChildren().elements(); while (e.hasMoreElements()) { Box b = (Box) e.nextElement(); @@ -310,7 +336,7 @@ public void renderPage(Page page) { BodyAreaContainer body; AreaContainer before, after; -writeStartTag(""); +writeStartTag(""); body = page.getBody(); before = page.getBefore(); after = page.getAfter(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/render/awt AWTRenderer.java
arved 01/07/22 15:12:44 Modified:src/org/apache/fop/render/awt AWTRenderer.java Log: Ralph LaChance/Andy Langowitz: improvements to AWTRenderer (borders,backgrounds...) Revision ChangesPath 1.26 +154 -36 xml-fop/src/org/apache/fop/render/awt/AWTRenderer.java Index: AWTRenderer.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/awt/AWTRenderer.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- AWTRenderer.java 2001/07/12 13:03:24 1.25 +++ AWTRenderer.java 2001/07/22 22:12:44 1.26 @@ -161,18 +161,57 @@ * @param g the green component * @param b the blue component */ + + // corrected 7/13/01 aml,rlc to properly handle thickness + // protected void addLine(int x1, int y1, int x2, int y2, int th, - float r, float g, float b) { + float r, float g, float b) + { graphics.setColor(new Color (r, g, b)); -// graphics.setColor(Color.red); -graphics.drawLine((int)(x1 / 1000f), - pageHeight - (int)(y1 / 1000f), (int)(x2 / 1000f), - pageHeight - (int)(y2 / 1000f)); +int x = x1; +int y = y1; +int height, width; +if (x1 == x2) //vertical line +{ + height = y2 - y1; + if (height > 0) //y coordinates are reversed between fo and AWT + { +height = -height; +y = y2; + } + width = th; + if (width < 0) + { +width = -width; +x -= width; + } +} +else //horizontal line +{ + width = x2 - x1; + if (width < 0) + { +width = -width; +x = x2; + } + height = th; + if (height > 0) //y coordinates are reversed between fo and AWT + { +height = -height; +y -= height; + } +} +addRect (x, y, width, height, false); + +//// graphics.setColor(Color.red); +//graphics.drawLine((int)(x1 / 1000f), +// pageHeight - (int)(y1 / 1000f), (int)(x2 / 1000f), +// pageHeight - (int)(y2 / 1000f)); } /** - * draw a filled rectangle + * draw a rectangle * * @param x the x position of left edge in millipoints * @param y the y position of top edge in millipoints @@ -182,15 +221,17 @@ * @param g the green component * @param b the blue component */ + + // changed by aml/rlc to use helper function that + // corrects for integer roundoff, and to remove 3D effect + protected void addRect(int x, int y, int w, int h, float r, float g, float b) { graphics.setColor(new Color (r, g, b)); // graphics.setColor(Color.green); -graphics.drawRect((int)(x / 1000f), - pageHeight - (int)(y / 1000f), (int)(w / 1000f), - -(int)(h / 1000f)); +addRect (x, y, w, h, true); } - + /** * draw a filled rectangle * @@ -205,23 +246,51 @@ * @param fg the green component of the fill * @param fb the blue component of the fill */ + + // changed by aml/rlc to use helper function that + // corrects for integer roundoff protected void addRect(int x, int y, int w, int h, float r, - float g, float b, float fr, float fg, float fb) { + float g, float b, float fr, float fg, float fb) + { graphics.setColor(new Color (r, g, b)); -graphics.fill3DRect((int)(x / 1000f), -pageHeight - (int)(y / 1000f), (int)(w / 1000f), --(int)(h / 1000f), true); +addRect (x, y, w, h, true); +graphics.setColor(new Color (fr, fg, fb)); +addRect (x, y, w, h, false); } /** + * draw a filled rectangle in the current color + * + * @param x the x position of left edge in millipoints + * @param y the y position of top edge in millipoints + * @param w the width in millipoints + * @param h the height in millipoints + * @param drawAsOutline true for draw, false for fill + */ + + // helper function by aml/rlc to correct integer roundoff problems + // +protected void addRect(int x, int y, int w, int h, boolean drawAsOutline) +{ +int startx = (x + 500)/ 1000; +int starty = page
cvs commit: xml-fop/src/org/apache/fop/fo/flow RetrieveMarker.java
arved 01/07/22 18:58:56 Modified:src/org/apache/fop/fo/flow RetrieveMarker.java Log: AHS: continued work on fo:marker support Revision ChangesPath 1.3 +54 -19xml-fop/src/org/apache/fop/fo/flow/RetrieveMarker.java Index: RetrieveMarker.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/RetrieveMarker.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- RetrieveMarker.java 2001/07/16 10:43:51 1.2 +++ RetrieveMarker.java 2001/07/23 01:58:56 1.3 @@ -1,4 +1,4 @@ -/*-- $Id: RetrieveMarker.java,v 1.2 2001/07/16 10:43:51 arved Exp $-- */ +/*-- $Id: RetrieveMarker.java,v 1.3 2001/07/23 01:58:56 arved Exp $-- */ /* * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the @@ -48,44 +48,72 @@ // 'retrieve-boundary'. Initially we will always check // the containing page Page containingPage = area.getPage(); - Marker bestMarker = searchPage(containingPage); + Marker bestMarker = searchPage(containingPage, true); // if marker not yet found, and 'retrieve-boundary' permits, // search forward by Page - /* insert code for searching forward by Page, if allowed */ + if ((null == bestMarker) && (retrieveBoundary != RetrieveBoundary.PAGE)) { + // System.out.println("Null bestMarker and searching..."); + Page currentPage = containingPage; + boolean isFirstCall = true; + while (bestMarker == null) { + Page previousPage = + locatePreviousPage(currentPage, retrieveBoundary, isFirstCall); + isFirstCall = false; + // System.out.println("Previous page = '" + previousPage + "'"); + bestMarker = searchPage(previousPage, false); + currentPage = previousPage; + } + } Status status = new Status(Status.AREA_FULL_NONE); if (null != bestMarker) { - // System.out.println("Laying out marker in area '" + area + "'"); + // System.out.println("Laying out marker '" + bestMarker + "' in area '" + area + "'"); + // the 'markers' referred to in this method are internal; they have + // nothing to do with fo:marker + bestMarker.resetMarker(); status = bestMarker.layoutMarker(area); } return status; } - private Marker searchPage(Page page) throws FOPException { + private Marker searchPage(Page page, boolean isContainingPage) + throws FOPException { Vector pageMarkers = page.getMarkers(); - if (pageMarkers.isEmpty()) + if (pageMarkers.isEmpty()) { + // System.out.println("No markers on page"); return null; - + } + + // if no longer the containing page (fo:retrieve-marker, or the page + // being processed), grab the last qualifying marker on this one + if (!isContainingPage) { + for (int c = pageMarkers.size(); c > 0; c--) { + Marker currentMarker = (Marker)pageMarkers.elementAt(c-1); + if (currentMarker.getMarkerClassName().equals(retrieveClassName)) { + return currentMarker; + } + } + } + // search forward if 'first-starting-within-page' or // 'first-including-carryover' - Marker fallback = null; if (retrievePosition == RetrievePosition.FIC) { for (int c = 0; c < pageMarkers.size(); c++) { Marker currentMarker = (Marker)pageMarkers.elementAt(c); - if (currentMarker.getMarkerClassName().equals(retrieveClassName)) + if (currentMarker.getMarkerClassName().equals(retrieveClassName)) { return currentMarker; +
cvs commit: xml-fop/src/org/apache/fop/fo/pagination PageSequence.java
arved 01/07/22 18:59:38 Modified:src/org/apache/fop/fo/pagination PageSequence.java Log: AHS: continued work on fo:marker support Revision ChangesPath 1.33 +5 -2 xml-fop/src/org/apache/fop/fo/pagination/PageSequence.java Index: PageSequence.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/PageSequence.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- PageSequence.java 2001/07/16 10:45:08 1.32 +++ PageSequence.java 2001/07/23 01:59:38 1.33 @@ -1,4 +1,4 @@ -/*-- $Id: PageSequence.java,v 1.32 2001/07/16 10:45:08 arved Exp $ -- +/*-- $Id: PageSequence.java,v 1.33 2001/07/23 01:59:38 arved Exp $ -- * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -264,7 +264,9 @@ } - // because of markers, do after fo:flow + // because of markers, do after fo:flow (likely also + // justifiable because of spec) + currentPage.setPageSequence(this); formatStaticContent(areaTree); MessageHandler.log("]"); @@ -627,6 +629,7 @@ String formattedPageNumber = pageNumberGenerator.makeFormattedPageNumber(this.currentPageNumber); currentPage.setFormattedNumber(formattedPageNumber); + currentPage.setPageSequence(this); formatStaticContent(areaTree); MessageHandler.log("[forced-" + firstAvailPageNumber + "]"); areaTree.addPage(currentPage); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/layout AreaTree.java
arved 01/07/22 19:00:03 Modified:src/org/apache/fop/layout AreaTree.java Log: AHS: continued work on fo:marker support Revision ChangesPath 1.9 +41 -2 xml-fop/src/org/apache/fop/layout/AreaTree.java Index: AreaTree.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/AreaTree.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- AreaTree.java 2001/06/12 11:37:36 1.8 +++ AreaTree.java 2001/07/23 02:00:03 1.9 @@ -1,4 +1,4 @@ -/* $Id: AreaTree.java,v 1.8 2001/06/12 11:37:36 keiron Exp $ +/* $Id: AreaTree.java,v 1.9 2001/07/23 02:00:03 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -13,6 +13,7 @@ import org.apache.fop.render.Renderer; import org.apache.fop.datatypes.IDReferences; import org.apache.fop.extensions.ExtensionObj; +import org.apache.fop.fo.pagination.PageSequence; // Java import java.io.IOException; @@ -67,5 +68,43 @@ return rootExtensions; } - + public Page getNextPage(Page current, boolean isWithinPageSequence, + boolean isFirstCall) { + Page nextPage = null; + int pageIndex = 0; + if (isFirstCall) + pageIndex = pageList.size(); + else + pageIndex = pageList.indexOf(current); + if ((pageIndex + 1) < pageList.size()) { + nextPage = (Page)pageList.elementAt(pageIndex + 1); + if (isWithinPageSequence && !nextPage.getPageSequence().equals(current.getPageSequence())) { + nextPage = null; + } + } + return nextPage; + } + + public Page getPreviousPage(Page current, boolean isWithinPageSequence, + boolean isFirstCall) { + Page previousPage = null; + int pageIndex = 0; + if (isFirstCall) + pageIndex = pageList.size(); + else + pageIndex = pageList.indexOf(current); + // System.out.println("Page index = " + pageIndex); + if ((pageIndex - 1) >= 0) { + previousPage = (Page)pageList.elementAt(pageIndex - 1); + PageSequence currentPS = current.getPageSequence(); + // System.out.println("Current PS = '" + currentPS + "'"); + PageSequence previousPS = previousPage.getPageSequence(); + // System.out.println("Previous PS = '" + previousPS + "'"); + if (isWithinPageSequence && !previousPS.equals(currentPS)) { + // System.out.println("Outside page sequence"); + previousPage = null; + } + } + return previousPage; + } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/layout Page.java
arved 01/07/22 19:00:37 Modified:src/org/apache/fop/layout Page.java Log: AHS: continued work on fo:marker support Revision ChangesPath 1.14 +16 -1 xml-fop/src/org/apache/fop/layout/Page.java Index: Page.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/Page.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- Page.java 2001/07/16 10:45:43 1.13 +++ Page.java 2001/07/23 02:00:37 1.14 @@ -1,4 +1,4 @@ -/* $Id: Page.java,v 1.13 2001/07/16 10:45:43 arved Exp $ +/* $Id: Page.java,v 1.14 2001/07/23 02:00:37 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -11,6 +11,7 @@ import org.apache.fop.fo.flow.*; import org.apache.fop.fo.*; import org.apache.fop.apps.*; +import org.apache.fop.fo.pagination.PageSequence; // Java import java.util.Vector; @@ -29,6 +30,8 @@ private AreaTree areaTree; + private PageSequence pageSequence; + protected int pageNumber = 0; protected String formattedPageNumber; @@ -47,6 +50,18 @@ markers = new Vector(); } + public void setPageSequence(PageSequence pageSequence) { + this.pageSequence = pageSequence; + } + + public PageSequence getPageSequence() { + return pageSequence; + } + + public AreaTree getAreaTree() { + return areaTree; + } + public void setNumber(int number) { this.pageNumber = number; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo/flow Flow.java
arved 01/07/23 17:56:39 Modified:src/org/apache/fop/fo/flow Flow.java Log: AHS: short license Revision ChangesPath 1.20 +4 -49 xml-fop/src/org/apache/fop/fo/flow/Flow.java Index: Flow.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Flow.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- Flow.java 2001/02/11 00:59:26 1.19 +++ Flow.java 2001/07/24 00:56:39 1.20 @@ -1,52 +1,7 @@ -/*-- $Id: Flow.java,v 1.19 2001/02/11 00:59:26 arved Exp $ -- - - - The Apache Software License, Version 1.1 - - -Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must -include the following acknowledgment: "This product includes software -developed by the Apache Software Foundation (http://www.apache.org/)." -Alternately, this acknowledgment may appear in the software itself, if -and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to -endorse or promote products derived from this software without prior -written permission. For written permission, please contact -[EMAIL PROTECTED] - - 5. Products derived from this software may not be called "Apache", nor may -"Apache" appear in their name, without prior written permission of the -Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - 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/>. - +/*-- $Id: Flow.java,v 1.20 2001/07/24 00:56:39 arved Exp $ + * Copyright (C) 2001 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.fo.flow; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo/flow ListBlock.java
arved 01/07/23 17:57:32 Modified:src/org/apache/fop/fo/flow ListBlock.java Log: AHS: adding support for 'returned-by' Revision ChangesPath 1.17 +20 -52xml-fop/src/org/apache/fop/fo/flow/ListBlock.java Index: ListBlock.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/ListBlock.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- ListBlock.java2001/03/04 21:34:51 1.16 +++ ListBlock.java2001/07/24 00:57:32 1.17 @@ -1,52 +1,7 @@ -/*-- $Id: ListBlock.java,v 1.16 2001/03/04 21:34:51 klease Exp $ -- - - - The Apache Software License, Version 1.1 - - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - [EMAIL PROTECTED] - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - 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/>. - +/*-- $Id: ListBlock.java,v 1.17 2001/07/24 00:57:32 arved Exp $ + * Copyright (C) 2001 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.fo.flow; @@ -136,9 +91,21 @@ } BlockArea blockArea = new BlockArea(propMgr.getFontState(area.getFontInfo()), - area.getAllocationWidth(), - area.spaceLeft(), startIndent, endIndent, 0, align, - alignLast, lineHeight); + area.getAllocationWidth(), + area.spaceLeft(), startIndent, endIndent, 0, align, + al
cvs commit: xml-fop/src/org/apache/fop/fo/flow ListItem.java
arved 01/07/23 17:57:57 Modified:src/org/apache/fop/fo/flow ListItem.java Log: AHS: adding support for 'returned-by' Revision ChangesPath 1.13 +27 -60xml-fop/src/org/apache/fop/fo/flow/ListItem.java Index: ListItem.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/ListItem.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- ListItem.java 2001/03/04 21:34:51 1.12 +++ ListItem.java 2001/07/24 00:57:57 1.13 @@ -1,52 +1,7 @@ -/*-- $Id: ListItem.java,v 1.12 2001/03/04 21:34:51 klease Exp $ -- - - - The Apache Software License, Version 1.1 - - -Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must -include the following acknowledgment: "This product includes software -developed by the Apache Software Foundation (http://www.apache.org/)." -Alternately, this acknowledgment may appear in the software itself, if -and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to -endorse or promote products derived from this software without prior -written permission. For written permission, please contact -[EMAIL PROTECTED] - - 5. Products derived from this software may not be called "Apache", nor may -"Apache" appear in their name, without prior written permission of the -Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - 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/>. - +/*-- $Id: ListItem.java,v 1.13 2001/07/24 00:57:57 arved Exp $ + * Copyright (C) 2001 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.fo.flow; @@ -125,15 +80,26 @@ new BlockArea(propMgr.getFontState(area.getFontInfo()), area.getAllocationWidth(), area.spaceLeft(), 0, 0, 0, align, alignLast, lineHeight); + this.blockArea.generatedBy = this; + this.areasGenerated++; + if (this.areasGenerated == 1) + this.blockArea.isFirst = true; + // for normal areas this should be the only pair + this.blockArea.addLineagePair(this, this.areasGenerated); + + // markers + if (this.hasMarkers()) + this.blockArea.addMarkers(this.getMarkers()); +
cvs commit: xml-fop/src/org/apache/fop/fo/flow ListItemBody.java
arved 01/07/23 17:58:22 Modified:src/org/apache/fop/fo/flow ListItemBody.java Log: AHS: adding support for 'returned-by'; placeholder Revision ChangesPath 1.9 +9 -49 xml-fop/src/org/apache/fop/fo/flow/ListItemBody.java Index: ListItemBody.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/ListItemBody.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ListItemBody.java 2001/02/23 06:00:29 1.8 +++ ListItemBody.java 2001/07/24 00:58:22 1.9 @@ -1,52 +1,7 @@ -/*-- $Id: ListItemBody.java,v 1.8 2001/02/23 06:00:29 kellyc Exp $ -- - - - The Apache Software License, Version 1.1 - - -Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must -include the following acknowledgment: "This product includes software -developed by the Apache Software Foundation (http://www.apache.org/)." -Alternately, this acknowledgment may appear in the software itself, if -and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to -endorse or promote products derived from this software without prior -written permission. For written permission, please contact -[EMAIL PROTECTED] - - 5. Products derived from this software may not be called "Apache", nor may -"Apache" appear in their name, without prior written permission of the -Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - 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/>. - +/*-- $Id: ListItemBody.java,v 1.9 2001/07/24 00:58:22 arved Exp $ + * Copyright (C) 2001 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.fo.flow; @@ -87,6 +42,11 @@ area.getIDReferences().initializeID(id,area); } + /* For calculating the lineage - The fo:list-item-body formatting object + * does not generate any areas. The fo:list-item-body formatting object + * returns the sequence of areas created by concatenating the sequences + * of areas returned by each of the children of the fo:list-item-body. */ + int numChildren = this.children.size(); for (int i = this.marker; i < numChildren; i++) { FObj fo = (FObj) children.elementAt(i); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo/flow ListItemLabel.java
arved 01/07/23 17:58:34 Modified:src/org/apache/fop/fo/flow ListItemLabel.java Log: AHS: adding support for 'returned-by'; placeholder Revision ChangesPath 1.9 +18 -58xml-fop/src/org/apache/fop/fo/flow/ListItemLabel.java Index: ListItemLabel.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/ListItemLabel.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ListItemLabel.java2001/02/23 06:00:29 1.8 +++ ListItemLabel.java2001/07/24 00:58:34 1.9 @@ -1,52 +1,7 @@ -/*-- $Id: ListItemLabel.java,v 1.8 2001/02/23 06:00:29 kellyc Exp $ -- - - - The Apache Software License, Version 1.1 - - -Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must -include the following acknowledgment: "This product includes software -developed by the Apache Software Foundation (http://www.apache.org/)." -Alternately, this acknowledgment may appear in the software itself, if -and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to -endorse or promote products derived from this software without prior -written permission. For written permission, please contact -[EMAIL PROTECTED] - - 5. Products derived from this software may not be called "Apache", nor may -"Apache" appear in their name, without prior written permission of the -Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - 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/>. - +/*-- $Id: ListItemLabel.java,v 1.9 2001/07/24 00:58:34 arved Exp $ + * Copyright (C) 2001 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.fo.flow; @@ -82,19 +37,24 @@ public Status layout(Area area) throws FOPException { int numChildren = this.children.size(); - if (numChildren != 1) { - throw new FOPException("list-item-label must have exactly one block in this version of FOP"); - } + if (numChildren != 1) { + throw new FOPException("list-item-label must have exactly one block in this version of FOP"); + } // initialize id String id = this.properties.get("id").getString(); area.getIDReferences().initializeID(id,area); - Block block = (Block) children.elementAt(0); - - Status status; - status = block.layout(area); - area.addDisplaySpace(-block.getAreaHeight()); - return status; + Block block = (Block) children.elementAt(0); + + /* For calculating the lineage - The fo:list-item-la
cvs commit: xml-fop/src/org/apache/fop/layout Area.java
arved 01/07/25 17:52:45 Modified:src/org/apache/fop/fo/flow Block.java FootnoteBody.java ListBlock.java ListItem.java RetrieveMarker.java src/org/apache/fop/layout Area.java Log: AHS: changed Area methods slightly Revision ChangesPath 1.36 +5 -6 xml-fop/src/org/apache/fop/fo/flow/Block.java Index: Block.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Block.java,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- Block.java2001/07/16 10:37:57 1.35 +++ Block.java2001/07/26 00:52:45 1.36 @@ -1,6 +1,5 @@ -/*-- $Id: Block.java,v 1.35 2001/07/16 10:37:57 arved Exp $-- */ -/* - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. +/*-- $Id: Block.java,v 1.36 2001/07/26 00:52:45 arved Exp $-- */ +/* Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. */ @@ -159,10 +158,10 @@ this.blockArea = new BlockArea(propMgr.getFontState(area.getFontInfo()), area.getAllocationWidth(), area.spaceLeft(), startIndent, endIndent, textIndent, align, alignLast, lineHeight); - this.blockArea.generatedBy = this; + this.blockArea.setGeneratedBy(this); this.areasGenerated++; if (this.areasGenerated == 1) - this.blockArea.isFirst = true; + this.blockArea.isFirst(true); // for normal areas this should be the only pair this.blockArea.addLineagePair(this, this.areasGenerated); @@ -259,7 +258,7 @@ } //MessageHandler.error(" b:OK" + marker + " "); - this.blockArea.isLast = true; + this.blockArea.isLast(true); return new Status(Status.OK); } 1.5 +7 -50 xml-fop/src/org/apache/fop/fo/flow/FootnoteBody.java Index: FootnoteBody.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/FootnoteBody.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- FootnoteBody.java 2001/07/17 03:14:29 1.4 +++ FootnoteBody.java 2001/07/26 00:52:45 1.5 @@ -1,52 +1,7 @@ -/*-- $Id: FootnoteBody.java,v 1.4 2001/07/17 03:14:29 arved Exp $ -- - - - The Apache Software License, Version 1.1 - - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - [EMAIL PROTECTED] - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS''
cvs commit: xml-fop/src/codegen foproperties.xml
arved 01/07/25 17:53:26 Modified:src/codegen foproperties.xml Log: AHS: activated space-start/space-end Revision ChangesPath 1.22 +2 -6 xml-fop/src/codegen/foproperties.xml Index: foproperties.xml === RCS file: /home/cvs/xml-fop/src/codegen/foproperties.xml,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- foproperties.xml 2001/07/16 10:35:47 1.21 +++ foproperties.xml 2001/07/26 00:53:26 1.22 @@ -882,15 +882,11 @@ space-end -false -ToBeImplemented -none +GenericSpace space-start -false -ToBeImplemented -none +GenericSpace - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/render/xml XMLRenderer.java
arved 01/07/26 17:18:27 Modified:src/org/apache/fop/render/xml XMLRenderer.java Log: AHS: changed signatures Revision ChangesPath 1.20 +43 -6 xml-fop/src/org/apache/fop/render/xml/XMLRenderer.java Index: XMLRenderer.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/xml/XMLRenderer.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- XMLRenderer.java 2001/07/17 03:16:29 1.19 +++ XMLRenderer.java 2001/07/27 00:18:27 1.20 @@ -1,4 +1,4 @@ -/* $Id: XMLRenderer.java,v 1.19 2001/07/17 03:16:29 arved Exp $ +/* $Id: XMLRenderer.java,v 1.20 2001/07/27 00:18:27 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources." @@ -197,11 +197,11 @@ StringBuffer baText = new StringBuffer(); baText.append(""); writeStartTag(baText.toString()); @@ -231,6 +231,43 @@ writeEndTag(""); } + public void renderInlineArea(InlineArea area) { + StringBuffer iaText = new StringBuffer(); + iaText.append(""); +writeStartTag(iaText.toString()); + + // write out marker info + java.util.Vector markers = area.getMarkers(); + if (!markers.isEmpty()) { + writeStartTag(""); + for (int m = 0; m < markers.size(); m++) { + org.apache.fop.fo.flow.Marker marker = + (org.apache.fop.fo.flow.Marker)markers.elementAt(m); + StringBuffer maText = new StringBuffer(); + maText.append(""); + writeEmptyElementTag(maText.toString()); + } + writeEndTag(""); + } + +Enumeration e = area.getChildren().elements(); +while (e.hasMoreElements()) { +Box b = (Box) e.nextElement(); +b.render(this); +} +writeEndTag(""); + } + /** * render a display space to XML * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/docs/examples/markers - New directory
arved 01/07/26 19:12:33 xml-fop/docs/examples/markers - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/docs/examples/markers glossary.xml glossary.xsl
arved 01/07/26 19:13:24 Added: docs/examples/markers glossary.xml glossary.xsl Log: AHS: fo:marker examples Revision ChangesPath 1.1 xml-fop/docs/examples/markers/glossary.xml Index: glossary.xml === basic-link The fo:basic-link is used for representing the start resource of a simple link. bidi-override The fo:bidi-override inline formatting object is used where it is necessary to override the default Unicode-bidirectionality algorithm direction for different (or nested) inline scripts in mixed-language documents. block The fo:block formatting object is commonly used for formatting paragraphs, titles, headlines, figure and table captions, etc. block-container The fo:block-container flow object is used to generate a block-level reference-area. character The fo:character flow object represents a character that is mapped to a glyph for presentation. color-profile Used to declare a color profile for a stylesheet. conditional-page-master-reference The fo:conditional-page-master-reference is used to identify a page-master that is to be used when the conditions on its use are satisfied. declarations Used to group global declarations for a stylesheet. external-graphic The fo:external-graphic flow object is used for a graphic where the graphics data resides outside of the XML result tree in the fo namespace. float The fo:float serves two purposes. It can be used so that during the normal placement of content, some related content is formatted into a separate area at beginning of the page (or of some following page) where it is available to be read without immediately intruding on the reader. Alternatively, it can be used when an area is intended to float to one side, with normal content flowing alongside. flow The content of the fo:flow formatting object is a sequence of flow objects that provides the flowing text content that is distributed into pages. footnote The fo:footnote is used to produce a footnote citation and the corresponding footnote. footnote-body The fo:footnote-body is used to generate the content of the footnote. initial-property-set The fo:initial-property-set specifies formatting properties for the first line of an fo:block. inline The fo:inline formatting object is commonly used for formatting a portion of text with a background or enclosing it in a border. inline-container The fo:inline-container flow object is used to generate an inline reference-area. instream-foreign-object The fo:instream-foreign-object flow object is used for an inline graphic or other "generic" object where the object data resides as descendants of the fo:instream-foreign-object. layout-master-set The fo:layout-master-set is a wrapper around all masters used in the document. leader The fo:leader formatting object is used to generate leaders consisting either of a rule or of a row of a repeating character or cyclically repeating pattern of characters that may be used for connecting two text formatting objects. list-block The fo:list-block flow object is used to format a list. list-item The fo:list-item formatting object contains the label and the body of an item in a list. list-item-body The fo:list-item-body formatting object contains the content of the body of a list-item. list-item-label The fo:list-item-label formatting object contains the content of the label of a list-item; typically used to either enumerate, identify, or adorn the list-item's body. marker The fo:marker is used in conjunction with fo:retrieve-marker to produce running headers or footers. multi-case The fo:multi-case is used to contain (within an fo:multi-switch) each alternative sub-tree of formatting objects among which the parent fo:multi-switch will choose one to show and will hide the rest. multi-properties The fo:multi-properties is used to switch between two or more property sets that are associated with a given portion of content. multi-property-set The fo:multi-property-set is used to specify an alternative
cvs commit: xml-fop CHANGES
arved 01/08/09 19:07:05 Modified:.CHANGES Log: Changes from 0.18 to 0.19 Revision ChangesPath 1.7 +185 -0xml-fop/CHANGES Index: CHANGES === RCS file: /home/cvs/xml-fop/CHANGES,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- CHANGES 2001/04/02 06:59:47 1.6 +++ CHANGES 2001/08/10 02:07:05 1.7 @@ -1,3 +1,188 @@ +== +Done since 0.19 release + +== +Done since 0.18 release + +*** Building +- improvements and fixes to build.xml (ASandstrom,KCampbell) + +*** General +- Changes to support Batik (KLiddle) +{ FOP now uses Batik to render svg +This is handled for awt - using batik to render to a graphic +and pdf. +Pdf still requires better image support. +The elements and properties are generated from the svgelements.xml +document. +The version of batik is 17/05/2001 cvs. } +- memory buffering (Seshadri G.K.) + +*** Examples +- Added Norwegian hyphenation based on Rune Kleveland's original +nohyphb.tex TeX patterns from the ispell-norsk-2.0 package (TEngvig) +adds Danish text (Lars Michael Johnsen) +- fixed up fills and borders for better appearance (KLiddle) +- Fixed basic-link horizontal position with justification turned on. (KCampbell) +- add border-collapse property (KLease) +- Added CID Font example (KCampbell) + +*** Hyphenation +- corrected danish hyphenation (Carlos Villegas) +- adds Danish hyphenation file (Carlos Villegas) +- Added Norwegian hyphenation based on Rune Kleveland's original +nohyphb.tex TeX patterns from the ispell-norsk-2.0 package (TEngvig) +- Hyphenation patterns for russian (TEngvig) + +*** codegen +- The elements and properties are generated from the svgelements.xml +document. (KLiddle) + +*** Package org.apache.fop.apps: +- support for XMLRenderer (ASandstrom) +- Removed uses of System.out where throwing a FOPException should suffice. +Refactored code to throw FOPExceptions so embedding FOP wont' cause app +server JVMs to exit. (KCampbell) +- adding -text and -pcl options to help text (FJannidis) +- sets baseDir to a URL string rather than a file path string (KLiddle) + +*** Package org.apache.fop.datatypes: +- New datatype to represent the property border-separation (KLease) + +*** Package org.apache.fop.fo: +- fixed a couple of problems when placing foreign objects near +page break (KLiddle) +- Support for LengthPair property type (KLease) +- restored support for external svg images (KLiddle) + +*** Package org.apache.fop.fo.flow: +- inlining of images (ASandstrom, Seshadri G.K.) +- footnote height problem fix (KLiddle) +- fixed a couple of problems when placing foreign objects near +page break (KLiddle) +- added support for 'number-columns-repeated' (G. Pretterhofer) +- fixes a null pointer ex if area is removed before creating area (KLiddle) +- footnote height/id reference problem fixes (KLiddle) +- Fix body positioning; remove widow and orphan handling for rows (KLease) +- Make borders closer to CR spec (KLease) +- Improves cell borders when border-collapse=collapse (the default). Note that +this doesn't implement the full CR, but it's a big improvement and will handle +many common cases. (KLease) +- Stop tables from breaking too early, but make sure that all cells are +composed with the same maxHeight and that absolute Height is set correctly. +In TableRow.java, remove old commented out stuff and put back space-before +(for now) and fix a potential bug involving space-before. (KLease) +- Overflows may cause a row to be re-laid out, need to skip cell content +that has already been processed. (AWelch) +- Put back background on table-column and table-cell (KLease) +- increasing padding problem fix (KLiddle) +- Each column in the row should start with the same height available. (AWelch) +- For borders to be drawn properly on overflowed rows must process all +children. (AWelch) +- Use Constants values. (KLease) + +*** Package org.apache.fop.fo.pagination: +- running page num ctr now instance variable for servlet use (KLiddle) +- Made logging go to the same stream (out) for pages and the newline +after a page sequence. The newline was previously going to the err stream. +(KCampbell) + +*** Package org.apache.fop.fonts: +- Patch from [EMAIL PROTECTED] to use unicode escape char instead of +pound sign because it was interpreted as an invalid double byte char in +Japanese locale (ja_JP.EUC) and wouldn't compile. (TEngvig) +- Fixes a signedness bug in handling cmaps that caused some fonts to be +invalid. (TEngvig) +- Some fonts contains malformed
cvs commit: xml-fop build.xml
arved 01/08/13 17:16:20 Modified:.build.xml Log: AHS: build improvements; version change Revision ChangesPath 1.39 +3 -5 xml-fop/build.xml Index: build.xml === RCS file: /home/cvs/xml-fop/build.xml,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- build.xml 2001/08/12 17:37:25 1.38 +++ build.xml 2001/08/14 00:16:20 1.39 @@ -164,7 +164,7 @@ - + @@ -669,7 +669,6 @@ - @@ -684,9 +683,8 @@ - - - + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/lib buildtools.jar
arved 01/08/13 17:17:16 Modified:lib buildtools.jar Log: AHS: updated buildtools Revision ChangesPath 1.9 +189 -204 xml-fop/lib/buildtools.jar <> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop CHANGES
arved 01/08/13 17:20:26 Modified:.CHANGES Log: AHS: FOP 0.20.1 remedial fixes Revision ChangesPath 1.9 +7 -0 xml-fop/CHANGES Index: CHANGES === RCS file: /home/cvs/xml-fop/CHANGES,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- CHANGES 2001/08/11 01:25:26 1.8 +++ CHANGES 2001/08/14 00:20:26 1.9 @@ -1,4 +1,11 @@ == +Done since 0.20 release + +*** General +- immediate fix to PDFRenderer and LazyFont, leading up to 0.20.1 +- build.xml improvements (Weiqi Gao) + +== Done since 0.19 release *** General - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop build.xml
arved 01/08/13 17:52:43 Modified:.build.xml Log: AHS: need to specifically delete tarfiles after all Revision ChangesPath 1.40 +1 -0 xml-fop/build.xml Index: build.xml === RCS file: /home/cvs/xml-fop/build.xml,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- build.xml 2001/08/14 00:16:20 1.39 +++ build.xml 2001/08/14 00:52:42 1.40 @@ -669,6 +669,7 @@ + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/lib jimi-1.0.jar
arved 02/02/09 17:51:22 Removed: lib Tag: fop-0_20_2-maintain jimi-1.0.jar Log: Remove for license reasons - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/lib jimi-License.txt
arved 02/02/09 17:51:50 Removed: lib Tag: fop-0_20_2-maintain jimi-License.txt Log: Remove for license reasons - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/lib BSF.license.txt
arved 02/02/09 17:52:35 Added: lib Tag: fop-0_20_2-maintain BSF.license.txt Log: Proper license for BSF Revision ChangesPath No revision No revision 1.1.2.1 +171 -0xml-fop/lib/Attic/BSF.license.txt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/lib readme
arved 02/02/09 18:01:15 Modified:lib Tag: fop-0_20_2-maintain readme Log: Indicated changes wrt Jimi Revision ChangesPath No revision No revision 1.4.2.1 +7 -0 xml-fop/lib/readme Index: readme === RCS file: /home/cvs/xml-fop/lib/readme,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -r1.4 -r1.4.2.1 --- readme18 May 2001 09:56:02 - 1.4 +++ readme10 Feb 2002 02:01:15 - 1.4.2.1 @@ -14,3 +14,10 @@ Xalan 2 in the classpath when building it.) stylebook.jarJar used for creating the FOP website + +*** OPTIONAL *** + +jimi.jar May be obtained from http://java.sun.com/products/jimi/. + Place jimi*.jar in lib/; modify batch/shell script + classpaths. + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/docs/design/understanding - New directory
arved 02/03/17 09:21:14 xml-fop/docs/design/understanding - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/docs/design/understanding area_tree.xml book.xml fo_tree.xml handling_attributes.xml images.xml layout_managers.xml layout_process.xml pdf_library.xml properties.xml renderers.xml status.xml svg.xml understanding.xml xml_parsing.xml
arved 02/03/17 09:21:53 Added: docs/design/understanding area_tree.xml book.xml fo_tree.xml handling_attributes.xml images.xml layout_managers.xml layout_process.xml pdf_library.xml properties.xml renderers.xml status.xml svg.xml understanding.xml xml_parsing.xml Log: Extra design commentary Revision ChangesPath 1.1 xml-fop/docs/design/understanding/area_tree.xml Index: area_tree.xml === Area Tree All you wanted to know about the Area Tree ! Yet to come :)) The series of notes for developers has started but it has not yet gone so far ! Keep watching 1.1 xml-fop/docs/design/understanding/book.xml Index: book.xml === http://xml.apache.org/fop/"; label="About FOP"/> 1.1 xml-fop/docs/design/understanding/fo_tree.xml Index: fo_tree.xml === FO Tree All you wanted to know about FO Tree ! The FO Tree is a representation of the XSL:FO document. This represents the Objectify step from the spec. The Refinement step is part of reading and using the properties which may happen immediately or during the layout process. Each xml element is represented by a java object. For pagination the classes are in org.apache.fop.fo.pagination.*, for elements in the flow they are in org.apache.fop.fo.flow.* and some others are in org.apache.fop.fo.*. The base class for all objects in the tree is FONode. The base class for all FO Objects is FObj. (insert diagram here) There is a class for each element in the FO set. An object is created for each element in the FO Tree. This object holds the properties for the FO Object. When the object is created it is setup. It is given its element name, the FOUserAgent - for resolving properties etc. - the logger and the attributes. The methods handleAttributes() and setuserAgent(), common to FONode, are used in this process. The object will then be given any text data or child elements. Then the end() method is called. The end method is used by a number of elements to indicate that it can do certain processing since all the children have been added. Some validity checking is done during these steps. The user can be warned of the error and processing can continue if possible. The FO Tree is simply a heirarchy of java objects that represent the fo elements from xml. The traversal is done by the layout or structure process only in the flow elements. The XML attributes on each element are passed to the object. The objects that represent FO objects then convert the attributes into properties. Since properties can be inherited the PropertyList class handles resolving properties for a particular element. All properties are specified in an XML file. Classes are created automatically during the build process. (insert diagram here) In some cases the element may be moved to have a different parent, for example markers, or the inheritance could be different, for example initial property set. The base class for foreign XML is XMLObj. This class handles creating a DOM Element and the setting of attributes. It also can create a DOM Document if it is a top level element, class XMLElement. This class must be extended for the namespace of the XML elements. For unknown namespaces the class is UnknowXMLObj. (insert diagram here) If some special processing is needed then the top level element can extend the XMLObj. For example the SVGElement makes the special DOM required for batik and gets the size of the svg. Foreign XML will usually be in an fo:instream-foreign-object, the XML will be passed to the render as a DOM where the render will be able to handle it. Other XML from an unknwon namespace will be ignored. By using element mappings it is possible to read other XML and either set information on the area tree create pseudo FO Objects that create areas in the area tree create FO Objects If
cvs commit: xml-fop/docs/design/alt.design - New directory
arved 02/03/17 09:22:16 xml-fop/docs/design/alt.design - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/docs/design/alt.design AbsolutePosition.png BorderCommonStyle.png parserPersistence.png processPlumbing.png Properties.png PropertyClasses.png PropertyConsts.png PropertyStaticsOverview.png property-super-classes-full.png PropNames.png SAXParsing.png VerticalAlign.png XML-event-buffer.png XMLEventQueue.png xmlevent-queue.png AbsolutePosition.dia processPlumbing.dia Properties.dia PropertyClasses.dia PropertyConsts.dia PropertyStaticsOverview.dia property-super-classes-full.dia PropNames.dia SAXParsing.dia VerticalAlign.dia XML-event-buffer.dia XMLEventQueue.dia xmlevent-queue.dia AbsolutePosition.png.xml alt.properties.xml book.xml BorderCommonStyle.png.xml classes-overview.xml properties-classes.xml Properties.png.xml PropertyConsts.png.xml propertyExpressions.xml PropNames.png.xml VerticalAlign.png.xml xml-parsing.xml dirlist.html
arved 02/03/17 09:24:11 Added: docs/design/alt.design AbsolutePosition.png BorderCommonStyle.png parserPersistence.png processPlumbing.png Properties.png PropertyClasses.png PropertyConsts.png PropertyStaticsOverview.png property-super-classes-full.png PropNames.png SAXParsing.png VerticalAlign.png XML-event-buffer.png XMLEventQueue.png xmlevent-queue.png AbsolutePosition.dia processPlumbing.dia Properties.dia PropertyClasses.dia PropertyConsts.dia PropertyStaticsOverview.dia property-super-classes-full.dia PropNames.dia SAXParsing.dia VerticalAlign.dia XML-event-buffer.dia XMLEventQueue.dia xmlevent-queue.dia AbsolutePosition.png.xml alt.properties.xml book.xml BorderCommonStyle.png.xml classes-overview.xml properties-classes.xml Properties.png.xml PropertyConsts.png.xml propertyExpressions.xml PropNames.png.xml VerticalAlign.png.xml xml-parsing.xml dirlist.html Log: Extra design commentary Revision ChangesPath 1.1 xml-fop/docs/design/alt.design/AbsolutePosition.png <> 1.1 xml-fop/docs/design/alt.design/BorderCommonStyle.png <> 1.1 xml-fop/docs/design/alt.design/parserPersistence.png <> 1.1 xml-fop/docs/design/alt.design/processPlumbing.png <> 1.1 xml-fop/docs/design/alt.design/Properties.png <> 1.1 xml-fop/docs/design/alt.design/PropertyClasses.png <> 1.1 xml-fop/docs/design/alt.design/PropertyConsts.png <> 1.1 xml-fop/docs/design/alt.design/PropertyStaticsOverview.png <> 1.1 xml-fop/docs/design/alt.design/property-super-classes-full.png <> 1.1 xml-fop/docs/design/alt.design/PropNames.png <> 1.1 xml-fop/docs/design/alt.design/SAXParsing.png <> 1.1 xml-fop/docs/design/alt.design/VerticalAlign.png <> 1.1 xml-fop/docs/design/alt.design/XML-event-buffer.png <> 1.1 xml-fop/docs/design/alt.design/XMLEventQueue.png <> 1.1 xml-fop/docs/design/alt.design/xmlevent-queue.png <> 1.1 xml-fop/docs/design/alt.design/AbsolutePosition.dia <> 1.1 xml-fop/docs/design/alt.design/processPlumbing.dia <> 1.1 xml-fop/docs/design/alt.design/Properties.dia <> 1.1 xml-fop/docs/design/alt.design/PropertyClasses.dia <> 1.1 xml-fop/docs/design/alt.design/PropertyConsts.dia <> 1.1 xml-fop/docs/design/alt.design/PropertyStaticsOverview.dia <> 1.1 xml-fop/docs/design/alt.design/property-super-classes-full.dia <> 1.1 xml-fop/docs/design/alt.design/PropNames.dia <> 1.1 xml-fop/docs/design/alt.design/SAXParsing.dia <> 1.1 xml-fop/docs/design/alt.design/VerticalAlign.dia <> 1.1 xml-fop/docs/design/alt.design/XML-event-buffer.dia <> 1.1 xml-fop/docs/design/alt.design/XMLEventQueue.dia <> 1.1 xml-fop/docs/design/alt.design/xmlevent-queue.dia <> 1.1 xml-fop/docs/design/alt.design/AbsolutePosition.png.xml Index: AbsolutePosition.png.xml === AbsolutePosition diagram 1.1 xml-fop/docs/design/alt.design/alt.properties.xml Index: alt.properties.xml === Implementing Properties The following discussion focusses on the relationship between Flow Objects in the Flow Object tree, and properties. There
cvs commit: xml-fop/src/codegen foproperties.xml
arved 02/04/23 15:22:53 Modified:src/codegen Tag: fop-0_20_2-maintain foproperties.xml Log: support for background-image (all renderers) author: Michael Gratton Revision ChangesPath No revision No revision 1.25.2.3 +9 -2 xml-fop/src/codegen/foproperties.xml Index: foproperties.xml === RCS file: /x1/home/cvs/xml-fop/src/codegen/foproperties.xml,v retrieving revision 1.25.2.2 retrieving revision 1.25.2.3 diff -u -r1.25.2.2 -r1.25.2.3 --- foproperties.xml 6 Dec 2001 21:28:21 - 1.25.2.2 +++ foproperties.xml 23 Apr 2002 22:22:52 - 1.25.2.3 @@ -397,13 +397,20 @@ background-image false -ToBeImplemented +String none background-repeat false -ToBeImplemented +Enum + + repeat + repeat-x + repeat-y + no-repeat + inherit + repeat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo PropertyManager.java
arved 02/04/23 15:23:39 Modified:src/org/apache/fop/fo Tag: fop-0_20_2-maintain PropertyManager.java Log: support for background-image (all renderers) author: Michael Gratton Revision ChangesPath No revision No revision 1.7.2.3 +61 -18xml-fop/src/org/apache/fop/fo/PropertyManager.java Index: PropertyManager.java === RCS file: /x1/home/cvs/xml-fop/src/org/apache/fop/fo/PropertyManager.java,v retrieving revision 1.7.2.2 retrieving revision 1.7.2.3 diff -u -r1.7.2.2 -r1.7.2.3 --- PropertyManager.java 9 Jan 2002 11:32:57 - 1.7.2.2 +++ PropertyManager.java 23 Apr 2002 22:23:39 - 1.7.2.3 @@ -1,5 +1,5 @@ /* - * $Id: PropertyManager.java,v 1.7.2.2 2002/01/09 11:32:57 keiron Exp $ + * $Id: PropertyManager.java,v 1.7.2.3 2002/04/23 22:23:39 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -7,27 +7,32 @@ package org.apache.fop.fo; -import org.apache.fop.layout.FontState; -import org.apache.fop.layout.FontInfo; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.MarginProps; -import org.apache.fop.layout.BackgroundProps; -import org.apache.fop.layout.MarginInlineProps; -import org.apache.fop.layout.AccessibilityProps; -import org.apache.fop.layout.AuralProps; -import org.apache.fop.layout.RelativePositionProps; -import org.apache.fop.layout.AbsolutePositionProps; +import java.net.MalformedURLException; +import java.text.FieldPosition; +import java.text.MessageFormat; + +import org.apache.fop.apps.FOPException; import org.apache.fop.fo.properties.BreakAfter; import org.apache.fop.fo.properties.BreakBefore; import org.apache.fop.fo.properties.Constants; -import org.apache.fop.layout.HyphenationProps; -import org.apache.fop.apps.FOPException; -import java.text.MessageFormat; -import java.text.FieldPosition; +import org.apache.fop.fo.properties.TextDecoration; +import org.apache.fop.image.FopImage; +import org.apache.fop.image.FopImageFactory; +import org.apache.fop.image.FopImageException; +import org.apache.fop.layout.AbsolutePositionProps; +import org.apache.fop.layout.AccessibilityProps; import org.apache.fop.layout.Area; +import org.apache.fop.layout.AuralProps; +import org.apache.fop.layout.BackgroundProps; +import org.apache.fop.layout.BorderAndPadding; import org.apache.fop.layout.ColumnArea; +import org.apache.fop.layout.FontInfo; +import org.apache.fop.layout.FontState; +import org.apache.fop.layout.HyphenationProps; +import org.apache.fop.layout.MarginInlineProps; +import org.apache.fop.layout.MarginProps; +import org.apache.fop.layout.RelativePositionProps; import org.apache.fop.layout.TextState; -import org.apache.fop.fo.properties.TextDecoration; public class PropertyManager { @@ -35,6 +40,7 @@ private FontState fontState = null; private BorderAndPadding borderAndPadding = null; private HyphenationProps hyphProps = null; +private BackgroundProps bgProps = null; private String[] saLeft; private String[] saRight; @@ -212,8 +218,45 @@ } public BackgroundProps getBackgroundProps() { -BackgroundProps bp = new BackgroundProps(); -return bp; +if (bgProps == null) { +this.bgProps = new BackgroundProps(); + // bgProps.backAttachment = this.properties.get("background-attachment").getEnum(); + bgProps.backColor = + this.properties.get("background-color").getColorType(); + + String src = this.properties.get("background-image").getString(); + if (src.equalsIgnoreCase("none")) { + bgProps.backImage = null; + } + else if (src.equalsIgnoreCase("inherit")) { + // XXX: implement this + bgProps.backImage = null; + } + else { + try { + bgProps.backImage = FopImageFactory.Make(src); + } + catch (MalformedURLException urlex) { + bgProps.backImage = null; + // XXX: use a logger instead + System.out.println("Error creating background image: " + + urlex.getMessage()); + } + catch (FopImageException imgex) { + bgProps.backImage = null; + // XXX: use a logger instead + System.out.println("Error creating background image: " + + imgex.getMessage(
cvs commit: xml-fop/src/org/apache/fop/fo/flow Block.java BlockContainer.java ListBlock.java Table.java TableBody.java TableCell.java TableColumn.java TableRow.java
arved 02/04/23 15:24:45 Modified:src/org/apache/fop/fo/flow Tag: fop-0_20_2-maintain Block.java BlockContainer.java ListBlock.java Table.java TableBody.java TableCell.java TableColumn.java TableRow.java Log: support for background-image (all renderers) author: Michael Gratton Revision ChangesPath No revision No revision 1.41.2.4 +2 -5 xml-fop/src/org/apache/fop/fo/flow/Block.java Index: Block.java === RCS file: /x1/home/cvs/xml-fop/src/org/apache/fop/fo/flow/Block.java,v retrieving revision 1.41.2.3 retrieving revision 1.41.2.4 diff -u -r1.41.2.3 -r1.41.2.4 --- Block.java9 Jan 2002 11:32:57 - 1.41.2.3 +++ Block.java23 Apr 2002 22:24:44 - 1.41.2.4 @@ -1,5 +1,5 @@ /* - * $Id: Block.java,v 1.41.2.3 2002/01/09 11:32:57 keiron Exp $ + * $Id: Block.java,v 1.41.2.4 2002/04/23 22:24:44 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -53,7 +53,6 @@ int spaceAfter; int textIndent; int keepWithNext; -ColorType backgroundColor; int blockWidows; int blockOrphans; @@ -154,8 +153,6 @@ this.properties.get("text-indent").getLength().mvalue(); this.keepWithNext = this.properties.get("keep-with-next").getEnum(); -this.backgroundColor = -this.properties.get("background-color").getColorType(); this.blockWidows = this.properties.get("widows").getNumber().intValue(); @@ -245,7 +242,7 @@ blockArea.setParent(area);// BasicLink needs it blockArea.setPage(area.getPage()); -blockArea.setBackgroundColor(backgroundColor); +blockArea.setBackground(propMgr.getBackgroundProps()); blockArea.setBorderAndPadding(propMgr.getBorderAndPadding()); blockArea.setHyphenation(propMgr.getHyphenationProps()); blockArea.start(); 1.11.2.1 +2 -6 xml-fop/src/org/apache/fop/fo/flow/BlockContainer.java Index: BlockContainer.java === RCS file: /x1/home/cvs/xml-fop/src/org/apache/fop/fo/flow/BlockContainer.java,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -u -r1.11 -r1.11.2.1 --- BlockContainer.java 6 Aug 2001 09:12:59 - 1.11 +++ BlockContainer.java 23 Apr 2002 22:24:44 - 1.11.2.1 @@ -1,5 +1,5 @@ /* - * $Id: BlockContainer.java,v 1.11 2001/08/06 09:12:59 keiron Exp $ + * $Id: BlockContainer.java,v 1.11.2.1 2002/04/23 22:24:44 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -21,7 +21,6 @@ public class BlockContainer extends FObj { -ColorType backgroundColor; int position; int top; @@ -87,9 +86,6 @@ this.marker = 0; -this.backgroundColor = -this.properties.get("background-color").getColorType(); - this.position = this.properties.get("position").getEnum(); this.top = this.properties.get("top").getLength().mvalue(); this.bottom = this.properties.get("bottom").getLength().mvalue(); @@ -119,7 +115,7 @@ position); areaContainer.setPage(area.getPage()); -areaContainer.setBackgroundColor(backgroundColor); +areaContainer.setBackground(propMgr.getBackgroundProps()); areaContainer.setBorderAndPadding(propMgr.getBorderAndPadding()); areaContainer.start(); 1.21.2.1 +2 -5 xml-fop/src/org/apache/fop/fo/flow/ListBlock.java Index: ListBlock.java === RCS file: /x1/home/cvs/xml-fop/src/org/apache/fop/fo/flow/ListBlock.java,v retrieving revision 1.21 retrieving revision 1.21.2.1 diff -u -r1.21 -r1.21.2.1 --- ListBlock.java20 Aug 2001 11:19:23 - 1.21 +++ ListBlock.java23 Apr 2002 22:24:44 - 1.21.2.1 @@ -1,5 +1,5 @@ /* - * $Id: ListBlock.java,v 1.21 2001/08/20 11:19:23 keiron Exp $ + * $Id: ListBlock.java,v 1.21.2.1 2002/04/23 22:24:44 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these source
cvs commit: xml-fop/src/org/apache/fop/fo/pagination RegionAfter.java RegionBefore.java RegionBody.java RegionEnd.java RegionStart.java
arved 02/04/23 15:25:25 Modified:src/org/apache/fop/fo/pagination Tag: fop-0_20_2-maintain RegionAfter.java RegionBefore.java RegionBody.java RegionEnd.java RegionStart.java Log: support for background-image (all renderers) author: Michael Gratton Revision ChangesPath No revision No revision 1.9.2.1 +7 -5 xml-fop/src/org/apache/fop/fo/pagination/RegionAfter.java Index: RegionAfter.java === RCS file: /x1/home/cvs/xml-fop/src/org/apache/fop/fo/pagination/RegionAfter.java,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -u -r1.9 -r1.9.2.1 --- RegionAfter.java 30 Jul 2001 20:29:25 - 1.9 +++ RegionAfter.java 23 Apr 2002 22:25:25 - 1.9.2.1 @@ -1,5 +1,5 @@ /* - * $Id: RegionAfter.java,v 1.9 2001/07/30 20:29:25 tore Exp $ + * $Id: RegionAfter.java,v 1.9.2.1 2002/04/23 22:25:25 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -57,10 +57,12 @@ // this.properties.get("reference-orientation"); // this.properties.get("writing-mode"); -return new RegionArea(allocationRectangleXPosition, - allocationRectangleYPosition - - allocationRectangleHeight + extent, - allocationRectangleWidth, extent); +RegionArea area = new RegionArea(allocationRectangleXPosition, + allocationRectangleYPosition + - allocationRectangleHeight + extent, + allocationRectangleWidth, extent); + area.setBackground(bProps); + return area; } 1.9.2.1 +6 -4 xml-fop/src/org/apache/fop/fo/pagination/RegionBefore.java Index: RegionBefore.java === RCS file: /x1/home/cvs/xml-fop/src/org/apache/fop/fo/pagination/RegionBefore.java,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -u -r1.9 -r1.9.2.1 --- RegionBefore.java 30 Jul 2001 20:29:25 - 1.9 +++ RegionBefore.java 23 Apr 2002 22:25:25 - 1.9.2.1 @@ -1,5 +1,5 @@ /* - * $Id: RegionBefore.java,v 1.9 2001/07/30 20:29:25 tore Exp $ + * $Id: RegionBefore.java,v 1.9.2.1 2002/04/23 22:25:25 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -58,9 +58,11 @@ // this.properties.get("reference-orientation"); // this.properties.get("writing-mode"); -return new RegionArea(allocationRectangleXPosition, - allocationRectangleYPosition, - allocationRectangleWidth, extent); +RegionArea area = new RegionArea(allocationRectangleXPosition, + allocationRectangleYPosition, + allocationRectangleWidth, extent); + area.setBackground(bProps); + return area; } 1.11.2.1 +3 -9 xml-fop/src/org/apache/fop/fo/pagination/RegionBody.java Index: RegionBody.java === RCS file: /x1/home/cvs/xml-fop/src/org/apache/fop/fo/pagination/RegionBody.java,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -u -r1.11 -r1.11.2.1 --- RegionBody.java 20 Aug 2001 11:19:24 - 1.11 +++ RegionBody.java 23 Apr 2002 22:25:25 - 1.11.2.1 @@ -1,5 +1,5 @@ /* - * $Id: RegionBody.java,v 1.11 2001/08/20 11:19:24 keiron Exp $ + * $Id: RegionBody.java,v 1.11.2.1 2002/04/23 22:25:25 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -11,7 +11,6 @@ import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyList; import org.apache.fop.fo.properties.Overflow; -import org.apache.fop.datatypes.ColorType; import org.apache.fop.apps.FOPException; import org.apache.fop.layout.RegionArea; import org.apache.fop.layout.BodyRegionArea; @@ -36,8 +35,6 @@ public static final String REGION_CLASS = "body"; -ColorType backgroundColor; - protected RegionBody(FObj parent, PropertyList propertyList) throws FOPException { super(parent, propertyList); @@ -61,9 +58,6 @@
cvs commit: xml-fop/src/org/apache/fop/layout Area.java BackgroundProps.java BodyRegionArea.java RegionArea.java
arved 02/04/23 15:26:10 Modified:src/org/apache/fop/layout Tag: fop-0_20_2-maintain Area.java BackgroundProps.java BodyRegionArea.java RegionArea.java Log: support for background-image (all renderers) author: Michael Gratton Revision ChangesPath No revision No revision 1.24.2.1 +6 -6 xml-fop/src/org/apache/fop/layout/Area.java Index: Area.java === RCS file: /x1/home/cvs/xml-fop/src/org/apache/fop/layout/Area.java,v retrieving revision 1.24 retrieving revision 1.24.2.1 diff -u -r1.24 -r1.24.2.1 --- Area.java 30 Jul 2001 20:29:27 - 1.24 +++ Area.java 23 Apr 2002 22:26:10 - 1.24.2.1 @@ -1,5 +1,5 @@ /* - * $Id: Area.java,v 1.24 2001/07/30 20:29:27 tore Exp $ + * $Id: Area.java,v 1.24.2.1 2002/04/23 22:26:10 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -48,7 +48,7 @@ /* the page this area is on */ protected Page page; -protected ColorType backgroundColor; +protected BackgroundProps background; private IDReferences idReferences; @@ -206,8 +206,8 @@ return this.page; } -public ColorType getBackgroundColor() { -return this.backgroundColor; +public BackgroundProps getBackground() { +return this.background; } // Must handle conditionality here, depending on isLast/isFirst @@ -291,8 +291,8 @@ this.page = page; } -public void setBackgroundColor(ColorType bgColor) { -this.backgroundColor = bgColor; +public void setBackground(BackgroundProps bg) { +this.background = bg; } public void setBorderAndPadding(BorderAndPadding bp) { 1.3.2.1 +5 -5 xml-fop/src/org/apache/fop/layout/BackgroundProps.java Index: BackgroundProps.java === RCS file: /x1/home/cvs/xml-fop/src/org/apache/fop/layout/BackgroundProps.java,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -u -r1.3 -r1.3.2.1 --- BackgroundProps.java 6 Aug 2001 09:14:24 - 1.3 +++ BackgroundProps.java 23 Apr 2002 22:26:10 - 1.3.2.1 @@ -1,5 +1,5 @@ /* - * $Id: BackgroundProps.java,v 1.3 2001/08/06 09:14:24 keiron Exp $ + * $Id: BackgroundProps.java,v 1.3.2.1 2002/04/23 22:26:10 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -7,9 +7,9 @@ package org.apache.fop.layout; +import org.apache.fop.datatypes.ColorType; import org.apache.fop.datatypes.Length; - -import java.awt.Color; +import org.apache.fop.image.FopImage; /** * Store all hyphenation related properties on an FO. @@ -17,8 +17,8 @@ */ public class BackgroundProps { public int backAttachment; -public Color backColor; -public String backImage; +public ColorType backColor; +public FopImage backImage; // null if no image public int backRepeat; public Length backPosHorizontal; public Length backPosVertical; 1.3.2.1 +12 -4 xml-fop/src/org/apache/fop/layout/BodyRegionArea.java Index: BodyRegionArea.java === RCS file: /x1/home/cvs/xml-fop/src/org/apache/fop/layout/BodyRegionArea.java,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -u -r1.3 -r1.3.2.1 --- BodyRegionArea.java 30 Jul 2001 20:29:27 - 1.3 +++ BodyRegionArea.java 23 Apr 2002 22:26:10 - 1.3.2.1 @@ -1,5 +1,5 @@ /* - * $Id: BodyRegionArea.java,v 1.3 2001/07/30 20:29:27 tore Exp $ + * $Id: BodyRegionArea.java,v 1.3.2.1 2002/04/23 22:26:10 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -25,9 +25,17 @@ } public BodyAreaContainer makeBodyAreaContainer() { -return new BodyAreaContainer(null, xPosition, yPosition, width, - height, Position.ABSOLUTE, columnCount, - columnGap); + System.out.println(" +++ Constructing new BodyAreaContainer:"); + System.out.println(" -> x : " + xPosition); + System.out.println(" -> y : " + yPosition); + System.out.println(" -> allocW: " + width);
cvs commit: xml-fop/src/org/apache/fop/render AbstractRenderer.java PrintRenderer.java
arved 02/04/23 15:26:59 Modified:src/org/apache/fop/render Tag: fop-0_20_2-maintain AbstractRenderer.java PrintRenderer.java Log: support for background-image (all renderers) author: Michael Gratton Revision ChangesPath No revision No revision 1.4.2.2 +229 -12 xml-fop/src/org/apache/fop/render/AbstractRenderer.java Index: AbstractRenderer.java === RCS file: /x1/home/cvs/xml-fop/src/org/apache/fop/render/AbstractRenderer.java,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.2 diff -u -r1.4.2.1 -r1.4.2.2 --- AbstractRenderer.java 17 Mar 2002 23:37:07 - 1.4.2.1 +++ AbstractRenderer.java 23 Apr 2002 22:26:58 - 1.4.2.2 @@ -1,5 +1,5 @@ /* - * $Id: AbstractRenderer.java,v 1.4.2.1 2002/03/17 23:37:07 chrisg Exp $ + * $Id: AbstractRenderer.java,v 1.4.2.2 2002/04/23 22:26:58 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -8,9 +8,9 @@ package org.apache.fop.render; // FOP -import org.apache.fop.pdf.PDFPathPaint; -import org.apache.fop.pdf.PDFColor; import org.apache.fop.image.ImageArea; +import org.apache.fop.image.FopImage; +import org.apache.fop.image.FopImageException; import org.apache.fop.apps.FOPException; import org.apache.fop.fo.properties.*; import org.apache.fop.layout.*; @@ -64,6 +64,133 @@ protected abstract void doFrame(Area area); /** + * Renders an area's background. + * @param x the x position of the left edge in millipoints + * @param y the y position of top edge in millipoints + * @param w the width in millipoints + * @param h the height in millipoints + */ +protected void doBackground(Area area, int x, int y, int w, int h) { + System.out.println("Doing background: " + area); + System.out.println(" x:" + x + " y:" + y); + System.out.println(" w:" + w + " h:" + h); + + if (h == 0 || w == 0) + return; + + BackgroundProps props = area.getBackground(); + if (props == null) + return; + + if (props.backColor.alpha() == 0) { + this.addFilledRect(x, y, w, -h, props.backColor); + } + + // XXX: I'm ignoring area rotation here 8( + // is this taken care of for me elsewhere in the codebase? + if (props.backImage != null) { + int imgW; + int imgH; + try { + // XXX: do correct unit conversion here + imgW = props.backImage.getWidth() * 1000; + imgH = props.backImage.getHeight() * 1000; + } + catch (FopImageException fie) { + log.error("Error obtaining bg image width and height", fie); + return; + } + + int dx = x; + int dy = y; + int endX = x + w; + int endY = y - h; + int clipW = w % imgW; + int clipH = h % imgH; + + boolean repeatX = true; + boolean repeatY = true; + switch (props.backRepeat) { + case BackgroundRepeat.REPEAT: + break; + + case BackgroundRepeat.REPEAT_X: + repeatY = false; + break; + + case BackgroundRepeat.REPEAT_Y: + repeatX = false; + break; + + case BackgroundRepeat.NO_REPEAT: + repeatX = false; + repeatY = false; + break; + + case BackgroundRepeat.INHERIT: + // XXX: what to do here? + break; + + default: + log.error("Ignoring invalid background-repeat property"); + } + + FontState fs = area.getFontState(); + + while (dy > endY) { // looping through rows + while (dx < endX) { // looping through cols + if (dx + imgW <= endX) { + // no x clipping + if (dy - imgH >= endY) { + // no x clipping, no y clipping + drawImageScaled(dx, dy, imgW, imgH, + props.backImage, fs); + } + else { + // no x clipping, y clipping + drawImageClipped(dx, dy, + 0, 0, imgW, clipH, + props.backImage, fs); + } + } + else { + //
cvs commit: xml-fop/src/org/apache/fop/render/xml XMLRenderer.java
arved 02/04/23 15:28:09 Modified:src/org/apache/fop/render/xml Tag: fop-0_20_2-maintain XMLRenderer.java Log: support for background-image (all renderers) author: Michael Gratton Revision ChangesPath No revision No revision 1.27.2.2 +42 -1 xml-fop/src/org/apache/fop/render/xml/XMLRenderer.java Index: XMLRenderer.java === RCS file: /x1/home/cvs/xml-fop/src/org/apache/fop/render/xml/XMLRenderer.java,v retrieving revision 1.27.2.1 retrieving revision 1.27.2.2 diff -u -r1.27.2.1 -r1.27.2.2 --- XMLRenderer.java 17 Mar 2002 23:37:07 - 1.27.2.1 +++ XMLRenderer.java 23 Apr 2002 22:28:09 - 1.27.2.2 @@ -1,5 +1,5 @@ /* - * $Id: XMLRenderer.java,v 1.27.2.1 2002/03/17 23:37:07 chrisg Exp $ + * $Id: XMLRenderer.java,v 1.27.2.2 2002/04/23 22:28:09 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -11,6 +11,7 @@ import org.apache.fop.svg.*; import org.apache.fop.render.Renderer; import org.apache.fop.render.AbstractRenderer; +import org.apache.fop.image.FopImage; import org.apache.fop.image.ImageArea; import org.apache.fop.layout.*; import org.apache.fop.layout.inline.*; @@ -152,6 +153,46 @@ /* use PDF's font setup to get PDF metrics */ org.apache.fop.render.pdf.FontSetup.setup(fontInfo); +} + +/** + * Renders an image, scaling it to the given width and height. + * If the scaled width and height is the same intrinsic size + * of the image, the image is not scaled. + * + * @param x the x position of left edge in millipoints + * @param y the y position of top edge in millipoints + * @param w the width in millipoints + * @param h the height in millipoints + * @param image the image to be rendered + * @param fs the font state to use when rendering text + * in non-bitmapped images. + */ +protected void drawImageScaled(int x, int y, int w, int h, +FopImage image, +FontState fs) { + // XXX: implement this +} + +/** + * Renders an image, clipping it as specified. + * + * @param x the x position of left edge in millipoints. + * @param y the y position of top edge in millipoints. + * @param clipX the left edge of the clip in millipoints + * @param clipY the top edge of the clip in millipoints + * @param clipW the clip width in millipoints + * @param clipH the clip height in millipoints + * @param fill the image to be rendered + * @param fs the font state to use when rendering text + * in non-bitmapped images. + */ +protected void drawImageClipped(int x, int y, + int clipX, int clipY, + int clipW, int clipH, + FopImage image, + FontState fs) { + // XXX: implement this } /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/render/txt TXTRenderer.java
arved 02/04/23 15:33:40 Modified:src/org/apache/fop/render/awt Tag: fop-0_20_2-maintain AWTRenderer.java src/org/apache/fop/render/mif Tag: fop-0_20_2-maintain MIFRenderer.java src/org/apache/fop/render/pcl Tag: fop-0_20_2-maintain PCLRenderer.java src/org/apache/fop/render/pdf Tag: fop-0_20_2-maintain PDFRenderer.java src/org/apache/fop/render/ps Tag: fop-0_20_2-maintain PSRenderer.java src/org/apache/fop/render/svg Tag: fop-0_20_2-maintain SVGRenderer.java src/org/apache/fop/render/txt Tag: fop-0_20_2-maintain TXTRenderer.java Log: support for background-image (all renderers)\nauthor: Michael Gratton Revision ChangesPath No revision No revision 1.38.2.2 +41 -8 xml-fop/src/org/apache/fop/render/awt/AWTRenderer.java Index: AWTRenderer.java === RCS file: /x1/home/cvs/xml-fop/src/org/apache/fop/render/awt/AWTRenderer.java,v retrieving revision 1.38.2.1 retrieving revision 1.38.2.2 diff -u -r1.38.2.1 -r1.38.2.2 --- AWTRenderer.java 11 Jan 2002 08:45:06 - 1.38.2.1 +++ AWTRenderer.java 23 Apr 2002 22:33:39 - 1.38.2.2 @@ -1,5 +1,5 @@ /* - * $Id: AWTRenderer.java,v 1.38.2.1 2002/01/11 08:45:06 keiron Exp $ + * $Id: AWTRenderer.java,v 1.38.2.2 2002/04/23 22:33:39 arved Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -412,19 +412,13 @@ h = area.getContentHeight(); int ry = this.currentYPosition; -ColorType bg = area.getBackgroundColor(); rx = rx - area.getPaddingLeft(); ry = ry + area.getPaddingTop(); w = w + area.getPaddingLeft() + area.getPaddingRight(); h = h + area.getPaddingTop() + area.getPaddingBottom(); -// I'm not sure I should have to check for bg being null -// but I do -if ((bg != null) && (bg.alpha() == 0)) { -this.addRect(rx, ry, w, -h, bg.red(), bg.green(), bg.blue(), - bg.red(), bg.green(), bg.blue()); -} + doBackground(area, rx, ry, w, h); rx = rx - area.getBorderLeftWidth(); ry = ry + area.getBorderTopWidth(); @@ -486,6 +480,45 @@ this.currentYPosition -= d; } +/** + * Renders an image, scaling it to the given width and height. + * If the scaled width and height is the same intrinsic size + * of the image, the image is not scaled. + * + * @param x the x position of left edge in millipoints + * @param y the y position of top edge in millipoints + * @param w the width in millipoints + * @param h the height in millipoints + * @param image the image to be rendered + * @param fs the font state to use when rendering text + * in non-bitmapped images. + */ +protected void drawImageScaled(int x, int y, int w, int h, +FopImage image, +FontState fs) { + // XXX: implement this +} + +/** + * Renders an image, clipping it as specified. + * + * @param x the x position of left edge in millipoints. + * @param y the y position of top edge in millipoints. + * @param clipX the left edge of the clip in millipoints + * @param clipY the top edge of the clip in millipoints + * @param clipW the clip width in millipoints + * @param clipH the clip height in millipoints + * @param fill the image to be rendered + * @param fs the font state to use when rendering text + * in non-bitmapped images. + */ +protected void drawImageClipped(int x, int y, + int clipX, int clipY, + int clipW, int clipH, + FopImage image, + FontState fs) { + // XXX: implement this +} // correct integer roundoff(aml/rlc) No revision No revision 1.11.2.1 +42 -13xml-fop/src/org/apache/fop/render/mif/MIFRenderer.java Index: MIFRenderer.java === RCS file: /x1/home/cvs/xml-fop/src/org/apache/fop/render/mif/MIFRenderer.java,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -u -r1.11 -r1.11.2.1 --- MIFRenderer.java 18 Sep 2001 1
RE: Place committers on inactive list?
> -Original Message- > From: Bertrand Delacretaz [mailto:[EMAIL PROTECTED] > Sent: September 2, 2003 2:49 AM > To: [EMAIL PROTECTED] > Subject: Re: Place committers on inactive list? > > > Le Mardi, 2 sep 2003, à 03:33 Europe/Zurich, Glen Mazza a écrit : > > ...Perhaps Karen, Arved and Bertrand should be added to > > the inactive list... > > No problem for me, I'd actually feel better being listed as inactive! That would be realistic. I have no intentions of permanently leaving the project, but I have been inactive for quite some time. I am just too busy in other pursuits at the moment. Arved - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Development Environment suggestions ?
> -Original Message- > From: John Austin [mailto:[EMAIL PROTECTED] > Sent: November 20, 2003 12:37 PM > To: [EMAIL PROTECTED] > Subject: Development Environment suggestions ? > > So far I have been playing around like the Neanderthal* > that I am. I use Sun Java 1.4.x with xterm, vi, emacs and > occasionally Jedit when I feel modern urges. > > Peter has mentioned Eclipse and I have used VisualAge for > Java, and either NetBeans or the Sun form thereof. If you have a few bucks, you can't beat IntelliJ IDEA. I have used VisualAge and NetBeans, and also JEdit, vi and emacs, but IntelliJ has them all beat hands down. > Is there a path to enlightenment (excuse the trollish tone) > therein ? Given that FOP can be installed and started in > TBI (The Bash IDE), are there other graphical IDE's with a > reasonable learning curve ? IntelliJ is fairly easy to pick up. > I have both Win98 and RH9 available to me. The RH box > has more resources in addition to having the usual Linux > advantages. As another poster mentioned, upgrade from Win98. Win98 has limited GDI resources (that is, the amount of memory for actual windows, visible or invisible), so is a PITA for serious development. > * Is that term Politically Correct ? Would it be offensive to > Europeans ? I myself am descended from Celts and probably > some Angles, Jutes and Saxons. Dunno about Picts. As I understand it, Neanderthals were as smart as us Cro-Magnons. :-) AHS
RE:
> -Original Message- > From: Tony Graham [mailto:[EMAIL PROTECTED]] > Sent: September 30, 2002 10:09 AM > To: [EMAIL PROTECTED] > Subject: Re: > > Peter B. West wrote at 30 Sep 2002 13:28:18 +1000: > > Tony Graham wrote: > > > [EMAIL PROTECTED] wrote at 27 Sep 2002 16:44:32 -0300: > ... > > > > That means "-", "#12235" , etc are characters, while > "'1'" is not. > > > > > > ⿋ is a character reference. '#12235' is how you talk about a > > > character's code point, although the hexadecimal representation is > > > usually preferable. > > > > > > In XSL terms, "'1'" is a one-character string literal, but while you > > > could claim that it is one character, there's no XSL > conversion from a > > > string to a character, so > should fail. > > > > Tony, > > > > I don't think this gets us out of difficulty. A casual inspection > > Forgive me, but I wasn't trying to get anybody out of any difficulty, > I was just trying to keep the terminology accurate. > > ... > > So how do I represent a character? > > > > To me, the cleanest, least ambiguous way is to represent a > > attribute assignment value with "''" - a string literal of > > length 1. > > Except that you know that that's not specified among the allowed > conversions. > > The interesting thing is that 'character' doesn't appear in the > productions in Section 5.9, Expressions, of the XSL Recommendation. > Now there's a question for [EMAIL PROTECTED]! > > I think that you represent a character as a single character, e.g., > character="c", or as a numeric character reference, e.g., > character=" ". I agree with this last, after having digested everything. Point is well taken that we have some points to nitpick with xsl-editors, mostly about disambiguating some of the language. Arved Sandstrom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE:
> -Original Message- > From: Peter B. West [mailto:[EMAIL PROTECTED]] > Sent: September 30, 2002 11:24 PM > To: [EMAIL PROTECTED] > Subject: Re: > > Arved Sandstrom wrote: > >>-Original Message- > >>From: Tony Graham [mailto:[EMAIL PROTECTED]] > > >>Peter B. West wrote at 30 Sep 2002 13:28:18 +1000: > >> > Tony Graham wrote: > >> > > [EMAIL PROTECTED] wrote at 27 Sep 2002 16:44:32 -0300: > >>... > >> > > > That means "-", "#12235" , etc are characters, while > >>"'1'" is not. > >> > > > >> > > ⿋ is a character reference. '#12235' is how you > talk about a > >> > > character's code point, although the hexadecimal representation is > >> > > usually preferable. > >> > > > >> > > In XSL terms, "'1'" is a one-character string literal, but > while you > >> > > could claim that it is one character, there's no XSL > >>conversion from a > >> > > string to a character, so > >>should fail. > >> > > >> > Tony, > >> > > >> > I don't think this gets us out of difficulty. A casual inspection > >> > >>Forgive me, but I wasn't trying to get anybody out of any difficulty, > >>I was just trying to keep the terminology accurate. > >> > >>... > >> > So how do I represent a character? > >> > > >> > To me, the cleanest, least ambiguous way is to represent a > > >> > attribute assignment value with "''" - a string literal of > >> > length 1. > >> > >>Except that you know that that's not specified among the allowed > >>conversions. > >> > >>The interesting thing is that 'character' doesn't appear in the > >>productions in Section 5.9, Expressions, of the XSL Recommendation. > >>Now there's a question for [EMAIL PROTECTED]! > >> > >>I think that you represent a character as a single character, e.g., > >>character="c", or as a numeric character reference, e.g., > >>character=" ". > > > > > > I agree with this last, after having digested everything. > > > > Point is well taken that we have some points to nitpick with > xsl-editors, > > mostly about disambiguating some of the language. > > Arved, > > Help me here. I must be missing something. What is it that you agree > with? That the spec, as worded, leaves us with > character="c" > or > character="c" > which amounts to the same thing? Yes, this is what I agree with. > If so, fair enough. Do you also agree that "c" is an NCName? And that > character="-" > is a parsing error? Well, the production for NCName doesn't live in isolation, with reference to http://www.w3.org/TR/REC-xml-names/#ns-decl. Yes, "c" fits the production, but it's really an NCName when you have also declared the namespace. Why is character="-" a parsing error? The XML Recommendation has at least one example of an attribute value that contains a hyphen. Maybe _I_ am missing something here. ;-) > As far as I can see, the only immediate ways forward are to descend into > the mire of context dependent parsing (which the editors have recently > formally decided that we must do in respect of "format") or apply our > own disambiguating condition. How are you intending to implement > ? By storing it as a Unicode value according to the XML Rec production Char::=#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x1-#x10] It will depend on the implementation library. ICU for example has UChar and UChar32 types. Regards, Arved - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE:
> -Original Message- > From: J.Pietschmann [mailto:[EMAIL PROTECTED]] > Sent: October 6, 2002 12:00 PM > To: [EMAIL PROTECTED] > Subject: Re: > > > Arved Sandstrom wrote: > > Why is character="-" a parsing error? The XML Recommendation > has at least > > one example of an attribute value that contains a hyphen. > > This comes from assuming that every unqoted sequence of characters which > is not a number, mesutrement or a color has to be interpreted as NCName, > as the grammar suggests, and IIRC a NCName must not start with a hyphen. > This means > hyphenation-char="-" > can't parse as number, can't parse as string, can't parse as color, can't > parse as NCName -> parsing error. Hi Joerg Can you cite the specific productions that lead to this conclusion? I am not saying that you are wrong but I can't find it. I must be tired. ;-) I just looked at the XML 1.1 production for AttValue which is AttValue::='"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'" and I see a prohibition here on using a literal '<' or '&' in the attribute value, anywhere. But I see nothing about '-'. If the grammar of the recommendations leads to the conclusion that character="-" is not OK, then this just simply offends my common sense. Arved - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE:
> -Original Message- > From: J.Pietschmann [mailto:[EMAIL PROTECTED]] > Sent: October 6, 2002 12:39 PM > To: [EMAIL PROTECTED] > Subject: Re: > > Arved Sandstrom wrote: > > Can you cite the specific productions that lead to this > conclusion? I am not > > saying that you are wrong but I can't find it. > > > > I must be tired. ;-) I just looked at the XML 1.1 production > for AttValue > > which is > > Don't look at XML AttValue, look at the XSLFO property expression > language. > Somehow it is implicit that all attributes in a XSLFO document are parsed > as expressions which are defined in 5.9 "Expressions". Refer specifically > to 5.9.3 "Basics". A single hyphen is not a valid expression according to > the XSLFO expression grammar. > Maybe some fallbacks are implicit somewhere, I don't know. An Expr can be a Literal, the production for which is '"' [^"]* '"' | "'" [^']* "'" If I look at the first alternative, '"' [^"]* '"' it seems to me that I have pretty considerable leeway, and "-" isn't ruled out at all. Arved - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE:
> -Original Message- > From: J.Pietschmann [mailto:[EMAIL PROTECTED]] > Sent: October 6, 2002 1:29 PM > To: [EMAIL PROTECTED] > Subject: Re: > > > Arved Sandstrom wrote: > > An Expr can be a Literal, the production for which is > > > > '"' [^"]* '"' > > | "'" [^']* "'" > > > > If I look at the first alternative, > > > > '"' [^"]* '"' > > > > it seems to me that I have pretty considerable leeway, and "-" > isn't ruled > > out at all. > > Erm, the expression is supposed to be inside the XML attribute quotes, > for example hyphenation-char="'-'" would be ok (literal, second > production), but hyphenation-char="-" does not match the literal > production, nor any other (except "operator"). Unless I missed > something, of course. And unless _I_ am missing something, "-" precisely matches that production. You are looking at "'" [^']* "'" but I am looking at '"' [^"]* '"' According to the latter I can absolutely do "-". Arved - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE:
> -Original Message- > From: J.Pietschmann [mailto:[EMAIL PROTECTED]] > Sent: October 6, 2002 2:15 PM > To: [EMAIL PROTECTED] > Subject: Re: > > > Arved Sandstrom wrote: > > And unless _I_ am missing something, "-" precisely matches that > production. > > > > You are looking at > > > > "'" [^']* "'" > > > > but I am looking at > > > > '"' [^"]* '"' > > > > According to the latter I can absolutely do "-". > > Well, in >hyphenation-char="-" > the hyphen is the expression, not "the hyphen surrounded by double > quotes". As I said, unless I'm something missing, the FO property > expression is the value of the XML attribute, which in turn is the > hyphen, because the double quotes are part of the XML syntax and > are stripped by the XML parser. The XSLFO property expression parser > gets the hyphen, without any quotes, double, or single. And without > the quotes, it does not match either of the two productions for literal. > This is the problem here. > > Perhaps I should have written that >hyphenation-char="'-'" > and >hyphenation-char='"-"' > as well as > hyphenation-char='"-"' > are legal, while neiter > hyphenation-char='-' > nor > hyphenation-char="-" > are ok. Yes, I see your point. I think they screwed up the grammar. As I stated before, I find it ludicrous that character="-" would not be OK. Arved - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: A performance patch for PDFInfo class
> -Original Message- > From: Kevin O'Neill [mailto:kevin@;rocketred.com.au] > Sent: November 11, 2002 5:47 PM > To: FOP Developers > Subject: Re: A performance patch for PDFInfo class > [ SNIP ] > String buffers are used by the compiler to implement the binary string > concatenation operator +. For example, the code: > > x = "a" + 4 + "c" > > > is compiled to the equivalent of: > > x = new StringBuffer().append("a").append(4).append("c") >.toString() > > > So the first recommendation is to use String "+" for this type of > method, it's easier to read and runs faster. [ SNIP ] This kind of thing is discussed by Jack Shirazi at length, also. The thing is, there has long been a blanket instruction, don't use String concatenation. Programmers learn it by fiat, and never think it through. In fact, it should be obvious to any programmer (if they are encouraged to think, that is) that concatenation of literal Strings is not something to avoid. Assuming a decent compiler. Regards, AHS - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: [VOTE] Victor as committer
+1. > -Original Message- > From: Keiron Liddle [mailto:[EMAIL PROTECTED]] > Sent: November 20, 2002 5:23 AM > To: FOP > Subject: [VOTE] Victor as committer > > > Hi Developers, > > I propose we have a vote for Victor to become a committer. > > Plenty of eagerness shown already and I am sure he will do lots more for > the project. > > Here's my vote: > +1 > > > Keiron. > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: [VOTE] Victor as committer
Realistically I should be considered inactive myself. Thanks for bringing this up, Art. I just happen to have a brutal workload at the moment and I don't see it lessening in the next 4 months, minimum. It's fun stuff - I love it - but at the end of a workday I can't stand to look at code much, and same goes for weekends. I am not disinterested in Fop and will attempt to continue providing input. I haven't stopped monitoring the lists. But until such a time as I can contribute code I should be considered inactive. Arved > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: November 20, 2002 3:43 PM > To: [EMAIL PROTECTED] > Subject: RE: [VOTE] Victor as committer > > > Ok, I guess that answers my question. Sorry I was too lazy to look that up > on my own. So my understanding is that only committers may vote, as per: > > "A Committer has write access to the source code repository and > gains voting > rights allowing them to affect the future of the subproject." > > Putting this with the following: > > "At times, Committers may go inactive for a variety of reasons. A > Committer > that has been inactive for 6 months or more may lose their status as a > Committer. Getting access back is as simple as re-requesting it on the > project's Developer mailing list" > > I assume that being inactive means that I have lost my status as > a committer > and hence may not vote. > > So, hopefully one of these days (I have no idea when) I will again be able > to contribute to FOP and re-attain committer status. At the > moment, I am not > actively working with FOP at work, but we are still using it (actually a > version from a long while back - around the last time I contributed > anything). The good thing is that I have not been called in to resolve any > problems with FOP, the bad thing is that this is probably largely > because of > the limited use case. I hope in the future to expand this, which > will likely > entail some contributions to FOP. Or maybe by then my efforts will not be > necessary - this would also be cool, although a bit disappointing > in that I > was not a part of it... > > Art (inactive) > > -Original Message- > From: Nicola Ken Barozzi [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, November 20, 2002 2:18 PM > To: [EMAIL PROTECTED] > Subject: Re: [VOTE] Victor as committer > > > > Venkata Rao Nadella wrote: > > Hi, > > > > I joined this list recently. I don't know anything about committer. > > Can someone let me know about committer? > > http://incubator.apache.org/drafts/glossary.html > http://jakarta.apache.org/site/roles.html > > -- > Nicola Ken Barozzi [EMAIL PROTECTED] > - verba volant, scripta manent - > (discussions get forgotten, just code remains) > - > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Alt-Design status: XML handling
> -Original Message- > From: Peter B. West [mailto:[EMAIL PROTECTED]] > Sent: November 26, 2002 3:25 AM > To: [EMAIL PROTECTED] > Subject: Re: Alt-Design status: XML handling > > Rhett, > > To comment on only two aspects of your posting. > > Rhett Aultman wrote: > > > > -Original Message- > > From: Oleg Tkachenko [mailto:[EMAIL PROTECTED]] > > > > Generally, event-driven processing is a pretty good thing. The > critical issue with it, though, is the ratio of event production > to event processing. If that number is anything greater than 1, > then more events are being produced in a stretch of time than can > be effectively processed in that stretch of time. Events start > to queue up, taking up memory. If it happens enough, the heap > starts to get a little too full, the gc runs a little too much, > and that causes processing time to suffer even further. Under > most circumstances, event-based processing is like using a garden > hose to water a bed of flowers. It works just fine. Under more > intense cases, though, it can be more like using a garden hose to > fill a small container of water, then leaving the hose laying > around (spilling water all over the lawn) while the container > gets carried off somewhere. Actually, it really matters where the events are coming from. An HTTP server has no control over how many requests it gets, so your description above is apt. But for FOP (disregarding FOPServlet) everything is one process - the XML parser, the formatter, the renderer - so it's ultimately procedural; there may be an internal boundary where an event/callback system is used, but it's all one thread so nothing queues up at all. The only reason to adopt your approach (and I am not saying I don't like it) is because it's easier to understand. Regards, Arved - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Still on for freeze deadline?
Considering that our new chief executive is Greg Stein, I'd be surprised if this isn't on the horizon. :-) > -Original Message- > From: J.Pietschmann [mailto:[EMAIL PROTECTED]] > Sent: December 1, 2002 4:12 PM > To: [EMAIL PROTECTED] > Subject: Re: Still on for freeze deadline? > > > Jeremias Maerki wrote: > > Moving around directories on the server so we don't lose history on > > files. See my proposal on directory structure reorganization, ex. > > moveing src/org to src/java/org. > > Any chance to get the ASF interested in SubVersion? > http://subversion.tigris.org/ > > Apart from being accessible through firewalls, it allows moving > files and directories, while being largely CVS compatible for > everything else. > > J.Pietschmann > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Redesign issues
Response below. > -Original Message- > From: J.Pietschmann [mailto:[EMAIL PROTECTED]] > Sent: December 7, 2002 7:16 PM > To: [EMAIL PROTECTED] > Subject: Re: Redesign issues > [ SNIP ] > Now the biggest issue: the layout managers itself. At the first > glance it is > not obvious why they should be first class objects at all, in > particular as > a cursory examination of the code shows a one-to-one correspondence to FOs > both for classes and instances. Well, layout managers abstract the layout > *process*, however, the deep layout manager class hierarchy is > mainly designed > around code reuse, which makes it really hard to understand. > There is a reason > that design rules recommend against overuse of inheritance for > code reuse and > deep inheritance hierarchies. There is only so much someone can > hold in the > brain. Nevertheless, this is something I don't know how to fix on > the cheap. I actually helped push for this last year - the notion of separate layout managers. I was strongly influenced by the mess that FOP code had become at the time, and really thought that layout should be taken out of the FOs themselves; that the FO's, in a sense, were (or should be) just value objects. I worked on an xslfo-proc prototype (in Perl) for months earlier this year. I started out with the layout manager idea. It became increasingly clear to me that there was in fact a natural 1-1 correspondence between managers and FOs. I had a prototype, incidentally, which properly handled reference-orientation in all regions, and even took RO down to block-containers, something which no implementation (not FOP, not XEP, not XSLFormatter, not XFC) has correctly done. Unless Epic handles RO correctly, which I don't know. It's also interesting, Joerg, that you should mention a "hard to understand" layout manager class hierarchy...this is also what inevitably developed in my prototype. So at some point (and I think there are comments and emails to support this) I eventually came back to the thought that there is nothing wrong with individual FOs being able to do their own layout. Which is actually the existing "maintenance stream" FOP model. I'll have some more to say laterthese are immediate comments. I am just struck by the fact that it is now December 2002 and we are not where we want to be, not even close, which is providing an open-source Extended conformance XSL processor to the hungry, huddled and poor. Arved - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Redesign issues
> -Original Message- > From: Peter B. West [mailto:[EMAIL PROTECTED]] > Sent: December 9, 2002 8:56 AM > To: [EMAIL PROTECTED] > Subject: Re: Redesign issues > > > Keiron Liddle wrote: > > > > > > I still believe that it is useful to have the layout managers separate > > from the fo tree. There are a number of reasons that come to mind. It is > > possible to independantly change layout managers. Certain fo's aren't > > directly in the same hierarchy: markers, undefined table columns, table > > cells under table body. Then there are things like floats and footnotes > > that can gain from this. > > Keiron, > > I'm inclining in this direction myself, because I am interested in > isolating the layout/area tree functions as much as possible from the > raw information stream of the FO tree. I tend to view the FO tree as a > read-only data source for the layout. manaaged by the Fo objects. The feeling I got from my prototype is that there is not much commonality. Markers - there is no logic here that has anything to do with layout, per se. The content goes into a static-content and hence does not influence page break decisions. The logic for handling markers can be confined to the document level. "root" is an FO - it is the document, so it is the FO that can handle this. Floats and footnotes - the float goes on a page or it doesn't. The footnote starts on page N and continues through N+x or it doesn't. What FO knows about pages? The "page-sequence"...that's the natural FO for handling float and footnote problems. OK, this is somewhat simplified; with floats it may come down to columns, and then it is the "region-body" that also needs to intercede. Tables I can't comment on. So there may be an argument here for independent layout managers. I think we could use layout managers when it is clear that there is a layout problem involving N FOs, such that those N FOs are not identical to the children of a higher FO. I see keeps as being the main occurrence of this. But even then, keeps are still related to logic that occurs in page-sequence and region-body and lines (3 entities, in other words), and the nature of that logic differs in all 3 situations, so is it worth abstracting out a keep manager? I don't know. Here's a common ground that I can agree on...pull the layout logic out, and put it in "managers". This is not going to hurt. But really, really cut down on the urge to re-use managers through an inheritance hierarchy. I think this is also Joerg's point. It obfuscates more than it helps. Arved - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Redesign issues
Responses below. > -Original Message- > From: Keiron Liddle [mailto:[EMAIL PROTECTED]] > Sent: December 10, 2002 5:56 AM > To: FOP > Subject: RE: Redesign issues > > > Hi Arved, > > On Mon, 2002-12-09 at 20:30, Arved Sandstrom wrote: > > The feeling I got from my prototype is that there is not much > commonality. > > > > Markers - there is no logic here that has anything to do with > layout, per > > se. The content goes into a static-content and hence does not > influence page > > break decisions. The logic for handling markers can be confined to the > > document level. "root" is an FO - it is the document, so it is > the FO that > > can handle this. > > That is true but there is something that happened in the original way > that fop handled markers. > The fo has a property list which has a parent property list from the > parent object. It also has a parent object. It couldn't be simply made > null and then passed to the root as it could cause npe's. > > The argument here is not so much that it cannot be done, more that if it > is a completely separate logic then it is easier to understand and > ensure it won't end up with bugs or memory leaks. Right...I implemented the original (incomplete) marker logic using what we had at the time for property handling. I did not tackle the re-parenting problem at all - didn't get that far - so the marker content actually retained the inherited properties from the origin FO, which is incorrect. I see no problems with a marker handler that associates with the document, in this case. This would coordinate with page-sequences and pages, obviously. Incidentally, I still think that the way markers are described in the spec is vague and confusing. Perhaps we should hammer this out. > > Floats and footnotes - the float goes on a page or it doesn't. > The footnote > > starts on page N and continues through N+x or it doesn't. What FO knows > > about pages? The "page-sequence"...that's the natural FO for > handling float > > and footnote problems. OK, this is somewhat simplified; with > floats it may > > come down to columns, and then it is the "region-body" that > also needs to > > intercede. > > > > Tables I can't comment on. So there may be an argument here for > independent > > layout managers. > > > > I think we could use layout managers when it is clear that > there is a layout > > problem involving N FOs, such that those N FOs are not identical to the > > children of a higher FO. I see keeps as being the main > occurrence of this. > > But even then, keeps are still related to logic that occurs in > page-sequence > > and region-body and lines (3 entities, in other words), and the > nature of > > that logic differs in all 3 situations, so is it worth abstracting out a > > keep manager? I don't know. > There is the line layout manager. There is no line fo. The block layout > manager is able to collect inline porducing layout managers and give > them to a line layout manager which then has the logic to handle flowing > inline areas into a line. > The block layout logic is then more simple. Lines are not FO's, no - that's why I used the word "entity". :-) > This is similar to the cells under a table body. > Also with page columns, do we want to make the FlowLayout manager handle > all the blocks that do and don't span columns or can we create a page > column layout manager which looks after blocks in columns and then can > handle the reflowing etc. I originally handled this (in my prototype) with managers for pages, regions, spans and columns. This is the one area where I think managers make the most sense - the handling of a page is complex and it simplifies matters to have clearly distinguishable managers to take care of the various constituent areas. > A leader with use-content creates an inline parent with a fixed width. > It is creating a simple inline area but we want to do a quick > independant layout for the content. > Again, maybe not necessary but it help separate out the logic. > > > Here's a common ground that I can agree on...pull the layout > logic out, and > > put it in "managers". This is not going to hurt. But really, > really cut down > > on the urge to re-use managers through an inheritance hierarchy. I think > > this is also Joerg's point. It obfuscates more than it helps. > > I'm not sure the exact re-use problem you are referring to but I agree > it should be simple and straight forward. Agreed. I won't comment further until I re-sync with the latest CVS and examine. :-) Arved - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Sun XSL Formatter
Not to sound bitter, but it would have been nice to know about this sooner. This pretty much usurps what I and Eric Bischoff have been doing (when we can); I sort of figure it didn't get written in the last month either. Any reason for the blasted secretiveness? Arved > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: December 13, 2002 12:09 PM > To: [EMAIL PROTECTED] > Subject: Sun XSL Formatter > > > Peter did ask... > > > > The Sun xmlroff XSL formatter is written in C, and it uses > libxml2 and libxslt plus the GLib, GObject, and Pango libraries > that underlie GTK+ and GNOME (although it does not require either > GTK+ or GNOME). > > The formatter currently produces PDF output only. > > xmlroff is a command line program, but the bulk of the XSL > formatting is implemented as a libfo library that can be linked > to any program that requires XSL formatting capability. > > It will be available under a BSD license. > > It is being developed on both Solaris and Linux. > > The formatter is awaiting final approval before the code can be > made public source. An announcement will be made on xsl-list, > www-xsl-fo, and XSL-FO@YahooGroups once the code is available. > > Regards, > > > Tony Graham > XML Technology Center > Sun Microsystems Ireland > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Sun XSL Formatter
Well, Java or C or C++ or Haskell, it would have been nice to have a clue. We have an ASF tradition of developing communities...this kind of stuff that Sun and IBM does is getting old. Don't open-source it; sell it. I will argue against its adoption into Apache. Arved > -Original Message- > From: Peter B. West [mailto:[EMAIL PROTECTED]] > Sent: December 13, 2002 8:43 PM > To: [EMAIL PROTECTED] > Subject: Re: Sun XSL Formatter > > > Arved Sandstrom wrote: > > Not to sound bitter, but it would have been nice to know about > this sooner. > > This pretty much usurps what I and Eric Bischoff have been > doing (when we > > can); I sort of figure it didn't get written in the last month > either. Any > > reason for the blasted secretiveness? > > > > >>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > >>Subject: Sun XSL Formatter > >> > >> > >>Peter did ask... > >> > > Tony, > > Thanks for the response. I must say, though, that had the product been > written in Java, I would have been asking the same question as Arved. > > 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] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Sun XSL Formatter
> -Original Message- > From: Peter S. Housel [mailto:[EMAIL PROTECTED]] > Sent: December 14, 2002 2:21 PM > To: [EMAIL PROTECTED] > Subject: Re: Sun XSL Formatter > > > "Arved Sandstrom" <[EMAIL PROTECTED]> writes: > > > Well, Java or C or C++ or Haskell, it would have been nice to > have a clue. > > > > We have an ASF tradition of developing communities...this kind of stuff > that > > Sun and IBM does is getting old. Don't open-source it; sell it. I will > argue > > against its adoption into Apache. > > Googling for xmlroff yields: > > http://www.plurb.com/webservices/UBL4.pdf > > Looks like they want to donate it to Gnome, not Apache. > > Despite your not wanting to sound bitter, your protest still sounds bitter > anyway. > > -Peter- No bitterness at all, actually, Peter. It takes a bit of wind out of my sails, sure, since xmlroff is so similar to the project that Eric Bischoff and myself were working on. Tony has certainly been aware of that for quite a long time - I don't understand why the secrecy, myself, seeing as how we are now looking at an OSS donation anyway. I'd be bitter if I were so arrogant as to think of myself as being upstaged. :-) That's not the case. I am quite familiar with the spec, and there are now a number of competing efforts. None of which are quite accurate. So there is room for more competition. Alternatively, I may talk to Tony and Eric and see if we can assist. Arved - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Sun XSL Formatter
> -Original Message- > From: Victor Mote [mailto:[EMAIL PROTECTED]] > Sent: December 14, 2002 3:01 PM > To: [EMAIL PROTECTED] > Subject: RE: Sun XSL Formatter > > > Peter S. Housel wrote: > > > Looks like they want to donate it to Gnome, not Apache. > > AFAIR, the BSD license is pretty incompatible with the Apache license. One > of the reasons that the xmlroff announcement doesn't change my > commitment to > FOP is that, for my interests anyway, the Apache license is > superior. Others > are that it is not written in Java, and only runs on > Sun-supported operating > systems. It almost seems like Java was bypassed because it runs > on Microsoft > operating systems. There are other deficiencies that I think are probable, > but we won't know until we get to play with it. > > I definitely intend to keep plugging away at FOP. > > Victor Mote Victor, I intend to continue supporting FOP myself. But can I point out that C is about as portable as it gets? Arved - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Sun XSL Formatter
> -Original Message- > From: Victor Mote [mailto:[EMAIL PROTECTED]] > Sent: December 14, 2002 3:40 PM > To: [EMAIL PROTECTED] > Subject: RE: Sun XSL Formatter > > > Arved Sandstrom wrote: > > > But can I point out that C is about as portable as it gets? > > Maybe someone on this list has time to throw xmlroff source code > into Visual > Studio & let us know how it goes :-) I'll probably do just that. If it was well-written code then it'll compile. There is nothing OS-specific about XSL, barring optimizations. > Sorry, I don't mean to be smart. It certainly seems to me that > C-portable is > an entirely different concept than Java-portable. Sure, in a narrow sense. Binary rather than source. In practical terms C is considerably more portable. Java is basically a Windows and MacOS X VM. > Also, I didn't intend to /only/ highlight portability. Java has lots of > other advantages over C that are important to this kind of application. I > won't recite them here, since everyone on this list already knows them. We could debate that. :-) I spend a lot of time every week dealing with Java NPEs. Seriously, you're right. Java is better for this. Writing good C requires a lot of background. Arved - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Sun XSL Formatter
> -Original Message- > From: Tony Graham [mailto:[EMAIL PROTECTED]] > Sent: December 16, 2002 12:23 PM > To: [EMAIL PROTECTED] > Subject: RE: Sun XSL Formatter > > > Arved Sandstrom wrote at 14 Dec 2002 15:05:05 -0400: > > No bitterness at all, actually, Peter. It takes a bit of wind out of my > > sails, sure, since xmlroff is so similar to the project that > Eric Bischoff > > and myself were working on. Tony has certainly been aware of > that for quite > > a long time - I don't understand why the secrecy, myself, > seeing as how we > > are now looking at an OSS donation anyway. > > Sun policy, not personal policy. > > I assure you that there are many steps, and many signatures, required > when a large corporation makes an open source donation. Purely > because it is a large corporation making the donation and not an > individual contributor, there is a lot of "due diligence" to be done. > If a project can't pass all the criteria, it won't be made public. > > Since a project intended for open souce may not make it to open > source, it is perhaps better to say nothing until the due diligence is > completed (or, in this case, very nearly completed). The alternative > -- announcing an intention to make a public source donation -- risks > the project not passing the criteria and risks later accusations of > vapourware or accusations of lack of commitment to open source when > the project can't be made public. > > That's why I couldn't say anything about the formatter in the lead up > to XML 2002: any of a number of people -- not just engineers and > engineering managers -- could have vetoed the donation for any of a > number of reasons, and I would have just had to withdraw from the > conference without another word being said. I actually know that. I was just blowing off steam. :-) > > I'd be bitter if I were so arrogant as to think of myself as > being upstaged. > > :-) That's not the case. I am quite familiar with the spec, > and there are > > now a number of competing efforts. None of which are quite accurate. So > > there is room for more competition. Alternatively, I may talk > to Tony and > > Eric and see if we can assist. > > Part of why it is written in C is so it doesn't compete with FOP for > developers. > > Arved took the wind out of my sails for a while when he announced his > SourceForge project, so wind taking runs both ways. I would be > pleased if Arved and/or Eric would consider assisting with the > project. Frankly, I would be pleased if *anybody* assisted with the > project, but Arved and Eric would be a bonus. Eric will have to weigh in himself. I think he is partial to C++. I am partial to C, and said that earlier this year; it was my original intention to go with C. I've been dormant on xslfoproc for a while; work has not permitted much OSS for me at all. I may have time coming up; it would be a pleasure to help out. I also concur that it would be nice to have Eric involved. I see no reason for competition. A single decent open-source C or C++ implementation would be great. Incidentally, my comments about potentially having had to consider the adoption of this project into Apache still stand. It is no reflection on the project, or on you, Tony. It is a personal philosophical stance - yes, company donations have provided the ASF with fine software, but there is a downside. Arved - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Sun XSL Formatter
But it was plausible. :-) > -Original Message- > From: Patrick Dean Rusk [mailto:[EMAIL PROTECTED]] > Sent: December 18, 2002 12:51 PM > To: [EMAIL PROTECTED] > Subject: RE: Sun XSL Formatter > > > Then I retract the suggestion. > > Pat > > > -Original Message- > From: Tony Graham [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, December 18, 2002 8:36 AM > To: [EMAIL PROTECTED] > Subject: RE: Sun XSL Formatter > > > Patrick Dean Rusk wrote at 17 Dec 2002 17:40:11 -0500: > >Perhaps Tony knows better, but I have a potentially plausible > explanation > > for Sun being "secretive" about their project: it may not > initially have > > been intended for eventual open source development. In other words, it > > could be a failed internal project to create a commercial product. > > No. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Happy Holidays
I'd like to wish everyone here happy holidays, whatever is appropriate. This is a good crowd. Regards, Arved Sandstrom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Overconstraint & Anomalous documents page in Wiki
Title: JforIntegrationInFop - background and guidelines I looked at the page, Rhett. It looks good as a mission statement. This area interests me a lot too, and I hope to start adding to it. Arved -Original Message-From: Rhett Aultman [mailto:[EMAIL PROTECTED]]Sent: December 26, 2002 2:39 PMTo: [EMAIL PROTECTED]Subject: Overconstraint & Anomalous documents page in Wiki Foppers, I've added a page to the Wiki in an attempt to put all of our previous discussion and what documentation I can find regarding overconstraint, anomalous documents, etc. It's located at: http://nagoya.apache.org/wiki/apachewiki.cgi?FOPOverConstraintDesign I'd like to make this part of a general documentation of layout design in general, and hope to be a strong facilitator in its development on the Wiki. I welcome anyone who's had anything to say about overconstraint or other anomalous conditions in the past to start putting their ideas up on the page. With a little work, I think we can start incorporating a design for overconstraint resolution into the HEAD layout managers. I see the rudiments of that system already forming, so I think we've got a good starting point.
RE: Footnote Problem
> -Original Message- > From: Joerg Pietschmann [mailto:[EMAIL PROTECTED]] > Sent: January 3, 2003 5:53 PM > To: [EMAIL PROTECTED] > Subject: Footnote Problem > > > Hi all, > is the footnote are supposed to span the whole page width even > if the body region has columns? If so, adding a footnote would > cause reshuffling of content of already filled columns, which in > turn might push the FO causing the footnote onto the next page > (another candidate for the "anomalous layout" wiki?). > Apart from this, is this case similar enough to rebalancing in > case a is encountered? Yes. There is no provision for columns in the footnote region. Arved - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: PMC candidates from the FOP subproject
Sorry, I missed the initial thread. +1 for both you, Jeremias, and for Peter. > -Original Message- > From: Jeremias Maerki [mailto:[EMAIL PROTECTED]] > Sent: January 25, 2003 10:12 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: PMC candidates from the FOP subproject > > > As requested we've voted for two FOP committers as representatives for > the XML PMC. The initial set is Peter B. West and me: > > - Peter B. West <[EMAIL PROTECTED]> > - Jeremias Maerki <[EMAIL PROTECTED]> > > In this thread, you'll find the voting results: > http://marc.theaimsgroup.com/?t=10429061552&r=1&w=2 > > Both Peter and I got +1s from Bertrand Delacretaz, Christian Geisert, > Keiron Liddle, Victor Mote, Joerg Pietschmann and Oleg Tkachenko. Peter > voted +1 for me and here's my +1 for Peter. > > We had no -1 votes. The following active committers haven't voted so > far: Karen Lease and Arved Sandstrom. > > > Keiron Liddle proposed establishing some kind of rotation for the FOP > representation in the XML PMC. We like the idea and we would like to ask > the current XML PMC if you'd be ok if we changed FOP representatives > every 6 months or so. Here's his idea and reasoning behind it: > http://marc.theaimsgroup.com/?l=fop-dev&m=104324971703737&w=2 > > > Jeremias Maerki > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Markers in areas
Joerg, you can freely get rid of that stuff. I originally introduced it when I had more faith in the spec, and thought that the authors knew what they were talking about when it came to to their math. Specifically, the lineage pairs is an abstract concept that I can see no implementation use for. In fact, I can't see any theoretical use for the idea either. Arved > -Original Message- > From: J.Pietschmann [mailto:[EMAIL PROTECTED]] > Sent: February 16, 2003 8:14 PM > To: [EMAIL PROTECTED] > Subject: Markers in areas > > > Hi, > does somebody need the markers attached to an area? I just canned them, > as well as another array atteched to areas (lineage pairs). Markers > were only used in the XML renderer. They ought to have uses to implement > retrieve-positions first-include-carryover and last-ending-within-page, > but they didn't get used for this. > > Objections? > > J.Pietschmann > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Markers in areas
They are not connected concepts, Mark. I originally put in the code for lineage pairs, and also started the implementation for markers. So I can assure you that they are completely unrelated. For what it's worth, subsequent contributors have significantly improved on marker support, so I am only commenting from the viewpoint of my knowledge of the spec. I made a few comments in my reply to Joerg. I have a degree in physics, and most of a Masters in physical oceanography. I see considerable mathematical anarchy in the XSL spec, some degree of mathematical naivete, and lots of confusion. My forte is not logic, based on my background, but even a physics guy can dissect the pseudo-logic in that spec. I think plenty of other people have also separated the wheat from the chaff as far as that document is concerned...I think we are due for a rewrite, with lots of the pretentious math excised, and replaced with plain language. Arved > -Original Message- > From: Mark C. Allman [mailto:[EMAIL PROTECTED]] > Sent: February 18, 2003 5:16 PM > To: [EMAIL PROTECTED] > Subject: RE: Markers in areas > > > ... but markers will continue to work as per the XSLFO spec, correct? > We depend on markers for dynamic page headings. > > -- Mark C. Allman > -- Allman Professional Consulting, Inc. > -- www.allmanpc.com, 617-947-4263 > > > -Original Message- > From: J.Pietschmann [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 18, 2003 4:09 PM > To: [EMAIL PROTECTED] > Subject: Re: Markers in areas > > Arved Sandstrom wrote: > > Joerg, you can freely get rid of that stuff. > > Great! > Anybody out there bothering to profile the new code? Two > objects less created per Area, this should be noticable! > > J.Pietschmann > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Long licence
Dirk, you may have seen my post on members, about this. The whole length of license issue. I find it odd that it's OK to suggest tools (IDEs/editors, etc) to hide a license. When the argument presented to the board was presumably that the long license is legally required. I'd like to find out what lawyer thought a long license is needed with every file. Because I question that finding. Arved > -Original Message- > From: Dirk-Willem van Gulik [mailto:[EMAIL PROTECTED]] > Sent: February 21, 2003 8:43 AM > To: [EMAIL PROTECTED] > Subject: Re: Long licence > > On Fri, 21 Feb 2003, Jeremias Maerki wrote: > > > software developers. :-) It would be so cool, if IDEs would have the > > ability to hide a licence at the beginning of a file. > > I;ve seen some clever pragma's/markers which let emacs do this. > > DW - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Long licence
Jeremias, a deliberate decision was taken to frown on condensed licenses or references. That tell me that there is a legal requirement for the license to be "in your face". So to speak. In any case, the board was presented (I assume) with a legal opinion to that effect. Which, although IANAL, I dispute. If it so happens that I am wrong (it's been known; I was last wrong on October 14th, 1995), I am sure that someone will so inform me. But I am checking with some local IP lawyers to see what the deal is. My point being that legally there is no distinction between developers working with OSS, and any other users. And in fact the distinction ought not be made, as many of the same developers _are_ users of the codebase. So it is OK to hide the licensing? I think not. I dislike a long boilerplate license. There are two ways to get rid of it - one is to use technological techniques to ignore it. I don't like that. FOP for example has many hundreds of source files...tack in a screen of legal stuff with each one and note that people with dialup just got presented with some extra download time. Significant extra download time. I intend to clarify this issue on the ASF members list. I have problems with this decision. Arved > -Original Message- > From: Jeremias Maerki [mailto:[EMAIL PROTECTED]] > Sent: February 21, 2003 9:19 AM > To: [EMAIL PROTECTED] > Subject: Re: Long licence > > > Arved, > > I don't see what's bad about it. The licence stays in every file as > necessary, the IDE should just as a service to the developer hide the > licence because it's not relevant to normal development tasks. > > On 21.02.2003 14:01:34 Arved Sandstrom wrote: > > I find it odd that it's OK to suggest tools (IDEs/editors, etc) > to hide a > > license. When the argument presented to the board was > presumably that the > > long license is legally required. > > > Jeremias Maerki > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Markers in areas
Well, Peter, no, I haven't written something this direct - yet. My trust in their responsiveness is at an ebb; they don't answer much communication, of any nature, quickly, so I doubt that they will answer a more critical email at all. FWIW I consider all of the editors to be way more experienced than me, when it comes to documents, and publishing, and so forth. I don't equate that with expertise in math, or programming, or technical writing. Number one, trained technical writers should write technical docs - a whole bunch of W3C recommendations prove that. _I_ am not very good at writing technical docs; I get windy and abstruse. That's why I don't get paid to write docs. :-) Every XSL-FO implementation has a different treatment of "reference-orientation". I keep harping on this, I know. In fact, I think _my_ interpretation is correct, and almost everyone else is wrong. I think that because I read the English in the spec. I know that sounds arrogant, but I have told the editors before that I'll implement according to the letter, not the spirit. If they wish to argue that the language says differently than what I think, that's their prerogative. There is a better procedure for turning out specs. The W3C hasn't twigged. Good companies in the industry already know it. It's invite the customers/clients in, get them to hash things out with the programmers and technical writers, and then let the latter two groups turn out a good document, or a good implementation. Or both. In this case the experts are the customers; we have a confused spec because they thought they were the programmers and writers as well. Arved > -Original Message- > From: Peter B. West [mailto:[EMAIL PROTECTED] > Sent: February 22, 2003 8:23 AM > To: [EMAIL PROTECTED] > Subject: Re: Markers in areas > > > Arved Sandstrom wrote: > > They are not connected concepts, Mark. I originally put in the code for > > lineage pairs, and also started the implementation for markers. So I can > > assure you that they are completely unrelated. For what it's worth, > > subsequent contributors have significantly improved on marker > support, so I > > am only commenting from the viewpoint of my knowledge of the spec. > > > > I made a few comments in my reply to Joerg. I have a degree in > physics, and > > most of a Masters in physical oceanography. I see considerable > mathematical > > anarchy in the XSL spec, some degree of mathematical naivete, > and lots of > > confusion. My forte is not logic, based on my background, but > even a physics > > guy can dissect the pseudo-logic in that spec. I think plenty of other > > people have also separated the wheat from the chaff as far as > that document > > is concerned...I think we are due for a rewrite, with lots of the > > pretentious math excised, and replaced with plain language. > > Arved, > > Hear, hear. Arved, have you told the editors this directly? If not, > please do. > > -- > 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] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Long licence
> -Original Message- > From: Dirk-Willem van Gulik [mailto:[EMAIL PROTECTED] > Sent: February 21, 2003 1:35 PM > To: [EMAIL PROTECTED] > Subject: RE: Long licence > > On Fri, 21 Feb 2003, Arved Sandstrom wrote: > > > I'd like to find out what lawyer thought a long license is > needed with every > > file. Because I question that finding. > > Question the board@ (again) for a black/white answer - or work with > licensing@ for a more interactive reply. Point taken. I get too much email already, so I've been averse to joining more lists. Maybe in this case I should join another. > But Bear in mind that the current 'license' is more than just strictly a > license; it contains elements of copyright, waiver and an agreement. Understood. > Bear in mind that the answer to vague questions like that carry very > significant price tags; and are very depended on the exact question; which > itself by its very nature is inexact. Yes. It's our business to pose the exact questions. It's the business of the lawyer to supply an answer. FWIW, I am not vilifying lawyers. My older sister is one. :-) I feel like the right questions weren't asked. > Also bear in mind that there are very, very few layers who actually have > studied open-source licenses in sufficient dept; and that most answers > from case-law are about proprietary and protectionist stances; and often > very US specific; and may be very dated. Yes, I agree. > Also bear in mind that the answer differs from jurisdiction to > jurisdiction; and from how litagationous/defensive the side you want to > err on is. Well, I differ from our US friends on this. I prefer to be terse and clear, and maintain some trust in people. > Finally bear in mind that the board propably does not want to ask > expensive questions now with respect to the current license; as the new > license is not far off - and the new license has taken into account this > desire to include by reference. OK, fair enough. I'll wait to see it. Arved - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: markers in redesign
Hi, Keiron I interpret 6.11.4 as follows. Number one, the names have to match - "marker-class-name" and "retrieve-class-name". This is straightforward. It defines qualifying areas. Number two, qualifying areas are excluded if they follow the page being formatted, regardless of "retrieve-boundary". So "retrieve-boundary" essentially defines the backward limits. Finally, "retrieve-boundary" also restricts qualifying areas in the backward direction: "page" says that if it's not on the currently being-formatted page, it isn't up for consideration. For "last-starting-within-page", "is-first" is clear enough I think. An FO is generating and returning areas on the containing page, and the first one is...well, the first one. :-) So it is the optimal candidate if its parent FO has qualifying markers. With reference to your [2], return to the def'n of "qualifying area": name-matching, period. I assume "last" in this context means last geometrically, as opposed to some other "last". Eg, immediately preceding as one normally reads a document. I think whoever wrote this portion (markers) made the spec too abstruse. I finally just broke my rule of adhering to the law, and considered the use cases, and decided what made sense. :-) Arved > -Original Message- > From: Keiron Liddle [mailto:[EMAIL PROTECTED] > Sent: February 23, 2003 6:49 PM > To: [EMAIL PROTECTED] > Subject: Re: markers in redesign > > > Hi all, > > Is it correct that it should look for markers on the current page > and if page > boundary is current page then stop there. If boundary is > page-sequence then > keep going backwards on each page until a marker is found or > reaches the start > of the page-sequence and similarly for the document boundary. > > I'm trying to work out exactly how the markers should work. > For the first starting within page and last ending I am fine > with. First including > carry-over seems okay. > > Last starting within page is a bit confusing. A statement [1] in > the spec suggests > that it shouldn't really find the last starting in the page but > rather find the closest > node to the root in the area tree that is the last starting area. > Another statement [2] > seems confusing but maybe this is if it is searching previous pages. > > So if this was in a page then block "a" would be the last > starting in the page. > > -start-- > ... > > > > ---pos1- > > > > end--- > > But if there is a column break in pos1 the last starting in page > will become > block "c" as block "a" is not starting in that part of the area tree. > > If this is the case then there are two possible cases when > starting an area: isfirst > and other. When finishing an area there are: islast, (had) > isfirst and both. This will > supply enough information to add only the needed markers to the > area tree. These > markers can then be kept for later retrieval. > > [1] "Every area in the hierarchy is considered preferential to, > or "better" than, any > area below it in the hierarchy." > > [2] "If there is no such area, then the last qualifying area in > the containing page is > better than any other area." > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: markers in redesign
Comments below. > -Original Message- > From: Peter B. West [mailto:[EMAIL PROTECTED] > Sent: February 24, 2003 6:53 AM > To: [EMAIL PROTECTED] > Subject: Re: markers in redesign > [ SNIP ] > It seems to me that the "hierarchy" is not the same as the area tree or > fo tree hierarchy. It is a unique hierarchy constructed by applying the > constraints on the qualifying areas. The boundary conditions impose > absolute constraints - violate one and you are out. But the other > conditions are not absolute, and they, along with actual page for > multi-page boundaries, are used to construct the hierarchy. Yes, that's my interpretation. Precisely so. It is tempting to confuse "hierarchy" for "tree". But the language of the spec in regard of markers defines a different hierarchy, one which happens to map closely to the area tree, but is highly filtered. I re-assert that in the case of this particular section of the spec, we can fall back on common sense, although normally I am loath to do so (it may sound funny to hear that, but I am a professional software developer, and I'd rather follow the letter than the spirit. That approach usually assures better code, and better specs). That means to me that in this case we use the use cases in the spec to identify what makes sense. Markers are amenable to this, as opposed to "reference-orientation", because the latter is an artificial concept, and several interpretations may apply. That means, to me, first, that we use the naming to identify qualifying areas. Two, we use "retrieve-boundary" to filter out qualifying areas. I make that distinction, because qualifying areas are defined by the naming alone. Three, we use "retrieve-position" coupled with area traits (and the traits are easy to establish) to figure out the best qualifier on the _current_ page. The thing that bugs me is, when there is no qualifying area in the "containing page" (Note to spec editors: try saying currently-formatted page), after filtering, then it becomes anarchy. It seems like user preferences based on "retrieve-position" lose all relevance. In other words, there is an elaborate set of definitions based on the current page, with a hierarchy defined by "retrieve-position", but as soon as one establishes that there is no such qualifying area on the current page, than it's just the first qualifying area one can find, moving back in the document. Arved - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: markers in redesign
Comments inline. > -Original Message- > From: Tony Graham [mailto:[EMAIL PROTECTED] > Sent: February 24, 2003 10:26 AM > To: [EMAIL PROTECTED] > Subject: RE: markers in redesign > > > Arved Sandstrom wrote at 24 Feb 2003 08:01:40 -0400: > > Comments below. > > > > > -Original Message- > > > From: Peter B. West [mailto:[EMAIL PROTECTED] > > > Sent: February 24, 2003 6:53 AM > > > To: [EMAIL PROTECTED] > > > Subject: Re: markers in redesign > > > > > [ SNIP ] > > > > > It seems to me that the "hierarchy" is not the same as the > area tree or > > > fo tree hierarchy. It is a unique hierarchy constructed by > applying the > > > constraints on the qualifying areas. The boundary conditions impose > > > absolute constraints - violate one and you are out. But the other > > > conditions are not absolute, and they, along with actual page for > > > multi-page boundaries, are used to construct the hierarchy. > > > > Yes, that's my interpretation. Precisely so. It is tempting to confuse > > "hierarchy" for "tree". But the language of the spec in regard > of markers > > defines a different hierarchy, one which happens to map > closely to the area > > tree, but is highly filtered. > > It's not just areas. fo:wrapper 'does not generate any areas', but > also 'may always have a sequence of zero or more fo:markers as its > initial children.' No, you're quite right, Tony, fo:wrapper does not generate areas. But it _returns_ areas, assuming that its children do (there are presumably some pathological cases), and those areas are what markers act on. "wrapper" is transparent. I may have missed your point on this. > ... > > The thing that bugs me is, when there is no qualifying area in the > > "containing page" (Note to spec editors: try saying currently-formatted > > page), after filtering, then it becomes anarchy. It seems like user > > I wasn't there when the spec was written, but it seems to me that > 'currently-formatted page' presupposes making pages on the fly and > doesn't quite describe pages that are unbounded in one or both > directions (i.e. where there is only ever one page) and also doesn't > describe the possible processing model of making all the pages from > the fo:flow and then going back and fixing up the static content. OK, you've got me here. :-) I fall into the trap of ignoring "media-usage" too frequently. So the point is well taken. Regarding the second point, that processing model ignores an "error-if-overflow" value for "overflow"; process a thousand pages and then only afterwards find out that you ought to have aborted with a message? Regards, Arved - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: markers in redesign
Comments below. > -Original Message- > From: Keiron Liddle [mailto:[EMAIL PROTECTED] > Sent: February 24, 2003 10:59 PM > To: [EMAIL PROTECTED] > Subject: Re: markers in redesign > > > Exactly. All definitions regarding retrieve-position exclusively > > refer to the "current page". There is not a single word on what should > > happen if there is no matching marker on the current page but several > > on the previous page which are eligible. FOP picks the last, but there > > is absolutely nothing in the spec which backs this, and I searched > > thoroughly last weekend. > > For the current page or containing page I take it to mean like so > (assuming doc or > page-sequence boundary): > If we are on the third page of a document and we want to retrieve > a "first-starting- > within-page" then it will look on page 3, if it finds the marker > then fine. If not then > there is no such area (on the current page) and it should look at > page 2. Page 2 is > now the containing page and it looks for a marker that is > "first-starting-within- > page" on page 2. Then page 1... > Admitedly it doesn't actually say that, but I can't interpret the > wording otherwise. [ SNIP ] I re-read the spec so exhaustively that my eyes are burning. :-) I think Keiron is right. Boy, it would be cool if they could rewrite that section, though. :-) Arved - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]