Loading ...
Sorry, an error occurred while loading the content.

2209Re: [XSL-FO] XSL:FO Numbered lists

Expand Messages
  • G. Ken Holman
    Sep 21, 2002
    • 0 Attachment
      At 2002-09-20 16:44 -0400, Sandra Mcdonnell wrote:
      >The
      >problem is that every item is number 1.
      >...
      > <NumList>
      > <NumListItem>
      > <Step>Do numbered lists work? </Step>
      > <StepContinue>Let's try to see if we can add a continued
      >explanation to our numbered step.</StepContinue>
      > </NumListItem>
      > <NumListItem>
      > <Step>Second Numbered Item</Step>
      > <StepContinue>And its Continuing explanation...</StepContinue>
      > </NumListItem>
      > </NumList>
      >...
      > <xsl:for-each select="NumListItem">
      >
      > <fo:list-item>
      > <fo:list-item-label>
      > <fo:block margin-left=".25in" font-size="10">
      > <xsl:for-each select="Step [position()]">
      > <xsl:number format="1."/>
      > </xsl:for-each>
      > </fo:block>
      > </fo:list-item-label>

      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.

      ................ Ken


      --
      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)
      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
    • Show all 7 messages in this topic