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

Constructing X number of elements

Subject: Constructing X number of elements
From: "Ilkka Hartikainen" <ilkka.hartikainen@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 21 Aug 2001 16:26:58 +0300
ilkka hartikainen
Hi!

How can I produce X number of elements in XSLT, where X is defined in an
attribute of an element in the source XML file?

For example (this isn't rally what I'm doing), I have this in the XML:

<movie name="Alien" rating="3"/>

And I'd like to produce as many stars as in the rating, like:

<div>
   <img src="star.gif" alt=""/>
   <img src="star.gif" alt=""/>
   <img src="star.gif" alt=""/>
</div>

I suppose I can't do this with the for-each-construct. Please help, there
has to be a way for doing this! :)
If someone knows how to do this with Java and Xalan extension elements, it
helps too. I just don't see how I could do this, because you can't actually
"move" backwards in XSLT via Java extensions. If you have a solution, please
help.

Kind regards,
Ilkka Hartikainen



 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.