xsl-list
[Top] [All Lists]

Re: [xsl] adjust width of block to previous block

2011-07-15 11:49:11
At 2011-07-15 17:07 +0200, Mathis Mörke wrote:
I am using Apache FOP version 0.95. Furthermore I am using xsl-fo to
generate pdf out of Matlab (matlab generates an xml-file and I use a
xsl-fo file as style sheet)

I don't know how to adjust the width of a next block to the previous
block. I have an external graphic in a block and want the next block
to have the same size as the block containing the external graphic.

There are no such semantics in XSL-FO 1.1 that I can think of. And there is no feedback loop to your transformation to tell you what the width is.

The only time I've seen a width change based on content is with a side float, and even then putting more text than the width of the graphic would simply widen the float area.

Some XSL-FO tools have an intermediate format that you might be able to exploit to determine and massage the values needed. But nothing I know of is standardized in this regard.

If your graphic's intrinsic size is maintained as metadata somewhere you could use that information to establish the width of the block, but there are no facilities in XSLT with which to do this with the actual image file.

I hope this helps, even if doesn't give you what you want.

. . . . . . . . . . . Ken


--
Contact us for world-wide XML consulting & instructor-led training
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
G. Ken Holman                 mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--