At 2011-04-29 15:34 +0000, Fredrik Bengtsson wrote:
I've been trying to wrap my head around "4.3 Spaces and
Conditionality" in the XSL spec, but I'm a bit confused.
I think you've got it right.
What I'd like to have is a block A which may or may not have a
nested block B inside it (actually a title inside a chapter
wrapper). A itself has a space-before of 6pt, and with no B inside,
that's what will separate stuff before A from other things inside A.
B has a space-before of 18pt, and when it is present I want the
total space between stuff before A and B itself to be 18pt, not
18+6pt. That is, I want their spaces to overlap such that the
greater one wins. How do I do that?
Ummmmmm ... *that's* the specification! You are only supposed to get
18pt in your situation.
Space-before is *not* a command to be executed, but rather, it is a
condition to be met.
The condition of space-before="6pt" is satisfied by the
space-before="18pt", thus you should only have 18pt.
In Antenna House, the example below of four columns gives me 18pt
difference in the first, 18pt difference in the second, 6pt
difference in the third and 24pt difference in the fourth.
Just like the spec says.
I hope this helps.
. . . . . . . . . . . Ken
<?xml version="1.0" encoding="US-ASCII"?><!--frederik.fo-->
<root xmlns="http://www.w3.org/1999/XSL/Format"
font-family="Times" font-size="20pt">
<layout-master-set>
<simple-page-master master-name="frame"
page-height="297mm" page-width="210mm"
margin-top="15mm" margin-bottom="15mm"
margin-left="15mm" margin-right="15mm">
<region-body region-name="frame-body"/>
</simple-page-master>
</layout-master-set>
<page-sequence master-reference="frame">
<flow flow-name="frame-body">
<table>
<table-body>
<table-cell>
<block>This is a test</block>
<block space-before="18pt">
No nested block.
</block>
</table-cell>
<table-cell>
<block>This is a test</block>
<block space-before="18pt">
<block space-before="6pt">
Nested block.
</block>
</block>
</table-cell>
<table-cell>
<block>This is a test</block>
<block space-before="18pt">
<block space-before="6pt" space-before.precedence="force">
Nested block nested force attribute.
</block>
</block>
</table-cell>
<table-cell>
<block>This is a test</block>
<block space-before="18pt" space-before.precedence="force">
<block space-before="6pt" space-before.precedence="force">
Nested block both force attributes.
</block>
</block>
</table-cell>
</table-body>
</table>
</flow>
</page-sequence>
</root>
--
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>
--~--