2211RE: [XSL-FO] XSL:FO Numbered lists
- Sep 23, 2002Hi Sandra,
Try <xsl:value-of select="count(preceding-sibling::step) + 1"/>
That's what we use!
Hope it helps,
From: Sandra Mcdonnell [mailto:smcdonnell@...]
Sent: 23 September 2002 14:53
Subject: Re: [XSL-FO] XSL:FO Numbered lists
Thanks for the help, though I gotta say, I can't make your solution work
at all. I didn't even get my number 1s on everything. ;-)
What I am trying to get is output that appears as follows:
etc etc. So I want the position of the Step element relative to the
NumListItems in which is resides.
My XML appears as follows:
<StepContinue> Step continue text </StepContinue>
<Step> Step 2 </Step>
<StepContinue> text </StepContinue>
I can make my XSL generate my X-FO, and then render to PDF, but I can't
make the count for the steps work out.
Hope this clarifies my problem and that you have an excellent answer! I
appreciate all your time!!!
G. Ken Holman wrote:
>At 2002-09-20 16:44 -0400, Sandra Mcdonnell wrote:<http://www.CraneSoftwrights.com/f/>
>>problem is that every item is number 1.
>> <Step>Do numbered lists work? </Step>
>> <StepContinue>Let's try to see if we can add a continued
>>explanation to our numbered step.</StepContinue>
>> <Step>Second Numbered Item</Step>
>> <StepContinue>And its Continuing explanation...</StepContinue>
>> <xsl:for-each select="NumListItem">
>> <fo:block margin-left=".25in" font-size="10">
>> <xsl:for-each select="Step [position()]">
>> <xsl:number format="1."/>
>Note that Step[position()] is equivalent to Step.
>You don't give a lot of detail for what you need but if you just want to be
>counting NuMListItem constructs, then use:
> <xsl:number format="1." count="NumListItem"/>
><xsl:number> will look up the ancestry (starting at the current node)
>looking for what is being counted, and then only does the counting once
>something being counted is found.
>I'm afraid I cannot figure out from the remainder of your code what you are
>trying to do with your Step and StepContinue constructs, but hopefully the
>above will get you your incrementing list item numbers.
>Upcoming hands-on in-depth Europe: Sep 18-Sep 20,2002
>XSLT/XPath and XSL-FO North America: Sep 30-Oct 4,2002
>G. Ken Holman mailto:gkholman@...
>Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
>Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)<http://docs.yahoo.com/info/terms/>
>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-10-1 Practical Formatting Using XSL-FO
>Next public training: 2002-09-18,19,30,10-03,12-08,2003-03-04,07
>To unsubscribe from this group, send an email to:
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>[Non-text portions of this message have been removed]
Yahoo! Groups Sponsor
To unsubscribe from this group, send an email to:
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
[Non-text portions of this message have been removed]
- << Previous post in topic Next post in topic >>