This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Function position()




  <xsl:template match"Paragraph">
   <xsl:value-of select="Text"/>
   <xsl:apply-template  select="StretchText"/>
  </xsl:template>


That doesn't seem to match your tre ediagram that had multiple text and
stretchtext children of Paragraph.
The obove will give you th echaracters from (only) the first Text,
followed by the result of applying all the StretchTexts (even if they
came before the Text in the source).

Why not



  <xsl:template match"Paragraph">
   <xsl:apply-templates/>
  </xsl:template>

which will process both kinds of children in document order?


  <xsl:template match"StretchText">
   <xsl:value-of select="position()"/>        ---> THIS doesn't work in my case.
  </xsl:template>

use <xsl:number/> possibly with level="multiple" depending on exactly
what it is you are counting.

David



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]