Subject: Re: Applying templates within a generated tag From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 29 Jul 1999 09:27:55 +0100 (BST) |
> 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Applying templates within a generat, Benjamin Corliss | Thread | Schedule for XML Developers' Confer, Jon Bosak |
CHILDREN PROBLEM, Marco . Mistroni | Date | CHILDREN PROBLEM/2, Marco . Mistroni |
Month |