Is there an alternative to "keep-together='always'" on table-row?

Sean picture Sean · Dec 18, 2012 · Viewed 21.1k times · Source

Upon finding the "keep-together" attribute, and needing to not page break inside a row I added keep-together="always" on every table-row element in my xslt. Is there a nicer way of achieving the same effect? It seems a bit hacky. (ps. I will accept "no" as an answer if no one provides a better one, provided some kind of explanation is proffered.)

Answer

Jeremias Märki picture Jeremias Märki · Dec 18, 2012

keep-together="always" is dangerous because that's a compound property that also indirectly sets keep-together.within-line="always" (prohibiting line breaks inside a table-cell). You should use keep-together.within-column="always" instead. But specifying that on a table-row is actually the way to go. Nothing hacky about it.

See also: http://www.w3.org/TR/xsl11/#datatype