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

Re: Iterate through tree structure

Subject: Re: Iterate through tree structure
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 31 Mar 2009 13:57:16 -0400
Re:  Iterate through tree structure
At 01:20 PM 3/31/2009, you wrote:
LOL.  Thank you so much!  That was embarasingly easy once you pointed
out that I should match against the element.  So all I needed was
this...

Cool.


It's slightly different to your approach where you suggested
<xsl:apply-templates mode="list-dir"
select="parent::dir/ancestor::dir"/>.  Could you tell me what this
does?

Well, applying templates is no different than using for-each, except instead of working with nodes directly, you are selecting them to be matched by templates (which can then be used to differentiate processing according to the types of elements, etc.). Selecting "parent::dir/ancestor::dir" is using XPath to select a set of 'dir' element ancestors, specifically excluding the parent 'dir' element. This was just a guess on my part, that those were the elements representing values you wanted listed (values that would have been generated by the templates then matched).


Cheers,
Wendell



======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================

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.