[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Newbie question: Incrementing the position in the

Subject: RE: Newbie question: Incrementing the position in the tree midstream
From: "Kenny Akridge" <kenny@xxxxxxxxxxxxxxxxx>
Date: Mon, 12 Apr 2004 15:56:46 -0400
position newbie
Sorry, I'm short for time, but another thought:

If you have the same amount of cells for every row, you could just do a
position() mod numberOfCells = 0 triggers a closing and opening tr element.

for-each
if test="position() mod 4 = 0
	<tr/>
process cells normally
end for-each

I hope I have understood your dilemma correctly.



-----Original Message-----
From: Kenny Akridge [mailto:kenny@xxxxxxxxxxxxxxxxx] 
Sent: Monday, April 12, 2004 3:48 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Newbie question: Incrementing the position in the tree
midstream

It sounds like you might want to do some recursion and pass in N recursively
to the template.  Then you could access cell[n], cell[n+1]... 

Just one idea.  There are a lot of approaches to this one.

-----Original Message-----
From: Durston, Andrew (AGRE) [mailto:andrew.durston@xxxxxxxxxxxxxxxxxxxx] 
Sent: Monday, April 12, 2004 3:42 PM
To: Xsl-List (E-mail)
Subject:  Newbie question: Incrementing the position in the tree
midstream


Hi all,

Just getting started with XSL and all and had a question about whether you
can change positions in the tree midstream.
I have a set of XML outputs from a database which splits a table into
individual cells -

test-plan/object/cell N
test-plan/object/cell N+1
test-plan/object/cell N+2
test-plan/object/cell N+3

I can search to find cell N. I'd like to be able to print cell N, cell N+1,
cell N+2 ... all at once and then when XSL goes back
to searching (via a For) through the tree, it skips N+1, N+2 etc. (basically
does a table row and then skips to the beginning of
the next row). Without entering another XML attribute into our DB to
indicate beginning and end of rows... How do I increment
the position, moving from object/cell N to object/cell N+1 midstream?

Thanks in advance,
Andrew

Andrew C. Durston
Smiths Aerospace
Electronic Systems - Grand Rapids
616.241.8715
andrew.durston@xxxxxxxxxxxxxxxxxxxx



******************************************
The information contained in, or attached to, this e-mail, may contain
confidential information and is intended solely for the use of the
individual or entity to whom they are addressed and may be subject to legal
privilege.  If you have received this e-mail in error you should notify the
sender immediately by reply e-mail, delete the message from your system and
notify your system manager.  Please do not copy it for any purpose, or
disclose its contents to any other person.  The views or opinions presented
in this e-mail are solely those of the author and do not necessarily
represent those of the company.  The recipient should check this e-mail and
any attachments for the presence of viruses.  The company accepts no
liability for any damage caused, directly or indirectly, by any virus
transmitted in this email.
******************************************

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.