Subject: Manipulation of XSL attributes From: "ciaran byrne" <ciaran.byrne@xxxxxxx> Date: Mon, 21 Aug 2000 12:59:35 +0100 |
Hi all, I'm having a problem with the manipulation of attribute values as follows.. Lets say I have an element <img src="x.bmp" alt="z.bmp" align="" hspace=""/> and a param in my XSL called $path, which for this example has the value "y.bmp" My desired output is: <img src="y.bmp" alt="z.bmp"/> As can be seen from above I've added in the $path and removed empty attribute values. The problem is I'm having no joy implementing this in my XSL. I was attempting to implement this by building up an attribute set such as: <xsl:attribute-set name="attributes"> <xsl:attribute name="src"><xsl:value-of select="$path"/></xsl:attribute> <xsl:if test="string(@alt)"> <xsl:attribute name="alt"><xsl:value-of select="@alt/></xsl:attribute> </xsl:if> </xsl:attribute-set> ....... <xsl:copy use-attribute-sets="attribute"> This gives me an error !! Any ideas anyone ??? XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Which XML parser gives the most, Thorbjørn Ravn Ander | Thread | Re: Manipulation of XSL attributes, David Allouche |
RE: Hiding the XSL ?, Ben Robb | Date | parametric xsl element values, Nuri Besen |
Month |