|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: randlist followed by randlist with different inden
At 2003-12-29 15:23 -0500, Norma Yeazell wrote:
I have 3 randlist in a row within a paragraph, the first should be at left the next two indented diffently. Can anyone give me a clue how to get this accomplished? This turns out to be simpler than originally thought. Provided your subordinate display relationship is based on a sibling source relationship, you can take advantage of XSL-FO's support of expressions as follows: <xsl:template match="randlist">
<list-block start-indent="{count(preceding-sibling::randlist)} * 7mm">
<xsl:apply-templates/>
</list-block>
</xsl:template><xsl:template match="item">
<list-item provisional-distance-between-starts="1cm">
<list-item-label end-indent="label-end()">
<block>1</block>
</list-item-label>
<list-item-body start-indent="body-start()">
<block><xsl:apply-templates/></block>
</list-item-body>
</list-item>
</xsl:template>In the above you are indenting 7mm for each list after the first list by counting the number of preceding sibling randlist elements and multiplying that count by 7mm. I hope this helps. ................................ Ken -- North America (Washington, DC): 3-day XSLT/2-day XSL-FO 2004-02-09 Instructor-led on-site corporate, government & user group training for XSLT and XSL-FO world-wide: please contact us for the details G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) ISBN 0-13-065196-6 Definitive XSLT and XPath ISBN 0-13-140374-5 Definitive XSL-FO ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath ISBN 1-894049-11-X Practical Formatting Using XSL-FO Member of the XML Guild of Practitioners: http://XMLGuild.info Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








