xsl-list
[Top] [All Lists]

Incrementing position in the tree midstream (Part 2)

2004-04-15 10:36:30

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(_dot_)durston(_at_)smiths-aerospace(_dot_)com





******************************************
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.
******************************************


<Prev in Thread] Current Thread [Next in Thread>