On Friday 03 January 2003 01:00, you wrote: > In the example below the rectangle is filled with black instead of > limegreen. Is there a way to specify the fill color using a variable? ... > <xsl:variable name="color" select="limegreen"/> > <svg:svg height="400" width="400"> > <svg:rect style="fill:{$color}" height="50" width="100" />
If something wents wrong, run the transformation standalone and examine the resulting file. in this case, you'd have seen you probably generated <svg:rect style="fill:" height="50" width="100" /> (no color) The problem is here <xsl:variable name="color" select="limegreen"/> This assigns the node set of <limegreen> child elements to the variable, which is most probably empty, and not the string 'limegreen'. If you want to do the latter, use <xsl:variable name="color" select="'limegreen'"/> Read the XPath spec for details. J.Pietschmann --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]