Hi Pascal, So, is "height" property supported on fo:table-row by FOP?
FOP compliance page says "yes" (not "partial") on "height" support, and XSL-FO specification says this property is applicable to fo:table-row. Yet, I cannot get it to work. Am I doing something wrong? Regards, Alexey. On Wednesday, September 15, 2010 10:08:29 am Alexey Neyman wrote: > Hi Pascal, > > Just tried. While there is no exception, <fo:table-row min-height="1em"> > still does not work in FOP 1.0 (still no effect whatsoever). See quoted > email as to why <fo:table-cell height="..."> is not sufficient to solve > this issue. > > Regards, > Alexey. > > On Wednesday, September 15, 2010 12:35:00 am Pascal Sancho wrote: > > Hi Alexey > > > > this Exception issue seems to be fixed in FOP 1.0 (I've noticed in the > > pdf attached to your initial post that you used FOP 0.95). > > I suggest you to upgrade, at least min-height will work as expected > > without any Exception. > > > > Pascal > > > > Le 14/09/2010 22:10, Alexey Neyman a écrit : > > > Hi Pascal, > > > > > > I see your point, although this advice is not particularly useful to > > > what I am doing. As I mentioned, this table is generated by DocBook, > > > and its templates for tables are probably the most convoluted in the > > > whole stylesheet. I was trying to avoid heavy customizations of these > > > templates. > > > > > > Another issue is that what I really want is "min-height" property in > > > this case: at XSLT stage, it is not known whether text inside the > > > table cell will occupy 1, 2, 3 or 15 rows. I tried using min-height in > > > the test case I posted before, but this causes an exception in FOP > > > (see below). According to spec, using min-height is perfectly legal: > > > it should set minimum height, while retaining optimum and maximum > > > height as "auto". > > > > > > An finally, what you suggested won't work if another cell is more than > > > 1 row. With the example I posted: > > > > > > AB > > > AC > > > DC > > > > > > If I set height to 2em, it looks okay. But, if cell B contains a text > > > that wraps into 2nd line, the table again looks as > > > > > > AB > > > DC > > > > > > but now the whole row containing C and D cells is 2em in height. Given > > > that DocBook stylesheet does not know how many lines of text there will > > > be in each cell - that is determined by FO processor - I cannot > > > calculate the height value beforehand. > > > > > > So, I tried to set height/min-height on a fo:table-row instead. Setting > > > min-height= on fo:table-row results in a different exception (also, see > > > below). Setting height= on fo:table-row does not have any effect at > > > all. According to XSL-FO spec, block-progression-dimension property > > > (that is set through height property) is allowed on fo:table-row. Is > > > this a FOP bug/missing feature? > > > > > > Regards, > > > Alexey. > > > > > > Exception with min-height= on fo:table-cell: > > > ---->8----->8----->8----->8----->8----->8----->8 > > > Sep 14, 2010 12:37:47 PM org.apache.fop.cli.Main startFOP > > > SEVERE: Exception > > > java.lang.NullPointerException > > > > > > at > > > org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:2 > > > 1 7) at > > > org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) > > > at org.apache.fop.cli.Main.startFOP(Main.java:166) > > > at org.apache.fop.cli.Main.main(Main.java:197) > > > > > > Caused by: java.lang.NullPointerException > > > > > > at > > > > > > org.apache.fop.layoutmgr.table.RowGroupLayoutManager.computeRowHeights( > > > Ro wGroupLayoutManager.java:165) > > > > > > at > > > > > > org.apache.fop.layoutmgr.table.RowGroupLayoutManager.createElementsForR > > > ow Group(RowGroupLayoutManager.java:127) > > > > > > at > > > > > > org.apache.fop.layoutmgr.table.RowGroupLayoutManager.getNextKnuthElemen > > > ts (RowGroupLayoutManager.java:60) > > > > > > at > > > > > > org.apache.fop.layoutmgr.table.TableContentLayoutManager.getKnuthElemen > > > ts ForRowIterator(TableContentLayoutManager.java:220) > > > > > > at > > > > > > org.apache.fop.layoutmgr.table.TableContentLayoutManager.getNextKnuthEl > > > em ents(TableContentLayoutManager.java:172) > > > > > > at > > > > > > org.apache.fop.layoutmgr.table.TableLayoutManager.getNextKnuthElements( > > > Ta bleLayoutManager.java:247) > > > > > > at > > > > > > org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElement > > > s( BlockStackingLayoutManager.java:294) > > > > > > at > > > > > > org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockL > > > ay outManager.java:116) > > > > > > at > > > > > > org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLay > > > ou tManager.java:107) > > > > > > at > > > > > > org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.j > > > av a:145) > > > > > > at > > > > > > org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreak > > > er .java:552) > > > > > > at > > > > > > org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java: > > > 13 7) > > > > > > at > > > > > > org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java: > > > 30 2) > > > > > > at > > > > > > org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java: > > > 26 4) > > > > > > at > > > > > > org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageS > > > eq uenceLayoutManager.java:106) > > > > > > at > > > > > > org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.jav > > > a: 234) > > > > > > at > > > > > > org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:1 > > > 23 ) > > > > > > at > > > > > > org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder. > > > ja va:340) > > > > > > at > > > org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:1 > > > 6 9) at > > > > > > org.apache.xalan.transformer.TransformerIdentityImpl.endElement(Transfo > > > rm erIdentityImpl.java:1102) > > > > > > at > > > org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown > > > > > > Source) > > > > > > at > > > org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown > > > > > > Source) > > > > > > at > > > > > > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown > > > Source) > > > > > > at > > > > > > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDi > > > sp atcher.dispatch(Unknown Source) > > > > > > at > > > > > > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkn > > > ow n Source) > > > > > > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > > > Source) at > > > org.apache.xerces.parsers.XML11Configuration.parse(Unknown > > > Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown > > > Source) at > > > org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown > > > Source) at > > > org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknow > > > n > > > > > > Source) > > > > > > at > > > > > > org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transfor > > > me rIdentityImpl.java:485) > > > > > > at > > > org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:2 > > > 1 4) ... 3 more > > > > > > ---->8----->8----->8----->8----->8----->8----->8 > > > > > > > > > Exception with min-height= on fo:table-row: > > > ---->8----->8----->8----->8----->8----->8----->8 > > > Sep 14, 2010 12:53:10 PM org.apache.fop.cli.Main startFOP > > > SEVERE: Exception > > > java.lang.NullPointerException > > > > > > at > > > org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:2 > > > 1 7) at > > > org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) > > > at org.apache.fop.cli.Main.startFOP(Main.java:166) > > > at org.apache.fop.cli.Main.main(Main.java:197) > > > > > > Caused by: java.lang.NullPointerException > > > > > > at > > > > > > org.apache.fop.layoutmgr.MinOptMaxUtil.toMinOptMax(MinOptMaxUtil.java:1 > > > 06 ) > > > > > > at > > > > > > org.apache.fop.layoutmgr.table.RowGroupLayoutManager.computeRowHeights( > > > Ro wGroupLayoutManager.java:155) > > > > > > at > > > > > > org.apache.fop.layoutmgr.table.RowGroupLayoutManager.createElementsForR > > > ow Group(RowGroupLayoutManager.java:127) > > > > > > at > > > > > > org.apache.fop.layoutmgr.table.RowGroupLayoutManager.getNextKnuthElemen > > > ts (RowGroupLayoutManager.java:60) > > > > > > at > > > > > > org.apache.fop.layoutmgr.table.TableContentLayoutManager.getKnuthElemen > > > ts ForRowIterator(TableContentLayoutManager.java:220) > > > > > > at > > > > > > org.apache.fop.layoutmgr.table.TableContentLayoutManager.getNextKnuthEl > > > em ents(TableContentLayoutManager.java:172) > > > > > > at > > > > > > org.apache.fop.layoutmgr.table.TableLayoutManager.getNextKnuthElements( > > > Ta bleLayoutManager.java:247) > > > > > > at > > > > > > org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElement > > > s( BlockStackingLayoutManager.java:294) > > > > > > at > > > > > > org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockL > > > ay outManager.java:116) > > > > > > at > > > > > > org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLay > > > ou tManager.java:107) > > > > > > at > > > > > > org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.j > > > av a:145) > > > > > > at > > > > > > org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreak > > > er .java:552) > > > > > > at > > > > > > org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java: > > > 13 7) > > > > > > at > > > > > > org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java: > > > 30 2) > > > > > > at > > > > > > org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java: > > > 26 4) > > > > > > at > > > > > > org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageS > > > eq uenceLayoutManager.java:106) > > > > > > at > > > > > > org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.jav > > > a: 234) > > > > > > at > > > > > > org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:1 > > > 23 ) > > > > > > at > > > > > > org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder. > > > ja va:340) > > > > > > at > > > org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:1 > > > 6 9) at > > > > > > org.apache.xalan.transformer.TransformerIdentityImpl.endElement(Transfo > > > rm erIdentityImpl.java:1102) > > > > > > at > > > org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown > > > > > > Source) > > > > > > at > > > org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown > > > > > > Source) > > > > > > at > > > > > > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown > > > Source) > > > > > > at > > > > > > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDi > > > sp atcher.dispatch(Unknown Source) > > > > > > at > > > > > > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkn > > > ow n Source) > > > > > > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > > > Source) at > > > org.apache.xerces.parsers.XML11Configuration.parse(Unknown > > > Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown > > > Source) at > > > org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown > > > Source) at > > > org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknow > > > n > > > > > > Source) > > > > > > at > > > > > > org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transfor > > > me rIdentityImpl.java:485) > > > > > > at > > > org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:2 > > > 1 4) ... 3 more > > > > > > ---->8----->8----->8----->8----->8----->8----->8 > > > > > > On Tuesday, September 14, 2010 01:04:02 am Pascal Sancho wrote: > > >> Hi, > > >> > > >> I think the behaviour is correct here: > > >> Cells height is not sufficient to see the effect you want. > > >> try to increase the height of vertically spanned cells (by setting the > > >> height property to 2em) and you will see what I mean. > > >> > > >> Pascal > > >> > > >> Le 13/09/2010 22:39, Alexey Neyman a écrit : > > >>> <fo:table table-layout="fixed" width="100%" > > >>> > > >>> border-top="solid black 0.5pt" border-left="solid black 0.5pt"> > > >>> > > >>> <fo:table-body> > > >>> > > >>> <fo:table-row> > > >>> > > >>> <fo:table-cell border-bottom="solid black 0.5pt" > > >>> > > >>> border-right="solid black 0.5pt" > > >>> number-rows-spanned="2" > > >>> number-columns-spanned="2"> > > >>> > > >>> <fo:block>A</fo:block> > > >>> > > >>> </fo:table-cell> > > >>> <fo:table-cell border-bottom="solid black 0.5pt" > > >>> > > >>> border-right="solid black 0.5pt"> > > >>> > > >>> <fo:block>B</fo:block> > > >>> > > >>> </fo:table-cell> > > >>> > > >>> </fo:table-row> > > >>> <fo:table-row> > > >>> > > >>> <fo:table-cell border-bottom="solid black 0.5pt" > > >>> > > >>> border-right="solid black 0.5pt" number-rows-spanned="2"> > > >>> > > >>> <fo:block>C</fo:block> > > >>> > > >>> </fo:table-cell> > > >>> > > >>> </fo:table-row> > > >>> <fo:table-row> > > >>> > > >>> <fo:table-cell border-bottom="solid black 0.5pt" > > >>> > > >>> border-right="solid black 0.5pt"> > > >>> > > >>> <fo:block>D</fo:block> > > >>> > > >>> </fo:table-cell> > > >>> <fo:table-cell border-bottom="solid black 0.5pt" > > >>> > > >>> border-right="solid black 0.5pt"> > > >>> > > >>> <fo:block>E</fo:block> > > >>> > > >>> </fo:table-cell> > > >>> > > >>> </fo:table-row> > > >>> > > >>> </fo:table-body> > > >>> > > >>> </fo:table> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
