Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Page break after each record but not on the last one
Message
From
24/06/2006 22:09:24
 
 
To
All
General information
Forum:
ASP.NET
Category:
XML
Title:
Page break after each record but not on the last one
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01131460
Message ID:
01131460
Views:
103
I have the following XML which inserts a Word page break after each address in order to have a new enveloppe for each record:
          <xsl:for-each select="NewDataSet/Temp">                    
            <w:p>
              <w:r>
                <w:t><xsl:value-of select="moreinfo" /></w:t>
              </w:r>
            </w:p>                        
            <w:p>
              <w:r>
                <w:t><xsl:value-of select="normalize-space(firstname)" /> <xsl:value-of select="lastname" /></w:t>
              </w:r>
            </w:p>                        
            <w:p>
              <w:r>
                <w:t><xsl:value-of select="address" /></w:t>
              </w:r>
            </w:p>                        

            <xsl:if test="address2[normalize-space(.) != '']">
              <w:p>
                <w:r>
                  <w:t><xsl:value-of select="address2" /></w:t>
                </w:r>
              </w:p>                        
            </xsl:if>

            <w:p>
              <w:r>
                <w:t><xsl:value-of select="normalize-space(city)" />, <xsl:value-of select="province" /></w:t>
              </w:r>
            </w:p>                        
            <w:p>
              <w:r>
                <w:t><xsl:value-of select="code" /></w:t>
              </w:r>
            </w:p>                        
            <w:p>
              <w:r>
                <w:t><xsl:value-of select="country" /></w:t>
              </w:r>
            </w:p>                        
            <w:br w:type="page" />
          </xsl:for-each>   
But, this creates an empty page on the last page. How can I check to avoid inserting the page break if this is the last record?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform