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

iterating a nodeset (provided by XML or XSL) in a cust

Subject: 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)
gernot h ller
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

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.