cvs commit: xml-fop/src/java/org/apache/fop/fo/flow FoBlock.java FoPcdata.java FoTable.java FoFlow.java
pbwest 2004/02/04 04:14:27 Modified:src/java/org/apache/fop/fo/flow Tag: FOP_0-20-0_Alt-Design FoBlock.java FoPcdata.java FoTable.java FoFlow.java Log: Removed debugging info Revision ChangesPath No revision No revision 1.1.2.10 +2 -4 xml-fop/src/java/org/apache/fop/fo/flow/Attic/FoBlock.java Index: FoBlock.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Attic/FoBlock.java,v retrieving revision 1.1.2.9 retrieving revision 1.1.2.10 diff -u -r1.1.2.9 -r1.1.2.10 --- FoBlock.java 2 Feb 2004 02:01:42 - 1.1.2.9 +++ FoBlock.java 4 Feb 2004 12:14:27 - 1.1.2.10 @@ -172,7 +172,6 @@ stateFlags, sparsePropsMap, sparseIndices); getMarkers(); XmlEvent ev = null; -System.out.println(In FoBlock); do { try { if ((stateFlags FONode.MC_OUT_OF_LINE) == 0) @@ -181,7 +180,6 @@ ev = xmlevents.expectOutOfLinePcdataOrInlineOrBlock(); if (ev != null) { // Generate the flow object -System.out.println(Generating flow object for + ev); FObjects.fobjects.makePageSeqFOChild( foTree, pageSequence, this, ev, stateFlags); if (ev.getType() != XmlEvent.CHARACTERS) { 1.1.2.5 +2 -3 xml-fop/src/java/org/apache/fop/fo/flow/Attic/FoPcdata.java Index: FoPcdata.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Attic/FoPcdata.java,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- FoPcdata.java 2 Feb 2004 02:01:42 - 1.1.2.4 +++ FoPcdata.java 4 Feb 2004 12:14:27 - 1.1.2.5 @@ -165,7 +165,6 @@ { super(foTree, FObjectNames.PCDATA, pageSequence, parent, event, stateFlags, sparsePropsMap, sparseIndices); -System.out.println(In FoPcdata); characters = event.getChars(); makeSparsePropsSet(); } 1.1.2.9 +2 -3 xml-fop/src/java/org/apache/fop/fo/flow/Attic/FoTable.java Index: FoTable.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Attic/FoTable.java,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -u -r1.1.2.8 -r1.1.2.9 --- FoTable.java 2 Feb 2004 02:01:42 - 1.1.2.8 +++ FoTable.java 4 Feb 2004 12:14:27 - 1.1.2.9 @@ -178,7 +178,6 @@ super(foTree, FObjectNames.TABLE, pageSequence, parent, event, stateFlags, sparsePropsMap, sparseIndices); XmlEvent ev; -System.out.println(In FoTable); // Look for zero or more markers getMarkers(); try { 1.1.2.9 +2 -4 xml-fop/src/java/org/apache/fop/fo/flow/Attic/FoFlow.java Index: FoFlow.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Attic/FoFlow.java,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -u -r1.1.2.8 -r1.1.2.9 --- FoFlow.java 2 Feb 2004 02:01:42 - 1.1.2.8 +++ FoFlow.java 4 Feb 2004 12:14:27 - 1.1.2.9 @@ -153,8 +153,6 @@ throw new FOPException (Block not found or unexpected non-block in fo:flow); } - -System.out.println(Making sparsePropsSet for flow.); makeSparsePropsSet(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/datastructs Node.java
pbwest 2004/02/04 04:17:51 Modified:src/java/org/apache/fop/datastructs Tag: FOP_0-20-0_Alt-Design Node.java Log: Added private method hasNextNode() as the implementation of hasNode(). Made constructors refer to this method to bypass scope problems in the superclass constructor for SyncedNode.PreOrder, etc. Revision ChangesPath No revision No revision 1.1.2.7 +17 -9 xml-fop/src/java/org/apache/fop/datastructs/Attic/Node.java Index: Node.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datastructs/Attic/Node.java,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -r1.1.2.6 -r1.1.2.7 --- Node.java 1 Feb 2004 08:12:00 - 1.1.2.6 +++ Node.java 4 Feb 2004 12:17:51 - 1.1.2.7 @@ -528,7 +528,7 @@ * Constructor for pre-order iterator. */ public PreOrder() { -hasNext(); // A call to set up the initial iterators +hasNextNode(); // A call to set up the initial iterators // so that a call to next() without a preceding call to // hasNext() will behave sanely } @@ -538,19 +538,23 @@ */ public PreOrder(Object sync) { synchronized (sync) { -hasNext(); // A call to set up the initial iterators +hasNextNode(); // A call to set up the initial iterators // so that a call to next() without a preceding call to // hasNext() will behave sanely } } public boolean hasNext() { +return hasNextNode(); +} + +private boolean hasNextNode() { if (selfNotReturned) { return true; } // self has been returned - are there any children? // if so, we must always have an iterator available -// even unless it is exhausted. Assume it is set up this +// even if it is exhausted. Assume it is set up this // way by next(). The iterator has a chance to do this // because self will always be returned first. // The test of nextChildIndex must always be made because @@ -566,7 +570,7 @@ } public Object next() { -if (! hasNext()) { +if (! hasNextNode()) { throw new NoSuchElementException(); } if (selfNotReturned) { @@ -640,7 +644,7 @@ * Constructor for post-order iterator. */ public PostOrder() { -hasNext(); // A call to set up the initial iterators +hasNextNode(); // A call to set up the initial iterators // so that a call to next() without a preceding call to // hasNext() will behave sanely } @@ -651,13 +655,17 @@ */ public PostOrder(Object sync) { synchronized (sync) { -hasNext(); // A call to set up the initial iterators +hasNextNode(); // A call to set up the initial iterators // so that a call to next() without a preceding call to // hasNext() will behave sanely } } public boolean hasNext() { +return hasNextNode(); +} + +private boolean hasNextNode() { // self is always the last to go if (selfReturned) { // nothing left return false; @@ -677,7 +685,7 @@ } public Object next() throws NoSuchElementException { -if (! hasNext()) { +if (! hasNextNode()) { throw new NoSuchElementException(); } // Are there any children? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo/pagination RegionBody.java
bckfnn 2004/02/04 04:58:27 Modified:src/java/org/apache/fop/fo/pagination RegionBody.java Log: Support for margin shorthands for margin-[left,right]. Revision ChangesPath 1.16 +2 -2 xml-fop/src/java/org/apache/fop/fo/pagination/RegionBody.java Index: RegionBody.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/RegionBody.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- RegionBody.java 2 Feb 2004 16:08:26 - 1.15 +++ RegionBody.java 4 Feb 2004 12:58:27 - 1.16 @@ -113,9 +113,9 @@ String sPropName = margin- + parent.propertyList.wmRelToAbs(reldir); int propId = FOPropertyMapping.getPropertyId(sPropName); -Property prop = propertyList.getExplicitBaseProp(propId); +Property prop = propertyList.getExplicitOrShorthand(propId); if (prop == null) { -prop = propertyList.getExplicitBaseProp(relPropId); +prop = propertyList.getExplicitOrShorthand(relPropId); } return ((prop != null) ? prop.getLength().getValue() : 0); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/render/pdf PDFRenderer.java
bckfnn 2004/02/04 05:06:36 Modified:src/java/org/apache/fop/render AbstractRenderer.java src/java/org/apache/fop/render/pdf PDFRenderer.java Log: Do the regiontraits before changes ctm because the ctm only apply for the region reference area, not the viewport itself. Revision ChangesPath 1.21 +2 -2 xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java Index: AbstractRenderer.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- AbstractRenderer.java 29 Jan 2004 19:45:48 - 1.20 +++ AbstractRenderer.java 4 Feb 2004 13:06:36 - 1.21 @@ -330,11 +330,11 @@ currentBlockIPPosition = currentIPPosition; RegionReference region = port.getRegion(); +handleRegionTraits(port); + // shouldn't the viewport have the CTM startVParea(region.getCTM()); - // do after starting viewport area -handleRegionTraits(port); if (region.getRegionClass() == Region.BODY_CODE) { renderBodyRegion((BodyRegion) region); } else { 1.32 +4 -3 xml-fop/src/java/org/apache/fop/render/pdf/PDFRenderer.java Index: PDFRenderer.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/pdf/PDFRenderer.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- PDFRenderer.java 3 Feb 2004 22:11:15 - 1.31 +++ PDFRenderer.java 4 Feb 2004 13:06:36 - 1.32 @@ -546,9 +546,9 @@ */ protected void handleRegionTraits(RegionViewport region) { currentFontName = ; -float startx = 0; -float starty = 0; Rectangle2D viewArea = region.getViewArea(); +float startx = (float)(viewArea.getX() / 1000f); +float starty = (float)(viewArea.getY() / 1000f);; float width = (float)(viewArea.getWidth() / 1000f); float height = (float)(viewArea.getHeight() / 1000f); @@ -557,8 +557,9 @@ bpMarginOffset = region.getBorderAndPaddingWidthBefore(); ipMarginOffset = region.getBorderAndPaddingWidthStart(); } - +beginTextObject(); drawBackAndBorders(region, startx, starty, width, height); +endTextObject(); } /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo/properties AutoLength.java BorderWidthPropertyMaker.java CompoundPropertyMaker.java LengthProperty.java LineHeightPropertyMaker.java ListProperty.java NumberProperty.java
bckfnn 2004/02/04 05:24:53 Modified:src/java/org/apache/fop/fo BoxPropShorthandParser.java src/java/org/apache/fop/fo/properties AutoLength.java BorderWidthPropertyMaker.java CompoundPropertyMaker.java LengthProperty.java LineHeightPropertyMaker.java ListProperty.java NumberProperty.java Log: Fix javadocs warnings caused by the recent moves of property classes and makers. Revision ChangesPath 1.10 +1 -1 xml-fop/src/java/org/apache/fop/fo/BoxPropShorthandParser.java Index: BoxPropShorthandParser.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/BoxPropShorthandParser.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- BoxPropShorthandParser.java 2 Feb 2004 16:08:24 - 1.9 +++ BoxPropShorthandParser.java 4 Feb 2004 13:24:53 - 1.10 @@ -70,7 +70,7 @@ * Set the given property based on the number of values set. * Example: padding, border-width, border-color, border-style, margin * @see org.apache.fop.fo.GenericShorthandParser#convertValueForProperty( - * int, ListProperty, Property.Maker, PropertyList) + * int, ListProperty, PropertyMaker, PropertyList) */ protected Property convertValueForProperty(int propId, ListProperty listProperty, 1.2 +2 -2 xml-fop/src/java/org/apache/fop/fo/properties/AutoLength.java Index: AutoLength.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/AutoLength.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AutoLength.java 2 Feb 2004 16:08:26 - 1.1 +++ AutoLength.java 4 Feb 2004 13:24:53 - 1.2 @@ -69,7 +69,7 @@ //} /** - * @see org.apache.fop.fo.Property#getString() + * @see org.apache.fop.fo.properties.Property#getString() */ public String getString() { return auto; 1.4 +2 -2 xml-fop/src/java/org/apache/fop/fo/properties/BorderWidthPropertyMaker.java Index: BorderWidthPropertyMaker.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/BorderWidthPropertyMaker.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- BorderWidthPropertyMaker.java 2 Feb 2004 16:08:26 - 1.3 +++ BorderWidthPropertyMaker.java 4 Feb 2004 13:24:53 - 1.4 @@ -81,7 +81,7 @@ /** * Check the value of the style property and return a length of 0 when * the style is NONE. - * @see org.apache.fop.fo.Property.Maker#get(int, PropertyList, boolean, boolean) + * @see org.apache.fop.fo.properties.PropertyMaker#get(int, PropertyList, boolean, boolean) */ public Property get(int subpropId, PropertyList propertyList, 1.3 +2 -2 xml-fop/src/java/org/apache/fop/fo/properties/CompoundPropertyMaker.java Index: CompoundPropertyMaker.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/CompoundPropertyMaker.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- CompoundPropertyMaker.java2 Feb 2004 16:08:26 - 1.2 +++ CompoundPropertyMaker.java4 Feb 2004 13:24:53 - 1.3 @@ -86,7 +86,7 @@ } /** - * @see org.apache.fop.fo.Property.Maker#useGeneric(Property.Maker) + * @see org.apache.fop.fo.properties.PropertyMaker#useGeneric(PropertyMaker) */ public void useGeneric(PropertyMaker generic) { super.useGeneric(generic); 1.2 +2 -2 xml-fop/src/java/org/apache/fop/fo/properties/LengthProperty.java Index: LengthProperty.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/LengthProperty.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- LengthProperty.java 2 Feb 2004 16:08:26 - 1.1 +++ LengthProperty.java 4 Feb 2004 13:24:53 - 1.2 @@ -103,7 +103,7 @@ } /** - * @see Property.Maker#convertProperty + * @see PropertyMaker#convertProperty */ public Property convertProperty(Property p, PropertyList propertyList, 1.4 +3 -3 xml-fop/src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java Index:
Adding PPD support when rendering PS
Hi, I've been looking at this for a couple of days, and figured I'd do best to post and see what other folks think about this. I have to implement PPD when generating PS for the project (FOP embedded app) that I'm working on - I need to be able to force printer tray selection/stapling etc. As such, I have butchered the version of FOP (0.20.5) that were using in development here and have managed to get a rough and ready version of what we need. If anyone is interested or has had a play with area, please feel free to drop me a line. I'd be really interested if the group as a whole had any thoughts/ideas which I could look at implementing and/or contributing back to the project (if you'll take 'em of course!). Cheers, Alex.
Re: Just a small question...
Andreas, Andreas L. Delmelle wrote: Picked this one up @ mulberry: In RenderX XEP, an XSL FO formatter, the preprocessor is written in XSLT; it is a complex stylesheet of moderate size, and it does what is best to do in XML manipulation language. If you look into XEP's main jar (e.g. xep372_trial.jar), you can find the preprocessor stylesheet under com/renderx/xep/pre/processor.xsl. This stylesheet is the main reason why XT is always needed in the classpath to run XEP. Does anybody here have an idea of what exactly is meant by this? It performs the most trivial preprocessing: strips namespaces, expands some shorthands, normalizes tables with no fo:table-row, etc. etc; things that are more easily expressed/debugged in XPath than in Java. Best regards, Nikolai Grigoriev RenderX
RE: Just a small question...
-Original Message- From: Nikolai Grigoriev [mailto:[EMAIL PROTECTED] If you look into XEP's main jar (e.g. xep372_trial.jar), you can find the preprocessor stylesheet under com/renderx/xep/pre/processor.xsl. This stylesheet is the main reason why XT is always needed in the classpath to run XEP. Ouch! I just knew there was something obvious I was overlooking :) Does anybody here have an idea of what exactly is meant by this? It performs the most trivial preprocessing: strips namespaces, expands some shorthands, normalizes tables with no fo:table-row, etc. etc; ^ One of the kinds of things I was thinking about... things that are more easily expressed/debugged in XPath than in Java. ... and a few more. I'll be following up on this, that's for sure. Thanks a lot for pointing this out! Cheers, Andreas
RE: Just a small question...
--- Andreas L. Delmelle [EMAIL PROTECTED] wrote: -Original Message- From: Nikolai Grigoriev [mailto:[EMAIL PROTECTED] If you look into XEP's main jar (e.g. xep372_trial.jar), you can find the preprocessor stylesheet under com/renderx/xep/pre/processor.xsl. This stylesheet is the main reason why XT is always needed in the classpath to run XEP. snip/ I'll be following up on this, that's for sure. Please do *not* share anything you find with the team--We don't need any you-stole-our-code headaches from the commercial implementations. Thanks a lot for pointing this out! Be careful, Andreas--RenderX or AntennaHouse code should not be in FOP--nor should FOP developers even be looking at its internals. Matter of simple integrity. Stay away from their work--it's not worth it!!! At worst, it's illegal, at best you're taking away the reward--from everyone!--of coming up with a comparable implementation. I don't want FOP tarnished with 0.001% of RenderX or AntennaHouse code (or inspired code). If we can't provide a comparable implementation, then let us lose honorably. If we can, we can then enjoy the satisfaction of having done it the honest way, not by copying work! Thanks, Glen __ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/
cvs commit: xml-fop/examples/embedding/xml/xslt projectteam2fo.xsl
gmazza 2004/02/04 16:31:50 Modified:examples/embedding build.xml examples/embedding/xml/xslt projectteam2fo.xsl Log: Added a parameter to the projectteam2fo.xsl example (for subsequent use in showing a setTransform() call in the samples); also added a needed library to the examples' build.xml file. Revision ChangesPath 1.3 +6 -5 xml-fop/examples/embedding/build.xml Index: build.xml === RCS file: /home/cvs/xml-fop/examples/embedding/build.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- build.xml 12 Mar 2003 11:14:53 - 1.2 +++ build.xml 5 Feb 2004 00:31:50 - 1.3 @@ -17,11 +17,12 @@ !-- stuff -- path id=project.class.path fileset dir=${fop.lib.dir} - include name=avalon-framework*.jar/ - include name=batik*.jar/ - include name=xml-apis.jar/ - include name=xerces*.jar/ - include name=xalan*.jar/ +include name=avalon-framework*.jar/ +include name=batik*.jar/ +include name=xml-apis.jar/ +include name=xerces*.jar/ +include name=xalan*.jar/ +include name=commons-io*.jar/ /fileset fileset dir=${fop.lib.dir}/../build include name=fop.jar/ 1.3 +3 -0 xml-fop/examples/embedding/xml/xslt/projectteam2fo.xsl Index: projectteam2fo.xsl === RCS file: /home/cvs/xml-fop/examples/embedding/xml/xslt/projectteam2fo.xsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- projectteam2fo.xsl12 Mar 2003 11:14:53 - 1.2 +++ projectteam2fo.xsl5 Feb 2004 00:31:50 - 1.3 @@ -1,6 +1,7 @@ ?xml version=1.0 encoding=UTF-8? xsl:stylesheet version=1.1 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; exclude-result-prefixes=fo xsl:output method=xml version=1.0 omit-xml-declaration=no indent=yes/ + xsl:param name=versionParam select=1.0/ !-- = -- !-- root element: projectteam -- !-- = -- @@ -14,6 +15,8 @@ fo:page-sequence master-reference=simpleA4 fo:flow flow-name=xsl-region-body fo:block font-size=16pt font-weight=bold space-after=5mmProject: xsl:value-of select=projectname/ + /fo:block + fo:block font-size=12pt space-after=5mmVersion xsl:value-of select=$versionParam/ /fo:block fo:block font-size=10pt fo:table table-layout=fixed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
(FOP examples) XSLT question
Since this is FOP work-related, I guess I can be allowed to ask a very newbie XSLT question here: I just added a parameter to one of the XSL example files (eventually to show the use of a JAXP transformer.setParam() call) as follows: xsl:param name=versionParam select=1.0/ ... ... fo:blockVersion xsl:value-of select=$versionParam/ ... But it keeps outputting Version 1 in the resultant PDF. What is the standard way of getting it to display Version 1.0? Thanks, Glen __ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/
Re: (FOP examples) XSLT question
On Wed, 2004-02-04 at 21:13, Glen Mazza wrote: Since this is FOP work-related, I guess I can be allowed to ask a very newbie XSLT question here: I just added a parameter to one of the XSL example files (eventually to show the use of a JAXP transformer.setParam() call) as follows: xsl:param name=versionParam select=1.0/ ... ... fo:blockVersion xsl:value-of select=$versionParam/ ... But it keeps outputting Version 1 in the resultant PDF. What is the standard way of getting it to display Version 1.0? Isn't there also xsl:copy-of / or xsl:copy / for this sort of thing. I think value-of implies some kind of conversion ... My reference is upstairs. -- John Austin [EMAIL PROTECTED]
Re: (FOP examples) XSLT question
I believe you need the select value in single quotes, as in: xsl:param name=versionParam select='1.0'/ From: http://www.w3.org/TR/xslt#local-variables NOTE:The nearest equivalent in Java to an xsl:variable element in a template is a final local variable declaration with an initializer. For example, xsl:variable name=x select='value'/ has similar semantics to final Object x = value; XSLT does not provide an equivalent to the Java assignment operator x = value; because this would make it harder to create an implementation that processes a document other than in a batch-like way, starting at the beginning and continuing through to the end. Hope this helps! Web Maestro Clay On Feb 4, 2004, at 4:43 PM, Glen Mazza wrote: Since this is FOP work-related, I guess I can be allowed to ask a very newbie XSLT question here: I just added a parameter to one of the XSL example files (eventually to show the use of a JAXP transformer.setParam() call) as follows: xsl:param name=versionParam select=1.0/ ... ... fo:blockVersion xsl:value-of select=$versionParam/ ... But it keeps outputting Version 1 in the resultant PDF. What is the standard way of getting it to display Version 1.0? Thanks, Glen __ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/