This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Constructing X number of elements
- To: "xsl mulberry" <XSL-List at lists dot mulberrytech dot com>
- Subject: [xsl] Constructing X number of elements
- From: "Ilkka Hartikainen" <ilkka dot hartikainen at netrophysolutions dot fi>
- Date: Tue, 21 Aug 2001 16:26:58 +0300
- Reply-To: xsl-list at lists dot mulberrytech dot com
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