Re: placing graphics side by side with xsl-fo
I have no real experience with XSL-FO. I've been working on XML to XML transforms. However, I've been asked to modify an XSL-FO stylesheet to display subfigures side by side. Right now they are rendering one over the other.
If I've understood your code correctly, you've put them each in block containers and block containers that are not absolutely positioned will stack in the block progression direction.
Here is the basic XML.
... were too confusing to determine your needs for captioning, positioning, alignment, etc.
Since graphics are inline constructs, you can put both on the same line, say with a half-centimeter separation, as follows:
<block> <external-graphic src='url("it1235")'/> <leader leader-length=".5cm"/> <external-graphic src='url("it1234")'/> </block>
If each sub-figure has independent captioning requirements, then it will have to be more elaborate. Some processors support <inline-container> and you can put two of those on a line and in each one you can put a line with the figure and other lines with your captions. Without <inline-container> support you might consider using a single item list construct to provide the scaffolding for your blocks.
Once you figure out what works, then you can adjust your XSLT accordingly.
When I try to determine what I need in my XSLT I will often write the XSL-FO by hand and test it ... which will tell me what constructs I need where. Then I worry about the XSLT to get there. Take the output of what you have now, tweak the end result and test it without running XSLT, and then fix the XSLT.
I hope this helps.
. . . . . . . . . . . Ken
-- Vote for your XML training: http://www.CraneSoftwrights.com/s/i/ Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format