XSL - FOP Incrementing A Number
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 1
- Joined: Fri Jul 13, 2007 7:16 pm
XSL - FOP Incrementing A Number
Post by alphamanic »
Hi Guys,
This is a newbie question.
I have an XSL which reads in some of value from xml using Document() function and some some <XSL:PARM>. I'm using <fo:block> to display the content in a block.
Simply what I want to do is create a counter that will increment for my each <FO:BLOCK>i.e.
<fo:block>
<display counter value>
<xsl:valueOf select="$param1"/>
</fo:block>
<fo:block>
<display counter value>
<xsl:valueOf select="document(somexml.xml)/note1"/>
</fo:block>
etc.
Please help? - I've tried the below code but it doesn't work:
<xsl:parm name="counter" select="1"/>
<some template>
<fo:block>
<xsl:with-parm name="counter" select="$counter + 1"/>
<xsl:valueOf select="$counter"/> - this return 1 instead of 2
</some template>
This is a newbie question.
I have an XSL which reads in some of value from xml using Document() function and some some <XSL:PARM>. I'm using <fo:block> to display the content in a block.
Simply what I want to do is create a counter that will increment for my each <FO:BLOCK>i.e.
<fo:block>
<display counter value>
<xsl:valueOf select="$param1"/>
</fo:block>
<fo:block>
<display counter value>
<xsl:valueOf select="document(somexml.xml)/note1"/>
</fo:block>
etc.
Please help? - I've tried the below code but it doesn't work:
<xsl:parm name="counter" select="1"/>
<some template>
<fo:block>
<xsl:with-parm name="counter" select="$counter + 1"/>
<xsl:valueOf select="$counter"/> - this return 1 instead of 2
</some template>
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service