|
Subject: Re: [xsl] "Merging" space-before From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Fri, 29 Apr 2011 12:11:40 -0400 |
I've been trying to wrap my head around "4.3 Spaces and Conditionality" in the XSL spec, but I'm a bit confused.
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?
<?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@xxxxxxxxxxxxxxxxxxxx Legal business disclaimers: http://www.CraneSoftwrights.com/legal
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] "Merging" space-before, Fredrik Bengtsson | Thread | |
| [xsl] "Merging" space-before, Fredrik Bengtsson | Date | [xsl] Software, Ginny Wagner |
| Month |