|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Manipulation of XSL attributes
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








