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
lemon  manSubject: XSL , XPATH Every fourth article
Author: lemon man
Date: 06 Jan 2006 08:14 PM
How can i specify to find every fourth item starting from 1 usiong an xpath expreesion? I've been racking my brain for a few hours on this and can't seem to find out how to set the variable.

i was going to try using each individual case like this


[(position() = 1) or (position() = 5) or (position() = 7) or (position() = 9) etc etc .....

But i know there must be some way to expres this programatically.


Any help would be much appreciated.
Thanks for any help anyone can provide.

L

Posttop
Tony LavinioSubject: XSL , XPATH Every fourth article
Author: Tony Lavinio
Date: 06 Jan 2006 11:19 PM
Try [position() mod 4 = 1]

 
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.