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

Re: Applying templates within a generated tag

Subject: Re: Applying templates within a generated tag
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 29 Jul 1999 09:27:55 +0100 (BST)
of templates within a company
> As you can see, there are two data lists contained within the
> complicated SRC attribute.  My initial implementation plan was to build these
> lists with an <xsl:for-each>.  However, I have found no easy way to do this.

I am not sure what you want your source input to look like.
However some general hints, if you have a string variable called x
then you can add ", 10.7" to the end of the string with

<xsl:.... name="x" select="concat($x$,', 10.7')"/>

xsl:....  could be xsl:variable, but probably won't be as the scoping
rules for variables probably mean that this doesn't do what you want.

most likely you want to make a named template that builds up the string
and then loop via _recursion_ so the old value of the string is still in
scope when you add the new bit to the end.

so something like
<xsl:call-template name="foo">
<xsl:with-param name="x" select="concat($x$,', 10.7')"/>
</xsl:call-template>

where the tempate called foo finds the next bit of data from your input
tree, then in an xsl:choose either makes the <IMG output if the thing is
finished, or recursively calls itself as above to build up the next part
of the string.

David


 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.