Re: [xsl] Descendant::??

Subject: Re: [xsl] Descendant::??
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 22 Apr 2008 21:16:06 +0100
The version i posted using apply-templates woul dnaturally have dealt
with nested categories to arbitrary depth, even though you said you
didn't need that initially. The paths to some of teh fields probably
needed some small tweaks but that should have been easy to fix.

Using for-each here you limit yourself to just two levels.

      <a href="{descendant::link}">
       <img src="{descendant::image}"/>


If there are nested categories (or even if there are not) it seems
likely that descentant axis here may pick up more than one link or inage
element. While you are using xslt1 all but teh first will be silently
discarded (which may be what you want) but if you switch to xslt2 you
will get all the link values, spae speparated so neither  the link nor
the image will work.


David

Current Thread