Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Iterate through tree structure

From: Wendell Piez <wapiez@------------.--->
To: xsl-list@-----.------------.---
Date: 3/31/2009 6:05:00 PM
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@m...
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
======================================================================


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@l...>
--~--



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent