Subject: Re: [xsl] Incremental Numbering From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Tue, 09 May 2006 21:04:15 +0200 |
I've googled and searched the archives and from what I have understood (which is little), it seems that what I want to do may not be possible. Hopefully I have misunderstood and someone is able to help.
it constructs an xml file which is then passed for rendering together with the necessary xsl.
<if test="option1=1">
<options> <option1>1</option1> <option2>0</option2> <option3>1</option3> <option4>0</option4> </options>
<xsl:if test="option1=1"> <fo:table-row> <fo:table-cell> <fo:block>1</fo:block> </fo:table-cell> <fo:table-cell> <fo:block>1</fo:block> </fo:table-cell </fo:table-row> </xsl:if> <xsl:if test="option2=1"> <fo:table-row> <fo:table-cell> <fo:block> <xsl:value-of select="count(option1[.=1])+1"/> </fo:block> </fo:table-cell> <fo:table-cell> <fo:block>1</fo:block> </fo:table-cell </fo:table-row> </xsl:if> <xsl:if test="option3=1"> <fo:table-row> <fo:table-cell> <fo:block> <xsl:value-of select="count(option1[.=1]|option2[.=1])+1"/> </fo:block> </fo:table-cell> <fo:table-cell> <fo:block>1</fo:block> </fo:table-cell </fo:table-row> </xsl:if> <xsl:if test="option4=1"> <fo:table-row> <fo:table-cell> <fo:block> <xsl:value-of select="count(option1[.=1]|option2[.=1]| option3[.=1])+1"/> </fo:block> </fo:table-cell> <fo:table-cell> <fo:block>1</fo:block> </fo:table-cell </fo:table-row> </xsl:if>
This is obviously very rough and I appreciate there is no xsl:increment function, but it's something like this that I need.
Is there any way I can store and increment a value in this way?
I hope I've made myself clear. Apologies if not.
-- Registration open for XSLT/XSL-FO training: Wash.,DC 2006-06-12/16 Also for XSLT/XSL-FO training: Minneapolis, MN 2006-07-31/08-04 Also for XML/XSLT/XSL-FO training:Birmingham,England 2006-05-22/25 Also for XSLT/XSL-FO training: Copenhagen,Denmark 2006-05-08/11 World-wide on-site corporate, govt. & user group XML/XSL training. 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) Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Incremental Numbering, Jon Gorman | Thread | RE: [xsl] Incremental Numbering, Michael Kay |
Re: [xsl] Incremental Numbering, Jon Gorman | Date | RE: [xsl] Sequence of chars not wor, Nathan Young -X \(na |
Month |