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

RE: recursive problem with full path and position info

Subject: RE: recursive problem with full path and position info
From: Robert Seber <robert.seber@xxxxxxxxxxxxxxxxxx>
Date: Mon, 30 Apr 2001 10:12:31 +0100
full path recursive functions
I'm not sure if it is efficient, but I came up with an alternative to
recursion using:

ancestor-or-self::*

see:

http://www.vbxml.com/snippetcentral/main.asp?view=viewsnippet&lang=xsl&id=v2
0010412100647


> -----Original Message-----
> From: Dan Diebolt [mailto:dandiebolt@xxxxxxxxx]
> Sent: Sunday, April 29, 2001 4:01 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  recursive problem with full path and position info
> 
> 
> Given this XML:
> 
> <root>
>   <a>
>     <b>1</b>
>     <b>2</b>
>   </a>
>   <a>
>     <b>3</b>
>     <b>4</b>
>   </a>
> </root>
> 
> I need to synthesize the following text output file:
> 
> root(1).a(1).b(1)='1'
> root(1).a(1).b(2)='2'
> root(1).a(2).b(1)='3'
> root(1).a(2).b(2)='4'
> 
> How would you approach this problem? I do not know *any* of the tag
> names ahead of time. I have an approach that works which matches
> on the leaf nodes with child::*[not(child::*)] and crawls up, but
> it is very slow and I don't think it is the correct approach. I 
> think I need a strategy that matches from the top and decends.
> Thanks in advance.
> 
> Regards,
> 
> Dan
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.