XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
- XSLT Help and Discussion (7625)
-> - XSL-fo and how to line feed th... (1)
-> + Houston we have a problem (2)
-> + XSL-FO PDF generation (2)
-> + StylusStudio - pick XSLT 1.0 b... (6)
-> - Stylus Studio 2010 debugging f... (1)
-> - Drop down menu List / Option M... (1)
-> - XML transformation using Java ... (1)
-> + i can't to find XSLT editor in... (2)
-> - Copy xml input as value of an ... (1)
-> - Remove Name space from the Tab... (1)
-> - CGI formatted URL with name/va... (1)
-> - Problem with counting (1)
-> + for-each loop is only returnin... (3)
-> - sort date but some dates may b... (1)
-> - Entity Conversion (1)
-> - How can I build an xml convert... (1)
-> + Little Help (2)
-> + how do I merge nodes to one sc... (2)
-> - beginner help xslt and xpath (1)
-> - Convert XML Feed to CSV/SQL/XL... (1)
-> - Working with text node. (1)
-> - No Topic (1)
-> - API for XSLT Converter for .NE... (1)
-> - Getting started (1)
-> + saxon sql extensions - mysql a... (2)
-> - How do I copy and create new e... (1)
-> + substring-before and sums (3)
-> + Parsing special characters in ... (2)
-> + Schema - Require attribute in ... (2)
-> - Edit existing XSL files when n... (1)
-> + How can I use one single XSLT ... (2)
-> - Default selection of value in ... (1)
-> - Problem with watermark in pdf ... (1)
-> + XSLT Parameter Values dialog n... (3)
-> + Value of File Name is not acce... (10)
-> - Need help with a complex table... (1)
-> - How to replace all nordic char... (1)
-> - XSLT java heap space error wit... (1)
-> - Table Overflow to next page (1)
-> - Using XSLT 2.0 to define custo... (1)
-> - "standalone" attribute and xs... (1)
-> + Standardizing IP addresses (2)
-> + Programmatically changing page... (6)
-> + Can Stylus generate XSLT if so... (5)
-> + Extraction based on NODE Name. (2)
-> + NO XSLT:WYSIWYG (2)
-> + determine condition at run tim... (2)
-> - How to reduce top margin in ev... (1)
-> + need help on xsl looping (4)
-> - Convert Symbol to Element (1)
-> + Separator -only- between field... (3)
-> + DocBook (9)
-> + First Occurance of Alphabet (2)
-> + XSL:Key and Document (2)
-> + Excel Macro using XSLT (2)
-> + Add missing element and attrib... (2)
-> + XSL: Stop Count at First Match (2)
-> + XSD to EDI (4)
-> + How to access data from nested... (2)
-> + Simple division of XML file (2)
-> - XML to Flat File (1)
-> + Dispalying data whith xsl:for ... (3)
-> - distinct nodes - into 3 column... (1)
-> + Newbie at XML (2)
-> + XSL Not Working (3)
-> + to draw table using xsl (2)
-> + Base64 decoder (5)
-> + How to create a hidden sheet u... (3)
-> + XML Reports (2)
-> + Copying image files from one d... (2)
-> + XML conversion to RSS (2)
-> + Inserting Image (2)
-> + Xml to Pdf using Xsl (2)
-> + Using a parameter (or similar)... (2)
-> + How to avoid creating empty xm... (2)
-> + how to read txt files in xml (2)
-> - Limit records to 4 per page. P... (4)
-> ->Limit records to 4 per pa...
-> ->Limit records to 4 per pa...
-> ->Limit records to 4 per pa...
-> + XSLT Mapping Based on JDK5 (2)
-> + XML Mappin (2)
-> + Format Datetime with xslt (3)
-> + Cell border missing (2)
-> + XSL: Key (not matches) (5)
-> + Loop through each char in stri... (2)
-> + What is the best way to sum va... (3)
-> + xslt sort help (2)
-> + getting the count (2)
-> + XSL dynamic variables (5)
-> + XSL:Key use (3)
-> + Help With Updating Attributes ... (8)
-> + GETTING COUNT AND POSITION usi... (3)
-> - Hi Everyone !! (1)
-> + Graph Traversal (Keep track of... (2)
-> + XSL IF with sum (2)
-> + Param not incrementing (2)
-> + Iterating through value tags (3)
-> + URGENT :::: Remove the name sp... (2)
-> + Pass new param values to ASP O... (2)
-> + Detect Browser Version in XSL (2)
-> + xslt result-document (2)
-> + Unique nodes based on two attr... (3)
-- Previous [181-200] [201-220] [221-240] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Sonika ColasoSubject: Limit records to 4 per page. Please help!
Author: Sonika Colaso
Date: 01 Sep 2009 10:42 AM
Originally Posted: 01 Sep 2009 10:41 AM
Hello. I am hoping someone can help me with this. Each record (COLORWAY_NAME) prints as a column on my report. I want to restrict it to 4 columns on a page & start a new page for the next four and so on. I am not sure if its the postition() or the mod or the count function I need to use. PLESE ADVISE on which one and HOW to use it. Appreciate any help. Here is a snippet of the XML & XSL code after it. The for-each statement below doesn't work. In the XML below, I want a new page starting for GREEN (after 4 colors). THANKS!

<!-- XML SNIPPET -->

<colorways color_no = "6" colorway_name = "FIELD KHAKI" status = "Y"> </colorways>
<colorways color_no = "12" colorway_name = "CERAMIC GREY" status = "Y"> </colorways>
<colorways color_no = "3" colorway_name = "BLUE" status = "Y"> </colorways>
<colorways color_no = "5" colorway_name = "RED" status = "Y"> </colorways>
<colorways color_no = "7" colorway_name = "GREEN" status = "Y"> </colorways>


<!-- XSL SNIPPET -->

<!--DEFINE PAGE -->

<fo:simple-page-master margin-right="0.5in" margin-left="0.5in" margin-bottom="0.25in" margin-top="0.25in" page-width="11.0in" page-height="8.5in" master-name="standard3">
<fo:region-before extent="0.5in"/>
<fo:region-body margin-top="0.5in" margin-bottom="0.25in"/>
<fo:region-after extent="0.25in"/>
</fo:simple-page-master>

<!-- REPEAT PAGE for > 4 Colorways -->

<xsl:for-each select="//colorways/count(@colorway_name)>3]">
<fo:page-sequence master-reference="standard3">
<fo:static-content flow-name="xsl-region-before">
<fo:table table-layout="fixed">
.
.
.
.
</xsl:for-each>

Postnext
(Deleted User) Subject: Limit records to 4 per page. Please help!
Author: (Deleted User)
Date: 02 Sep 2009 12:43 PM
Hi Sonika,
you should write

<xsl:for-each select="//colorways">

and then add a

<xsl:if test="position() mod 4 = 0">
<fo:block break-after='page'/>
</xsl:if>

Alberto

Postnext
Sonika ColasoSubject: Limit records to 4 per page. Please help!
Author: Sonika Colaso
Date: 08 Sep 2009 10:25 AM
Thanks Alberto! I'm struggling with where in my code can I add yours. Can't seem to get it to work. Will uploading my entire XSL help? Thanks again!

Posttop
Sonika ColasoSubject: Limit records to 4 per page. Please help!
Author: Sonika Colaso
Date: 08 Sep 2009 10:35 AM
Thanks Alberto! I'm struggling with where in my code can I add yours. Can't seem to get it to work. Will uploading my entire XSL help? Thanks again!

   
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.