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
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Chris HolmesSubject: easy position ? by newbie
Author: Chris Holmes
Date: 15 Jan 2007 12:18 PM
I'm trying to create a table using for-each where a </tr> tag will be inserted after every third entry (and then the last entry) in the select list.

Is there a way to do test=position() div 3 = "a whole number" or am I barking up the wrong tree?

Thanks for any help on this.

Chris

Postnext
Ivan PedruzziSubject: easy position ? by newbie
Author: Ivan Pedruzzi
Date: 15 Jan 2007 12:33 PM

Use mod instead

<xsl:if test="position() mod 3 = 0">
<br/>
</xsl:if>


Ivan Pedruzzi
Stylus Studio Team

Posttop
Chris HolmesSubject: easy position ? by newbie
Author: Chris Holmes
Date: 15 Jan 2007 12:43 PM
Thanks, Ivan.

It works like a charm.

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
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.