MK> If you do
MK>
MK> <xsl:apply-templates select="section, ref, ack, app"/>
MK>
MK> then the sections will be processed in that order, and position() used
MK> within the relevant templates will give you consecutive numbering. Also
MK> count(section|ref|ack|app) will give you the right total.
MK>
DC> It's not clear why you need any if test at all, what's wrong with
DC>
DC> <xsl:apply-templates select="section,ref,ack,app"/>
DC>
DC> which will just convert those sections and the optional elements igf
DC> they are there and not if they are not?
DC>
DC> Also, i need to count Total num of pages. Is there any expr like
DC> Total pages = <xsl:value of select"count(//section) + if(ref) add 1 +
DC> if (ack) add 1 + if(app) add 1"/>
DC>
DC> select="count(//section,ref,ack,app)"
DC>
DC> or in xslt1
DC>
DC> select="count(//section|ref|ack|app)"
DC>
Sometimes I wonder if we should take turns, you do a week, then I do a
week:-)
David
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--