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

Re: Trouble using recursion to make a Counter

Subject: Re: Trouble using recursion to make a Counter
From: dave frette <gohabitat@xxxxxxxxx>
Date: Fri, 30 Jul 2004 09:17:34 -0700 (PDT)
make a counter
I agree with the others.  I think you should reconsider your data.
This probably isn't your real data, but if it is it seems odd to have 
level 2 description/id within a level 3 element.

            <Level3>
                  <Level2Desc>Condo</Level2Desc>
                  <Level2ID>1001</Level2ID>
            </Level3>

- Dave

--- greyson.smith@xxxxxxxxxxxxx wrote:

> 
> 
> 
> 
> Hello!  I've been struggling with something that seemed very simple when I
> first started looking at it, but has become frustrating.  I have hit the
> archives and google, yet have found nothing to spark my imagination.  All I
> need is to process my xml and for each node that I process increment and
> print a counter to the result file.
> 
> I have data that looks like this:
> 
> <level1>
>       <Level1Desc>Neighborhood</Level1Desc>
>       <Level1ID>1</Level1ID>
>       <Level2>
>             <Level2Desc>Street</Level2Desc>
>             <Level2ID>100</Level2ID>
>             <Level3>
>                   <Level2Desc>House</Level2Desc>
>                   <Level2ID>1000</Level2ID>
>             </Level3>
>             <Level3>
>                   <Level2Desc>Condo</Level2Desc>
>                   <Level2ID>1001</Level2ID>
>             </Level3>
>       </Level2>
>       <Level2>
>             <Level2Desc>Park</Level2Desc>
>             <Level2ID>101</Level2ID>
>       </Level2>
> </level1>
> 
> There are many level 1s in my data.
> 
> I have looked at using the position function, but it seems to be based on
> levels, so i was getting 1s 2s and 3s quite a bit.  I tried looking at
> recursion, but the examples I found were not nested.
> 
> I have been trying to use recursion samples that I found using this list
> which I shall not reprint, but can supply a copy if needed.
> 
> So the end result of the processing would look something like
> 
> 1 Neighborhood
> 2 Street
> 3 House
> 4 Condo
> 5 Park
> 
> Which is to say that every item that I do something with I need a unique
> sequential number.
> 
> Thank you.
> --
> "NOTICE:  The information contained in this electronic mail transmission is
> intended by Convergys Corporation for the use of the named individual or
> entity to which it is directed and may contain information that is
> privileged or otherwise confidential.  If you have received this electronic
> mail transmission in error, please delete it from your system without
> copying or forwarding it, and notify the sender of the error by reply email
> or by telephone (collect), so that the sender's address records can be
> corrected."
> 
> 



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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.