[xsl] iterating a nodeset (provided by XML or XSL) in a custom template (image-chooser)

Subject: [xsl] iterating a nodeset (provided by XML or XSL) in a custom template (image-chooser)
From: Gernot Hueller <g.hueller@xxxxxx>
Date: Wed, 9 Apr 2003 11:41:56 +0200 (MEST)
Hello all,
I am looking for a template that iterates over a given set (of nodes
describing images) and picks a right one based on criteria (e.g. img width<display
width.... ;-) )
To make things trickier, I want to supply the images in a) the XML to
transform and b) the stylesheet itself.
Scenario: some images (and their meta-info) is provided in the XML (eg by a
third party), while other images (and their meta-info) are provided by me
myself, in the stylesheet (eg banners, headers, ...).

I have already tried an XSL something like this:
<xsl:template match="myfirstml">
<html><body><p>
<xsl:call-template name="header-image"/>
...
but with that code, the instructions from <xsl:template name="header-image">
were simply copied, not applied.

- does anyone have/know of "copy-paste" samples?

- in general, how can I _build_ a nodeset in an XSL template and pass it as
a parameter xsl:call-template? (and what's the best way to process that
nodeset?)

As for the image-chooser itself:
I'm not sure how work through a list of images. Should I pass a common
parent node and iterate the position? Can I pass the starting node and traverse
the following-sibling? any examples for that? (especially since I want to
create some of these inside the XSL itself)

Any snipplets/links appreciated,
thanks,
	Gernot

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!


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


Current Thread