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

Incrementing position in the tree midstream (Part 2)

Subject: Incrementing position in the tree midstream (Part 2)
From: "Durston, Andrew (AGRE)" <andrew.durston@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 Apr 2004 11:36:30 -0600
move position xsl
Hi again,

Thanks again for your help w the first question. I realized I mistated how I want to move about the trees.
I want to build a table from the following --

/test-plan/object (instance N)/cell
/test-plan/object (instance N+1)/cell
/test-plan/object (instance N+2)/cell
/test-plan/object (instance N+3)/cell

The cell to be placed in each table position is the same XML name. For each "object" in "test-plan", there is one field which tells me whether I am in a table or not ("tabletype" with values either TableNone or TableCell). A second field, "objecttext" has a unique text string fragment which can tell me what cell I am at in the table (from ".0-1.0-1.0-1" for cell 1,1 to  ".0-1.0-x.0-y" where x is number of rows and y is number of columns, filled in by the program which generates the XML).

In short, what I am looking to do is --

For everything in test-plan
	If tabletype is TableNone
		output objectext within <p></p>
	if tabletype is TableCell
		if objecttext contains .0-1.0-1.0-1 (the beginning of a table)
			generate the table (I gather by counting text occurances of the 1st row ( .0-1.0-1. ) then outputing groups in mod row length)
end-for

I am basically getting confused in how to count the occurances down the chain of siblings (all objecttexts under all objects under test-plan).

Thanks again,
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.