DO NOT REPLY [Bug 25646] - [PATCH] line and column numbers on fo:elements
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25646. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25646 [PATCH] line and column numbers on fo:elements [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | --- Additional Comments From [EMAIL PROTECTED] 2003-12-27 14:02 --- Please accept my apologies for breaking the build when running with a XMLFilter which doesn't gives locator information. A NPE will then occur. The attached patch fixes the NPE.
DO NOT REPLY [Bug 25646] - [PATCH] line and column numbers on fo:elements
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25646. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25646 [PATCH] line and column numbers on fo:elements --- Additional Comments From [EMAIL PROTECTED] 2003-12-27 14:03 --- Created an attachment (id=9709) Unified patch against HEAD
DO NOT REPLY [Bug 25773] New: - [PATCH] width, height, border and background support for block-container.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25773. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25773 [PATCH] width, height, border and background support for block-container. Summary: [PATCH] width, height, border and background support for block-container. Product: Fop Version: 1.0dev Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: page-master/layout AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] This patch assigns width, height and common traits to block-container areas. It contains the following changes: 1) Keep the width and height properties in instance fields in BlockContainerLM. I'm not at all sure that is the preferred approach, but it makes sense to me. Feedback welcome. 2) Add the child block in the BCLM.flush() after the child area tree has been built. Othwerwise the auto height will always be zero and the bpd is not incremented. 3) Added a Block.addBlock(Block, boolean) method which block-container can use when it is adding children to a fixed height block. The default addBlock(Block) method still calculates the height based on the children. 4) Pass overflow signals from the child LM through to the parent LM. Otherwise no new page is created when a child block overflows a page and an indefinite loop is entered. 5) Sets common borders and background traits to the block-container area.
DO NOT REPLY [Bug 25773] - [PATCH] width, height, border and background support for block-container.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25773. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25773 [PATCH] width, height, border and background support for block-container. --- Additional Comments From [EMAIL PROTECTED] 2003-12-27 14:38 --- Created an attachment (id=9710) A unified diff against HEAD.
DO NOT REPLY [Bug 25773] - [PATCH] width, height, border and background support for block-container.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25773. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25773 [PATCH] width, height, border and background support for block-container. --- Additional Comments From [EMAIL PROTECTED] 2003-12-27 14:39 --- Created an attachment (id=9711) A .fo testcase.
DO NOT REPLY [Bug 25773] - [PATCH] width, height, border and background support for block-container.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25773. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25773 [PATCH] width, height, border and background support for block-container. --- Additional Comments From [EMAIL PROTECTED] 2003-12-27 14:41 --- Created an attachment (id=9712) The .pdf result of the testcase after applying the patch.
Which area rectangle does Block.height and Block.width specify?
Hi, I was looking at some of the border issues and would like to ask for a little clarification of which of area rectangle that is described by Block.getHeight and Block.getWidth. http://www.w3.org/TR/2001/REC-xsl-20011015/slice4.html#area-geo From looking at the layout managers it seems to specify the content rectangle but the border code in PDFRendere interprets the values as the allocation rectangle. I would guess that that values should be the size of content rectangle. regards, finn
RE: Which area rectangle does Block.height and Block.width specify?
-Original Message- From: Finn Bock [mailto:[EMAIL PROTECTED] I was looking at some of the border issues and would like to ask for a little clarification of which of area rectangle that is described by Block.getHeight and Block.getWidth. http://www.w3.org/TR/2001/REC-xsl-20011015/slice4.html#area-geo From looking at the layout managers it seems to specify the content rectangle but the border code in PDFRendere interprets the values as the allocation rectangle. I would guess that that values should be the size of content rectangle. Having had a first look, I wouldn't be too sure... If you want to draw a border, you want it to take into account the padding (if present), no? At the time the PDFRenderer renders the borders it should draw these along the large-allocation-rectangle, not the content rectangle. So, I would definitely go check if Block.getHeight and Block.getWidth already take into account the specified or inherited padding... Perhaps someone else can clarify this further? Cheers, Andreas
Re: Trying to use the NIST test suite.
On Dec 24, 2003, at 4:03 PM, Andreas L. Delmelle wrote: wouldn't it be reasonable to also accept the obsolete 'master-name' and to just print out a corresponding warning message instead of throwing an error? AFAIK, the attribute has only been renamed to 'master-reference', but its meaning and usage remained identically the same. The latter seems preferrable as it discourages the use of properties that are undefined by the spec, while the first allows people to ignore it. If at some time they decide (for some mysterious reason) to use XEP instead of FOP, they'll receive an error anyway. Just a thought. I would think that by providing a WARNING message RE: 'master-name deprecated in favor of master-reference' or some such, that would alleviate any concerns. It would also make old files work without change (and look to the FAQ, which has much improved since Victor started looking into things... ;-p).. If however, there is some technical/challenging reason which this flies against (aghast?) then, never mind... Web Maestro Clay
Re: [VOTE] Finn Bock for Committer
On Dec 26, 2003, at 1:23 AM, Jeremias Maerki wrote: On 24.12.2003 07:56:10 Bertrand Delacretaz wrote: Le Dimanche, 21 déc 2003, à 22:53 Europe/Zurich, Glen Mazza a écrit : Seems like no one has voted on this yet? Must be this Christmas thing... +1 from me, too. I've got an (un)fortunate additional excuse: The flu put me out of action during the last days. :-) or rather :-( BTW, I think, that when this vote passes, there are at least two other candidates who deserve a similar nomination, maybe not because of patch frequency, but for dedicated service to the project. Expect these within the next two days (no time today, sorry). Jeremias Maerki I didn't vote (my vote doesn't count) but since you asked... +1 is how I (and our friend and non-voting 'member' Andreas) would've voted... :-) Since Finn appears to have won by a landslide may I be the first to congratulate Mr. Bock! May you see FOP's 1.0 release and beyond! Web Maestro Clay
RE: Which area rectangle does Block.height and Block.width specify?
-Original Message- From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED] -Original Message- From: Finn Bock [mailto:[EMAIL PROTECTED] I was looking at some of the border issues and would like to ask for a little clarification of which of area rectangle that is described by Block.getHeight and Block.getWidth. snip / I would guess that that values should be the size of content rectangle. Having had a first look, I wouldn't be too sure... If you want to draw a border, you want it to take into account the padding (if present), no? At the time the PDFRenderer renders the borders it should draw these along the large-allocation-rectangle, not the content rectangle. So, I would definitely go check if Block.getHeight and Block.getWidth already take into account the specified or inherited padding... On a second peek into fop.area.Block fop.area.BlockParent fop.area.Area fop.layoutmgr.BlockLayoutManager Block.setWidth is fed the IPD of the parent Area in BlockLayoutManager.java, and the IPD is indeed defined as qthe inline-progression-dimension of the *content* rectangle for each area generated by this formatting object/q[1] But this would be the content rectangle of the *parent* area, hence the confusion. Anyone? Cheers, Andreas [1] http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#inline-progression-di mension
DO NOT REPLY [Bug 25773] - [PATCH] width, height, border and background support for block-container.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25773. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25773 [PATCH] width, height, border and background support for block-container. --- Additional Comments From [EMAIL PROTECTED] 2003-12-27 20:14 --- Finn, Please be careful--if-statements *must* always be in braces, as follows: if (something) { single_statement; } See: http://java.sun.com/docs/codeconv/html/CodeConventions.doc6.html#449, referenced on our developer page. I'll make the changes to this patch, but please be careful in future coding. Thanks, Glen
DO NOT REPLY [Bug 25773] - [PATCH] width, height, border and background support for block-container.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25773. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25773 [PATCH] width, height, border and background support for block-container. --- Additional Comments From [EMAIL PROTECTED] 2003-12-27 20:27 --- Finn-- I can't apply this, as part of the patch is missing (only BlockContainerLayoutManager.java is present, not the Block.java (and other?) changes. Thanks, Glen
cvs commit: xml-fop/src/java/org/apache/fop/fo/flow ExternalGraphic.java
gmazza 2003/12/27 12:40:04 Modified:src/java/org/apache/fop/fo/flow ExternalGraphic.java Log: Bug 25758 (patch by Finn Bock) -- Fix of content-height/content-width for images, to satisfy NIST test adp-height1.fo Revision ChangesPath 1.13 +6 -5 xml-fop/src/java/org/apache/fop/fo/flow/ExternalGraphic.java Index: ExternalGraphic.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/ExternalGraphic.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- ExternalGraphic.java 20 Dec 2003 06:53:22 - 1.12 +++ ExternalGraphic.java 27 Dec 2003 20:40:04 - 1.13 @@ -167,13 +167,14 @@ url = null; return; } -if (cwidth == -1) { +if (cwidth == -1 cheight == -1) { cwidth = (int)(fopimage.getWidth() * 1000); -} -if (cheight == -1) { cheight = (int)(fopimage.getHeight() * 1000); -} -if (scaling == Scaling.UNIFORM) { +} else if (cwidth == -1) { +cwidth = (int)(fopimage.getWidth() * cheight) / fopimage.getHeight(); +} else if (cheight == -1) { +cheight = (int)(fopimage.getHeight() * cwidth) / fopimage.getWidth(); +} else { // adjust the larger double rat1 = cwidth / (fopimage.getWidth() * 1000f); double rat2 = cheight / (fopimage.getHeight() * 1000f); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 25758] - [PATCH] external-graphics scaling with just one content-xxx attribute
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25758. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25758 [PATCH] external-graphics scaling with just one content-xxx attribute [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2003-12-27 20:40 --- Applied, thanks!
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr LineLayoutManager.java
gmazza 2003/12/27 13:03:34 Modified:src/java/org/apache/fop/layoutmgr LineLayoutManager.java Log: Bug 25756 (Patch by Simon Pepping): Remove line BPs where line consists only of suppressible content (whitespace). Revision ChangesPath 1.9 +36 -1 xml-fop/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java Index: LineLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- LineLayoutManager.java23 Dec 2003 20:41:58 - 1.8 +++ LineLayoutManager.java27 Dec 2003 21:03:34 - 1.9 @@ -325,7 +325,15 @@ return null; } if (prevBP == null) { -prevBP = bp; +BreakPoss prevLineEnd = (iPrevLineEnd == 0) +? null +: (BreakPoss) vecInlineBreaks.get(iPrevLineEnd); +if (allAreSuppressible(prevLineEnd)) { +removeAllBP(prevLineEnd); +return null; +} else { +prevBP = bp; +} } // Choose the best break @@ -419,6 +427,33 @@ if (!couldEndLine || bp == prev) break; } return couldEndLine; +} + +/** Test whether all breakposs in vecInlineBreaks +back to and excluding prev are suppressible */ +private boolean allAreSuppressible(BreakPoss prev) { +ListIterator bpIter = +vecInlineBreaks.listIterator(vecInlineBreaks.size()); +boolean allAreSuppressible = true; +BreakPoss bp; +while (bpIter.hasPrevious() +(bp = (BreakPoss) bpIter.previous()) != prev +(allAreSuppressible = bp.isSuppressible())) { +} +return allAreSuppressible; +} + +/** Remove all BPs from the end back to and excluding prev +from vecInlineBreaks*/ +private void removeAllBP(BreakPoss prev) { +int iPrev; +if (prev == null) { +vecInlineBreaks.clear(); +} else if ((iPrev = vecInlineBreaks.indexOf(prev)) != -1) { +for (int i = vecInlineBreaks.size(); iPrev i; --i) { +vecInlineBreaks.remove(i); +} +} } private HyphContext getHyphenContext(BreakPoss prev, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 25756] - [PATCH] LineLayoutManager.getNextBreakPoss should return null when the line consists only of suppressible content.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25756. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25756 [PATCH] LineLayoutManager.getNextBreakPoss should return null when the line consists only of suppressible content. [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2003-12-27 21:03 --- Applied, thanks!
cvs commit: xml-fop/src/java/org/apache/fop/fo/flow Block.java BlockContainer.java Inline.java Marker.java
gmazza 2003/12/27 14:00:38 Modified:src/java/org/apache/fop/fo FObj.java GenericShorthandParser.java PropertyList.java PropertyManager.java src/java/org/apache/fop/fo/expr FromParentFunction.java src/java/org/apache/fop/fo/flow Block.java BlockContainer.java Inline.java Marker.java Log: *Partial* conversion of PropertyList.get(String propName) to new PropertyList.get(int propId) method. This method will remain overloaded until all calls converted to int constants. Work based on Finn Bock's patch. Revision ChangesPath 1.29 +4 -3 xml-fop/src/java/org/apache/fop/fo/FObj.java Index: FObj.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FObj.java,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- FObj.java 26 Dec 2003 22:11:17 - 1.28 +++ FObj.java 27 Dec 2003 22:00:38 - 1.29 @@ -66,7 +66,7 @@ /** * Base class for representation of formatting objects and their processing. */ -public class FObj extends FONode { +public class FObj extends FONode implements Constants { private static final String FO_URI = http://www.w3.org/1999/XSL/Format;; public static Property.Maker[] propertyListTable = null; @@ -257,7 +257,8 @@ * @return the property */ public Property getProperty(String name) { -return (propertyList.get(name)); +int propId = FOPropertyMapping.getPropertyId(name); +return (propertyList.get(propId)); } /** @@ -267,7 +268,7 @@ * fo and sets the id attribute of this object. */ public void setupID() { -Property prop = this.propertyList.get(id); +Property prop = this.propertyList.get(PR_ID); if (prop != null) { String str = prop.getString(); if (str != null !str.equals()) { 1.4 +1 -3 xml-fop/src/java/org/apache/fop/fo/GenericShorthandParser.java Index: GenericShorthandParser.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/GenericShorthandParser.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- GenericShorthandParser.java 26 Dec 2003 23:41:47 - 1.3 +++ GenericShorthandParser.java 27 Dec 2003 22:00:38 - 1.4 @@ -52,7 +52,6 @@ import java.util.Vector; import java.util.Enumeration; -import org.apache.fop.fo.properties.FOPropertyMapping; public class GenericShorthandParser implements ShorthandParser { @@ -96,8 +95,7 @@ if (count() == 1) { String sval = ((Property)list.elementAt(0)).getString(); if (sval != null sval.equals(inherit)) { -String name = FOPropertyMapping.getPropertyName(propId); -return propertyList.getFromParent(name); +return propertyList.getFromParent(propId); } } return convertValueForProperty(propId, maker, propertyList); 1.11 +23 -6 xml-fop/src/java/org/apache/fop/fo/PropertyList.java Index: PropertyList.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyList.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- PropertyList.java 26 Dec 2003 23:41:47 - 1.10 +++ PropertyList.java 27 Dec 2003 22:00:38 - 1.11 @@ -229,7 +229,8 @@ public Property getInherited(String propertyName) { if (parentPropertyList != null isInherited(namespace, elementName, propertyName)) { -return parentPropertyList.get(propertyName); +int propertyId = FOPropertyMapping.getPropertyId(propertyName); +return parentPropertyList.get(propertyId); } else { // return the initial value try { @@ -290,14 +291,28 @@ * this will try to compute it based on other properties, or if it is * inheritable, to return the inherited value. If all else fails, it returns * the default value. - * @param propertyName property name + * @param propId The Constants ID of the property whose value is desired. * @return the Property corresponding to that name */ -public Property get(String propertyName) { +public Property get(int propId) { +String propertyName = FOPropertyMapping.getPropertyName(propId); return get(propertyName, true, true); } /** + * TEMPORARY until conversion to int's complete + * Return the property on the current FlowObject.
DO NOT REPLY [Bug 25773] - [PATCH] width, height, border and background support for block-container.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25773. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25773 [PATCH] width, height, border and background support for block-container. --- Additional Comments From [EMAIL PROTECTED] 2003-12-28 00:38 --- New patch attached; complete this time and without the style violations. I'm sorry about the inconvenience this has caused.
DO NOT REPLY [Bug 25773] - [PATCH] width, height, border and background support for block-container.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25773. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25773 [PATCH] width, height, border and background support for block-container. --- Additional Comments From [EMAIL PROTECTED] 2003-12-28 00:44 --- Created an attachment (id=9713) A unified diff against HEAD (complete this time).
cvs commit: xml-fop/lib xercesImpl.jar xml-apis.jar
pbwest 2003/12/27 18:57:48 Modified:lib Tag: FOP_0-20-0_Alt-Design xml-apis.jar Added: lib Tag: FOP_0-20-0_Alt-Design xercesImpl.jar Log: Update to Xerces 2.6.0 to overcome bug in 2.2.1 Revision ChangesPath No revision No revision 1.2.2.2 +296 -263 xml-fop/lib/xml-apis.jar Binary file No revision Binary file No revision Binary file 1.1.2.1 +3342 -0 xml-fop/lib/Attic/xercesImpl.jar Binary file - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/lib xercesImpl-2.2.0.jar
pbwest 2003/12/27 19:45:23 Removed: lib Tag: FOP_0-20-0_Alt-Design xercesImpl-2.2.0.jar Log: Update to Xerces 2.6.0 to overcome bug in 2.2.1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/xml XMLNamespaces.java
pbwest 2003/12/27 19:58:54 Modified:src/java/org/apache/fop/xml Tag: FOP_0-20-0_Alt-Design XMLNamespaces.java Log: Change pre-installed namespace URIs - remove XLink and include FOX. Define SEQ_BITS as 18 for tracking pool usage. (This and related seqMask and getSequence()should probably be elsewhere.) intern() URI string. Revision ChangesPath No revision No revision 1.1.2.2 +19 -13xml-fop/src/java/org/apache/fop/xml/Attic/XMLNamespaces.java Index: XMLNamespaces.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/xml/Attic/XMLNamespaces.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- XMLNamespaces.java5 Jul 2003 19:12:36 - 1.1.2.1 +++ XMLNamespaces.java28 Dec 2003 03:58:54 - 1.1.2.2 @@ -75,13 +75,13 @@ public static final String DefAttrNSpace = ; public static final String XSLNamespace = http://www.w3.org/1999/XSL/Format;; +public static final String FOXNamespace = +http://xml.apache.org/fop/extensions;; public static final String SVGNamespace = http://www.w3.org/2000/svg;; -public static final String XlinkNamespace = -http://www.w3.org/1999/xlink;; public static final int DefAttrNSIndex = 0; public static final int XSLNSpaceIndex = 1; -public static final int SVGNSpaceIndex = 2; -public static final int XLinkNSpaceIndex = 3; +public static final int FOXNSpaceIndex = 2; +public static final int SVGNSpaceIndex = 3; /** * A ttHashMap/tt mapping a namespace URI to an ttint/tt @@ -122,10 +122,16 @@ */ private int sequence = 0; +/** + * Number of bits in the sequence mask. This value will determine + * the number of sequence values the pool will track. + */ +private static final int SEQ_BITS = 18; + /** Mask to restrict the range of values within which isequence/i * may cycle. */ -public final int seqMask = (1 20) - 1; +public final int seqMask = (1 SEQ_BITS) - 1; /** * The access function for the sequence. @@ -138,16 +144,16 @@ } public XMLNamespaces() { -uriIndices = new HashMap(4); -uris = new ArrayList(4); +uriIndices = new HashMap((int)(6/0.75)); +uris = new ArrayList(6); uriIndices.put(DefAttrNSpace, Ints.consts.get(DefAttrNSIndex)); uris.add(DefAttrNSIndex, DefAttrNSpace); uriIndices.put(XSLNamespace, Ints.consts.get(XSLNSpaceIndex)); uris.add(XSLNSpaceIndex, XSLNamespace); +uriIndices.put(FOXNamespace, Ints.consts.get(FOXNSpaceIndex)); +uris.add(FOXNSpaceIndex, FOXNamespace); uriIndices.put(SVGNamespace, Ints.consts.get(SVGNSpaceIndex)); uris.add(SVGNSpaceIndex, SVGNamespace); -uriIndices.put(XlinkNamespace, Ints.consts.get(XLinkNSpaceIndex)); -uris.add(XLinkNSpaceIndex, XlinkNamespace); } /** @@ -171,7 +177,7 @@ i = uris.size(); //System.out.println(Adding namespace + uri + + i); uriIndices.put(uri, Ints.consts.get(i)); -uris.add(i, uri); +uris.add(i, uri.intern()); return i; } // not null - found the integer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/apps Driver.java
pbwest 2003/12/27 20:16:00 Modified:src/java/org/apache/fop/apps Tag: FOP_0-20-0_Alt-Design Driver.java Log: Removed setting of namespace-prefixes feature from SAX parser. Revision ChangesPath No revision No revision 1.9.2.3 +3 -8 xml-fop/src/java/org/apache/fop/apps/Driver.java Index: Driver.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Driver.java,v retrieving revision 1.9.2.2 retrieving revision 1.9.2.3 diff -u -r1.9.2.2 -r1.9.2.3 --- Driver.java 11 Jul 2003 04:03:47 - 1.9.2.2 +++ Driver.java 28 Dec 2003 04:16:00 - 1.9.2.3 @@ -198,14 +198,9 @@ * @throws FOPException */ public void setParserFeatures(XMLReader parser) throws FOPException { -try { -parser.setFeature(http://xml.org/sax/features/namespace-prefixes;, - true); -} catch (SAXException e) { -throw new FOPException( -Error in setting up parser feature namespace-prefixes\n - + You need a parser which supports SAX version 2, e); -} +/* + Setting of namespaces-prefixes feature removed. +*/ } /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo FOAttributes.java
pbwest 2003/12/27 21:22:07 Modified:src/java/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design FOAttributes.java Log: Eliminated checks for xmlns* in line with removal of namespace-prefixes feature from parser. Localised some varialbe references. Interned LocalName. Revision ChangesPath No revision No revision 1.1.2.2 +10 -18xml-fop/src/java/org/apache/fop/fo/Attic/FOAttributes.java Index: FOAttributes.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/Attic/FOAttributes.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- FOAttributes.java 5 Jul 2003 19:26:05 - 1.1.2.1 +++ FOAttributes.java 28 Dec 2003 05:22:07 - 1.1.2.2 @@ -150,35 +150,26 @@ Attributes attributes = event.getAttributes(); if (attributes == null) throw new FOPException (No Attributes in XMLEvent); -int propIndex; -HashMap tmpHash; for (int i = 0; i attributes.getLength(); i++) { -String attrUri = attributes.getURI(i); -String attrLocalname = attributes.getLocalName(i); -String attrQName = attributes.getQName(i); -int sep = attrQName.indexOf(':'); -String prefix = attrQName.substring(0, (sep == -1 ? 0 : sep)); -if (prefix.equals(xmlns)) break; +String attrUri = attributes.getURI(i).intern(); +String attrLocalname = attributes.getLocalName(i).intern(); String attrValue = attributes.getValue(i); int attrUriIndex = foNode.namespaces.getURIIndex(attrUri); //System.out.println(FONode: + event); if (attrUriIndex == XMLNamespaces.DefAttrNSIndex) { -// Standard FO namespace -// Catch default namespace declaration here. -if (attrLocalname.equals(xmlns)) break; +// Standard attribute namespace // Is this a known (valid) property? -propIndex = PropNames.getPropertyIndex(attrLocalname); +int propIndex = PropNames.getPropertyIndex(attrLocalname); // Known attribute name foAttrMap.put(Ints.consts.get(propIndex), attrValue); } else { // Not the XSL FO namespace -int j; if (nSpaceAttrMaps == null) { //Create the list System.out.println(Creating nSpaceAttrMaps); nSpaceAttrMaps = new ArrayList(attrUriIndex + 1); // Add the fo list -for (j = 0; j XMLNamespaces.DefAttrNSIndex; j++) +for (int j = 0; j XMLNamespaces.DefAttrNSIndex; j++) nSpaceAttrMaps.add(new HashMap(0)); System.out.println(Adding foAttrMap); @@ -186,10 +177,11 @@ } // Make sure there are elements between the last current // and the one to be added -for (j = nSpaceAttrMaps.size(); j = attrUriIndex; j++) +for (int j = nSpaceAttrMaps.size(); j = attrUriIndex; j++) nSpaceAttrMaps.add(new HashMap(0)); // Does a HashMap exist for this namespace? +HashMap tmpHash; if ((tmpHash = (HashMap)nSpaceAttrMaps.get(attrUriIndex)) == null) { tmpHash = new HashMap(1); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop .classpath
pbwest 2003/12/27 21:26:23 Modified:.Tag: FOP_0-20-0_Alt-Design .classpath Log: Changes to jar libraries. Revision ChangesPath No revision No revision 1.1.2.5 +9 -9 xml-fop/Attic/.classpath Index: .classpath === RCS file: /home/cvs/xml-fop/Attic/.classpath,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- .classpath8 Jul 2003 11:03:40 - 1.1.2.4 +++ .classpath28 Dec 2003 05:26:22 - 1.1.2.5 @@ -1,12 +1,12 @@ ?xml version=1.0 encoding=UTF-8? classpath -classpathentry kind=src path=src/java/ -classpathentry excluding=*.xml|*.xsl kind=src path=src/codegen/ -classpathentry kind=con path=org.eclipse.jdt.launching.JRE_CONTAINER/ -classpathentry kind=lib path=lib/ant.jar/ -classpathentry kind=lib path=lib/xalan-2.4.1.jar/ -classpathentry kind=lib path=lib/xercesImpl-2.2.0.jar/ -classpathentry kind=lib path=lib/xml-apis.jar/ -classpathentry kind=lib path=lib/avalon-framework-4.1.4.jar/ -classpathentry kind=output path=build/classes/ + classpathentry kind=src path=src/java/ + classpathentry excluding=*.xml|*.xsl kind=src path=src/codegen/ + classpathentry kind=con path=org.eclipse.jdt.launching.JRE_CONTAINER/ + classpathentry kind=lib path=lib/ant.jar/ + classpathentry kind=lib path=lib/xalan-2.4.1.jar/ + classpathentry kind=lib path=lib/xml-apis.jar/ + classpathentry kind=lib path=lib/avalon-framework-4.1.4.jar/ + classpathentry kind=lib path=lib/xercesImpl.jar/ + classpathentry kind=output path=build/classes/ /classpath - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop build.xml
pbwest 2003/12/27 21:29:00 Modified:.Tag: FOP_0-20-0_Alt-Design build.xml Log: Add conf entries to jar. Exclude userconfig.xml. Revision ChangesPath No revision No revision 1.37.2.6 +3 -1 xml-fop/build.xml Index: build.xml === RCS file: /home/cvs/xml-fop/build.xml,v retrieving revision 1.37.2.5 retrieving revision 1.37.2.6 diff -u -r1.37.2.5 -r1.37.2.6 --- build.xml 10 Jul 2003 12:43:51 - 1.37.2.5 +++ build.xml 28 Dec 2003 05:29:00 - 1.37.2.6 @@ -103,6 +103,7 @@ exclude name=dist/**/ exclude name=build/**/ exclude name=lib/**/ +exclude name=**/userconfig.xml /fileset fileset dir=${basedir} id=dist.bin.lib @@ -118,6 +119,7 @@ exclude name=build/**/ include name=src/**/ include name=conf/**/ +exclude name=**/userconfig.xml/ include name=docs/**/ include name=lib/**/ include name=CHANGES/ @@ -561,7 +563,7 @@ [${os.name} ${os.version} ${os.arch}, Java ${java.runtime.version}]/ jar jarfile=${build.dir}/${name}.jar basedir=${build.dest} -includes=org/** +includes=org/**,conf/** manifest attribute name=Main-Class value=${main.class}/ attribute name=Class-Path value=${manifest-classpath}/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop fop.sh
pbwest 2003/12/27 21:37:33 Added: .Tag: FOP_0-20-0_Alt-Design fop.sh Log: Copied from HEAD Revision ChangesPath No revision No revision 1.2.2.2 +105 -2xml-fop/fop.sh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/conf .cvsignore
pbwest 2003/12/27 21:44:34 Added: conf Tag: FOP_0-20-0_Alt-Design .cvsignore Log: Added to guard against userconfig.xml. Revision ChangesPath No revision No revision 1.1.2.1 +1 -0 xml-fop/conf/Attic/.cvsignore - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/conf userconfig.xml
pbwest 2003/12/27 21:50:33 Removed: conf Tag: FOP_0-20-0_Alt-Design userconfig.xml Log: Removed from CVS control. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Which area rectangle does Block.height and Block.width specify?
Hi, I was looking at some of the border issues and would like to ask for a little clarification of which of area rectangle that is described by Block.getHeight and Block.getWidth. I think the intention was that it is the allocation width and height, the content is then calculated from the border, padding and indents. So the width and height is the external values for use by other elements for example when working out the ipd or bpd used by the area. http://www.w3.org/TR/2001/REC-xsl-20011015/slice4.html#area-geo From looking at the layout managers it seems to specify the content rectangle but the border code in PDFRendere interprets the values as the allocation rectangle. I would guess that that values should be the size of content rectangle. regards, finn